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

  /* Neon Dynamic Colors (mapped to theme colors) */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: var(--glow-color);

  /* Header offset based on fixed elements */
  --header-offset: 168px;
}

/* Global body padding to prevent content being hidden by fixed header */
body {
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
  background-color: var(--background-color);
  color: var(--text-main);
  font-family: 'Arial', sans-serif;
  margin: 0;
  line-height: 1.6;
}

/* --- Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --- Dynamic Neon Glow 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),
      inset 0 0 10px rgba(17, 168, 78, 0.3); /* Fallback RGB for primary */
  }
  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(34, 199, 104, 0.3); /* Fallback RGB for secondary */
  }
  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(87, 227, 141, 0.3); /* Fallback RGB for accent */
  }
}

@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 alternate-colors {
  0% {
    border-color: var(--neon-primary);
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
  100% {
    border-color: var(--neon-secondary);
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }
}

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

/* --- 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: #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(17, 168, 78, 0.1);
  z-index: 1001; /* Ensure on top of header */
}

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

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

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

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

/* --- Header Section --- */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  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(17, 168, 78, 0.1);
  padding: 0 20px; /* Add some padding for logo/buttons */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff; /* Regular style, no neon for logo */
  text-decoration: none;
  display: block;
  line-height: 1; /* Adjust line-height for better vertical alignment */
}

/* Ensure logo img is handled if present, though this uses text logo */
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 12px;
  align-items: center;
}

.btn {
  position: relative;
  background: var(--btn-gradient); /* Use custom button gradient */
  padding: 12px 25px;
  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 #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
  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-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(17, 168, 78, 0.5);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1002; /* Above logo and mobile buttons */
}

.hamburger-menu__icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease-in-out;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger */
}

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

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

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Display as flex on desktop */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Dynamic border color */
  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);
  padding: 0 20px; /* Add some padding for nav links */
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center; /* Center nav items on desktop */
  gap: 25px;
}

.main-nav__link {
  color: var(--text-main);
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav__link:hover {
  color: var(--primary-color);
}

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

.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 {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

.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;
  gap: 5px;
  width: 100%; /* Ensure full width for row slots */
}

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

.footer-dynamic-row:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

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

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px;
  }

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

  /* Mobile Content Area 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 Mobile */
  .marquee-section {
    height: 36px;
    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-duration: 25s; /* Adjust speed for mobile */
  }

  /* Header Mobile */
  .site-header {
    top: 36px; /* Below marquee for mobile */
  }
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Adjust padding for mobile */
  }
  .header-container {
    max-width: none; /* Full width for mobile container */
    padding: 0; /* Remove internal padding, handled by header-top */
    position: relative; /* For logo centering if using absolute */
  }
  
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 22px; /* Smaller logo text on mobile */
  }
  .logo img {
    max-height: 40px; /* Smaller logo image on mobile */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place to the left */
    width: 24px; /* Smaller hamburger */
    height: 20px;
  }

  /* Mobile Buttons (Always visible) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding around buttons */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    justify-content: center;
    gap: 10px; /* Space between buttons */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      inset 0 0 10px rgba(17, 168, 78, 0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space equally */
    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 */
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation Mobile (Hidden by default, shown when active) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: calc(36px + 60px + 48px); /* Below marquee and header-top and mobile-nav-buttons */
    left: 0;
    width: 100%;
    height: calc(100% - (36px + 60px + 48px)); /* Fill remaining height */
    overflow-y: auto;
    z-index: 999; /* Below hamburger menu, above overlay */
    background: rgba(10, 10, 10, 0.95); /* Semi-transparent dark background */
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%); /* Start off-screen */
    padding: 20px 15px; /* Add padding for menu items */
    border-top: none; /* Remove border from desktop */
    border-bottom: none;
    box-shadow: none; /* Remove shadow from desktop */
    align-items: flex-start; /* Align menu items to the left */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: none; /* Full width for mobile container */
    padding: 0; /* Remove internal padding */
  }

  .main-nav__link {
    font-size: 18px;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav__link:last-child {
    border-bottom: none;
  }

  /* Overlay for mobile menu */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998; /* Below menu, above main content */
  }

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

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-col:not(:last-child) {
    border-bottom: 1px solid var(--divider-color);
    padding-bottom: 20px;
  }
  .footer-dynamic-row {
    padding: 10px 0;
  }
  .footer-bottom {
    padding-top: 15px;
  }
}

/* For .theme-colors animation RGB fallback for shadows */
:root {
  --neon-primary-rgb: 17, 168, 78; /* RGB for #11A84E */
  --neon-secondary-rgb: 34, 199, 104; /* RGB for #22C768 */
  --neon-accent-rgb: 87, 227, 141; /* RGB for #57E38D */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
