:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --bg-color: #FFFFFF; /* Page content background, not header/marquee */
  --register-login-font-color: #FFFF00;

  /* Neon colors derived from primary/secondary */
  --neon-primary: #39FF14; /* Vibrant Green */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF00FF; /* Magenta */

  /* Header offsets */
  --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: 35px;
    --header-top-height-mobile: 50px;
    --mobile-nav-buttons-height-mobile: 45px; /* Based on padding 8px 12px, font 13px, line-height ~1.5 */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* Mobile: 35 + 50 + 45 = 130px */
  }
}

/* Base styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #f0f0f0;
  background-color: #000; /* Dark background for neon theme */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

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

/* Animations for neon effects */
@keyframes marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

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

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

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

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop); /* Desktop height */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  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(57, 255, 20, 0.1);
  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;
}

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

.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;
  white-space: nowrap; /* Ensure marquee text stays on one line */
}

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
}

/* Header Top Area */
.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  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(57, 255, 20, 0.1);
  height: var(--header-top-height-desktop); /* Desktop height */
  display: flex;
  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; /* Padding for logo and buttons */
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Logo is regular text, no neon */
  text-transform: uppercase;
  display: block;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px; /* Desktop logo height */
}

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

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
  align-items: center;
}

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

/* Main Navigation Area */
.main-nav {
  background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border color, contrasting animation */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  height: var(--main-nav-height-desktop); /* Desktop height */
  display: flex; /* Visible on desktop */
  align-items: center;
}

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

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular text, no neon */
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary); /* Hover with a neon accent */
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Use custom colors */
  padding: 12px 20px;
  color: var(--register-login-font-color); /* Custom font color */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic neon glow */
  text-shadow: 
    0 0 5px var(--register-login-font-color),
    0 0 10px var(--register-login-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1; /* Ensure text fits */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.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),
    inset 0 0 15px rgba(57, 255, 20, 0.5);
}

/* Footer Styles */
.site-footer {
  background: #111; /* Dark background, no neon */
  color: #ccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-col {
  padding: 10px 0;
}

.footer-col h4, .game-providers-section h4, .social-media-section h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

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

.footer-description {
  line-height: 1.6;
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav a {
  color: #ccc;
  transition: color 0.3s ease;
}

.footer-nav 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;
  object-fit: contain;
}

.game-providers-section, .social-media-section {
  max-width: 1200px;
  margin: 30px auto; /* Margin between sections */
  padding: 0 20px;
  text-align: center;
}

.footer-bottom-section {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 20px;
  border-top: 1px solid #333;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.footer-utility-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-utility-nav a {
  color: #aaa;
  transition: color 0.3s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Marquee Mobile */
  .marquee-section {
    height: var(--marquee-height-mobile); /* Mobile height */
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 18px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: 1.2;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation-duration: 25s;
  }

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

  .header-top {
    height: var(--header-top-height-mobile); /* Mobile height */
  }
  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .hamburger-menu {
    display: block;
    position: relative;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002; /* Above logo */
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }
  .hamburger-menu::before,
  .hamburger-menu::after,
  .hamburger-menu span {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--neon-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  }
  .hamburger-menu span {
    position: relative;
  }
  .hamburger-menu.active::before {
    transform: translateY(10.5px) rotate(45deg);
    background-color: var(--neon-accent);
    box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
  }
  .hamburger-menu.active::after {
    transform: translateY(-10.5px) rotate(-45deg);
    background-color: var(--neon-accent);
    box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
  }
  .hamburger-menu.active span {
    opacity: 0;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 10px; /* Adjust padding to prevent logo touching hamburger */
    text-align: center; /* For text logo */
  }
  .logo img {
    max-height: 40px; /* Mobile logo height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Adjust padding */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      0 0 30px var(--neon-secondary),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
    height: var(--mobile-nav-buttons-height-mobile); /* Mobile height */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% width - half of gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below header top + mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: rgba(10, 10, 10, 0.95); /* Semi-transparent dark background */
    flex-direction: column;
    justify-content: flex-start; /* Align items to top */
    align-items: center;
    padding-top: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: transform 0.3s ease;
    transform: translateX(-100%); /* Off-screen by default */
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 15px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 25px rgba(255, 0, 255, 0.1);
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    width: 100%; /* Take full width of main-nav */
    max-width: none; /* No max-width restriction on mobile */
  }
  .nav-link {
    font-size: 18px;
    padding: 12px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile 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 content */
  }
  .mobile-menu-overlay.active {
    display: block;
  }

  /* Footer Mobile */
  .footer-grid-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-logo {
    text-align: center;
  }
  .footer-description {
    text-align: center;
  }
  .footer-nav {
    align-items: center;
  }
  .payment-icons, .game-providers-icons, .social-media-icons {
    justify-content: center;
  }
  .game-providers-section, .social-media-section {
    margin: 20px auto;
  }
  .footer-bottom-section {
    margin-top: 20px;
    padding: 15px;
  }
  .footer-utility-nav {
    gap: 10px;
  }

  /* 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;
  }
}

/* No-scroll class for body when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
