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

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll from overflowing content */
}

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

a:hover {
  color: var(--secondary-color);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--background-color);
  box-sizing: border-box;
}

.header-top {
  background-color: var(--deep-green-color); /* Contrasting with main-nav */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.header-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px; /* Added padding */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
  display: flex;
  align-items: center;
}

.logo:hover {
  color: var(--glow-color);
}

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

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--card-bg);
  padding: 8px 15px;
  width: 100%;
}

.btn {
  padding: 10px 18px;
  border-radius: 25px;
  background: var(--button-gradient);
  color: var(--text-main);
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
  display: inline-flex; /* Use flex for button content alignment */
  align-items: center;
  justify-content: center;
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 10px var(--glow-color);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; /* Above header */
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:last-child {
  margin-bottom: 0;
}

.main-nav {
  background-color: var(--primary-color); /* Different from header-top */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.nav-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-main);
  padding: 0 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.overlay {
  display: none;
  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(--card-bg);
  color: var(--text-secondary);
  padding: 40px 0 20px;
  font-size: 14px;
  border-top: 1px solid var(--divider-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

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

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

.footer-logo:hover {
  color: var(--glow-color);
}

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

.footer-title {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

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

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

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

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

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

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

  .header-top {
    min-height: 60px;
    height: 60px;
  }

  .header-container {
    padding: 0 15px;
    position: relative;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    margin-left: 30px; /* Offset for hamburger */
    margin-right: 30px; /* Balance for hamburger */
  }

  .logo img {
    max-height: 56px !important;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mobile-nav-buttons {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--card-bg);
    padding: 8px 15px;
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.2);
  }

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

  .main-nav {
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Fixed width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Allow scrolling for long menus */
    display: none; /* Hidden by default */
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Ensure it's displayed */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid var(--divider-color);
    justify-content: flex-start;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }

  .footer-container {
    padding: 0 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
