:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --button-font-color: #FFFF00;
  --background-color: #FFFFFF;

  /* Neon dynamic colors - based on primary green, but vibrant */
  --neon-color-1: #39FF14; /* Bright Lime Green */
  --neon-color-2: #00FF00; /* Pure Green */
  --neon-color-3: #7CFC00; /* Lawn Green */
  --neon-color-4: #ADFF2F; /* Green Yellow */
  --neon-color-5: #00FA9A; /* Medium Spring Green */
  --neon-color-6: #20B2AA; /* Light Sea Green */

  /* Specific neon colors for header sections for contrast */
  --header-top-neon: #FFFF00; /* Neon Yellow for top bar */
  --main-nav-neon: #FF00FF; /* Neon Magenta for main nav */
  --button-neon: #FF0000; /* Neon Red for buttons */
  
  --header-offset: 155px; /* Desktop: marquee 45px + header-top 60px + main-nav 50px */
  --marquee-height: 45px;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 145px; /* Mobile: marquee 45px + header-top 50px + mobile-nav-buttons 50px */
  }
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  background-color: var(--background-color); /* Main body background, not header/marquee */
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Animations for neon effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-color-1);
    box-shadow: 
      0 0 10px var(--neon-color-1),
      0 0 20px var(--neon-color-1);
  }
  20% {
    border-color: var(--neon-color-2);
    box-shadow: 
      0 0 10px var(--neon-color-2),
      0 0 20px var(--neon-color-2);
  }
  40% {
    border-color: var(--neon-color-3);
    box-shadow: 
      0 0 10px var(--neon-color-3),
      0 0 20px var(--neon-color-3);
  }
  60% {
    border-color: var(--neon-color-4);
    box-shadow: 
      0 0 10px var(--neon-color-4),
      0 0 20px var(--neon-color-4);
  }
  80% {
    border-color: var(--neon-color-5);
    box-shadow: 
      0 0 10px var(--neon-color-5),
      0 0 20px var(--neon-color-5);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-color-1),
      0 0 10px var(--neon-color-1),
      0 0 15px var(--neon-color-1);
    color: #ffffff;
  }
  33% {
    text-shadow: 
      0 0 5px var(--neon-color-3),
      0 0 10px var(--neon-color-3),
      0 0 15px var(--neon-color-3);
    color: #ffffff;
  }
  66% {
    text-shadow: 
      0 0 5px var(--neon-color-5),
      0 0 10px var(--neon-color-5),
      0 0 15px var(--neon-color-5);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-color-1),
      0 0 10px var(--neon-color-1),
      0 0 15px var(--neon-color-1);
    color: #ffffff;
  }
}

/* Marquee Section */
.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 8s ease-in-out infinite alternate; /* Dynamic color border */
  box-shadow: 
    0 0 10px var(--neon-color-1),
    0 0 20px var(--neon-color-1),
    0 0 30px var(--neon-color-1),
    inset 0 0 20px rgba(57, 255, 20, 0.1); /* Greenish glow */
  z-index: 1001;
  padding: 5px 0; /* Adjust padding to control height */
  min-height: 35px; /* Minimum height for marquee */
  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;
  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-color-1),
    0 0 10px var(--neon-color-1),
    0 0 15px var(--neon-color-1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  color: #ffffff; /* Ensure emoji color is white for better glow effect */
}

@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 40s linear infinite; /* Slower scroll for longer content */
  gap: 30px;
  padding-right: 30px; /* Ensure space before repeating content */
}

.marquee-text {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-shadow: 
    0 0 5px var(--neon-color-1),
    0 0 10px var(--neon-color-1),
    0 0 15px var(--neon-color-1);
  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: normal; /* Allow text to wrap within item if needed */
  max-width: 300px; /* Limit individual marquee item width */
}

.marquee-text:hover {
  text-shadow: 
    0 0 10px var(--neon-color-1),
    0 0 20px var(--neon-color-1),
    0 0 30px var(--neon-color-1),
    0 0 40px var(--neon-color-1);
  transform: scale(1.05);
  color: #ffffff;
}

.marquee-separator {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-shadow: 
    0 0 3px var(--neon-color-1),
    0 0 6px var(--neon-color-1);
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Default to column for easier mobile adaptation, then row for desktop */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 6s ease-in-out infinite; /* Dynamic color border for top bar */
  box-shadow: 
    0 0 10px var(--header-top-neon),
    0 0 20px var(--header-top-neon),
    0 0 30px var(--header-top-neon),
    inset 0 0 20px rgba(255, 255, 0, 0.1); /* Yellowish glow */
  width: 100%;
  padding: 15px 0; /* Vertical padding for desktop header-top */
  min-height: 30px; /* Minimum height to ensure visibility */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px; /* Horizontal padding for desktop header-container */
  position: relative; /* For mobile logo absolute positioning if needed */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White for contrast */
  text-decoration: none;
  /* LOGO must NOT have neon effects */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  transition: color 0.3s ease;
  display: block; /* Ensure logo is visible */
}

