:root {
  --header-offset: 166px; /* 44px (marquee) + 68px (header-top) + 52px (main-nav) + 2px */
  --marquee-height-desktop: 44px;
  --header-top-height-desktop: 68px;
  --main-nav-height-desktop: 52px;

  --neon-primary: #57E38D; /* Glow */
  --neon-secondary: #11A84E; /* Primary */
  --neon-accent: #22C768; /* Secondary */

  /* Custom color scheme */
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

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

/* 🚨 Dynamic Neon Glow Animations (MUST use dynamic colors) */
@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary), inset 0 0 10px rgba(87, 227, 141, 0.3);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary), inset 0 0 10px rgba(17, 168, 78, 0.3);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent), inset 0 0 10px rgba(34, 199, 104, 0.3);
  }
}

@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(--color-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(--color-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(--color-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 Styles (MUST) */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop);
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--color-text-main);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  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);
  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(--color-text-main);
  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: var(--color-text-main);
}

.marquee-separator {
  font-size: 16px;
  color: rgba(242, 255, 246, 0.6);
  margin: 0 15px;
  text-shadow: 0 0 3px var(--neon-primary), 0 0 6px var(--neon-primary);
}

/* 🚨 Header Styles (MUST) */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop);
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  box-sizing: border-box;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  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);
}

.header-top {
  box-sizing: border-box;
  min-height: var(--header-top-height-desktop);
  height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(var(--neon-primary), 0.2);
}

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

/* 🚨 LOGO Styles (NO NEON EFFECTS) */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  flex-shrink: 0;
  /* No text-shadow, box-shadow, filter, neon animations */
}

/* 🚨 Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  flex-shrink: 0;
}
.hamburger-menu::before, .hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--neon-primary);
  left: 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}
.hamburger-menu::before { top: 0; }
.hamburger-menu::after { bottom: 0; }
.hamburger-menu.active::before { transform: rotate(45deg); top: 9px; }
.hamburger-menu.active::after { transform: rotate(-45deg); bottom: 9px; }

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

.main-nav {
  box-sizing: border-box;
  min-height: var(--main-nav-height-desktop);
  height: var(--main-nav-height-desktop);
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation or reversed */
  box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary), inset 0 0 20px rgba(17, 168, 78, 0.1);
}

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--neon-primary);
  text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.mobile-nav-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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.visible {
  display: block;
  opacity: 1;
}

/* 🚨 Button Styles */
.btn {
  position: relative;
  background: var(--color-button-gradient);
  padding: 12px 25px;
  color: var(--color-text-main);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 0 0 5px var(--color-text-main), 0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Footer Styles (NO NEON EFFECTS) */
.site-footer {
  background-color: var(--color-card-bg);
  color: var(--color-text-secondary);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  border-top: 1px solid var(--color-divider);
}

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

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

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li a {
  color: var(--color-text-secondary);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: var(--neon-primary);
}

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

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

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure anchor is renderable */
}

/* 🚨 Mobile Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* 36px (marquee) + 60px (header-top) + 48px (main-nav) + 2px */
    --marquee-height-desktop: 36px; /* Override desktop height for mobile */
    --header-top-height-desktop: 60px; /* Override desktop height for mobile */
    --main-nav-height-desktop: 48px; /* Override desktop height for mobile */
  }

  .marquee-section {
    height: var(--marquee-height-desktop);
  }
  .marquee-container {
    gap: 10px;
    padding: 0 12px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 14px;
  }
  .marquee-separator {
    font-size: 14px;
    margin: 0 10px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  .site-header {
    top: var(--marquee-height-desktop);
  }

  .header-top {
    min-height: var(--header-top-height-desktop);
    height: var(--header-top-height-desktop);
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: flex-start; /* Adjust for hamburger menu */
    gap: 15px; /* Space between hamburger and logo */
  }

  .hamburger-menu {
    display: block;
  }

  /* 🚨 Mobile Logo Centering (Method 1) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 0 0 8px var(--neon-secondary), 0 0 15px var(--neon-secondary), inset 0 0 10px rgba(17, 168, 78, 0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, considering 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Position below header and mobile buttons */
    left: 0;
    width: 250px;
    height: calc(100% - var(--marquee-height-desktop) - var(--header-top-height-desktop) - var(--main-nav-height-desktop));
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background: var(--color-card-bg);
    padding: 20px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-right: 2px solid var(--color-border);
  }

  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider);
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col h3 {
    font-size: 16px;
  }

  .footer-logo {
    font-size: 20px;
  }

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

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
