:root {
  --primary-color: #017439; /* Brand green */
  --secondary-color: #FFFFFF; /* White */

  /* Custom colors for buttons */
  --register-btn-bg: #C30808; /* Red */
  --login-btn-bg: #C30808; /* Red */
  --btn-text-color: #FFFF00; /* Yellow */

  /* Neon palette based on brand green, but with vibrant neon feel */
  --neon-primary-base: #017439; /* Base green */
  --neon-secondary-base: #00FF7F; /* Bright spring green */
  --neon-accent-base: #FFD700; /* Gold/yellow */

  --neon-glow-color1: #00FF00; /* Bright Green */
  --neon-glow-color2: #00FFFF; /* Cyan */
  --neon-glow-color3: #FF00FF; /* Magenta */
  --neon-glow-color4: #FFFF00; /* Yellow */
  --neon-glow-color5: #FF4500; /* OrangeRed */

  /* Header/Marquee Backgrounds */
  --header-bg-dark1: #0a0a0a;
  --header-bg-dark2: #1a1a2e;
  --header-bg-dark3: #16213e;

  /* Header Offset Calculation:
     Desktop: Marquee (45px) + Header Top (60px) + Main Nav (50px) = 155px
  */
  --header-offset: 155px; /* Desktop */
}

@media (max-width: 768px) {
  :root {
    /* Mobile: Marquee (30px) + Header Top (50px) + Mobile Buttons (50px) = 130px */
    --header-offset: 130px; /* Mobile */
  }
}

/* Base styles for body to prevent overflow on mobile */
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #fff;
  background-color: #111;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-glow-color4),
      0 0 10px var(--neon-glow-color4),
      0 0 15px var(--neon-glow-color4);
    color: var(--secondary-color);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-glow-color5),
      0 0 10px var(--neon-glow-color5),
      0 0 15px var(--neon-glow-color5);
    color: var(--secondary-color);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-glow-color4),
      0 0 10px var(--neon-glow-color4),
      0 0 15px var(--neon-glow-color4);
    color: var(--secondary-color);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--header-bg-dark1), var(--header-bg-dark2));
  color: var(--secondary-color);
  overflow: hidden;
  height: 45px; /* Desktop height */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-glow-color1),
    0 0 20px var(--neon-glow-color1),
    0 0 30px var(--neon-glow-color1),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  display: flex; /* Ensure flex context for marquee-container */
  align-items: center; /* Vertically center content */
}

.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: 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-color4),
    0 0 10px var(--neon-glow-color4),
    0 0 15px var(--neon-glow-color4);
  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;
}

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

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-glow-color4),
    0 0 10px var(--neon-glow-color4),
    0 0 15px var(--neon-glow-color4);
  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-color4),
    0 0 20px var(--neon-glow-color4),
    0 0 30px var(--neon-glow-color4),
    0 0 40px var(--neon-glow-color4);
  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-glow-color4),
    0 0 6px var(--neon-glow-color4);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 45px; /* Adjust based on desktop marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Background for entire header is handled by sub-sections */
}

/* Header Top Section (Desktop: Logo + Buttons) */
.header-top {
  background: linear-gradient(135deg, var(--header-bg-dark2), var(--header-bg-dark3));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-glow-color2),
    0 0 20px var(--neon-glow-color2),
    0 0 30px var(--neon-glow-color2),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  padding: 10px 0;
  height: 60px; /* Desktop height */
  box-sizing: border-box;
  display: flex; /* Ensure flex context for header-container */
  align-items: center;
}

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

/* Logo - NO NEON EFFECTS */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular white color */
  text-decoration: none;
  flex-shrink: 0;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above logo and other elements */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow:
    0 0 5px var(--neon-glow-color4),
    0 0 10px var(--neon-glow-color4);
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 15px;
  flex-shrink: 0;
}

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

/* Main Navigation (Desktop: visible, Mobile: hidden by default) */
.main-nav {
  background: linear-gradient(135deg, var(--header-bg-dark3), var(--header-bg-dark1));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation for contrast */
  box-shadow:
    0 0 10px var(--neon-glow-color3),
    0 0 20px var(--neon-glow-color3),
    0 0 30px var(--neon-glow-color3),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  padding: 0;
  height: 50px; /* Desktop height */
  box-sizing: border-box;
  display: flex; /* Visible on desktop */
  align-items: center;
  justify-content: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: var(--secondary-color); /* Regular white color */
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-glow-color4); /* Yellowish hover */
  text-shadow: 0 0 8px var(--neon-glow-color4);
}

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

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

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-btn-bg), var(--login-btn-bg)); /* Use custom button colors */
  padding: 12px 25px;
  color: var(--btn-text-color); /* Use custom button text color */
  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(--btn-text-color),
    0 0 10px var(--register-btn-bg);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap; /* Prevent text wrapping on desktop */
  cursor: pointer;
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-glow-color5),
    0 0 30px var(--neon-glow-color5),
    inset 0 0 15px rgba(255, 69, 0, 0.3);
}

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

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

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

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

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-about {
  flex: 1.5; /* Give more space to about section */
  min-width: 250px;
}

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

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

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

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

.payment-icons, .game-providers-icons, .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Consistent gap for all icon sections */
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme, slight glow */
  transition: filter 0.3s ease;
}

.payment-icons img:hover, .game-providers-icons img:hover, .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%) drop-shadow(0 0 5px var(--primary-color));
}

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

.game-providers-section, .social-media-section {
  margin-bottom: 20px;
}
.game-providers-section:last-child, .social-media-section:last-child {
  margin-bottom: 0;
}

.footer-bottom-section {
  text-align: center;
}

.copyright-info {
  margin-bottom: 15px;
  color: #888;
}

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

.footer-legal-nav li a {
  color: #aaa;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  /* 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;
  }

  /* Marquee Mobile */
  .marquee-section {
    height: 30px; /* Mobile height */
    padding: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite; /* Faster scroll on mobile */
  }

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

  .header-top {
    height: 50px; /* Mobile height */
    padding: 0 15px;
  }

  .header-container {
    padding: 0; /* Remove horizontal padding from container on mobile */
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: 0; /* Place to the left */
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px; /* Smaller logo text on mobile */
    padding-right: 0; /* Remove extra padding */
    text-align: center; /* Center text logo */
  }
  /* If logo is an image, additional styling might be needed for .logo img */

  .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: 8px 15px; /* Smaller padding */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, var(--header-bg-dark1), var(--header-bg-dark2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 5px var(--neon-glow-color3),
      0 0 10px var(--neon-glow-color3),
      inset 0 0 10px rgba(255, 0, 255, 0.1);
  }
  .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-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(180deg, var(--header-bg-dark1), var(--header-bg-dark3));
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 15px var(--neon-glow-color4),
      0 0 30px var(--neon-glow-color4),
      inset -5px 0 20px rgba(255, 255, 0, 0.1);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay, below hamburger menu */
    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;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    gap: 15px;
  }

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

  /* Footer Mobile */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-col {
    min-width: unset;
    flex: unset;
    width: 100%;
    text-align: center;
  }
  .footer-about {
    text-align: center;
  }
  .footer-logo {
    font-size: 20px;
  }
  .footer-nav-group ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
  }
  .footer-legal-nav {
    flex-direction: column;
    gap: 10px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
