:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;

  /* Neon colors derived from theme */
  --neon-primary: var(--glow-color); /* #57E38D */
  --neon-secondary: var(--primary-color); /* #11A84E */
  --neon-accent: var(--gold-color); /* #F2C14E */

  /* Header offset for desktop (with marquee) */
  --header-offset: 166px;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  padding-top: var(--header-offset); /* Mandatory body padding-top */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* Base styles for anchors/buttons */
a {
  text-decoration: none;
  color: inherit;
}

/* Keyframe Animations for 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: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: #ffffff;
  }
  100% {
    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 height */
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--text-main);
  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 neon-primary's rgba for inner shadow */
  z-index: 1001; /* Ensure on top of header */
  display: flex; /* Use flex to align icon and wrapper */
  align-items: center;
  justify-content: center;
  padding: 0 15px; /* Add padding for content */
}

.marquee-container {
  width: 100%;
  max-width: 1200px; /* Constrain width for larger screens */
  height: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; /* Adjusted size for icon */
  height: 24px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px; /* Adjusted font size */
  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: 15px; /* Adjusted font size */
  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;
  line-height: 1.2; /* Adjust line-height for better fit */
}

.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: 15px;
  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 */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background-color: transparent; /* Background handled by header-top and main-nav */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--deep-green), var(--card-bg)); /* 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),
    inset 0 0 10px rgba(87, 227, 141, 0.1); /* Glow color from theme */
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px; /* Padding for logo and buttons */
  box-sizing: border-box;
}

/* Logo - NO NEON EFFECT */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main); /* Regular text color */
  text-decoration: none;
  display: block;
  flex-shrink: 0; /* Prevent shrinking */
  /* No text-shadow, box-shadow, or neon animations here */
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
  padding: 0;
  margin-right: 15px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  margin-bottom: 5px;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}
.hamburger-line:last-child { margin-bottom: 0; }

.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: visible, horizontal */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-bg), var(--deep-green)); /* Dark background, different from header-top */
  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),
    inset 0 0 10px rgba(17, 168, 78, 0.1); /* Glow color from theme */
}

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

.nav-link {
  color: var(--text-main); /* Regular text color for menu items */
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

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

/* Buttons (Neon Style) */
.btn {
  position: relative;
  background: var(--button-gradient);
  padding: 10px 20px;
  color: var(--text-main);
  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),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s; /* Faster animation 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); /* Use neon-primary's rgba for inner shadow */
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Mobile Overlay for Hamburger Menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below menu, above content */
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.site-footer h3 {
  color: var(--text-main);
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 5px;
}

.site-footer h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

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

.footer-col {
  padding: 10px 0;
}

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

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

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

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

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

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

/* Dynamic Slot styles for footer */
.footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px; /* For col_4 icons */
  width: 100%;
}
.footer-dynamic-row .footer-slot-anchor-inner {
  gap: 8px; /* For mid_1, mid_2 icons */
}
.footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--divider-color);
  text-align: center;
  color: var(--text-secondary);
  /* No links allowed in footer-bottom */
}
.footer-bottom p {
    margin: 0;
}

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

  body {
    padding-top: var(--header-offset);
  }

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

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

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

  .header-top {
    min-height: 60px !important; /* Mobile height */
    height: 60px !important;
    box-shadow:
      0 0 8px var(--neon-primary),
      0 0 16px var(--neon-primary),
      inset 0 0 8px rgba(87, 227, 141, 0.1); /* Glow color from theme */
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    justify-content: flex-start; /* Align hamburger left */
  }

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

  .logo {
    order: 2; /* Place second */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 22px;
  }

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

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent wrapping */
    min-height: 48px; /* Mobile height */
    height: auto; /* Allow height to adjust if text wraps */
    background: linear-gradient(135deg, var(--card-bg), var(--deep-green)); /* 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 16px var(--neon-secondary),
      inset 0 0 8px rgba(17, 168, 78, 0.1); /* Glow color from theme */
  }

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

  /* Main Navigation (Mobile - Hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e); /* Dark menu background */
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    border-right: 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),
      inset 0 0 10px rgba(87, 227, 141, 0.1); /* Glow color from theme */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider-color);
    font-size: 16px;
  }
  .nav-link:last-child { border-bottom: none; }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    margin-bottom: 30px;
  }

  .footer-col h3 {
    font-size: 16px;
    margin-bottom: 15px;
  }
  .footer-col h3::after {
    width: 30px;
  }

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

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

  .footer-bottom {
    padding-top: 15px;
    font-size: 12px;
  }
}

/* No-scroll class for body when menu is open */
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;
  }
}
