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

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

body.no-scroll {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--card-bg); /* Use card-bg for a darker header */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-height: 60px; /* Minimum height for header */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Desktop padding */
  display: flex;
  align-items: center;
  width: 100%;
  min-height: inherit; /* Inherit min-height from site-header */
}

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

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

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

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

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

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

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none; /* Remove underline for buttons */
  color: #000; /* Dark text for bright buttons */
  background: var(--button-gradient);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 0 10px var(--glow-color);
}

.btn-primary {
  color: #000;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 40px 20px;
  font-size: 14px;
}

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

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

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

.footer-col .footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color); /* Added border-top for visual separation */
}

.footer-bottom p {
  margin: 0;
}

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

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

  .header-container {
    width: 100%;
    max-width: none; /* Important: No max-width on mobile */
    padding: 0 15px; /* Mobile padding */
    justify-content: space-between; /* Space out items */
    position: relative; /* For absolute logo centering if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    flex-shrink: 0;
    order: 1; /* Order for hamburger */
  }

  .logo {
    flex: 1 !important; /* Flex to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Order for logo */
    padding: 0; /* Remove vertical padding */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px; /* Adjust max-height for mobile logo */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below fixed header */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    align-items: flex-start;
    overflow-y: auto; /* Enable scroll for long menus */
    z-index: 999; /* Below hamburger, above content */
  }

  .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);
  }
  .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 */
    flex-shrink: 0;
    order: 3; /* Order for mobile buttons */
    gap: 8px; /* Spacing between mobile buttons */
  }

  .btn {
    padding: 8px 15px; /* Smaller buttons on mobile */
    font-size: 14px;
  }

  .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 menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    padding-bottom: 20px;
  }

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

  .footer-col .footer-nav {
    align-items: center;
  }

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

  .footer-bottom {
    padding-top: 15px;
  }

  /* 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 already handled globally */
}

/* Ensure contrast for text on card background */
.site-header, .site-footer, .main-nav, .footer-col {
  color: var(--text-main); /* Ensure text color is main text color */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
