/* Global Styles */
:root {
  --header-offset: 166px; /* Desktop with marquee */
  --marquee-height: 44px;
  --header-top-height: 68px;
  --main-nav-height: 52px;
  --mobile-nav-buttons-height: 48px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #F2FFF6;
  background-color: #08160F;
  padding-top: var(--header-offset); /* Fixed header offset */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

h1, h2, h3, h4, h5, h6 {
  color: #F2FFF6;
  margin-top: 0;
  margin-bottom: 10px;
}

a {
  color: #11A84E;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* 
/* Dynamic neon glow color variables */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --neon-primary: var(--primary-color, #11A84E);
  --neon-secondary: var(--secondary-color, #22C768);
  --neon-accent: #57E38D; /* Using Glow color as accent */
  --neon-bg-dark: #0a0a0a;
  --neon-bg-gradient: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
}

/* Dynamic color animations */
@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;
  }
}

/* Neon flicker for subtle animation */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
    box-shadow: 
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px currentColor,
      inset 0 0 15px rgba(255,255,255,0.1);
  }
  20%, 24%, 55% {
    opacity: 0.8;
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      inset 0 0 10px rgba(255,255,255,0.05);
  }
}

/* Marquee scrolling animation */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
*/

/* --- Marquee Section --- */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height);
  box-sizing: border-box;
  background: var(--neon-bg-gradient);
  color: #ffffff;
  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(17, 168, 78, 0.1); /* Using primary color for inner glow */
  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: var(--marquee-height); /* Position below marquee */
  left: 0;
  width: 100%;
  background: var(--neon-bg-gradient);
  z-index: 1000;
  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(17, 168, 78, 0.1);
}

.header-top {
  box-sizing: border-box;
  min-height: var(--header-top-height);
  height: var(--header-top-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 20px; /* Default desktop padding */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2FFF6; /* Regular color, no neon for logo */
  text-decoration: none;
  display: block;
  padding: 5px 0; /* Adjust padding to fit height */
  /* LOGO must NOT have neon effects */
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 60px; /* Desktop logo max height */
  object-fit: contain;
}

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

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

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

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  flex-wrap: nowrap; /* Prevent wrapping on desktop */
}

.nav-link {
  color: #F2FFF6; /* Regular text color for menu items */
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link:hover, .nav-link.active {
  color: #11A84E; /* Use primary color on hover */
  text-decoration: underline;
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo and overlay */
  margin-right: 15px;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger */
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px var(--neon-accent); /* Glow effect for bars */
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { top: 100%; transform: translateY(-100%); }

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

/* Mobile Menu Overlay */
.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; /* Below hamburger, above main content */
}

/* --- Buttons (Neon Style) --- */
.btn {
  position: relative;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  padding: 12px 25px;
  color: #ffffff;
  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 #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.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),
    0 0 45px var(--neon-primary),
    inset 0 0 15px rgba(17, 168, 78, 0.4);
}

/* --- Site Footer --- */
.site-footer {
  background-color: #11271B; /* Regular background, no neon */
  color: #A7D9B8;
  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 #1E3A2A;
}

.footer-col h3 {
  color: #F2FFF6;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #F2FFF6;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: #A7D9B8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #11A84E;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #1E3A2A;
}

.footer-bottom p {
  margin: 0;
  color: #A7D9B8;
}

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

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
  }

  /* Mobile Marquee */
  .marquee-section {
    height: var(--marquee-height);
    padding-top: 0;
    padding-bottom: 0;
  }
  
  .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;
  }

  /* Mobile Header */
  .site-header {
    top: var(--marquee-height); /* Position below mobile marquee */
  }

  .header-top {
    min-height: var(--header-top-height);
    height: var(--header-top-height);
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial for mobile to take full width */
    padding: 0; /* Handled by header-top padding */
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Left side */
  }

  .logo {
    order: 1; /* Center */
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0; /* Reset padding */
  }

  .logo img {
    max-height: 56px; /* Mobile logo max height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Padding for the button container */
    gap: 10px;
    justify-content: center;
    min-height: var(--mobile-nav-buttons-height);
    height: auto; /* Allow height to adjust if text wraps */
    background: var(--neon-bg-gradient); /* Same background as header */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse; /* Consistent with main-nav */
    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(34, 199, 104, 0.1);
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 10px gap */
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    height: auto; /* Allow button height to adjust with wrapped text */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(var(--marquee-height) + var(--header-top-height) + var(--mobile-nav-buttons-height)); /* Below header and mobile buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - (var(--marquee-height) + var(--header-top-height) + var(--mobile-nav-buttons-height))); /* Full height below header */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    background: var(--neon-bg-dark); /* Darker background for menu */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      5px 0 15px rgba(0,0,0,0.5),
      0 0 10px var(--neon-primary);
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

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

  /* Mobile Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    padding-bottom: 20px;
  }
  
  .footer-mid-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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