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

  /* Neon dynamic colors - based on theme */
  --neon-primary: var(--glow-color); /* #57E38D */
  --neon-secondary: #2AD16F; /* Button top color */
  --neon-accent: var(--gold-color); /* #F2C14E */

  /* Header offset calculation (with marquee) */
  --header-offset: 166px; /* 44px (marquee) + 68px (header-top) + 52px (main-nav) */
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-main-color);
  background-color: var(--bg-color);
  padding-top: var(--header-offset);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body overflow on desktop as well */
}

/* Base animations for dynamic neon effects */
@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-color);
  }
  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-color);
  }
  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-color);
  }
}

@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: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  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); /* Use glow color for shadow */
  z-index: 1001;
  display: flex;
  align-items: center;
}

.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;
  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;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  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-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  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); /* Use glow color for shadow */
}

.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; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main-color); /* Not neon */
  text-decoration: none;
  flex-shrink: 0;
  /* No neon effects for logo */
  text-shadow: none;
  box-shadow: none;
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

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

.btn {
  position: relative;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Specific button gradient */
  padding: 12px 25px;
  color: var(--text-main-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px var(--text-main-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  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(87, 227, 141, 0.3);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border color, reversed animation */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(42, 209, 111, 0.1); /* Use secondary neon color for shadow */
}

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

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

.nav-link:hover {
  color: var(--neon-primary); /* Use a neon color on hover */
  text-shadow: 0 0 8px var(--neon-primary);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
  border-radius: 3px;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-main-color);
  position: relative;
  transition: background-color 0.3s ease;
  text-shadow: 
    0 0 3px var(--text-main-color),
    0 0 6px var(--neon-primary);
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-main-color);
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
  text-shadow: 
    0 0 3px var(--text-main-color),
    0 0 6px var(--neon-primary);
}

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

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

/* Site Footer */
.site-footer {
  background-color: var(--card-bg-color); /* Regular dark background */
  color: var(--text-secondary-color);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

.footer-col h3 {
  color: var(--text-main-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--neon-primary); /* Can use a neon color for footer logo */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
  color: var(--text-secondary-color);
}

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

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

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

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

.footer-dynamic-col .footer-slot-anchor-inner,
.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
}
.footer-dynamic-col .footer-slot-anchor-inner {
  gap: 5px;
}
.footer-dynamic-row .footer-slot-anchor-inner {
  gap: 8px;
  width: 100%;
}
.footer-dynamic-col .footer-slot-anchor-inner img,
.footer-dynamic-row .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;
  padding: 20px 0;
  border-top: 1px solid var(--divider-color);
}
.footer-dynamic-row-1 { margin-bottom: 10px; }
.footer-dynamic-row-2 { border-bottom: 1px solid var(--divider-color); padding-bottom: 30px; }

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

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

  /* Marquee */
  .marquee-section {
    height: 36px !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 */
  .site-header {
    top: 36px; /* Below mobile marquee */
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
    justify-content: flex-start; /* Align hamburger left, logo centered */
  }
  .header-container .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .logo img {
    max-height: 40px !important; /* Mobile logo height */
  }
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it first */
    margin-right: 15px; /* Space between hamburger and logo */
  }

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Always visible 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);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  .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 */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation (Hamburger Menu Content) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the entire fixed header block */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Adjust height to fit below header */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    padding: 20px 0;
    overflow-y: auto; /* Allow scrolling for long menus */
    border: none; /* Remove border from main-nav on mobile */
    box-shadow: none; /* Remove box-shadow from main-nav on mobile */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    max-width: none; /* Important for mobile */
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider-color);
    text-align: left;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-dynamic-row {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
