:root {
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
  --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-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

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 body overflow-x */
}

/* --- Header Styles --- */
.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.2);
  background-color: var(--color-deep-green); /* Overall fixed header background */
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-green); /* Specific color for header top */
  width: 100%;
}

.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 40px; /* Desktop padding for logo/buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold color for logo text */
  text-decoration: none;
  display: block; /* Ensure logo is visible */
  flex-shrink: 0;
}

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

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop by default */
  min-height: 48px; /* Minimum height for mobile button row */
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: var(--color-card-bg); /* Background for mobile button row */
  padding: 8px 15px; /* Padding for mobile button row */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
}

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

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

.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Specific color 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;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between desktop nav items */
}

.nav-menu li a {
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 16px;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-menu li a:hover {
  color: var(--color-gold); /* Hover effect for nav items */
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  color: var(--color-text-main); /* Text color for buttons */
  font-weight: bold;
  background: var(--color-button-gradient); /* Gradient background for buttons */
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

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

.overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

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

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

.footer-col h3 {
  color: var(--color-text-main);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--color-border); /* Border for footer column headings */
  padding-bottom: 5px;
}

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

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

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

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

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

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

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

/* Dynamic slot anchors - must be visible */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for system injection */
  display: block;
}

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

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

  /* Mobile Header Top */
  .header-top {
    height: 60px; /* Mobile fixed height */
    padding: 0 15px; /* Mobile padding */
  }

  .header-container {
    padding: 0; /* Container padding handled by header-top */
    justify-content: space-between; /* Hamburger left, Logo centered, desktop buttons hidden */
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    position: relative;
    z-index: 1001;
    order: 1; /* Place hamburger first */
  }

  .logo {
    flex-grow: 1; /* Allow logo to take available space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    order: 2; /* Place logo second */
    margin: 0; /* Remove any default margins */
    font-size: 24px; /* Adjust font size for mobile */
    max-width: calc(100% - 60px); /* Account for hamburger width (30px) + some buffer */
  }
  
  .logo img {
    max-height: 56px !important; /* Mobile max height for image logo */
    max-width: 100%;
  }

  /* A transparent element to balance the flex if the hamburger is the only other item */
  .header-container::after {
    content: '';
    width: 30px; /* Match hamburger width to visually center logo */
    order: 3;
    display: block; /* Ensure it takes up space */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px; /* Mobile fixed height */
    align-items: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px; padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    background-color: var(--color-card-bg);
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 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;
  }

  /* Mobile Main Nav (Hamburger Menu Content) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 108px; /* Starts below header-top (60px) + mobile-nav-buttons (48px) */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - 108px); /* Fill remaining height */
    background-color: var(--color-card-bg); /* Background for mobile menu */
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0;
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap for vertical menu */
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--color-divider); /* Separator for menu items */
  }
  
  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu li a {
    padding: 12px 0;
    display: block;
    font-size: 15px;
  }

  .overlay.active {
    display: block;
  }

  /* Mobile Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  
  /* 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;
  }
  
  /* Prevent body scroll when menu is active */
  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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
