:root {
  --primary-color: #017439; /* Deep Green */
  --secondary-color: #FFFFFF; /* White */

  /* Custom colors from prompt */
  --color-register: #C30808;
  --color-login: #C30808;
  --color-background: #FFFFFF;
  --color-reg-login-font: #FFFF00;

  /* Neon palette derived from primary/secondary, with complementary vibrant colors */
  --neon-dark-bg-1: #0a0a0a; /* Darkest */
  --neon-dark-bg-2: #1a1a2e; /* Darker Blue-Purple */
  --neon-dark-bg-3: #16213e; /* Dark Blue */

  --neon-primary-glow: #00ff00; /* Bright Green */
  --neon-secondary-glow: #00ffff; /* Cyan */
  --neon-accent-glow: #ffff00; /* Yellow */
  --neon-red-glow: #ff0000; /* Red for contrast/alert */

  /* Dynamic color variables for animations, based on primary/secondary/accent */
  --neon-cycle-1-color1: var(--neon-primary-glow);
  --neon-cycle-1-color2: var(--neon-secondary-glow);
  --neon-cycle-1-color3: var(--neon-accent-glow);

  --header-offset: 155px; /* Marquee 45px + Header Top 60px + Main Nav 50px */
}

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

/* Global Box Sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ccc;
  background-color: #000;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

/* Common Container Styles */
.header-container, .nav-container, .footer-top-grid, .game-providers-section, .social-media-section, .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 768px) {
  .header-container, .nav-container, .footer-top-grid, .game-providers-section, .social-media-section, .footer-bottom {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Animations for Neon Effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary-glow);
    box-shadow:
      0 0 10px var(--neon-primary-glow),
      0 0 20px var(--neon-primary-glow),
      inset 0 0 10px rgba(0, 255, 0, 0.3);
  }
  33% {
    border-color: var(--neon-secondary-glow);
    box-shadow:
      0 0 10px var(--neon-secondary-glow),
      0 0 20px var(--neon-secondary-glow),
      inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent-glow);
    box-shadow:
      0 0 10px var(--neon-accent-glow),
      0 0 20px var(--neon-accent-glow),
      inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

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

@keyframes marquee-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

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

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2), var(--neon-dark-bg-3));
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  min-height: 45px;
  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: 5px 20px; /* Adjusted padding to fit height */
}

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

.marquee-icon-emoji {
  font-size: 20px;
  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-glow),
    0 0 10px var(--neon-primary-glow),
    0 0 15px var(--neon-primary-glow);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.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 content doesn't abruptly end */
}

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

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

.site-header .header-top {
  background: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-accent-glow),
    0 0 20px var(--neon-accent-glow),
    inset 0 0 10px rgba(255, 255, 0, 0.2);
  min-height: 60px;
  display: flex;
  align-items: center;
  position: relative; /* For mobile logo absolute positioning */
}

.site-header .header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 60px;
}

.logo {
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--primary-color);
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.main-nav {
  background: linear-gradient(135deg, var(--neon-dark-bg-2), var(--neon-dark-bg-3));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse;
  box-shadow:
    0 0 10px var(--neon-red-glow),
    0 0 20px var(--neon-red-glow),
    inset 0 0 10px rgba(255, 0, 0, 0.2);
  min-height: 50px;
  display: flex;
  align-items: center;
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  min-height: 50px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

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

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 15px rgba(0, 255, 0, 0.4);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above mobile menu */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary-glow);
  border-radius: 2px;
  position: relative;
  transition: background-color 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-primary-glow),
    0 0 10px var(--neon-primary-glow);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: inherit;
  border-radius: 2px;
  position: absolute;
  transition: transform 0.3s ease, top 0.3s ease;
  box-shadow: inherit;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
  box-shadow: none;
}

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

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

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

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

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

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

.footer-col {
  margin-bottom: 20px;
}

.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;
  color: #aaa;
}

.footer-heading {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
}

.footer-links li a {
  color: #aaa;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

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

.payment-icons, .game-providers-icons, .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%); /* Optional: for consistent look */
  opacity: 0.7;
  transition: all 0.3s ease;
}

.payment-icons img:hover, .game-providers-icons img:hover, .social-media-icons img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.game-providers-section, .social-media-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 20px;
}

.copyright {
  color: #aaa;
  margin-bottom: 10px;
}

.footer-policy-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.footer-policy-links li a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-policy-links li a:hover {
  color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    min-height: 35px;
    padding: 0px; /* Reduced padding for mobile */
  }
  .marquee-container {
    gap: 10px;
    padding: 0px 5px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text, .marquee-separator {
    font-size: 14px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header */
  .site-header {
    top: 35px; /* Adjusted for mobile marquee height */
  }

  .site-header .header-top {
    min-height: 50px;
  }

  .site-header .header-top .header-container {
    min-height: 50px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .hamburger-menu {
    display: block;
    order: 0;
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    max-width: calc(100% - 70px); /* Account for hamburger width */
  }
  .logo img {
    max-height: 40px;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .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: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-red-glow),
      0 0 20px var(--neon-red-glow),
      inset 0 0 10px rgba(255, 0, 0, 0.2);
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    background: linear-gradient(135deg, var(--neon-dark-bg-3), var(--neon-dark-bg-1));
    padding: 20px;
    transform: translateX(-100%); /* Off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow:
      0 0 10px var(--neon-secondary-glow),
      0 0 20px var(--neon-secondary-glow),
      inset 0 0 10px rgba(0, 255, 255, 0.2);
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-policy-links {
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
  }
  
  .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;
  }
}
