/* ======================
   【电脑端】100%保留所有原版动画、三列布局、特效（完全未改动）
====================== */
.nav-dropdown {
  position: relative;
  list-style: none;
}
.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.dropdown-grid-menu {
  position: absolute;
  top: 150%;
  left: 50%;
  min-width: 480px;
  background: #000000;
  border: 1px solid #165dff;
  border-radius: 12px;
  padding: 20px 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(22, 93, 255, 0.15), 0 4px 12px rgba(0,0,0,0.2);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  transform: translate(-50%, 10px) scale(0.95);
  transform-origin: center top;
}
.nav-dropdown:hover .dropdown-grid-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 6px) scale(1);
}
.dropdown-line {
  display: none;
}
.dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
}
.dropdown-col:nth-child(1) .dropdown-item:nth-child(1) { transition-delay: 0.05s; }
.dropdown-col:nth-child(1) .dropdown-item:nth-child(2) { transition-delay: 0.15s; }
.dropdown-col:nth-child(2) .dropdown-item:nth-child(1) { transition-delay: 0.25s; }
.dropdown-col:nth-child(2) .dropdown-item:nth-child(2) { transition-delay: 0.35s; }
.dropdown-col:nth-child(3) .dropdown-item:nth-child(1) { transition-delay: 0.45s; }
.dropdown-col:nth-child(3) .dropdown-item:nth-child(2) { transition-delay: 0.55s; }
.nav-dropdown:hover .dropdown-item {
  opacity: 1;
  transform: translateY(0);
}
.menu-icon {
  display: none !important;
}
.dropdown-item:hover {
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.12);
}
.dropdown-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(22, 93, 255, 0.15), transparent);
  transition: left 0.4s ease;
}
.dropdown-item:hover::after {
  left: 100%;
}
.dropdown-grid-menu::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #000;
  border-top: 1px solid #165dff;
  border-right: 1px solid #165dff;
  transform: translateX(-50%) rotate(-45deg);
  transition: all 0.4s ease;
}
.dropdown-menu {
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* ======================
   【移动端】终极强制重写（100%覆盖所有冲突样式，根治所有BUG）
   核心：强制丢弃所有PC端嵌套规则，全局强制两列、无溢出、无错位
====================== */
@media (max-width:900px) {
  .pc-btn {
    display: none;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 14, 23, 0.98);
    flex-direction: column;
    padding: 20px;
    margin: 0;
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    box-sizing: border-box;
  }
  .nav-menu.active {
    display: flex;
  }

  .nav-menu > li {
    width: 100%;
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
    border: none;
    display: block;
    box-sizing: border-box;
  }

  .nav-menu > li > a {
    display: flex;
    width: 100%;
    text-align: center;
    padding: 14px 0;
    font-size: 16px;
    background: rgba(255,255,255,0.03);
    color: var(--text);
    border-radius: 8px;
    margin: 0;
    justify-content: center;
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease;
  }

  .nav-dropdown.active > a {
    background: rgba(22, 93, 255, 0.08);
    color: #165dff;
  }

  .nav-dropdown {
    width: 100%;
    box-sizing: border-box;
  }

  /* 强制覆盖所有原有样式，最高优先级 */
  .dropdown-grid-menu {
    all: unset !important;
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 12px 0 0 !important;
    padding: 16px !important;
    background: #000 !important;
    border: 1px solid #165dff !important;
    border-radius: 10px !important;
    /* 绝对标准两列布局 */
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    /* 收起状态 */
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
  }

  .nav-dropdown.active .dropdown-grid-menu {
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* 彻底废除col容器所有功能，杜绝结构冲突 */
  .dropdown-col {
    all: unset !important;
    display: contents !important;
  }

  /* 子菜单强制统一尺寸，百分百适配屏幕，绝不溢出 */
  .dropdown-item {
    all: unset !important;
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 5px !important;
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    background: rgba(255,255,255,0.02) !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    transform: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .dropdown-item:hover {
    background: rgba(22, 93, 255, 0.06) !important;
    color: #165dff !important;
  }

  .dropdown-grid-menu::before {
    display: none !important;
  }
}

/* 汉堡按钮样式 */
.menu-bar {
  display: none;
  width: 34px;
  height: 30px;
  position: relative;
  cursor: pointer;
  z-index: 999;
}
.menu-bar span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.menu-bar span:nth-child(1) { top: 0; }
.menu-bar span:nth-child(2) { top: 13px; }
.menu-bar span:nth-child(3) { bottom: 0; }
.menu-bar.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 13px;
}
.menu-bar.active span:nth-child(2) {
  opacity: 0;
}
.menu-bar.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 13px;
}
@media (max-width:900px) {
  .menu-bar {
    display: block;
  }
}
