: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; /* Use for vibrant neon glow */
  --gold-color: #F2C14E; /* Use for vibrant neon glow */
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;

  /* Neon specific colors - derived for high vibrancy */
  --neon-primary: var(--glow-color); /* Vibrant green for primary neon */
  --neon-secondary: var(--gold-color); /* Vibrant gold for secondary neon */
  --neon-accent: #00ffff; /* A contrasting cyber blue */

  /* Header offset based on marquee + header-top + main-nav */
  --header-offset: 166px; /* Desktop: 44 + 68 + 52 + 2px */
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-main);
  background-color: var(--background-color);
  line-height: 1.6;
  padding-top: var(--header-offset); /* Critical for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base container styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Animations for neon effects */
@keyframes rainbow-border {
  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%, 100% { text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), 0 0 15px var(--neon-primary); color: #ffffff; }
  33% { text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary); color: #ffffff; }
  66% { text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent); color: #ffffff; }
}
@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 fixed height */
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: rainbow-border 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 0 0 10px rgba(var(--neon-primary), 0.7), 0 0 20px rgba(var(--neon-primary), 0.5), inset 0 0 20px rgba(255, 255, 255, 0.1);
  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: #ffffff; text-decoration: none;
  text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), 0 0 15px var(--neon-primary);
  line-height: 1.5; display: inline-block; vertical-align: middle;
  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);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: rainbow-border 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 0 0 10px rgba(var(--neon-secondary), 0.7), 0 0 20px rgba(var(--neon-secondary), 0.5);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  color: var(--text-main); /* Regular style, no neon */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block; /* Ensure it's visible */
  flex-shrink: 0;
  padding: 0; /* No extra padding */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 60px; /* Desktop logo max height */
  object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Desktop default: visible */
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile Navigation Buttons - hidden on desktop */
.mobile-nav-buttons {
  display: none; /* Desktop default: hidden */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default: visible */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Dark background, different from header-top */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 5s linear infinite reverse; /* Dynamic border color, different animation */
  box-shadow: 0 0 10px rgba(var(--neon-accent), 0.7), 0 0 20px rgba(var(--neon-accent), 0.5);
}
.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px;
}
.nav-link {
  color: var(--text-main); /* Regular style, no neon */
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--secondary-color);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo */
  flex-shrink: 0;
}
.hamburger-menu span {
  display: block;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  position: absolute;
  left: 0;
  width: 100%;
  transition: all 0.3s ease;
  /* Neon glow for hamburger */
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}
.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); }

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.mobile-menu-overlay.active {
  display: block;
}

/* Buttons */
.btn {
  position: relative;
  background: var(--button-gradient); /* Custom button gradient */
  padding: 12px 25px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: rainbow-border 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 15px var(--neon-primary), 0 0 30px var(--neon-primary), inset 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Footer */
.site-footer {
  background-color: var(--background-color); /* Dark background */
  color: var(--text-secondary);
  padding: 40px 0 20px;
  font-size: 14px;
}
.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 20px;
}
.footer-col h3 {
  color: var(--text-main);
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-col a:hover {
  color: var(--primary-color);
}
.footer-logo {
  color: var(--text-main);
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}
.footer-description {
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.footer-bottom {
  border-top: 1px solid var(--divider-color);
  padding-top: 20px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.footer-bottom .copyright {
  margin: 0;
  color: var(--text-secondary);
}
/* Ensure anchor slots are not hidden */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure element exists for injection */
  display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* Mobile: 36 + 60 + 48 + 2px */
  }

  /* Marquee */
  .marquee-section { height: 36px !important; }
  .marquee-container { gap: 10px !important; padding: 0 12px !important; height: 100% !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; }

  /* Header */
  .site-header { top: 36px; } /* Below mobile marquee */
  .header-top { height: 60px !important; } /* Mobile fixed height */
  .header-container {
    width: 100%; max-width: none; padding-left: 15px; padding-right: 15px;
    justify-content: space-between; /* Hamburger left, Logo center, right empty */
    position: relative; /* For absolute positioning of logo if needed */
  }
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 20px;
    position: absolute; /* Force center, override flex if needed */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  .logo img { max-height: 40px !important; } /* Mobile logo max height */

  .hamburger-menu { display: block; order: -1; /* Place hamburger first */ }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Mobile default: visible */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Added vertical padding */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Match header-top background */
    border-bottom: 1px solid var(--divider-color); /* Subtle divider */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    min-height: 48px; /* Fixed height for mobile buttons row */
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Max width for 2 buttons with 10px gap */
    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;
    text-align: center;
  }

  /* Main Navigation (mobile) */
  .main-nav {
    height: auto; /* Auto height for menu content */
    min-height: 100vh; /* Full viewport height when active */
    width: 280px; /* Sidebar width */
    position: fixed;
    top: 0; /* Align with top of viewport */
    left: 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 60px; /* Space for hamburger/logo area */
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    z-index: 1000; /* Above overlay */
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Match desktop main-nav */
    border-right: 2px solid;
    animation: rainbow-border 5s linear infinite reverse; /* Dynamic border color */
    display: none; /* Mobile default hidden, JS will change to flex/block */
  }
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0); /* Slide in */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    gap: 15px;
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column */
    padding: 0 15px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .footer-col li {
    margin-bottom: 0;
  }
  .footer-col a {
    padding: 5px 10px;
    border: 1px solid var(--divider-color);
    border-radius: 5px;
  }
  .footer-bottom {
    padding: 0 15px 20px;
  }
  .footer-bottom .footer-container {
    padding: 0; /* Remove container padding for footer-bottom */
  }

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