:root {
  --header-offset: 122px; /* Desktop no marquee: 68+52 = 120, use 122px */
  --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%);
}

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

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 15px 30px; /* Desktop padding */
  width: 100%; /* Ensure it spans max-width */
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-main-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 1001; /* Higher than mobile menu */
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav .nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--glow-color); /* Highlight on hover/active */
  background-color: rgba(255, 211, 107, 0.1); /* Subtle background */
}

.desktop-nav-buttons {
  flex-shrink: 0;
  margin-left: auto;
  display: flex; /* Display on desktop */
  gap: 10px;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  color: var(--bg-color); /* Dark text on bright button */
  background: var(--button-gradient);
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 15px var(--glow-color); /* Glow effect on hover */
}

/* 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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

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

.footer-col h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

.footer-nav a {
  display: block;
  color: var(--text-main-color);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
}

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

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

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

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

  .site-header {
    min-height: 60px; /* Adjust for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Important for mobile */
    padding: 10px 15px; /* Mobile padding */
    justify-content: space-between; /* Space out hamburger, logo, buttons */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    flex-shrink: 0;
    margin-right: 10px;
  }

  .logo {
    flex: 1; /* Allow logo to take available space */
    text-align: center; /* Center text logo */
    font-size: 24px; /* Adjust font size for mobile */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 80%; /* Adjust width as needed */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    background-color: var(--card-bg-color); /* Use card background for mobile menu */
    flex-direction: column; /* Vertical menu */
    align-items: flex-start;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 999;
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    flex-shrink: 0;
    gap: 8px;
    margin-left: 10px; /* Space from logo */
  }

  .footer-container {
    grid-template-columns: 1fr 1fr; /* Two columns on smaller screens */
    padding: 0 15px;
  }

  .footer-col:nth-child(3),
  .footer-col:nth-child(4) {
    margin-top: 20px; /* Add some space between rows */
  }

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

/* Ensure body no-scroll works */
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;
  }
}
