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

  /* Neon colors - dynamically adapting to primary/secondary, with vibrant accents */
  --neon-primary: var(--primary-color); /* Base for neon effects */
  --neon-secondary: #00FFFF; /* Cyan, complementary */
  --neon-accent: #FF00FF; /* Magenta, vibrant contrast */
  --neon-glow-color-1: var(--primary-color);
  --neon-glow-color-2: #00FFFF; /* Example: Cyan */
  --neon-glow-color-3: #FF00FF; /* Example: Magenta */
  --neon-glow-color-4: #FFFF00; /* Example: Yellow */
  --neon-glow-color-5: #FF4500; /* Example: OrangeRed */

  /* Header offset based on Marquee (44px/36px) + Header Top (68px/60px) + Mobile Nav Buttons (48px) + Main Nav (52px/0px mobile) */
  /* Desktop: 44 + 68 + 52 = 164px. Adding 2px buffer = 166px */
  --header-offset: 166px;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Account for fixed header and marquee */
  background-color: var(--background-color);
  color: #333333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base container for content width */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

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

a:hover {
  text-decoration: underline;
}

/* Neon Dynamic Color Animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-glow-color-1);
    box-shadow: 
      0 0 10px var(--neon-glow-color-1),
      0 0 20px var(--neon-glow-color-1);
  }
  33% {
    border-color: var(--neon-glow-color-2);
    box-shadow: 
      0 0 10px var(--neon-glow-color-2),
      0 0 20px var(--neon-glow-color-2);
  }
  66% {
    border-color: var(--neon-glow-color-3);
    box-shadow: 
      0 0 10px var(--neon-glow-color-3),
      0 0 20px var(--neon-glow-color-3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-1),
      0 0 10px var(--neon-glow-color-1),
      0 0 15px var(--neon-glow-color-1);
    color: #ffffff;
  }
  33% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-2),
      0 0 10px var(--neon-glow-color-2),
      0 0 15px var(--neon-glow-color-2);
    color: #ffffff;
  }
  66% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-3),
      0 0 10px var(--neon-glow-color-3),
      0 0 15px var(--neon-glow-color-3);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-1),
      0 0 10px var(--neon-glow-color-1),
      0 0 15px var(--neon-glow-color-1);
    color: #ffffff;
  }
}

/* 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-glow-color-1),
    0 0 20px var(--neon-glow-color-1),
    0 0 30px var(--neon-glow-color-1),
    inset 0 0 20px rgba(255, 0, 255, 0.1); /* Example initial glow color */
  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;
  text-shadow: 
    0 0 5px var(--neon-glow-color-1),
    0 0 10px var(--neon-glow-color-1),
    0 0 15px var(--neon-glow-color-1);
  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-glow-color-1),
    0 0 10px var(--neon-glow-color-1),
    0 0 15px var(--neon-glow-color-1);
  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-glow-color-1),
    0 0 20px var(--neon-glow-color-1),
    0 0 30px var(--neon-glow-color-1),
    0 0 40px var(--neon-glow-color-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-glow-color-1),
    0 0 6px var(--neon-glow-color-1);
}

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

/* Header Section 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; /* Dynamic border */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-glow-color-4), /* Yellowish glow for header top */
    0 0 20px var(--neon-glow-color-4),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 20px; /* Padding for container edges */
}

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

.logo {
  color: var(--secondary-color); /* White for clear contrast */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0 10px; /* Inner padding for logo text/img */
  display: block; /* Ensure it takes up space */
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for desktop logo */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Hamburger menu - hidden on desktop */
.hamburger-menu {
  display: none; /* Hidden on desktop, shown by media query */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  width: 40px;
  height: 40px;
  z-index: 1002; /* Above logo on mobile */
  align-items: center;
  justify-content: center;
}

.hamburger-menu .hamburger-icon {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--neon-primary); /* Use primary neon color */
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
  animation: theme-colors 4s ease-in-out infinite;
  position: absolute; /* Position relative to button */
}

.hamburger-menu .hamburger-icon::before,
.hamburger-menu .hamburger-icon::after {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
  animation: theme-colors 4s ease-in-out infinite;
}

.hamburger-menu .hamburger-icon::before {
  transform: translateY(-9px);
}

.hamburger-menu .hamburger-icon::after {
  transform: translateY(9px);
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent; /* Hide middle bar */
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(0) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(0) rotate(-45deg);
}

/* Desktop navigation buttons */
.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 15px;
  align-items: center;
  flex-shrink: 0;
}

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

/* Main Navigation */
.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); /* Darker 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-glow-color-5), /* Orangered glow for main nav */
    0 0 20px var(--neon-glow-color-5),
    inset 0 0 20px rgba(255, 69, 0, 0.1);
}

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

.nav-link {
  color: var(--secondary-color); /* White text for nav links */
  font-size: 16px;
  padding: 10px 15px;
  display: block;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--primary-color); /* Hover color */
  text-shadow: 0 0 8px var(--primary-color);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--login-color), #FF8C00); /* Login color gradient */
  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(--login-color);
  transition: all 0.3s ease;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--login-color),
    0 0 30px var(--login-color),
    inset 0 0 15px rgba(234, 124, 7, 0.5);
}

/* 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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: #1a1a1a; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: var(--secondary-color); /* White headings */
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

.footer-col ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

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

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

/* Footer Dynamic Slots */
.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.footer-dynamic-row .footer-slot-anchor-inner img,
.footer-dynamic-col .footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(150%); /* Subtle effect for icons */
  transition: filter 0.3s ease;
}

.footer-dynamic-row .footer-slot-anchor-inner img:hover,
.footer-dynamic-col .footer-slot-anchor-inner img:hover {
  filter: grayscale(0%) brightness(100%); /* Color on hover */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333333;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 0;
  color: #aaaaaa;
}

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

  /* Marquee 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 Mobile */
  .site-header {
    top: 36px; /* Below mobile marquee */
  }

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

  .header-container {
    padding: 0; /* Handled by header-top */
    justify-content: flex-start; /* Align hamburger left */
    max-width: none; /* No max-width on mobile */
    width: 100%;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place it first */
    margin-right: 15px;
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 20px;
    padding: 0;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Added padding for mobile buttons */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 
      0 0 5px var(--neon-glow-color-4),
      0 0 10px var(--neon-glow-color-4);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile, toggled by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(180deg, #0a0a0a, #1a1a2e); /* Dark background */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 
      0 0 10px var(--neon-glow-color-5),
      0 0 20px var(--neon-glow-color-5);
    z-index: 1000; /* Above overlay */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    padding: 0 15px;
  }

  .footer-dynamic-row,
  .footer-bottom {
    padding: 0 15px;
  }

  /* Mobile content area protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
