:root {
  /* Site Specific Colors */
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy-color: #08162B;

  /* Neon Dynamic Colors - Using site specific colors for theme-flow */
  --neon-primary: var(--primary-color); /* #113B7A */
  --neon-secondary: var(--secondary-color); /* #1D5FD1 */
  --neon-accent: var(--glow-color); /* #4FA8FF */ /* Using glow as accent for vibrancy */

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

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

/* Base Neon Animations - Using site specific colors for theme-flow */
@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, 59, 122, 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(29, 95, 209, 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(79, 168, 255, 0.3);
  }
}

@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: var(--text-main);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: var(--text-main);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: var(--text-main);
  }
}

/* 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(17, 59, 122, 0.1);
  z-index: 1001; /* Ensure on top of header */
  display: flex; /* Use flex for marquee-container alignment */
  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-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: var(--text-main);
  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 Styles */
.site-header {
  position: fixed;
  top: 44px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: transparent; /* Background handled by header-top and main-nav */
}

/* Header Top Section */
.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 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, 59, 122, 0.1);
  padding: 0 20px; /* Add some padding for logo/buttons */
}

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

/* Logo Styles (NO NEON EFFECTS) */
.logo {
  color: var(--text-main); /* Regular text color */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  flex-shrink: 0;
  display: block;
  /* NO text-shadow, box-shadow, filter, neon animations for logo */
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for desktop logo */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  /* NO text-shadow, box-shadow, filter, neon animations for logo */
}

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

/* Mobile Navigation Buttons (Desktop Hidden) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  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, 59, 122, 0.1);
  padding: 0 20px;
  justify-content: center;
  align-items: center;
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: visible, horizontal */
  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; /* 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(29, 95, 209, 0.1);
  padding: 0 20px;
}

.nav-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px; /* Max width for desktop */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center; /* Center nav items */
  height: 100%;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--text-main); /* Regular text color */
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
  /* NO neon text-shadow, box-shadow, filter for nav links */
}

.nav-link:hover,
.nav-link.active {
  color: var(--glow-color); /* Highlight color on hover/active */
  text-shadow: 0 0 8px var(--glow-color); /* Subtle glow on hover/active */
}

/* Hamburger Menu (Desktop Hidden) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  width: 40px;
  height: 40px;
  z-index: 1002; /* Ensure on top in mobile */
}

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

.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: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below mobile menu */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Button Styles */
.btn {
  position: relative;
  background: var(--button-gradient); /* Custom button gradient */
  padding: 12px 30px;
  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 var(--text-main),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent text wrapping for desktop buttons */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 120px; /* Ensure a minimum width for buttons */
}

.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, 59, 122, 0.4);
}

/* Footer Styles (Regular, NO NEON EFFECTS) */
.site-footer {
  background-color: var(--card-bg); /* Dark background */
  color: var(--text-secondary);
  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;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 30px;
}

.footer-col h3 {
  color: var(--text-main);
  font-size: 16px;
  margin-bottom: 15px;
  position: relative;
}

.footer-col h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 5px;
}

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

.footer-description {
  margin-bottom: 20px;
  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: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Header Offset for mobile */
  :root { --header-offset: 146px; } /* 36px (marquee) + 60px (header-top) + 48px (mobile-nav-buttons) = 144px, plus buffer */

  /* Marquee Section Mobile */
  .marquee-section {
    height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 12px !important;
    height: 100% !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;
  }

  /* Header Top Mobile */
  .site-header {
    top: 36px; /* Below mobile marquee */
  }
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px;
  }
  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding-left: 0; /* Remove padding, hamburger handles left spacing */
    padding-right: 0; /* Remove padding, right side is empty */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Hamburger Menu Mobile */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    flex-shrink: 0;
    margin-right: 15px; /* Space between hamburger and logo */
  }

  /* Logo Mobile Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center content horizontally */
    align-items: center !important; /* Center content vertically */
    font-size: 20px; /* Adjust font size for mobile */
    /* Ensure no margin/padding pushes it off center */
    margin: 0;
    padding: 0;
  }
  .logo img {
    max-height: 40px !important; /* Adjust max height for mobile logo */
  }

  /* Desktop Nav Buttons Mobile Hidden */
  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  /* Mobile Nav Buttons Mobile Visible */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    min-height: 48px;
    height: auto; /* Allow height to adjust if text wraps */
  }

  .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 to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    min-height: 38px; /* Ensure button has some height even with small text */
  }

  /* Main Nav Mobile (Hidden by default, shown by JS) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 146px; /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 70%; /* Adjust width as needed */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - 146px); /* Full height minus header */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Scroll if too many items */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 20px rgba(29, 95, 209, 0.1);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align items to the left */
    padding: 20px 15px;
    height: auto; /* Allow height to grow */
    max-width: none; /* No max-width on mobile */
    width: 100%;
    gap: 15px;
  }

  .nav-link {
    width: 100%; /* Full width links */
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .footer-col h3 {
    margin-top: 15px;
  }
  .footer-logo {
    font-size: 20px;
  }
  .footer-bottom {
    padding-top: 15px;
  }

  /* Mobile 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;
  }
  body.no-scroll {
    overflow: 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;
  }
}
