: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;

  --neon-primary: #57E38D; /* Vibrant green from Glow */
  --neon-secondary: #F2C14E; /* Gold from Gold */
  --neon-accent: #2AD16F; /* Button top green */

  --header-offset: 166px; /* Desktop: 44 (marquee) + 68 (header-top) + 52 (main-nav) + 2px margin = 166px */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-main);
  padding-top: var(--header-offset);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Neon Glow Animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      0 0 15px var(--neon-primary);
    color: var(--text-main);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: var(--text-main);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: var(--text-main);
  }
}

@keyframes marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px; /* Desktop height */
  box-sizing: border-box;
  background: var(--background-color); /* Dark background */
  color: var(--text-main);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  box-shadow:
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(87, 227, 141, 0.1); /* Green glow */
  z-index: 1001;
}
.marquee-container {
  width: 100%; max-width: 100%; height: 100%; margin: 0 auto; overflow: hidden;
  display: flex; align-items: center; gap: 15px; padding: 0 20px; box-sizing: border-box;
}
.marquee-icon {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; z-index: 2; position: relative;
}
.marquee-icon-emoji {
  font-size: 24px; display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate;
  text-shadow:
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.marquee-wrapper { flex: 1; overflow: hidden; position: relative; }
.marquee-content {
  display: inline-flex; align-items: center; white-space: nowrap;
  animation: marquee-scroll 30s linear infinite; gap: 30px;
}
.marquee-text {
  font-size: 16px; font-weight: 600; color: var(--text-main); text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  cursor: pointer; transition: all 0.3s ease;
}
.marquee-text:hover {
  text-shadow:
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    0 0 40px var(--neon-primary);
  transform: scale(1.05); color: #ffffff;
}
.marquee-separator {
  font-size: 16px; color: rgba(255, 255, 255, 0.6); margin: 0 15px;
  text-shadow:
    0 0 3px var(--neon-primary),
    0 0 6px var(--neon-primary);
}

/* Header Section */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee desktop */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--background-color); /* Dark background */
  color: var(--text-main);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  box-shadow:
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    inset 0 0 20px rgba(87, 227, 141, 0.1); /* Green glow */
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Slightly different dark bg */
  border-bottom: 1px solid var(--divider-color);
}
.header-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px; /* Desktop max-width */
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px; /* Desktop padding */
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main); /* Regular text color, no neon */
  text-decoration: none;
  display: block; /* Ensure visibility */
  flex-shrink: 0;
}
.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; /* Desktop default */
  gap: 10px;
  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; /* Mobile height */
  width: 100%;
  max-width: 100%;
  padding: 0 15px; /* Mobile padding */
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Dark background */
  border-top: 1px solid var(--divider-color);
  border-bottom: 1px solid var(--divider-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: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Dark background */
  border-top: 1px solid var(--divider-color);
  border-bottom: 1px solid var(--divider-color);
}
.nav-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px; /* Desktop max-width */
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px; /* Desktop padding */
}
.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main); /* Regular text color */
  text-decoration: none;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--glow-color); /* Glow color on hover */
  background-color: rgba(87, 227, 141, 0.1); /* Light glow background */
  border-radius: 3px;
}

/* Hamburger Menu (mobile only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above logo */
  transition: all 0.3s ease;
  padding: 5px;
}
.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--neon-primary);
  border-radius: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}
.hamburger-menu.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* Overlay for mobile menu */
.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; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}
.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Buttons */
.btn {
  position: relative;
  background: var(--button-gradient);
  padding: 12px 30px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  text-shadow:
    0 0 5px var(--text-main),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}
.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(87, 227, 141, 0.3);
}

/* Footer Section */
.site-footer {
  background-color: var(--background-color); /* Regular dark background */
  color: var(--text-secondary);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}
.footer-col {
  display: flex;
  flex-direction: column;
}
.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 15px;
}
.footer-col h3 {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 15px;
}
.footer-col p {
  margin-bottom: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--primary-color);
}
.footer-slot-anchor-inner {
  min-height: 20px;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--divider-color);
  padding-top: 20px;
  margin-top: 20px;
  color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* Mobile: 36 (marquee) + 60 (header-top) + 48 (mobile-nav-buttons) + 2px margin = 146px */
  }

  .marquee-section {
    height: 36px !important; /* Mobile height */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 12px !important;
  }
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .marquee-icon-emoji { font-size: 14px !important; }
  .marquee-text { font-size: 14px !important; }
  .marquee-separator { font-size: 14px !important; margin: 0 10px !important; }
  .marquee-content { gap: 20px; animation: marquee-scroll 25s linear infinite; }

  .site-header {
    top: 36px; /* Below marquee mobile */
  }

  .header-top {
    min-height: 60px !important; /* Mobile height */
    height: 60px !important;
  }
  .header-container {
    width: 100%; /* Mobile full width */
    max-width: none;
    padding: 0 15px; /* Mobile padding */
    justify-content: space-between;
    position: relative;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Adjust max-width to not overlap hamburger */
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }
  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: -1; /* Place it first */
    margin-right: auto;
    flex-shrink: 0;
  }

  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    align-items: center;
    justify-content: center;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, with 10px gap */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
  }

  .main-nav {
    min-height: auto; /* Mobile menu height adjusts */
    height: 100vh; /* Full viewport height */
    position: fixed; /* Fixed for mobile menu */
    top: calc(var(--header-offset) - 48px); /* Starts below header-top and marquee */
    left: 0;
    width: 250px; /* Mobile menu width */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Above overlay */
    display: none; /* Hidden by default, shown by JS */
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Dark background */
  }
  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Show menu */
  }
  .nav-container {
    width: 100%; /* Mobile full width */
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
  }
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid var(--divider-color);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .footer-col:not(:last-child) {
    margin-bottom: 20px;
  }

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

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