:root {
  --header-offset: 122px; /* Desktop: Calculated for header height */
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --bg-color: #0A0A0A;
  --card-bg-color: #111111;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--bg-color);
  color: var(--text-main-color);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

body.no-scroll {
  overflow: hidden;
}

/* Site Header - Fixed & Floating */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-color); /* Dark background for contrast */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Floating effect */
  z-index: 1000;
  min-height: 60px; /* Ensure content fits */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 30px; /* Desktop padding */
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  flex-shrink: 0;
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  padding: 5px 0;
  display: block; /* Ensure logo is always visible */
  text-shadow: 0 0 5px var(--glow-color); /* Subtle glow for brand */
}

/* Main Navigation - Desktop */
.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 25px; /* Spacing between nav links */
  padding: 0 20px; /* Internal padding */
}

.nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 0;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
  transform: translateX(0);
}

/* Desktop Buttons */
.desktop-nav-buttons {
  flex-shrink: 0;
  margin-left: auto; /* Push buttons to the right */
  display: flex; /* Always flex on desktop */
  gap: 10px;
  align-items: center;
}

/* Mobile Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none !important; /* Hidden by default on desktop, override with !important */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--text-main-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 1001; /* Above other header elements */
}

/* Common Button Styles */
.btn {
  padding: 10px 20px;
  border-radius: 25px; /* Rounded buttons */
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent text wrapping */
}

.btn-login,
.btn-register {
  background: var(--button-gradient);
  color: #333; /* Dark text for contrast on bright button */
  box-shadow: 0 4px 10px rgba(255, 211, 107, 0.4); /* Glow effect */
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Footer Styles */
.site-footer {
  background-color: var(--bg-color);
  color: var(--text-main-color);
  padding: 40px 0 20px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
}

.footer-main-content {
  padding-bottom: 30px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
  gap: 30px;
  padding: 0 30px;
  box-sizing: border-box;
}

.footer-col {
  padding: 10px 0;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 15px;
  text-shadow: 0 0 3px var(--glow-color);
}

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgba(255, 246, 214, 0.8); /* Slightly muted text */
}

.footer-heading {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: bold;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: rgba(255, 246, 214, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-mid-slots, .footer-bottom-slot, .footer-top-row {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 30px;
  box-sizing: border-box;
  display: flex; /* Ensure these can contain content */
  flex-wrap: wrap; /* Allow content to wrap */
  gap: 20px;
}

.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px;
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding: 20px 30px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  color: rgba(255, 246, 214, 0.6);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: Calculated for header height */
  }

  /* Prevent horizontal scroll on mobile */
  body {
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    min-height: 50px;
  }

  .header-container {
    padding: 10px 15px; /* Mobile padding */
    width: 100%; /* Occupy full width */
    max-width: none; /* No max-width on mobile */
    position: relative;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* First element */
    font-size: 24px;
  }

  .logo {
    order: 2; /* Second element */
    flex: 1 !important; /* Take remaining space */
    display: flex !important; /* Use flex to center image or text */
    justify-content: center !important; /* Center content horizontally */
    align-items: center !important; /* Center content vertically */
    font-size: 24px;
    padding: 0; /* Reset padding from desktop */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }

  /* Main Navigation - Mobile (hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical links */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Width of the slide-out menu */\    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg-color); /* Menu background */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-out;
    z-index: 1000;
    align-items: flex-start; /* Align links to the left */
    gap: 15px;
    overflow-y: auto; /* Allow scrolling if many links */
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide in */
  }

  .nav-link {
    width: 100%; /* Full width for mobile links */
    padding: 12px 0;
    font-size: 18px;
    border-bottom: 1px solid var(--border-color); /* Separator */
  }
  .nav-link::after {
    display: none; /* Hide underline effect on mobile */
  }
  .nav-link:hover {
    transform: none; /* Reset hover transform */
  }

  /* Desktop Buttons (hidden on mobile) */
  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  /* Mobile Buttons (shown on mobile, next to logo) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    order: 3; /* Third element */
    flex-shrink: 0;
    gap: 8px;
    margin-left: auto; /* Push to the right */
  }

  .btn {
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 20px;
  }

  /* Footer Mobile Layout */
  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    padding: 0 15px;
    gap: 20px;
  }

  .footer-logo {
    font-size: 22px;
  }

  .footer-heading {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-mid-slots, .footer-bottom-slot, .footer-top-row {
    padding: 0 15px;
    gap: 15px;
  }

  .footer-bottom {
    padding: 15px 15px 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
