:root {
  --header-offset: 122px; /* Desktop without marquee: 68px + 52px = 120px, plus 2px buffer */
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --page-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-text-color: #000000; /* Adjusted for WCAG AA contrast */
}

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

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  color: var(--secondary-color);
}

/* Header Styling - Desktop First */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--card-bg); /* Use card-bg for header for contrast with page-bg */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 68px; /* Base height for header-top */
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box; /* Include padding/border in element's total width and height */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 30px; /* Desktop padding */
  min-height: 52px; /* Main nav height, combined with header-top padding/border, forms header offset */
  box-sizing: border-box;
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 0;
  flex-shrink: 0;
  display: block; /* Ensure logo is visible by default */
}

/* Hamburger menu (hidden by default on desktop) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 28px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above mobile menu overlay */
  flex-shrink: 0;
  line-height: 1;
}

/* Main Navigation - Desktop */
.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Spacing between desktop nav links */
  padding: 10px 0;
  position: static; /* Desktop: normal flow */
  height: auto;
  overflow: visible;
  transition: none; /* No transition on desktop */
}

.nav-link {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.nav-link:hover::after {
  width: 100%;
}

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

.mobile-nav-buttons {
  display: none !important; /* Hidden by default on desktop */
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: var(--button-text-color); /* Use variable for WCAG AA contrast */
  background: var(--button-gradient);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  line-height: 1; /* Ensure text alignment */
  white-space: nowrap;
}

.btn:hover {
  box-shadow: 0 6px 20px rgba(var(--glow-color), 0.4);
  filter: brightness(1.1);
}

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

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

/* Footer Styling */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--border-color);
}

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-cols-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;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.footer-col ul li a {
  color: var(--text-main);
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: inline-block;
}

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

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

/* Placeholder styling */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 10px; /* Ensure visibility for potential content injection */
  display: block;
}
.footer-slot-anchor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.footer-slot-anchor-row .footer-slot-anchor-inner {
  flex: 1 1 calc(25% - 15px); /* For 4 columns */
  min-width: 100px;
  box-sizing: border-box;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile without marquee: 60px + 48px = 108px, plus 2px buffer */
  }

  /* Body overflow for mobile content 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;
  }

  .site-header {
    min-height: 60px; /* Mobile header height */
  }

  .header-container {
    padding: 0 15px; /* Mobile padding */
    min-height: 60px; /* Mobile base height */
    width: 100%; /* Important for mobile container */
    max-width: none; /* Remove max-width for mobile */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1; /* Leftmost */
  }

  .logo {
    order: 2; /* Middle */
    flex: 1 !important; /* Take remaining space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    font-size: 24px;
    padding: 5px 0;
    max-width: calc(100% - 100px); /* Prevent logo from overlapping buttons */
  }
  /* If logo is an image, ensure it scales properly */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust as needed */
  }

  /* Mobile Navigation (Hamburger menu content) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed; /* Fixed position for off-canvas menu */
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    z-index: 1000;
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align links to the left */
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 17px;
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after {
    display: none; /* No underline animation on mobile */
  }


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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    order: 3; /* Rightmost */
    gap: 8px; /* Spacing between mobile buttons */
    margin-left: auto; /* Push to the right */
    flex-shrink: 0;
  }

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

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    top: var(--header-offset); /* Start below header */
    height: calc(100% - var(--header-offset)); /* Full height below header */
  }

  /* Footer Mobile */
  .footer-cols-container {
    grid-template-columns: 1fr; /* Single column layout for footer */
    gap: 20px;
  }

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

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

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

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

  .footer-slot-anchor-row .footer-slot-anchor-inner {
    flex: 1 1 100%; /* Single column for mid slots on mobile */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
