:root {
  --primary-color: #F2C14E;
  --accent-color: #FFD36B;
  --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --background-color: #0A0A0A;
  --text-main-color: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;

  /* Header offset - No marquee */
  --header-offset: 122px; /* Desktop: header-top (68) + main-nav (52) + 2px buffer */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Crucial: body padding-top */
  background-color: var(--background-color);
  color: var(--text-main-color);
  overflow-x: hidden; /* For mobile content overflow */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--background-color); /* Darker background */
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 2;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main-color);
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block; /* Default for text logo */
  line-height: 1;
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, crucial */
  min-height: 48px;
  background-color: var(--background-color); /* Same as header-top */
  border-bottom: 1px solid var(--border-color);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Lighter background than header-top */
  width: 100%;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

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

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.btn {
  background: var(--btn-gradient);
  color: var(--background-color); /* Text color for buttons should contrast with gradient */
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
}

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

.footer-slot-anchor {
  display: block;
  height: 0;
  overflow: hidden;
}

.footer-slot-anchor-inner {
  display: block;
  height: 0;
  overflow: hidden;
}

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

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

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

.footer-col .footer-description {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 1200px;
  margin: 0 auto;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60) + mobile-nav-buttons (48) + 2px buffer */
  }

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

  /* 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;
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width */
    padding: 0 15px;
    position: relative;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    z-index: 1002;
  }
  
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%; /* Crucial: no max-width */
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    justify-content: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px; /* Max sidebar width */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    background-color: var(--card-bg);
    transform: translateX(-100%); /* Initially off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001;
    border-right: 1px solid var(--border-color);
  }

  .main-nav.active {
    display: block; /* Crucial: show when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }
}

.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;
  }
}
