/* ========================================
   千售科技官网 - 导航栏样式
   参考: LikeAdmin (72px header / #4153ff primary / 1348px min-width)
   ======================================== */

/* --- 头部 --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height); /* 72px */
  transition: all 0.35s ease;
  background: transparent;
}

.header.scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 2px 16px rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header .container {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

/* --- Logo（与右侧工具区等宽，确保nav居中对称） --- */
.logo {
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #fff;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.logo span {
  font-size: 16px;
  line-height: var(--header-height);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.header.scrolled .logo {
  color: var(--color-text);
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: all var(--transition-normal);
}

.header.scrolled .logo-icon {
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* --- 导航容器（flex:1 区域中居中） --- */
.header > .container > nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

/* --- 导航菜单 --- */
.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-list > li {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-list > li > a {
  display: flex;
  align-items: center;
  padding: 0 8px;
  height: 48px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: all 0.25s ease;
  position: relative;
  letter-spacing: 0.4px;
  border-radius: 8px;
  white-space: nowrap;
}

.header.scrolled .nav-list > li > a {
  color: var(--color-text-secondary);
}

.nav-list > li > a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header.scrolled .nav-list > li > a::after {
  background: var(--color-primary);
}

.nav-list > li > a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.header.scrolled .nav-list > li > a:hover {
  color: var(--color-primary);
  background: rgba(65, 83, 255, 0.06);
}

.nav-list > li > a:hover::after,
.nav-list > li > a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-list > li > a.active {
  color: #fff;
  font-weight: 600;
}

.header.scrolled .nav-list > li > a.active {
  color: var(--color-primary);
}

.header.scrolled .nav-list > li > a.active::after {
  background: var(--color-primary);
}

/* NEW 红色徽标 */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 3px;
  background: #ff2d42;
  color: #fff;
  margin-left: 4px;
  margin-top: -10px;
  line-height: 1.5;
  letter-spacing: 0.3px;
  pointer-events: none;
}

/* HOT 蓝色徽标 */
.nav-badge-hot {
  background: var(--color-primary);
  color: #fff;
}

/* OPC 红色徽标 */
.nav-badge-red {
  background: #ef4444;
  color: #fff;
}

/* 招募中 橙色徽标 */
.nav-badge-recruit {
  background: #f59e0b;
  color: #fff;
}

/* --- 右侧工具区（与Logo等宽，确保nav居中对称） --- */
.header-tools {
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.25s ease;
  padding: 0;
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.header.scrolled .nav-icon-btn {
  color: var(--color-text-secondary);
}

.header.scrolled .nav-icon-btn:hover {
  background: rgba(65, 83, 255, 0.08);
  color: var(--color-primary);
}

/* 语言切换文字按钮 */
.nav-text-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  letter-spacing: 0.4px;
  min-width: 40px;
  transition: all 0.25s ease;
}

.nav-text-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.header.scrolled .nav-text-btn {
  color: var(--color-text-secondary);
}

.header.scrolled .nav-text-btn:hover {
  background: rgba(65, 83, 255, 0.08);
  color: var(--color-primary);
}

/* --- 语言切换下拉 --- */
.nav-lang-wrap {
  position: relative;
  z-index: 1002;
}

.nav-lang-btn {
  min-width: 42px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.nav-lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  background: #0d1f3c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  min-width: 190px;
  overflow: hidden;
  padding: 6px 0;
  z-index: 1003;
}

.nav-lang-dropdown.open {
  display: block;
}

.nav-lang-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-lang-dropdown a:hover {
  background: rgba(65, 83, 255, 0.12);
  color: var(--color-primary, #4153ff);
}

.nav-lang-dropdown a.active {
  color: var(--color-primary, #4153ff);
  background: rgba(65, 83, 255, 0.08);
  font-weight: 600;
}

/* --- 导航 CTA 按钮 --- */
.nav-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px !important;
  height: 42px !important;
  background: linear-gradient(135deg, var(--color-primary), #6b7dff) !important;
  color: #fff !important;
  border-radius: 21px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 12px rgba(65, 83, 255, 0.32);
  white-space: nowrap;
  transition: all 0.25s ease !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(65, 83, 255, 0.45);
}

.header.scrolled .nav-cta {
  box-shadow: 0 2px 10px rgba(65, 83, 255, 0.28);
}

/* --- 下拉菜单（登录） --- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #0d1f3c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  overflow: hidden;
  padding: 8px 0;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85) !important;
  transition: background var(--transition-fast);
  height: auto;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-primary) !important;
}

.nav-list li:hover .dropdown-menu {
  display: block;
}

/* --- 汉堡菜单按钮 --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 1001;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all var(--transition-normal);
}

.header.scrolled .hamburger span {
  background: var(--color-text);
}

.hamburger span:nth-child(3) {
  width: 16px;
  align-self: flex-end;
}

/* --- 移动端导航面板 --- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: #0a1628;
  z-index: 10000;
  transition: right var(--transition-normal);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
  padding: 30px 24px;
  overflow-y: auto;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  margin-bottom: 20px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
  background: var(--color-bg);
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-list li:last-child {
  border-bottom: none;
}

.mobile-nav-list a {
  display: block;
  padding: 15px 0;
  font-size: 16px;
  color: var(--color-text);
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-list a:hover {
  color: var(--color-primary);
}

/* --- 遮罩 --- */
.mobile-nav-mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.mobile-nav-mask.active {
  display: block;
}
