:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
  --color-primary: #11A84E;
  --color-accent: #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 horizontal scroll for desktop as well */
}

/* Base styles for links */
a {
  text-decoration: none;
  color: var(--color-text-main);
}
a:hover {
  color: var(--color-accent);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--color-background); /* Overall header background */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: var(--color-background); /* Specific background for header-top */
  border-bottom: 1px solid var(--color-divider);
}

.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 20px; /* Padding for desktop container */
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold for logo */
  text-transform: uppercase;
  text-decoration: none;
  display: flex; /* Ensure flex context for potential image logo */
  align-items: center;
  gap: 8px; /* For potential image + text */
}
.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop by default */
  min-height: 48px; /* Mobile height, but hidden on desktop */
  width: 100%; /* Take full width for mobile */
  background-color: var(--color-card-bg); /* Use a different background for this bar */
  border-bottom: 1px solid var(--color-divider);
  padding: 0 15px; /* Adjust padding for mobile */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop height */
  height: 52px;
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: var(--color-card-bg); /* Specific background for main-nav */
}

.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; /* Padding for desktop container */
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--color-text-main);
  font-size: 16px;
  font-weight: bold;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--color-accent);
  text-shadow: 0 0 5px var(--color-glow);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1002; /* Above header */
}
.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  transition: all 0.3s ease;
  border-radius: 2px;
}
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%); /* Invert gradient on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 15px var(--color-glow);
  color: var(--color-text-main); /* Ensure text color remains */
}
.btn-register {
  /* Specific styles if needed */
}
.btn-login {
  /* Specific styles if needed */
}

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

.footer-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-divider);
}

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

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

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

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - must be visible and not hidden */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space and is not collapsed */
  width: 100%;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body itself also prevents horizontal scroll */
  }

  /* Header Top Section */
  .header-top {
    min-height: 60px !important; /* Mobile height override */
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
    justify-content: space-between; /* Space out hamburger and logo */
  }
  .header-container {
    width: 100%;
    max-width: none; /* No max-width for mobile container */
    padding: 0; /* Remove container padding as header-top has it */
    position: relative; /* For absolute logo positioning */
  }

  /* Mobile Logo Centering (Method 1: Flexbox + Absolute positioning for robustness) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: flex; /* Visible on mobile */
    position: relative; /* Ensure it's clickable */
    z-index: 1002;
    padding: 10px; /* Make it easier to tap */
    margin-left: -10px; /* Offset padding */
  }

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

  /* Mobile Navigation Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px; /* Mobile height */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden; /* Prevent buttons from overflowing */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0; /* Allow buttons to shrink */
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile */
    font-size: 13px; /* Smaller font size for mobile */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    height: auto; /* Allow height to adjust with wrapped text */
  }

  /* Main Navigation (mobile sidebar menu) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
    background-color: var(--color-card-bg);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger */
    overflow-y: auto; /* Enable scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width for mobile container */
    flex-direction: column; /* Stack links vertically */
    align-items: flex-start;
    padding: 0; /* Remove container padding */
    gap: 15px; /* Spacing between mobile nav links */
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Overlay */
  .overlay.active {
    display: block;
  }

  /* Body no-scroll for menu open */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-col:not(.footer-about) {
    margin-top: 20px;
  }

  /* Mobile content overflow protection */
  .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;
}
