/* ============================================
   HEADER SECTION - Fixed Navigation
   ============================================ */

.header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--container-width);
  max-width: calc(100% - 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(255, 253, 252, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 40px;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

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

/* ============================================
   LOGO
   ============================================ */
.logo {
  width: 200px;
  height: auto;
  flex-shrink: 0;
}

/* ============================================
   NAVIGATION CONTAINER
   ============================================ */
.nav-container {
  display: flex;
  align-items: center;
  gap: 64px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-gray);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-orange);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-orange);
  font-weight: 700;
}

/* ============================================
   PRE-ORDER BUTTON (Header)
   ============================================ */
.btn-preorder {
  padding: 10px 16px;
  background: var(--color-orange);
  border: 1px solid var(--color-orange);
  border-radius: 40px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-white);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-preorder:hover {
  background: #d55a33;
  transform: translateY(-1px);
}

.btn-preorder:active {
  transform: translateY(0);
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 3px;
  background: var(--color-orange);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Desktop (1280px - 1440px) */
@media (max-width: 1440px) {
  .header {
    width: calc(100% - 80px);
  }
}

/* Laptop (1024px - 1280px) */
@media (max-width: 1280px) {
  .header {
    width: calc(100% - 60px);
  }
}

/* Tablet Portrait (600px - 768px) */
@media (max-width: 768px) {
  .header {
    width: calc(100% - 32px);
    padding: 12px 16px;
    top: 12px;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 253, 252, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    /* 修复移动端左侧空白问题 */
    margin: 0;
    padding: 0;
    /* 确保菜单隐藏时不影响页面滚动 */
    visibility: hidden;
    pointer-events: none;
  }
  
  .nav-container.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .nav-links a {
    font-size: 24px;
  }
  
  .nav-links a::after {
    display: none;
  }
  
  .logo {
    width: 140px;
  }
}

/* Mobile Large (480px - 600px) */
@media (max-width: 600px) {
  .header {
    width: calc(100% - 24px);
    padding: 10px 14px;
    top: 10px;
  }
  
  .logo {
    width: 120px;
  }
}

/* Mobile (max 480px) */
@media (max-width: 480px) {
  .header {
    width: calc(100% - 20px);
    padding: 8px 12px;
    border-radius: 30px;
  }
  
  .logo {
    width: 100px;
  }
  
  .mobile-menu-toggle span {
    width: 20px;
    height: 2px;
  }
}

/* Small Mobile (max 360px) */
@media (max-width: 360px) {
  .header {
    width: calc(100% - 16px);
    padding: 6px 10px;
  }
  
  .logo {
    width: 90px;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .nav-links a::after {
    display: none;
  }
  
  .btn-preorder:hover {
    transform: none;
  }
  
  .btn-preorder:active {
    transform: scale(0.98);
  }
  
  .nav-links a {
    padding: 12px 0;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .nav-container {
    padding: 20px;
    gap: 20px;
  }
  
  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
  
  .nav-links a {
    font-size: 18px;
  }
}

/* Print Styles */
@media print {
  .header,
  .mobile-menu-toggle {
    display: none !important;
  }
}

