:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px */
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-deep-green: #0A4B2C;
  --color-divider: #1E3A2A;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-background);
  overflow-x: hidden; /* Global overflow for safety */
}

/* Site Header - Fixed position, suspended look */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background-color: var(--color-background); /* Overall header background, parts will override */
  box-sizing: border-box;
}

/* Header Top - Desktop default */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-green); /* Darker background for top area */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.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-gold); /* Gold for logo text */
  text-decoration: none;
  display: block;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* Mobile Navigation Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--color-card-bg); /* Use card background for mobile buttons section */
  padding: 0 15px; /* Default padding, mobile will override */
  width: 100%;
  overflow: hidden; /* Prevent overflow */
}

/* Hamburger Menu - Hidden by default on desktop */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above header */
}

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

/* Main Navigation - Desktop default */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height */
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Lighter background for main nav */
  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;
  gap: 25px; /* Spacing between nav links */
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--color-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  color: var(--color-text-main); /* Ensure text is visible */
  background: var(--color-button-gradient); /* Custom button gradient */
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

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

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer styles */
.site-footer {
  background-color: var(--color-card-bg); /* Footer background */
  padding: 40px 20px 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid var(--color-divider);
}

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

.footer-col {
  padding: 10px 0;
}

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

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--color-text-secondary);
}

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

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

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--color-divider);
  text-align: center;
  color: var(--color-text-secondary);
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic Slot Anchors - Must remain visible */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it's not completely collapsed */
  width: 100%;
}

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

  body {
    overflow-x: hidden; /* Ensure body overflow is hidden */
  }

  /* Mobile Header Top */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Container itself doesn't need padding, header-top has it */
    justify-content: space-between; /* To push hamburger left, logo middle-ish */
  }

  /* Hamburger Menu - Visible on mobile */
  .hamburger-menu {
    display: flex;
    margin-right: 15px; /* Space between hamburger and logo */
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* Logo Centering for mobile (image or text) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Slightly smaller logo on mobile */
  }

  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: 100%; /* Ensure image fits */
  }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

  .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 for mobile buttons */
    font-size: 13px; /* Smaller font size for mobile buttons */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center; /* Center text if it wraps */
  }

  /* Main Navigation - Mobile hidden by default, fixed position, column layout */
  .main-nav {
    min-height: auto !important;
    height: auto !important;
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--color-card-bg); /* Menu background */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1002; /* Above overlay and header */
    overflow-y: auto; /* Scrollable if content is long */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    flex-direction: column; /* Vertical links */
    align-items: flex-start; /* Align links to left */
    padding: 0 20px;
    gap: 15px; /* Spacing between mobile nav links */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider); /* Divider for links */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-col:not(:last-child) {
    border-bottom: 1px solid var(--color-divider);
    padding-bottom: 20px;
  }

  .footer-col h3 {
    margin-top: 15px;
  }

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

  /* Mobile Content Overflow Rules */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
