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

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

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

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 15px 30px; /* Desktop padding */
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribute items */
  min-height: 40px; /* Min height for container content */
}

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

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Spacing between nav links */
  margin: 0 20px; /* Give some space around the nav */
}

.nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover,
.nav-link.active {
  color: var(--auxiliary-color);
  border-bottom-color: var(--auxiliary-color);
}

.desktop-nav-buttons {
  flex-shrink: 0;
  display: flex; /* Desktop visible */
  gap: 10px; /* Spacing between buttons */
  margin-left: auto; /* Push buttons to the right */
}

.mobile-nav-buttons {
  display: none !important; /* Mobile buttons hidden on desktop */
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  color: black; /* Changed to black for WCAG AA contrast on gold button */
  background: var(--button-gradient);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 28px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above mobile menu overlay */
  flex-shrink: 0;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998; /* Below mobile menu, above content */
}

.mobile-menu-overlay.active {
  display: block;
}

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

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

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

.footer-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

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

.footer-description {
  color: var(--text-main-color);
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  color: var(--text-main-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--auxiliary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-main-color);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile without marquee */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

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

  .header-container {
    width: 100%; /* Must be 100% */
    max-width: none; /* Must not be restricted */
    padding: 10px 15px; /* Mobile padding */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
    order: 1;
    font-size: 32px;
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding: 0;
    max-width: calc(100% - 140px); /* Account for hamburger and buttons width */
  }

  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding: 20px 0;
    align-items: flex-start;
    gap: 0;
  }

  .main-nav.active {
    display: flex; /* IMPORTANT: Must be flex or block to be visible */
    transform: translateX(0);
  }

  .nav-link {
    width: 100%;
    padding: 15px 30px;
    border-bottom: none;
    font-size: 17px;
    color: var(--text-main-color);
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--auxiliary-color);
    border-bottom: none;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-nav-buttons {
    order: 3;
    display: flex !important;
    gap: 8px;
    margin-left: auto;
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Footer Mobile */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-col h3 {
    text-align: center;
  }

  .footer-nav {
    text-align: center;
  }

  .footer-logo {
    margin-bottom: 10px;
  }
}

/* No-scroll class for body when menu is open */
body.no-scroll {
  overflow: hidden;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