.logo:hover {
  color: var(--primary-color); /* Slight change on hover */
}

.desktop-nav-buttons {
  display: flex; /* Default to flex for desktop */
  gap: 12px;
  align-items: center;
}

.btn {
  position: relative;
  padding: 12px 25px;
  color: var(--button-font-color); /* Neon yellow font for contrast */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 5s ease-in-out infinite alternate; /* Dynamic color border */
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Red/Red gradient */
  text-shadow: 
    0 0 5px var(--button-font-color),
    0 0 10px var(--button-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

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

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

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--header-top-neon); /* Neon color for lines */
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 0 5px var(--header-top-neon), 0 0 10px var(--header-top-neon);
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Hamburger menu active state */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Darker background for main nav */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 7s ease-in-out infinite alternate; /* Dynamic color border for main nav */
  box-shadow: 
    0 0 10px var(--main-nav-neon),
    0 0 20px var(--main-nav-neon),
    0 0 30px var(--main-nav-neon),
    inset 0 0 20px rgba(255, 0, 255, 0.1); /* Magenta glow */
  width: 100%;
  display: flex; /* Default to flex for desktop */
  padding: 10px 0; /* Vertical padding for desktop main-nav */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--secondary-color); /* White text for menu items */
  text-decoration: none;
  font-weight: 500;
  padding: 10px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping on desktop */
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color); /* Green on hover */
  text-shadow: 0 0 5px var(--primary-color); /* Slight glow on hover */
}

/* Footer Section */
.site-footer {
  background-color: #1a1a2e; /* Dark background, not neon */
  color: #ffffff;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive 4 columns */
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  color: var(--primary-color); /* Green for titles */
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White for logo */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  word-wrap: break-word; /* Ensure full text display */
  overflow-wrap: break-word;
}

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

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

.footer-nav ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav ul li a:hover {
  color: var(--primary-color); /* Green on hover */
}

.payment-icons,
.game-providers-icons,
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Slightly larger gap for social/game providers */
  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 {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section:last-of-type,
.social-media-section:last-of-type {
  border-bottom: none; /* No border for the last section */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.6);
}

.copyright {
  margin: 0;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    padding: 2px 0;
    min-height: 30px;
  }
  .marquee-container {
    gap: 8px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    max-width: 200px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    animation: marquee-scroll 30s linear infinite; /* Adjust speed for mobile */
    gap: 20px;
  }

  /* Header */
  .site-header {
    flex-direction: column; /* Stack elements */
  }

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

  .header-container {
    padding: 0 15px; /* Adjust horizontal padding for mobile */
    width: 100%;
    max-width: none; /* Mobile container fills width */
    justify-content: space-between;
    position: relative;
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 2; /* Center logo */
    position: absolute; /* Force center */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  
  .logo img {
    max-height: 40px; /* Adjust logo size for mobile */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger on the left */
    z-index: 1002;
    padding: 5px;
    margin-left: -5px; /* Adjust to align with edge */
  }
  
  .hamburger-menu span {
    background-color: var(--secondary-color); /* White for hamburger lines */
    box-shadow: none; /* No neon glow for hamburger lines on mobile to avoid clutter */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for mobile button container */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, equal width with gap */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size for mobile buttons */
    text-align: center;
    text-transform: none; /* Allow original case for button text */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(var(--marquee-height) + 50px + 50px); /* Below marquee and mobile buttons - fallback */
    left: 0;
    width: 100%;
    height: calc(100% - var(--marquee-height) - 50px - 50px); /* Fill remaining height - fallback */
    flex-direction: column; /* Vertical menu */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    overflow-y: auto; /* Scroll if content overflows */
    transition: transform 0.3s ease-out;
    transform: translateX(-100%); /* Slide out to the left */
    z-index: 1000; /* Above content, below hamburger */
    border: none; /* Remove border for mobile menu */
    box-shadow: none; /* Remove box shadow for mobile menu */
    padding-bottom: 20px; /* Add some padding at the bottom */
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    text-align: left;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

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

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

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

  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  
  .footer-description {
    font-size: 13px;
  }

  .payment-icons,
  .game-providers-icons,
  .social-media-icons {
    gap: 5px; /* Smaller gap on mobile */
  }
  .payment-icons img,
  .game-providers-icons img,
  .social-media-icons img {
    max-height: 40px; /* Smaller icons on mobile */
  }

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