/* 现代科技风格菜单和搜索组件 */

.modemenu {
  height: auto;
  margin-top:120px;
  min-height: 60px;
  overflow: visible;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  position: relative;
  perspective: 1000px;
}

.modemenu::before {
  content: '';
  position: absolute;
  top: 30;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 162, 255, 0.1), transparent);
  z-index: -1;
}

.modemenu li {
  float: none;
  height: auto;
  background: transparent;
  position: relative;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
}

.modemenu li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  opacity: 0;
  border-radius: 8px;
  transition: all 0.3s ease;
  z-index: -1;
}

.modemenu li:hover {
  transform: translateY(-3px);
}

.modemenu li:hover::before {
  opacity: 0.1;
}

.modemenu li span {
  display: block;
  height: auto;
  padding: 0.75rem 1.5rem;
  float: none;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modemenu li span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-bg);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.modemenu li span a {
  display: block;
  padding: 0;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.modemenu li span a:hover, .modemenu li span a.ck {
  background: transparent;
  color: var(--primary-color);
  text-decoration: none;
}

.modemenu li span a.ck {
  color: var(--primary-color);
  text-shadow: 0 0 5px rgba(0, 242, 255, 0.5);
}

.modemenu li span a.ck::before {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-color);
}

.modemenu li:hover span::after {
  width: 70%;
}

.modemenu li.li0 span, 
.modemenu li.li1 span, 
.modemenu li.li2 span, 
.modemenu li.li3 span, 
.modemenu li.li4 span, 
.modemenu li.li5 span {
  background: transparent;
  padding-left: 1.5rem;
  position: relative;
}

.modemenu li.li0 span::before,
.modemenu li.li1 span::before,
.modemenu li.li2 span::before,
.modemenu li.li3 span::before,
.modemenu li.li4 span::before,
.modemenu li.li5 span::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background: var(--gradient-bg);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  transition: all 0.3s ease;
}

.modemenu li.li0 span::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E"); }
.modemenu li.li1 span::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z'/%3E%3C/svg%3E"); }
.modemenu li.li2 span::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.41 8-8 8z'/%3E%3C/svg%3E"); }
.modemenu li.li3 span::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.41 8-8 8z'/%3E%3C/svg%3E"); }
.modemenu li.li4 span::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.41 8-8 8z'/%3E%3C/svg%3E"); }
.modemenu li.li5 span::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.41 8-8 8z'/%3E%3C/svg%3E"); }

.modemenu li:hover span::before {
  transform: translateY(-50%) scale(1.2);
}

/* 响应式设计 - 菜单 */
@media screen and (max-width: 768px) {
  .modemenu {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modemenu li {
    margin: 0.25rem 0;
    width: 100%;
  }
  
  .modemenu li span {
    padding: 1rem 1.5rem 1rem 3rem;
  }
  
  .modemenu li span::before {
    left: 1rem;
  }
}

/* 搜索框样式 */
.modeSearch {
  height: auto;
  margin: 1.5rem auto;
  background: transparent;
  width:100%;
  z-index: 100;
  color: var(--text-secondary);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
  border: var(--neon-border);
  transition: all 0.3s ease;
}

.modeSearch:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-effect);
}

.modeSearch .showtype {
  width: auto;
  min-width: 120px;
  float:left;
  height: auto;
  background: transparent;
  position: relative;
  cursor: pointer;
  order: 1;
  flex: 0 0 auto;
}

.modeSearch .showtype span {
  display: block;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  height: auto;
  line-height: 1.5;
  overflow: hidden;
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-radius: 8px;
  background: var(--light-bg);
  position: relative;
  transition: all 0.3s ease;
}

.modeSearch .showtype span::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-secondary);
  transition: all 0.3s ease;
}

.modeSearch .showtype:hover span {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 162, 255, 0.2);
}

.modeSearch .showtype:hover span::after {
  border-top-color: var(--primary-color);
}

.modeSearch .listtype {
  width: 100%;
  position: absolute;
  left: 0;
  top: 100%;
  background: var(--light-bg);
  border-radius: 0 0 8px 8px;
  padding: 0;
  margin-top: 0.25rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-top: none;
}

.modeSearch:hover .listtype {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.modeSearch .listtype li {
  background: transparent;
  padding: 0;
  transition: all 0.3s ease;
}

.modeSearch .listtype li:hover {
  background: rgba(0, 162, 255, 0.05);
}

.modeSearch .listtype li span {
  display: block;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  height: auto;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.modeSearch .listtype li span.over {
  background: rgba(0, 162, 255, 0.1);
  font-weight: 600;
  color: var(--primary-color);
}

.modeSearch .listtype li span.ck {
  font-weight: 600;
  color: var(--primary-color);
  position: relative;
}

.modeSearch .listtype li span.ck::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--primary-color);
}

.modeSearch .keyword {
  width: 70%;
  float:left;
  height: auto;
  position: relative;
  background: transparent;
  order: 2;
}

.modeSearch .keyword input {
  width: 100%;
  height: auto;
  padding: 0.75rem 1rem;
  line-height: 1.5;
  background: var(--light-bg);
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.modeSearch .keyword input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 162, 255, 0.2);
}

.modeSearch .keyword input::placeholder {
  color: var(--text-secondary);
}

.modeSearch .submits {
  width: auto;
  height: auto;
  position: relative;
  top: auto;
  left: auto;
  order: 3;
  flex: 0 0 auto;
}

.modeSearch .submits input {
  border: none;
  background: var(--gradient-bg);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 162, 255, 0.3);
}

.modeSearch .submits input:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 162, 255, 0.4);
}

/* 响应式设计 - 搜索框 */
@media screen and (max-width: 768px) {
  .modeSearch {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modeSearch .showtype {
    width: 100%;
  }
  
  .modeSearch .keyword {
    width: 100%;
  }
  
  .modeSearch .submits {
    width: 100%;
  }
  
  .modeSearch .submits input {
    width: 100%;
  }
}

/* 动画效果 */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 162, 255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 162, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 162, 255, 0); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* 3D效果增强 */
.menu-3d-effect {
  transform: perspective(1000px) rotateX(5deg);
  transition: transform 0.5s ease;
}

.menu-3d-effect:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-5px);
}

/* 焦点样式 */
.modeSearch input:focus,
.modeSearch .showtype:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .modemenu li span a {
    font-weight: 700;
  }
  
  .modeSearch {
    border: 2px solid var(--primary-color);
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .modemenu li,
  .modemenu li span,
  .modemenu li span a,
  .modeSearch,
  .modeSearch .showtype span,
  .modeSearch .listtype,
  .modeSearch .keyword input,
  .modeSearch .submits input {
    transition: none;
  }
  
  .modemenu li:hover {
    transform: none;
  }
  
  .modeSearch:hover {
    transform: none;
  }
}

/* 黑暗模式支持 */
@media (prefers-color-scheme: dark) {
  .modemenu::before {
    background: linear-gradient(90deg, transparent, rgba(0, 162, 255, 0.2), transparent);
  }
  
  .modemenu li span a {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .modeSearch {
    background: rgba(26, 32, 54, 0.85);
  }
  
  .modeSearch .showtype span,
  .modeSearch .keyword input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 162, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
  }
  
  .modeSearch .listtype {
    background: rgba(26, 32, 54, 0.95);
    border-color: rgba(0, 162, 255, 0.3);
  }
  
  .modeSearch .listtype li span {
    color: rgba(255, 255, 255, 0.9);
  }
}