:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000080; /* Navy Blue */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a; /* Dark background for neon */
  --bg-dark-alt: #1a1a2e; /* Slightly lighter dark */
  --bg-dark-nav: #16213e; /* Another dark shade */

  /* Neon dynamic colors based on theme */
  --neon-primary: var(--primary-color); /* #FFD700 */
  --neon-secondary: #FF4500; /* OrangeRed, good contrast with gold */
  --neon-accent: #00FFFF; /* Aqua, for another accent */
  --neon-text-glow: var(--neon-primary);

  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop: 45 + 60 + 50 = 155px */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 50px;
    --mobile-buttons-height: 45px; /* Adjust based on padding/line-height */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Mobile: 30 + 50 + 45 = 125px */
  }
}

/* Base styles for HTML elements */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply offset to body */
  background-color: var(--bg-dark-alt); /* General page background */
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
  text-decoration: none;
  color: inherit;
}

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-light); /* Default for titles */
}

.footer-container, .header-container, .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Neon dynamic color animations */
@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%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; }
  50% { background-position: 100% 50%; box-shadow: 0 0 10px #00ffff, 0 0 20px #0000ff; }
  100% { background-position: 0% 50%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; }
}

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

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop);
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-alt), var(--bg-dark-nav));
  color: var(--text-light);
  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(255, 255, 0, 0.1); /* Using yellow for primary neon */
  z-index: 1001;
  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; /* Adjust padding for height */
  height: 100%;
  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;
  height: 100%;
  display: flex;
  align-items: center;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  height: 100%;
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  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(--text-light);
}

.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 */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Offset by marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Background handled by sub-sections */
}

.site-header .header-top {
  width: 100%;
  min-height: var(--header-top-height-desktop);
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-alt), var(--bg-dark-nav));
  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),
    inset 0 0 15px rgba(255, 255, 0, 0.1); /* Neon glow effect for header-top */
  display: flex;
  align-items: center;
  position: relative;
}

.site-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 20px; /* Consistent padding */
}

/* Logo - NO NEON EFFECTS */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-light);
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 0; /* Add some padding to logo text */
  flex-shrink: 0;
  z-index: 1; /* Ensure logo is above other elements if positioned */
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px; /* Desktop logo height */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 15px;
  flex-shrink: 0;
  z-index: 1;
}

/* Mobile Navigation Buttons - Hidden on Desktop */
.mobile-nav-buttons {
  display: none;
}

/* Hamburger Menu - Hidden on Desktop */
.hamburger-menu {
  display: none;
}

/* Main Navigation */
.main-nav {
  width: 100%;
  min-height: var(--main-nav-height-desktop);
  background: linear-gradient(135deg, var(--bg-dark-nav), var(--bg-dark-alt), var(--bg-dark));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Dynamic border color for nav */
  box-shadow:
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    inset 0 0 15px rgba(0, 255, 255, 0.1); /* Neon glow for nav */
  display: flex; /* Desktop default: flex */
  align-items: center;
  position: static; /* Desktop default: static */
  z-index: 999;
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 100%;
  height: 100%;
  padding: 10px 20px;
}

.nav-link {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover {
  color: var(--primary-color);
  text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 30px;
  color: var(--text-light);
  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-light),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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(255, 255, 255, 0.3);
}

/* Footer Section */
.site-footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer h4 {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.site-footer .footer-top-section {
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-top-section .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

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

.site-footer .footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgba(255, 255, 255, 0.7);
}

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

.site-footer .footer-nav-list a {
  color: rgba(255, 255, 255, 0.7);
  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; /* Adjust gap for icon sections */
  width: 100%;
}

.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;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme, optional */
  transition: filter 0.3s ease;
}

.site-footer .payment-icons img:hover,
.site-footer .game-providers-icons img:hover,
.site-footer .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

.site-footer .footer-middle-section {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-middle-section .footer-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.site-footer .game-providers-section,
.site-footer .social-media-section {
  width: 100%;
}

.site-footer .footer-bottom-section {
  padding-top: 20px;
}

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

.site-footer .copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.site-footer .footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer .footer-legal-nav a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
}

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

/* Mobile Responsive Styles */
@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;
    padding-top: var(--header-offset); /* Mobile offset */
  }

  /* Marquee Mobile */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0;
  }
  .marquee-container {
    padding: 0 5px; /* Smaller padding */
    gap: 5px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    margin-right: 10px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 5px;
  }
  .marquee-content {
    gap: 15px;
    animation-duration: 20s; /* Faster scroll on mobile */
  }

  /* Header Mobile */
  .site-header {
    top: var(--marquee-height-mobile); /* Mobile offset by marquee height */
  }

  .site-header .header-top {
    min-height: var(--header-top-height-mobile);
    padding: 0; /* Remove padding, container handles it */
  }

  .site-header .header-container {
    padding: 0 15px; /* Mobile container padding */
    position: relative; /* For logo absolute positioning */
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Above logo and overlay */
    position: relative;
    left: 0;
  }

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-light);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
    box-shadow: 0 0 5px var(--neon-primary); /* Neon glow for hamburger */
  }

  .hamburger-menu.active span:nth-child(1) { transform: rotate(45deg); top: 0; }
  .hamburger-menu.active span:nth-child(2) { opacity: 0; transform: translateX(-100%); }
  .hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg); top: 0; }
  .hamburger-menu.active span:nth-child(1),
  .hamburger-menu.active span:nth-child(3) {
    transform-origin: center;
    top: 10px;
    background: var(--neon-primary); /* Active color */
  }

  /* Mobile Logo Centering */
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    padding: 0;
    position: absolute; /* Absolute positioning for precise centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 70px); /* Account for hamburger menu width */
    height: 100%; /* Occupy full height of header-top */
  }
  .logo img {
    max-height: 35px; /* Mobile logo height */
  }

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

  /* Mobile Navigation Buttons - Always visible below header-top */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Padding for the button container */
    background-color: var(--bg-dark-alt); /* Background for mobile buttons */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px; /* Gap between buttons */
    min-height: var(--mobile-buttons-height);
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

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

  /* Main Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Start below fixed header + buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: var(--bg-dark-nav); /* Dark background for mobile menu */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    border: none; /* Remove border from desktop */
    z-index: 1000; /* Above overlay, below hamburger */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    gap: 15px;
    padding: 20px 15px;
    align-items: flex-start; /* Align links to the left */
    width: 100%;
    max-width: none; /* Remove max-width constraint */
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* 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 menu, above page content */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  /* Footer Mobile */
  .site-footer .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .site-footer .footer-middle-section .footer-container {
    gap: 20px;
  }
  .site-footer .footer-bottom-section .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .site-footer .footer-legal-nav {
    justify-content: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
