:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;

  /* Neon colors for dynamic effects - derived from site colors and vibrant choices */
  --neon-base-primary: var(--primary-color); /* Use site primary as a base */
  --neon-base-secondary: var(--secondary-color);
  --neon-flow-1: #FF00FF; /* Vibrant Pink */
  --neon-flow-2: #00FFFF; /* Vibrant Cyan */
  --neon-flow-3: #FFFF00; /* Vibrant Yellow */
  --neon-flow-4: #FF6600; /* Vibrant Orange */
  --neon-flow-5: #00FF00; /* Vibrant Green */

  /* Header offset calculation */
  --header-offset: 166px; /* Desktop: 44 (marquee) + 68 (header-top) + 52 (main-nav) = 164px, plus 2px buffer */
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #ffffff; /* Default text color for dark backgrounds */
  background-color: #000000; /* Ensure dark background for neon */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Animations for dynamic neon colors */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-flow-1);
    box-shadow:
      0 0 10px var(--neon-flow-1),
      0 0 20px var(--neon-flow-1),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  25% {
    border-color: var(--neon-flow-2);
    box-shadow:
      0 0 10px var(--neon-flow-2),
      0 0 20px var(--neon-flow-2),
      inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  50% {
    border-color: var(--neon-flow-3);
    box-shadow:
      0 0 10px var(--neon-flow-3),
      0 0 20px var(--neon-flow-3),
      inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
  75% {
    border-color: var(--neon-flow-4);
    box-shadow:
      0 0 10px var(--neon-flow-4),
      0 0 20px var(--neon-flow-4),
      inset 0 0 10px rgba(255, 102, 0, 0.3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-flow-1),
      0 0 10px var(--neon-flow-1),
      0 0 15px var(--neon-flow-1);
    color: var(--neon-base-secondary);
  }
  25% {
    text-shadow:
      0 0 5px var(--neon-flow-2),
      0 0 10px var(--neon-flow-2),
      0 0 15px var(--neon-flow-2);
    color: var(--neon-base-secondary);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-flow-3),
      0 0 10px var(--neon-flow-3),
      0 0 15px var(--neon-flow-3);
    color: var(--neon-base-secondary);
  }
  75% {
    text-shadow:
      0 0 5px var(--neon-flow-4),
      0 0 10px var(--neon-flow-4),
      0 0 15px var(--neon-flow-4);
    color: var(--neon-base-secondary);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-flow-1),
      0 0 10px var(--neon-flow-1),
      0 0 15px var(--neon-flow-1);
    color: var(--neon-base-secondary);
  }
}

@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 Styles */
.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-flow-1),
    0 0 20px var(--neon-flow-1),
    0 0 30px var(--neon-flow-1),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  z-index: 1001;
  display: flex; /* Use flex to align icon and wrapper */
  align-items: center;
}

.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-flow-1),
    0 0 10px var(--neon-flow-1),
    0 0 15px var(--neon-flow-1);
  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;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: all 0.3s ease;
}

.marquee-text:hover {
  text-shadow:
    0 0 10px var(--neon-flow-1),
    0 0 20px var(--neon-flow-1),
    0 0 30px var(--neon-flow-1),
    0 0 40px var(--neon-flow-1);
  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-flow-1),
    0 0 6px var(--neon-flow-1);
}

/* Site Header Styles */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  z-index: 1000;
  box-sizing: border-box;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-flow-2),
    0 0 20px var(--neon-flow-2),
    0 0 30px var(--neon-flow-2),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
}

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

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

.logo {
  color: var(--secondary-color); /* Regular color, no neon for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  flex-shrink: 0; /* Prevent logo from shrinking */
  display: block; /* Ensure it's not display: none */
  /* NO neon effects for logo */
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 60px; /* Max height for desktop logo */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above overlay */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-flow-3); /* Neon color for bars */
  margin: 5px 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-flow-3), 0 0 10px var(--neon-flow-3);
}

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

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

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Visible 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-flow-3),
    0 0 20px var(--neon-flow-3),
    0 0 30px var(--neon-flow-3),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: var(--secondary-color); /* Regular color for nav links */
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
  /* NO neon effects by default for nav links */
}

.nav-link:hover {
  color: var(--neon-flow-1); /* Change color on hover */
  text-shadow: 0 0 8px var(--neon-flow-1); /* Subtle glow on hover */
}

/* Button styles */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-base-primary), var(--neon-flow-2)); /* Use site primary and cyan */
  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-base-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping by default */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-flow-1),
    0 0 30px var(--neon-flow-1),
    inset 0 0 15px rgba(255, 0, 255, 0.4);
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* Mobile: 36 (marquee) + 60 (header-top) + 48 (mobile-buttons) = 144px, plus 2px buffer */
  }

  .marquee-section {
    height: 36px; /* Mobile height */
  }
  .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;
  }

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px;
  }

  .header-container {
    padding: 0; /* Handled by header-top */
    justify-content: flex-start; /* Align hamburger left */
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: 0; /* Place first */
    box-shadow: 0 0 5px var(--neon-flow-3); /* Neon glow for hamburger */
    border-radius: 3px;
    padding: 8px;
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo text/image */
    align-items: center !important;
    font-size: 24px;
    order: 1; /* Place in middle */
    padding: 0 10px; /* Add some padding around logo */
  }

  .logo img {
    max-height: 56px; /* Max height for mobile logo */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Match header background */
    border-bottom: 1px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 5px var(--neon-flow-1),
      0 0 10px var(--neon-flow-1),
      inset 0 0 10px rgba(255, 0, 255, 0.1);
    z-index: 998; /* Below main-nav and hamburger, but above content */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(135deg, #16213e, #0f3460); /* Darker background for menu */
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow:
      0 0 10px var(--neon-flow-3),
      0 0 20px var(--neon-flow-3),
      inset 0 0 20px rgba(255, 255, 0, 0.1);
  }

  .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 15px;
    gap: 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile container */
  }

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

  .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 menu, above content */
    transition: opacity 0.3s ease-out;
    opacity: 0;
  }

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

/* Footer Styles (no neon) */
.site-footer {
  background-color: #1a1a1a; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive 4-column layout */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-col {
  box-sizing: border-box;
}

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

.footer-description {
  margin-top: 15px;
  font-size: 13px;
  color: #aaaaaa;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: bold;
}

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

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

.footer-nav a {
  color: #cccccc;
  text-decoration: none;
  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 */
  width: 100%;
}
.footer-dynamic-col .footer-slot-anchor-inner {
    gap: 5px; /* Smaller gap for col 4 */
}
.footer-dynamic-col .footer-slot-anchor-inner img,
.footer-dynamic-row .footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}


.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px; /* Spacing between dynamic rows and bottom */
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-dynamic-row:first-of-type {
    border-top: none; /* No top border for the very first dynamic row if it's not preceded by others */
}


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

.footer-bottom a {
    /* No links allowed in footer-bottom, so this rule is just a safeguard */
    text-decoration: none;
    color: inherit;
    pointer-events: none;
}

@media (max-width: 768px) {
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    margin-bottom: 30px;
  }

  .footer-col {
    text-align: center;
  }

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

  .footer-heading {
    font-size: 16px;
    margin-bottom: 15px;
  }

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

  .site-footer {
    padding: 30px 15px 15px;
  }
}

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