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

  /* Neon specific colors, intelligently selected */
  --neon-primary: var(--primary-color); /* #26A9E0 */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF00FF; /* Magenta */
  --neon-yellow: #FFFF00;
  --neon-red: #FF0000;
  --neon-orange: #FFA500;

  /* Header offset calculation */
  --header-offset: 155px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: Marquee(30px) + HeaderTop(50px) + MobileNavButtons(40px) */
  }
}

/* Base styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  background-color: #121212; /* Dark background for neon theme */
  color: #ffffff;
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* WCAG AA contrast check - Ensure text colors are bright enough on dark backgrounds */
h1, h2, h3, h4, h5, h6, p, a, li, button, span {
  color: #ffffff; /* Default text color for visibility on dark background */
}

/* Neon Dynamic Color Animations */
@keyframes rainbow-border {
  0% { border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red); }
  16.6% { border-color: var(--neon-orange); box-shadow: 0 0 10px var(--neon-orange), 0 0 20px var(--neon-orange); }
  33.3% { border-color: var(--neon-yellow); box-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow); }
  50% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); } /* light blue */
  66.6% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); } /* cyan */
  83.3% { border-color: var(--neon-accent); box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent); } /* magenta */
  100% { border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red); }
}

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

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

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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(38, 169, 224, 0.1); /* Using primary color */
  z-index: 1001;
  height: 45px; /* Desktop height */
  display: flex;
  align-items: center;
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Smaller icon */
  height: 30px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px; /* Smaller font size */
  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;
  padding-right: 30px; /* Ensure space for content to disappear */
}

.marquee-text {
  font-size: 15px; /* Slightly smaller font */
  font-weight: 600;
  color: #ffffff;
  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: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 10px;
  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: 45px; /* Adjust based on marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Background for entire fixed header */
}

.site-header .header-top {
  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-yellow),
    0 0 20px var(--neon-yellow),
    0 0 30px var(--neon-yellow),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 10px 0; /* Vertical padding for desktop header top */
  min-height: 40px; /* Ensure minimum height */
  display: flex;
  align-items: center;
}

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

.site-header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  white-space: nowrap;
  /* LOGO must NOT have neon effects */
  text-shadow: none;
  box-shadow: none;
  filter: none;
}
.site-header .logo img {
  display: block;
  max-height: 40px;
  height: auto;
  width: auto;
}

.site-header .desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 12px;
}

.site-header .btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary)); /* Dynamic gradient */
  padding: 10px 20px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-size: 14px;
  white-space: nowrap;
}

.site-header .btn:hover {
  animation-duration: 2s; /* Faster glow 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(38, 169, 224, 0.4);
}

.site-header .main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 3s linear infinite; /* Dynamic rainbow border */
  box-shadow:
    0 0 10px var(--neon-red),
    0 0 20px var(--neon-red),
    0 0 30px var(--neon-red),
    inset 0 0 20px rgba(255, 0, 0, 0.1);
  padding: 10px 0;
  display: flex; /* Show on desktop */
  align-items: center;
  min-height: 30px;
}

.site-header .main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping for many links on smaller desktops */
}

.site-header .nav-link {
  color: var(--secondary-color); /* Regular color for nav links */
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping for individual links */
  /* No neon effects for nav links */
  text-shadow: none;
}

.site-header .nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(38, 169, 224, 0.1);
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

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

/* Footer Section Styles */
.site-footer {
  background-color: #1c1c1c; /* Dark grey, no neon */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer .footer-top,
.site-footer .footer-middle,
.site-footer .footer-bottom {
  padding: 15px 0;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-footer .footer-top .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
}

.site-footer .footer-col h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

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

.site-footer .footer-description {
  color: #aaaaaa;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.site-footer .footer-nav-list a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.site-footer .payment-icons,
.site-footer .game-providers-icons,
.site-footer .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* For Game Providers and Social Media */
  width: 100%;
}
.site-footer .payment-icons {
  gap: 5px; /* Smaller gap for payment icons */
}

.site-footer .payment-icons img,
.site-footer .game-providers-icons img,
.site-footer .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.site-footer .footer-middle {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  padding-bottom: 30px;
}
.site-footer .game-providers-section,
.site-footer .social-media-section {
  margin-bottom: 25px;
}
.site-footer .social-media-section {
  margin-bottom: 0; /* Last section in middle */
}


.site-footer .footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-footer .footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer .copyright {
  margin: 0;
  color: #aaaaaa;
  flex-shrink: 0;
}

.site-footer .footer-legal-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.site-footer .footer-legal-nav a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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


/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Marquee mobile adaptation */
  .marquee-section {
    height: 30px; /* Mobile height */
    padding: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 12px;
  }
  .marquee-separator {
    font-size: 12px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header mobile adaptation */
  .site-header {
    top: 30px; /* Adjust based on mobile marquee height */
  }

  .site-header .header-top {
    padding: 10px 0;
    min-height: 30px; /* Adjust height for mobile */
  }

  .site-header .header-container {
    padding: 0 15px;
    max-width: none; /* No max-width on mobile */
    width: 100%;
    justify-content: flex-start; /* Align items to start for hamburger */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1002; /* Above logo and overlay */
    order: 0; /* Keep to the left */
  }

  .hamburger-menu::before,
  .hamburger-menu::after,
  .hamburger-menu span {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--neon-primary);
    left: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
  }

  .hamburger-menu::before { top: 0; }
  .hamburger-menu::after { bottom: 0; }
  .hamburger-menu span { top: 50%; transform: translateY(-50%); }

  .hamburger-menu.active::before { top: 50%; transform: translateY(-50%) rotate(45deg); }
  .hamburger-menu.active::after { bottom: 50%; transform: translateY(50%) rotate(-45deg); }
  .hamburger-menu.active span { transform: translateX(-50px); opacity: 0; } /* Hide middle bar */

  .site-header .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 18px; /* Smaller logo font */
    margin-left: 10px; /* Space from hamburger */
    max-width: calc(100% - 50px); /* Adjust max-width to not overlap hamburger */
  }
  .site-header .logo img {
    max-height: 35px !important; /* Smaller logo image */
  }

  .site-header .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    padding: 5px 15px; /* Vertical padding, horizontal matches container */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border */
    box-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      inset 0 0 10px rgba(38, 169, 224, 0.1);
    min-height: 30px; /* Ensure minimum height */
  }

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

  .site-header .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 120px; /* Adjust based on header-top + mobile-nav-buttons height */
    left: 0;
    width: 100%;
    height: calc(100% - 120px); /* Full height below header */
    flex-direction: column;
    background-color: #121212; /* Dark background for menu */
    overflow-y: auto;
    transition: transform 0.3s ease-out;
    transform: translateX(-100%); /* Slide out to the left */
    z-index: 1000; /* Above overlay */
    padding-bottom: 20px; /* Padding at the bottom of the menu */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border */
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }

  .site-header .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }
  
  .site-header .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    max-width: none; /* No max-width on mobile */
    width: 100%;
  }

  .site-header .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 16px;
    text-align: left;
  }
  .site-header .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 */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  /* Footer mobile adaptation */
  .site-footer .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column */
    gap: 25px;
  }

  .site-footer .footer-bottom .footer-container {
    flex-direction: column;
    gap: 10px;
  }

  .site-footer .footer-legal-nav {
    flex-direction: column;
    gap: 8px;
  }
  .site-footer .footer-legal-nav a {
    text-align: center;
  }

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