:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --page-bg: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;

  /* Header offset for desktop (68px + 52px = 120px + 2px buffer) */
  --header-offset: 122px;
}

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

/* Base styles for links */
a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--secondary-color);
}

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

/* 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.2);
  background-color: transparent; /* Actual background will be on header-top and main-nav */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-green); /* Header top background */
  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-left: 20px;
  padding-right: 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color); /* Branding color for logo */
  text-transform: uppercase;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px; /* Max height for desktop logo */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile nav buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: var(--card-bg); /* Use a distinct background */
  padding: 8px 20px; /* Desktop-like padding, will be overridden on mobile */
  justify-content: center;
  align-items: center;
  width: 100%;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Main nav background */
  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(--text-main);
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-color);
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
  transition: all 0.3s ease;
}
.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-main);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

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

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

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

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block; /* Ensure it behaves like a block for margin */
}

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

.footer-heading {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 15px;
  position: relative;
}
.footer-heading::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--gold-color);
  margin-top: 5px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--gold-color);
}

.footer-mid-slots,
.footer-slot-anchor-inner {
  /* These are for dynamic content injection, ensure they are visible */
  min-height: 1px; /* Ensure they take up space if empty for layout */
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    /* Header offset for mobile (60px + 48px = 108px + 2px buffer) */
    --header-offset: 110px;
  }

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

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding-left: 0; /* Handled by header-top padding */
    padding-right: 0; /* Handled by header-top padding */
    position: relative; /* For absolute logo centering */
    justify-content: space-between; /* To keep hamburger left */
  }

  /* Image LOGO Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute; /* To allow flex centering to work with hamburger */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right-side icon */
    height: 100%;
  }
  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: 100%;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place hamburger to the left */
    margin-right: auto; /* Push logo to center */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    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 overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons in one line */
    background-color: var(--card-bg); /* Match footer or distinct */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit with gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    height: auto; /* Allow button height to adjust with wrapped text */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Adjust width as needed */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg); /* Menu background */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay, below hamburger */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }
  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: none; /* Remove max-width */
    padding: 0 20px;
    gap: 15px; /* Smaller gap for vertical links */
  }
  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--divider-color);
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

  /* Page content images overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Footer adjustments */
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
  }
  .footer-col:not(:last-child) {
    margin-bottom: 20px;
  }
  .footer-heading {
    text-align: left;
  }
  .footer-heading::after {
    margin-left: 0;
  }
  .footer-logo {
    text-align: left;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
