:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
  --color-primary: #F2C14E;
  --color-secondary: #FFD36B;
  --color-btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --color-card-bg: #111111;
  --color-background: #0A0A0A;
  --color-text-main: #FFF6D6;
  --color-border: #3A2A12;
  --color-glow: #FFD36B;
}

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

body.no-scroll {
  overflow: hidden;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  box-sizing: border-box;
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--color-background); /* Dark background */
  overflow: hidden;
  padding: 0 20px; /* Add padding to header-top for the edges */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-primary);
  text-decoration: none;
  display: flex; /* For potential image logo centering or text alignment */
  align-items: center;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for logo image on desktop */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Nav Buttons (hidden on desktop by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: var(--color-card-bg); /* Use card background for this strip */
  padding: 0 20px; /* Consistent padding */
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  background-color: var(--color-card-bg); /* Lighter background than header-top */
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  padding: 0 20px; /* Add padding to main-nav for the edges */
}

.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;
  width: 100%;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.nav-list a {
  color: var(--color-text-main);
  text-decoration: none;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

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

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

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

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative; /* For z-index and positioning */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text-main);
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  bottom: -8px;
}

/* Hamburger active state */
.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  color: var(--color-text-main);
  background: var(--color-btn-gradient); /* Button specific gradient */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap; /* Prevent line breaks on desktop */
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

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

/* Mobile Menu Overlay */
.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;
}

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

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

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

.footer-col {
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
}

.footer-bottom .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.copyright-info {
  font-size: 13px;
  color: var(--color-text-main);
  margin: 0;
}

/* Dynamic Slot Anchors - ensure they are visible for injection */
.footer-slot-anchor,
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they take up space if empty but visible */
  width: 100%;
  box-sizing: border-box;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 48px (main-nav) = 156px. Oh wait, mobile-nav-buttons is between header-top and main-nav. So 60 + 48 + 48 = 156. The prompt says 108px for no marquee. Let's re-evaluate. The prompt says mobile-nav-buttons is *at least* 48px, and is counted in the mobile offset. So 60 (header-top) + 48 (mobile-nav-buttons) + 48 (main-nav) = 156. The prompt's example 108px is (60+48) for no marquee, which implies mobile-nav-buttons is *not* always present as a fixed bar, or it is part of main-nav. But the prompt explicitly says "移动端按钮容器（.mobile-nav-buttons）必须位于 .header-top 下方、.main-nav 上方，作为独立的一栏". This means it is an *additional* fixed bar. The prompt example values might be for a different structure. Let's use the actual sum for my structure. 60 + 48 + 48 = 156. Adding 2-4px buffer, 158px. */
    /* Re-reading "移动（汉堡抽屉关闭、.main-nav 不占文档流高度时）：无跑马灯 → 108px（60+48）". This 108px must imply that .mobile-nav-buttons is *not* a fixed bar, or it replaces .main-nav height. But "按钮独立区域（必须）: 必须生成按钮，必须在 Logo 下方使用独立的 .mobile-nav-buttons 容器（位于 .header-top 与 .main-nav 之间），最多2个按钮，与桌面端 .desktop-nav-buttons 内容一致" means it IS a fixed bar. This is a conflict. I will follow the explicit instruction to have .mobile-nav-buttons as an independent bar and calculate based on that. So 60 (header-top) + 48 (mobile-nav-buttons) + 48 (main-nav, though main-nav is hidden, its space would be taken by mobile-nav-buttons in the calculation of total fixed height *if* it were to replace main-nav. However, the calculation is for `padding-top: var(--header-offset);` on `body`, which is the total height of *all* fixed elements at the top. So 60 (header-top) + 48 (mobile-nav-buttons) = 108px. The `main-nav` becomes a slide-out, so its height isn't *added* to the fixed stack, but rather its `top` is positioned below the fixed stack. So 108px is correct. */
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) = 108px + 2px buffer */
  }

  /* Header Top Area */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    justify-content: space-between; /* Hamburger left, Logo center, potential dummy right */
  }

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

  .logo {
    flex: 1 !important; /* Method 1 for image logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100%;
  }

  .logo img {
    max-height: 56px !important; /* Max height for logo image on mobile */
  }

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

  /* Mobile Nav Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden; /* Prevent content overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    justify-content: center; /* Center buttons if there's space */
  }

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

  /* Main Navigation Area (Mobile Menu) */
  .main-nav {
    min-height: auto; /* Auto height for expanded menu */
    height: auto;
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Position below fixed header and mobile-nav-buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column; /* Vertical layout */
    align-items: flex-start; /* Align menu items left */
    padding: 20px 0; /* Padding for menu items */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    background-color: var(--color-card-bg); /* Use card background for menu */
    border-top: none; /* No top border for the menu itself */
    overflow-y: auto; /* Enable scrolling for long menus */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    display: none; /* Hidden by default, will be block/flex when active */
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Or block, depending on content */
  }

  .nav-container {
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

  .nav-list {
    flex-direction: column; /* Vertical list */
    width: 100%;
    gap: 15px; /* Spacing between menu items */
  }

  .nav-list a {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
  }

  .nav-list a::after {
    height: 1px; /* Thinner underline for mobile */
  }

  /* Mobile Overlay */
  .mobile-menu-overlay {
    top: 0; /* Overlay should cover the whole screen */
    height: 100vh; /* Use viewport height */
  }

  /* Footer */
  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-col {
    align-items: flex-start;
  }

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

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

  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 10px;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
