/* Color Variables */
: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 - No marquee: Desktop 120px (68+52) + 2px; Mobile 108px (60+48) + 2px */
  --header-offset: 122px;
}

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

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

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

/* Site Header */
.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.2);
  background-color: var(--background-color); /* Fallback, specific colors for top/main nav */
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-green-color); /* Different from main-nav */
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.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 */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's visible */
}

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

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

/* Mobile Nav Buttons - Hidden by default for desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile height */
  background-color: var(--card-bg); /* Different background from main-nav */
  width: 100%;
  padding: 10px 20px; /* Add padding for mobile buttons */
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

.nav-list a {
  padding: 10px 0;
  display: block;
  color: var(--text-main);
  font-weight: bold;
  white-space: nowrap;
}

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

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
}

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

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

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

/* Buttons */
.btn {
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* No underline */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-register {
  background: var(--button-gradient);
  color: var(--text-main);
  border: 1px solid var(--glow-color);
}

.btn-register:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px var(--glow-color);
}

.btn-login {
  background-color: var(--gold-color); /* Use gold for login */
  color: var(--background-color);
  border: 1px solid var(--gold-color);
}

.btn-login:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px var(--gold-color);
}

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

.overlay.active {
  display: block;
}

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

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

.footer-col h3 {
  color: var(--text-main);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 8px;
}

.footer-col p {
  line-height: 1.8;
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure slot is visible for content injection */
  margin-top: 15px;
}

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

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

  /* Mobile Header Top */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding-left: 15px; /* Adjust padding for mobile */
    padding-right: 15px;
  }

  .header-container {
    max-width: none; /* No max-width on mobile */
    padding-left: 0; /* Handled by header-top */
    padding-right: 0; /* Handled by header-top */
    position: relative; /* For logo absolute positioning */
  }

  .logo {
    flex: 1 !important; /* For centering with hamburger */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    min-height: 48px; /* Fixed height for mobile buttons */
    padding-left: 15px; /* Mobile padding */
    padding-right: 15px; /* Mobile padding */
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

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

  /* Hamburger Menu on mobile */
  .hamburger-menu {
    display: block; /* Show on mobile */
    position: absolute; /* Position relative to header-top */
    left: 15px; /* Align with header-top padding */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Mobile Main Navigation (Hamburger Menu Content) */
  .main-nav {
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--card-bg); /* Sidebar background */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    display: none; /* Hidden by default - critical for toggle logic */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start;
    padding: 20px 0;
    min-height: auto; /* Remove fixed height */
    height: auto; /* Remove fixed height */
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Show menu - critical for toggle logic */
  }

  .nav-container {
    flex-direction: column; /* Stack menu items vertically */
    align-items: flex-start;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px; /* Adjust padding */
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap between vertical items */
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--divider-color);
  }

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

  .nav-list a {
    padding: 12px 0;
    width: 100%;
    text-align: left;
  }

  /* Footer Responsive */
  .site-footer {
    padding-top: 30px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    padding: 0 15px;
  }

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

  .footer-bottom {
    padding: 15px 15px 0;
  }

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

/* No-scroll class for body 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;
}
