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

  /* Neon dynamic colors - based on prompt and site colors */
  --neon-primary: var(--primary-color); /* Light blue */
  --neon-secondary: #FF4444; /* Vibrant Red */
  --neon-accent: #FFFF00; /* Vibrant Yellow */
  --neon-dark-bg: #0a0a0a;
  --neon-dark-bg-gradient: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);

  /* Header offset calculation */
  --header-offset-desktop-no-marquee: 120px; /* 68px (header-top) + 52px (main-nav) */
  --header-offset-desktop-with-marquee: 164px; /* 44px (marquee) + 68px (header-top) + 52px (main-nav) */
  --header-offset-mobile-no-marquee: 108px; /* 60px (header-top) + 48px (main-nav) */
  --header-offset-mobile-with-marquee: 144px; /* 36px (marquee) + 60px (header-top) + 48px (main-nav) */

  /* Using with marquee for this generation */
  --header-offset: var(--header-offset-desktop-with-marquee);
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset here */
  background-color: #FFFFFF;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll from mobile content */
}

/* General Link Styles */
a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--login-color);
}

/* --- Neon Dynamic Color Animations (Must be defined once) --- */
@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); }
  100% { filter: hue-rotate(360deg); }
}

@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%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

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

/* --- Marquee Section Styles --- */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px; /* Desktop height */
  box-sizing: border-box;
  background: var(--neon-dark-bg-gradient);
  color: var(--secondary-color);
  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(38, 169, 224, 0.1);
  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-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(--secondary-color);
  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: var(--secondary-color);
}

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

/* --- Header Section Styles --- */
.site-header {
  position: fixed;
  top: 44px; /* Desktop: below marquee (44px) */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--neon-dark-bg-gradient);
  color: var(--secondary-color);
  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(38, 169, 224, 0.1);
}

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

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* LOGO is regular, no neon effects */
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 20px; /* Space between logo and other elements if needed */
}

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

/* Hamburger Menu (Desktop Hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1002;
  position: relative;
  margin-right: 20px;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--secondary-color);
  border-radius: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary); /* Neon glow for hamburger */
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
}

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

/* Main Navigation (Desktop) */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop height */
  height: 52px;
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background: var(--neon-dark-bg); /* Different dark background for main nav */
  border-top: 1px solid rgba(38, 169, 224, 0.2);
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic glow */
  box-shadow:
    0 0 8px var(--neon-secondary),
    0 0 15px var(--neon-secondary),
    inset 0 0 10px rgba(255, 68, 68, 0.1);
}

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

.main-nav .nav-link {
  color: var(--secondary-color);
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--neon-accent);
  transition: width 0.3s ease;
  box-shadow: 0 0 5px var(--neon-accent);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
  width: 100%;
}

.main-nav .nav-link:hover {
  color: var(--neon-accent);
  text-shadow: 0 0 5px var(--neon-accent);
}

/* Buttons */
.btn {
  position: relative;
  padding: 12px 25px;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Use theme colors for buttons */
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  text-shadow:
    0 0 5px var(--secondary-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
  cursor: pointer;
}

.btn:hover {
  animation-duration: 2s; /* Faster glow on hover */
  transform: translateY(-2px) scale(1.02);
  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(38, 169, 224, 0.5);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Footer Styles --- */
.site-footer {
  background-color: #1a1a2e; /* Dark background for footer, no neon */
  color: #c0c0c0;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.site-footer a {
  color: var(--secondary-color);
  text-decoration: none;
}

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

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
  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;
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure text wraps */
  overflow-wrap: break-word; /* Ensure text wraps */
}

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

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

.footer-nav a {
  color: #c0c0c0;
}

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

.footer-col.footer-contact p {
  margin-bottom: 10px;
}

/* Dynamic slot styling */
.footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px; /* For col 4 */
  width: 100%; /* For mid slots */
}

.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 {
  gap: 8px; /* For mid slots */
}

.footer-dynamic-row .footer-slot-anchor-inner img {
  max-height: 50px;
  height: auto;
  width: auto;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
}

.footer-bottom p {
  margin: 0;
}

/* --- Responsive Design (Mobile First Overrides) --- */
@media (max-width: 768px) {
  :root {
    --header-offset: var(--header-offset-mobile-with-marquee);
  }

  /* 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; /* Mobile: below marquee (36px) */
    box-shadow: 0 0 5px var(--neon-primary); /* Reduced glow for mobile */
  }

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

  .header-container {
    max-width: none; /* Full width on mobile */
    padding: 0;
    justify-content: space-between; /* Hamburger left, logo centered */
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    margin-right: 0;
    position: relative;
    z-index: 1002; /* Ensure hamburger is clickable */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding: 0; /* Remove extra padding on mobile */
    margin-left: -30px; /* Counteract hamburger pushing it right */
  }

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

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

  /* Mobile Nav Buttons (Visible on mobile, independent row) */
  .mobile-nav-buttons {
    display: flex !important; /* Always visible 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: var(--neon-dark-bg); /* Background for button row */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 5px var(--neon-accent);
  }

  .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 to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary); /* Reduced glow */
  }

  /* Main Nav (Mobile - Hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: calc(36px + 60px + 48px); /* Marquee + header-top + mobile-nav-buttons height */
    left: 0;
    width: 100%;
    height: calc(100% - (36px + 60px + 48px)); /* Fill remaining viewport height */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
    background: var(--neon-dark-bg-gradient);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
    border: none; /* Remove border from desktop version */
    box-shadow: none;
  }

  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      0 0 30px var(--neon-primary);
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0;
    width: 100%;
    max-width: none; /* Full width on mobile */
  }

  .main-nav .nav-link {
    font-size: 18px;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
  }

  .main-nav .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: 30px;
  }
  
  .footer-description {
    font-size: 13px;
  }

  .footer-col h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .footer-logo {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .footer-dynamic-row {
    margin: 15px auto;
  }
  
  .footer-dynamic-row .footer-slot-anchor-inner img {
    max-height: 40px;
  }
  
  .footer-bottom {
    padding-top: 15px;
    font-size: 12px;
  }

  /* Mobile Content Overflow Fix */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Ensure body no-scroll works */
body.no-scroll {
  overflow: hidden;
}

/* RGB values for rgba in box-shadow */
:root {
  --neon-primary-rgb: 38, 169, 224; /* From #26A9E0 */
  --neon-secondary-rgb: 255, 68, 68; /* From #FF4444 */
  --neon-accent-rgb: 255, 255, 0; /* From #FFFF00 */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
