:root {
  --primary-color: #26A9E0; /* Light blue */
  --secondary-color: #FFFFFF; /* White */
  --login-color: #EA7C07; /* Orange */
  --background-color: #FFFFFF;
  --black-color: #000000;

  /* Neon dynamic colors - based on theme, but with vibrant cycles */
  --neon-primary: var(--primary-color);
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF00FF; /* Magenta */
  --neon-cycle-1: #26A9E0, #00FFFF, #FF00FF, #EA7C07, #FFFF00, #FF1493;
  --neon-cycle-2: #00FFFF, #FF00FF, #26A9E0, #FFFF00, #EA7C07, #FF1493;
  --neon-cycle-3: #FF00FF, #26A9E0, #00FFFF, #EA7C07, #FFFF00, #FF1493;

  /* Header offset based on marquee + header-top + main-nav */
  --header-offset: 166px; /* Desktop: 44 (marquee) + 68 (header-top) + 52 (main-nav) + 2px buffer */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  background-color: var(--black-color); /* Dark background for neon effect */
  color: #ffffff;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Base animations for dynamic neon colors */
@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 hue-spin {
  0% { filter: hue-rotate(0deg); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { filter: hue-rotate(360deg); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
}
@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 gradient-flow {
  0% { background-position: 0% 50%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; }
  50% { background-position: 100% 50%; box-shadow: 0 0 10px #00ffff, 0 0 20px #0000ff; }
  100% { background-position: 0% 50%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; }
}
@keyframes random-glow {
  0% { border-color: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
  20% { border-color: #00ffff; box-shadow: 0 0 20px #00ffff; }
  40% { border-color: #ffff00; box-shadow: 0 0 20px #ffff00; }
  60% { border-color: #00ff00; box-shadow: 0 0 20px #00ff00; }
  80% { border-color: #ff0000; box-shadow: 0 0 20px #ff0000; }
  100% { border-color: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
}
@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 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 currentColor; }
  20%, 24%, 55% { opacity: 0.8; box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, inset 0 0 10px currentColor; }
}
@keyframes pulse-glow {
  from { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
  to { box-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor; }
}
@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Marquee Section (Neon Style) */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  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 color border */
  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(255, 0, 255, 0.1);
  z-index: 1001; /* Above 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;
}
.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);
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Site Header (Neon Style, Fixed) */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
}

/* Header Top Section (Logo + Desktop Buttons) */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  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 color border */
  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(255, 0, 255, 0.1);
}
.header-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px; /* Desktop container max-width */
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px; /* Inner padding */
}

/* Logo (Regular Style - NO NEON) */
.logo {
  color: var(--secondary-color); /* White for contrast */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  flex-shrink: 0;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 60px; /* Max height for desktop logo */
  object-fit: contain;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002;
  flex-shrink: 0;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  border: 2px solid;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  border-radius: 3px;
  padding: 5px;
  box-sizing: content-box;
}
.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--secondary-color);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glow */
}
.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }
.hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto; /* Push to right */
}

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

/* Placeholder for mobile logo centering (hidden on desktop) */
.mobile-right-spacer {
  display: none;
}

/* Main Navigation (Desktop Display) */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Default to flex for 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; /* Different dynamic color border */
  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(0, 255, 255, 0.1);
}
.nav-container {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  max-width: 1200px; /* Desktop container max-width */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 0 20px;
}
.nav-link {
  color: var(--secondary-color); /* White for menu items */
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-link:hover {
  color: var(--primary-color);
}
.nav-link:hover::after {
  transform: scaleX(1);
}

/* Buttons (Neon Style) */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 20px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  text-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}
.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--neon-primary), 0 0 30px var(--neon-primary), inset 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Footer (Regular Style) */
.site-footer {
  background-color: #1a1a1a; /* Dark gray background */
  color: #cccccc;
  padding: 40px 20px 10px;
  font-size: 14px;
  line-height: 1.6;
}
.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 rgba(255, 255, 255, 0.1);
}
.footer-col h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}
.footer-logo {
  color: var(--primary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}
.footer-description {
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
  color: #aaaaaa;
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: var(--primary-color);
}
.footer-dynamic-row {
  max-width: 1200px;
  margin: 20px auto;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-dynamic-row .footer-slot-anchor-inner,
.footer-col.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* For rows */
  width: 100%;
}
.footer-col.footer-dynamic-col .footer-slot-anchor-inner {
  gap: 5px; /* For column */
}
.footer-dynamic-row .footer-slot-anchor-inner img,
.footer-col.footer-dynamic-col .footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: #999999;
}
.footer-bottom a {
  text-decoration: none; /* No links allowed here, but just in case */
  color: inherit;
}

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

  /* Marquee Mobile */
  .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 Mobile */
  .site-header {
    top: 36px; /* Below mobile marquee */
  }
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
  }
  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove inner padding, use header-top padding */
    justify-content: space-between; /* Hamburger left, Logo center, Spacer right */
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Hamburger Menu Mobile */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: 1; /* Left side */
    position: relative;
    z-index: 1002;
  }

  /* Logo Centering Mobile (Method 1: Flexbox with spacer) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Center */
    font-size: 20px; /* Adjust logo font size */
  }
  .logo img {
    max-height: 40px !important; /* Max height for mobile logo */
  }

  .mobile-right-spacer {
    display: block; /* Visible on mobile */
    width: 40px; /* Roughly same width as hamburger menu */
    height: 1px; /* Placeholder */
    order: 3; /* Right side */
    flex-shrink: 0;
  }
  
  /* Desktop Nav Buttons (Hidden on Mobile) */
  .desktop-nav-buttons {
    display: none; /* Hidden on mobile */
  }

  /* Mobile Nav Buttons (Always Visible) */
  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the row */
    overflow: hidden;
    gap: 10px; /* Gap between buttons */
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, #16213e, #0f3460); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
    min-height: 48px; /* Fixed height for mobile buttons */
    height: auto; /* Allow height to adjust if text wraps, but prefer fixed height */
  }
  .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 wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation (Mobile Hidden, Column Layout) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: 146px; /* Below header-top + mobile-nav-buttons */
    left: 0;
    width: 70%; /* Slide-out menu width */
    height: calc(100% - 146px); /* Full height below header */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e); /* Dark background */
    overflow-y: auto;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary);
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link::after {
    display: none; /* Remove underline effect on mobile */
  }
  .nav-link:hover {
    color: var(--primary-color);
  }

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

  /* Body scroll lock */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 10px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .footer-col h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .footer-logo {
    font-size: 24px;
    margin-bottom: 10px;
  }
  .footer-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
  }
  .footer-dynamic-row {
    margin: 15px auto;
    padding: 10px 0;
  }
  .footer-bottom {
    padding-top: 15px;
    font-size: 12px;
  }

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