
/* --- Global Variables & Base Styles --- */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --bg-color: #0a0a0a; /* Dark background for neon theme */
  --text-color: #ffffff;
  --header-offset: 166px; /* Desktop: Marquee(44) + HeaderTop(68) + MainNav(52) + 2px buffer */

  /* Neon dynamic colors - based on primary/secondary/accent */
  --neon-primary: var(--primary-color); /* #26A9E0 */
  --neon-secondary: #ff00ff; /* Purple/Pink for contrast */
  --neon-accent: #00ffff; /* Cyan for contrast */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Account for fixed header */
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
  text-decoration: none;
  color: var(--text-color);
}

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

/* --- Keyframe Animations for Neon Effects --- */

/* Theme color flow for borders/shadows */
@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(38, 169, 224, 0.3);
  }
  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(255, 0, 255, 0.3);
  }
  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(0, 255, 255, 0.3);
  }
}

/* Text glow flow for marquee/buttons */
@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;
  }
}

/* Neon flicker for subtle animation */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.8; }
}

/* Pulse glow for buttons/icons */
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

/* --- Marquee Section Styles --- */
.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(38, 169, 224, 0.1);
  z-index: 1001; /* Ensure on top of header */
}

.marquee-container {
  width: 100%;
  max-width: 1200px;
  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: pulse-glow 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;
}

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

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  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 Styles --- */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--text-color);
  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(38, 169, 224, 0.1);
  z-index: 1000; /* Below marquee, above content */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  display: block;
  /* LOGO must not have neon effects */
  text-shadow: none;
  box-shadow: none;
  filter: none;
}
.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 10px;
  margin-left: auto; /* Push to right */
}

.mobile-nav-buttons {
  display: none; /* Hide on desktop */
  padding: 10px 20px;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 990; /* Below main-nav when open */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px;
  display: flex; /* Show 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: 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(255, 0, 255, 0.1);
}

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

.nav-link {
  padding: 10px 15px;
  color: var(--text-color); /* Regular color, no neon */
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  text-decoration: none;
}

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

/* Hamburger menu (mobile only) */
.hamburger-menu {
  display: none; /* Hide on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above overlay */
  padding: 0;
  margin-right: 20px;
}

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

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) 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 mobile menu */
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* --- Buttons --- */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 30px;
  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: bold;
  white-space: nowrap; /* Prevent text wrap 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(38, 169, 224, 0.4);
}

/* --- Footer Section Styles --- */
.site-footer {
  background-color: #1a1a2e; /* Dark, but not neon */
  color: #e0e0e0;
  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 40px;
}

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

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

.footer-nav a {
  color: #e0e0e0;
  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: 8px; /* For mid rows, can be 5px for col */
  width: 100%;
}

.footer-dynamic-col .footer-slot-anchor-inner { gap: 5px; } /* Smaller gap for column */

.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0b0b0;
}

.footer-bottom p {
  margin: 0;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* Mobile: Marquee(36) + HeaderTop(60) + MobileNavButtons(48) + 2px buffer */
  }

  /* Marquee mobile */
  .marquee-section {
    height: 36px !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 12px !important;
    height: 100% !important;
    max-width: 100%; /* Ensure it spans full width */
  }
  .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;
  }

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }
  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    justify-content: flex-start; /* Align hamburger left */
    position: relative; /* For logo absolute centering if needed */
  }

  /* Hamburger menu visible on mobile */
  .hamburger-menu {
    display: block;
    order: 1; /* First item */
  }

  /* Logo centered on mobile (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Second item */
    font-size: 18px; /* Adjust font size for mobile */
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    order: 3; /* After header-top, before main-nav */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    min-height: 48px; /* Mobile fixed height */
    height: 48px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Consistent with main-nav */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      inset 0 0 10px rgba(255, 0, 255, 0.1);
  }

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

  .main-nav {
    display: none; /* Hidden by default, shown with JS active class */
    position: fixed;
    top: var(--header-offset); /* Below header + mobile buttons */
    left: 0;
    width: 75%; /* Slide-in menu width */
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    transform: translateX(-100%); /* Hidden off-screen */
    transition: transform 0.3s ease-out;
    background: linear-gradient(135deg, #0f3460, #16213e, #1a1a2e); /* Dark background */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset 0 0 20px rgba(38, 169, 224, 0.1);
    z-index: 1000; /* Above overlay */
  }

  .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: 20px 0;
    height: auto; /* Allow content to dictate height */
    max-width: none; /* No max-width on mobile */
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    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-bottom {
    margin-top: 20px;
    padding-top: 15px;
  }

  /* Mobile content image overflow fix */
  .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;
  }
}
