:root {
  --site-primary: #11A84E;
  --site-secondary: #22C768;
  --site-card-bg: #11271B;
  --site-background: #08160F;
  --site-text-main: #F2FFF6;
  --site-text-secondary: #A7D9B8;
  --site-border: #2E7A4E;
  --site-glow: #57E38D;
  --site-gold: #F2C14E;
  --site-divider: #1E3A2A;
  --site-deep-green: #0A4B2C;

  /* Neon specific colors for dynamic effects */
  --neon-color-1: var(--site-glow); /* Greenish glow */
  --neon-color-2: #8A2BE2; /* Blue Violet */
  --neon-color-3: #FF00FF; /* Magenta */
  
  --header-offset: 166px; /* Desktop with marquee: 44 (marquee) + 68 (header-top) + 52 (main-nav) + 2px = 166px */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  background-color: var(--site-background);
  color: var(--site-text-main);
  padding-top: var(--header-offset); /* Main content offset for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
  line-height: 1.5;
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Keyframes for dynamic neon effects */
@keyframes theme-colors-glow {
  0%, 100% {
    border-color: var(--neon-color-1);
    box-shadow: 
      0 0 10px var(--neon-color-1),
      0 0 20px var(--neon-color-1),
      inset 0 0 10px rgba(87, 227, 141, 0.3);
  }
  33% {
    border-color: var(--neon-color-2);
    box-shadow: 
      0 0 10px var(--neon-color-2),
      0 0 20px var(--neon-color-2),
      inset 0 0 10px rgba(138, 43, 226, 0.3);
  }
  66% {
    border-color: var(--neon-color-3);
    box-shadow: 
      0 0 10px var(--neon-color-3),
      0 0 20px var(--neon-color-3),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-color-1),
      0 0 10px var(--neon-color-1),
      0 0 15px var(--neon-color-1);
    color: var(--site-text-main);
  }
  33% {
    text-shadow: 
      0 0 5px var(--neon-color-2),
      0 0 10px var(--neon-color-2),
      0 0 15px var(--neon-color-2);
    color: var(--site-text-main);
  }
  66% {
    text-shadow: 
      0 0 5px var(--neon-color-3),
      0 0 10px var(--neon-color-3),
      0 0 15px var(--neon-color-3);
    color: var(--site-text-main);
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-color-1),
      0 0 10px var(--neon-color-1),
      0 0 15px var(--neon-color-1);
    color: var(--site-text-main);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px; /* Desktop height */
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--site-text-main);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors-glow 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-color-1),
    0 0 20px var(--neon-color-1),
    0 0 30px var(--neon-color-1),
    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-color-1),
    0 0 10px var(--neon-color-1),
    0 0 15px var(--neon-color-1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

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

.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(--site-text-main);
  text-decoration: none;
  text-shadow: 
    0 0 5px var(--neon-color-1),
    0 0 10px var(--neon-color-1),
    0 0 15px var(--neon-color-1);
  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-color-1),
    0 0 20px var(--neon-color-1),
    0 0 30px var(--neon-color-1),
    0 0 40px var(--neon-color-1);
  transform: scale(1.05);
  color: var(--site-text-main);
}

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

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Header Section */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--site-text-main);
  animation: theme-colors-glow 4s ease-in-out infinite; /* Dynamic border glow */
  box-shadow: 
    0 0 10px var(--neon-color-1),
    0 0 20px var(--neon-color-1),
    0 0 30px var(--neon-color-1),
    inset 0 0 20px rgba(87, 227, 141, 0.1);
}

.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);
  border-bottom: 2px solid transparent; /* Border for dynamic glow */
  animation: theme-colors-glow 4s ease-in-out infinite;
}

.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 {
  font-size: 28px;
  font-weight: bold;
  color: var(--site-text-main); /* Regular color, no neon for logo */
  text-decoration: none;
  display: block; /* Ensure visibility */
  flex-shrink: 0;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Desktop default: visible */
  gap: 10px;
  align-items: center;
}

.btn {
  position: relative;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button color */
  padding: 12px 30px;
  color: var(--site-text-main);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid transparent; /* Border for dynamic glow */
  animation: theme-colors-glow 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px var(--site-text-main),
    0 0 10px var(--neon-color-1); /* Text glow for buttons */
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-color-1),
    0 0 30px var(--neon-color-1),
    inset 0 0 15px rgba(87, 227, 141, 0.5);
}

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop height */
  height: 52px;
  display: flex; /* Desktop default: visible */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark gradient */
  border-top: 2px solid transparent; /* Border for dynamic glow */
  border-bottom: 2px solid transparent; /* Border for dynamic glow */
  animation: theme-colors-glow 4s ease-in-out infinite reverse; /* Dynamic border glow, reversed for contrast */
}

.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: 25px;
  padding: 0 20px;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--site-glow);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover {
  color: var(--site-glow);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--site-glow);
  position: relative;
  transition: background-color 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger icon */
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--site-glow);
  position: absolute;
  transition: transform 0.3s ease, top 0.3s ease, background-color 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger icon */
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.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;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Footer Section */
.site-footer {
  background-color: var(--site-background);
  color: var(--site-text-secondary);
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--site-divider);
}

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

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

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

.site-footer h3 {
  font-size: 18px;
  color: var(--site-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(--site-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}
.footer-dynamic-col .footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px auto;
  padding: 15px 0;
  border-bottom: 1px solid var(--site-divider);
}

.footer-dynamic-row-2 {
  border-bottom: none; /* Last dynamic row doesn't need border-bottom */
  margin-bottom: 0;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.footer-dynamic-row .footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  color: var(--site-text-secondary);
  max-width: 1200px;
  margin: 0 auto;
}

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

  .marquee-section {
    height: 36px; /* Mobile height */
  }
  .marquee-container {
    padding: 0 12px;
    gap: 10px;
  }
  .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: 36px; /* Below mobile marquee */
  }
  
  .header-top {
    min-height: 60px; /* Mobile height */
    height: 60px;
  }
  .header-container {
    padding: 0 15px;
    max-width: none; /* Occupy full width */
    justify-content: flex-start; /* Adjust for hamburger menu */
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Show on mobile */
    order: 0; /* Place before logo */
    margin-right: 15px;
  }
  
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    order: 1; /* Center logo */
  }
  .logo img {
    max-height: 56px; /* Mobile logo height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Match header top background */
    border-bottom: 2px solid transparent;
    animation: theme-colors-glow 4s ease-in-out infinite;
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header block */
    left: 0;
    width: 75%; /* Slide-in width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Match main nav desktop background */
    border-right: 2px solid transparent;
    animation: theme-colors-glow 4s ease-in-out infinite reverse;
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0;
    max-width: none; /* Occupy full width */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after {
    height: 1px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .footer-dynamic-row {
    padding: 10px 0;
  }
  .footer-dynamic-row .footer-slot-anchor-inner img {
    max-height: 40px; /* Smaller images on mobile */
  }

  .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;
  }
}
