:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --background-color: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;

  --neon-primary: #4A8BFF; /* Vibrant blue, inspired by primary */
  --neon-secondary: #6FA3FF; /* Lighter blue, from secondary */
  --neon-accent: #FF00FF; /* Vibrant magenta for contrast */

  --header-offset: 166px; /* Marquee (44px) + Header Top (68px) + Main Nav (52px) + buffer */
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--background-color);
  overflow-x: hidden; /* Prevent horizontal scroll from mobile overflow rules */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  text-decoration: none;
  color: var(--primary-color);
}
a:hover {
  color: var(--secondary-color);
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Animations for Neon Effects */
@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%); }
}

@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(74, 139, 255, 0.3); /* Based on #4A8BFF */
  }
  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(111, 163, 255, 0.3); /* Based on #6FA3FF */
  }
  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(255, 0, 255, 0.3); /* Based on #FF00FF */
  }
}

@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;
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  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(74, 139, 255, 0.1); /* Based on neon-primary */
  z-index: 1001;
}

.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;
  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-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; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  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(74, 139, 255, 0.1); /* Based on neon-primary */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #0a0a0a); /* Slightly different dark bg */
  border-bottom: 1px solid rgba(74, 139, 255, 0.3); /* Based on neon-primary */
}

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

.logo {
  color: #ffffff; /* Regular color for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  line-height: 1;
  /* No neon effects for logo */
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  /* No neon effects for logo image */
}

.desktop-nav-buttons {
  display: flex; /* Default to flex for desktop */
  gap: 12px;
  align-items: center;
}

.btn {
  position: relative;
  background: var(--button-gradient);
  padding: 12px 30px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background: linear-gradient(135deg, #16213e, #1a1a2e); /* Darker background for mobile buttons */
  padding: 0 15px;
  gap: 10px;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(111, 163, 255, 0.3); /* Based on neon-secondary */
}

.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, #16213e, #0f3460); /* Different dark bg for main nav */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  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(111, 163, 255, 0.1); /* Based on neon-secondary */
}

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

.nav-link {
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
}
.nav-link:hover, .nav-link.active {
  color: var(--neon-primary);
  text-shadow: 0 0 8px var(--neon-primary), 0 0 15px var(--neon-primary);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above logo on mobile */
  position: relative;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  margin: 5px 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-accent);
}

.hamburger-menu.active .hamburger-icon:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-menu.active .hamburger-icon:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .hamburger-icon:nth-child(3) {
  transform: translateY(-7px) 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 menu, above content */
}

/* Footer Section */
.site-footer {
  background-color: #1F2D3D; /* Text Main as a dark footer background */
  color: #ffffff;
  padding: 40px 0 20px;
  margin-top: auto; /* Push footer to bottom */
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-col {
  padding-right: 15px;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 20px;
  position: relative;
}
.footer-heading::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 8px;
}

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.footer-bottom a {
  pointer-events: none;
  color: inherit;
}

/* Dynamic Slot Anchors */
.footer-slot-anchor-inner {
  /* This container must remain empty for system injection */
}


/* Responsive Styles */
@media (max-width: 768px) {
  /* Header Offset for Mobile */
  :root { --header-offset: 146px; } /* Marquee (36px) + Header Top (60px) + Mobile Nav Buttons (48px) + buffer */

  /* Marquee */
  .marquee-section {
    height: 36px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !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 */
  .site-header {
    top: 36px; /* Marquee height for mobile */
  }
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
  }
  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    padding: 0; /* Handled by header-top */
    justify-content: space-between;
    position: relative; /* For absolute positioning of logo */
  }

  /* Mobile Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Account for hamburger width */
    height: 100%; /* Fill height to center vertically */
  }
  .logo img {
    max-height: 56px !important; /* Mobile logo max height */
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: block; /* Show on mobile */
    order: -1; /* Place to the left */
    position: relative;
    z-index: 1002;
  }

  /* Desktop buttons hidden on mobile */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    flex-wrap: nowrap; /* Ensure two buttons stay in one line */
    min-height: 48px;
  }
  .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;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
  }

  /* Main Navigation (Mobile Menu Drawer) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 144px; /* Marquee (36px) + header-top (60px) + mobile-nav-buttons (48px) */
    left: 0;
    width: 80%; /* Drawer width */
    max-width: 300px; /* Max drawer width */
    height: calc(100% - 144px); /* Full height below header/buttons */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000;
    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),
      0 0 30px var(--neon-primary);
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    height: auto;
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile menu overlay when active */
  .mobile-menu-overlay.active {
    display: block;
  }

  /* Mobile Content Overflow 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;
  }

  /* Footer */
  .site-footer {
    padding: 30px 0 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    padding: 0 15px;
  }
  .footer-col {
    margin-bottom: 20px;
    padding-right: 0;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  .footer-bottom {
    margin-top: 20px;
    padding-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Specific styling for body when menu is open to prevent scroll */
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;
  }
}
