:root {
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
  --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;
}

/* Reset and base styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-background);
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll from content */
}

body.no-scroll {
  overflow: hidden !important;
}

a {
  text-decoration: none;
  color: var(--color-text-main);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--color-background); /* Base for header */
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent header content from overflowing */
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  background-color: var(--color-deep-green); /* Distinct background for header-top */
  padding: 0 20px; /* Default padding for smaller desktop screens */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold color for the logo text */
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
  flex-shrink: 0; /* Prevent logo from shrinking */
  padding-right: 20px; /* Space between logo and other elements if needed */
}
/* If logo is an image, set max-height */
.logo img {
  display: block;
  max-height: 60px; /* Desktop image logo height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile-specific buttons (hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default, shown on mobile */
  min-height: 48px; /* Mobile button bar height */
  background-color: var(--color-card-bg); /* Distinct background for mobile buttons */
  padding: 0 15px; /* Mobile padding */
  justify-content: center;
  align-items: center;
}

.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  background-color: var(--color-primary); /* Distinct background for main-nav */
  padding: 0 20px; /* Default padding for smaller desktop screens */
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px; /* Spacing between nav links */
}

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

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

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  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;
}

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

/* Overlay for 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: 998; /* Below menu, above content */
}

.overlay.active {
  display: block;
}

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

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Footer styles */
.site-footer {
  background-color: var(--color-card-bg);
  color: var(--color-text-secondary);
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

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

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

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

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

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

.footer-slot-anchor-inner {
  /* Placeholder for injected content, ensure it's visible */
  min-height: 1px;
}

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

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

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    height: 60px; /* Mobile fixed height */
    padding: 0 15px;
    position: relative; /* For absolute positioning of logo */
  }

  .header-container {
    padding: 0; /* No padding on container itself, handled by header-top */
    justify-content: space-between; /* To push hamburger left and buttons right */
  }

  /* Method 2 for mobile logo centering (absolute positioning) */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%; /* Ensure logo takes full height of header-top for vertical centering */
  }
  .logo img {
    max-height: 56px !important; /* Mobile image logo height */
  }
  
  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjust padding for mobile */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--color-card-bg); /* Match footer bg */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: -1; /* Move to the left */
    margin-right: auto; /* Push content to right */
    position: relative;
    z-index: 1001; /* Ensure it's above logo if positioned absolutely */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below the fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--color-card-bg); /* Sidebar background */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
    box-sizing: border-box;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
  }

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

  /* Footer responsive */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col:not(.footer-about) {
    border-top: 1px solid var(--color-divider);
    padding-top: 20px;
  }

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