/* ========================================
   甬战全站统一Header样式
   毛玻璃效果 + 固定定位 + 64px高度
   ======================================== */

.yz-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .yz-site-header {
  background: rgba(15, 23, 42, 0.85);
}

.header-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.header-logo:hover {
  color: var(--accent-primary);
}

.header-search {
  position: relative;
  flex: 0 0 200px;
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.header-search input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.header-search input::placeholder {
  color: var(--text-tertiary);
}

.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.header-nav a.active {
  color: var(--accent-primary);
  background: var(--accent-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
}

.theme-toggle-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.theme-toggle-btn svg {
  display: block;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
}

.mobile-menu-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.mobile-menu-btn svg {
  display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .header-container {
    padding: 0 16px;
    gap: 12px;
  }
  
  .header-logo {
    font-size: 16px;
  }
  
  .header-search {
    display: none;
  }
  
  .mobile-menu-btn {
    display: inline-flex;
  }
  
  .header-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 16px 16px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }
  
  .header-nav.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .header-nav a {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 480px) {
  .header-nav a {
    padding: 14px 16px;
  }
}

/* ===== v3 激活按钮在header中的适配 ===== */
.header-actions .yz-lic-btn { height: 32px; display: inline-flex; align-items: center; }
.quota-vip { color: #16a34a !important; font-weight: 700; }
