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

  /* Neon colors for dynamic glow effects */
  --neon-glow-color-1: #00ffcc; /* Teal */
  --neon-glow-color-2: #ff00ff; /* Magenta */
  --neon-glow-color-3: #ffff00; /* Yellow */
  --neon-glow-color-4: #ff6600; /* Orange */
  --neon-glow-color-5: #00aaff; /* Blue */

  --marquee-height-desktop: 40px;
  --marquee-height-mobile: 25px;

  --header-offset: calc(var(--marquee-height-desktop) + 60px + 50px); /* Desktop: Marquee (40px) + HeaderTop (60px) + MainNav (50px) = 150px */
}

@media (max-width: 768px) {
  :root {
    --header-offset: calc(var(--marquee-height-mobile) + 50px + 35px); /* Mobile: Marquee (25px) + HeaderTop (50px) + MobileButtons (35px) = 110px */
  }
}

/* Animations for dynamic neon effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-glow-color-1);
    box-shadow: 
      0 0 10px var(--neon-glow-color-1),
      0 0 20px var(--neon-glow-color-1),
      inset 0 0 10px rgba(0, 255, 204, 0.3);
  }
  33% {
    border-color: var(--neon-glow-color-2);
    box-shadow: 
      0 0 10px var(--neon-glow-color-2),
      0 0 20px var(--neon-glow-color-2),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-glow-color-3);
    box-shadow: 
      0 0 10px var(--neon-glow-color-3),
      0 0 20px var(--neon-glow-color-3),
      inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

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

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

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #fff;
  background-color: #1a1a1a; /* Dark background for overall page */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Accessibility: WCAG AA contrast for text */
a, p, span, h1, h2, h3, h4, h5, h6 {
  color: #fff; /* Default text color for dark background */
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop); /* Use variable for height */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-glow-color-1),
    0 0 20px var(--neon-glow-color-1),
    0 0 30px var(--neon-glow-color-1),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  z-index: 1001;
  display: flex; /* Use flex to align icon and wrapper */
  align-items: center;
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 20px; /* Adjusted padding for height */
}

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

.marquee-icon-emoji {
  font-size: 18px; /* Adjusted font size */
  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-color-1),
    0 0 10px var(--neon-glow-color-1),
    0 0 15px var(--neon-glow-color-1);
  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: #ffffff;
  text-decoration: none;
  text-shadow: 
    0 0 5px var(--neon-glow-color-1),
    0 0 10px var(--neon-glow-color-1),
    0 0 15px var(--neon-glow-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;
}

.marquee-text:hover {
  text-shadow: 
    0 0 10px var(--neon-glow-color-1),
    0 0 20px var(--neon-glow-color-1),
    0 0 30px var(--neon-glow-color-1),
    0 0 40px var(--neon-glow-color-1);
  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-glow-color-1),
    0 0 6px var(--neon-glow-color-1);
}

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
}

.header-top {
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-glow-color-3), /* Yellow glow for top bar */
    0 0 20px var(--neon-glow-color-3),
    0 0 30px var(--neon-glow-color-3),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 15px 0; /* Adjusted padding for height */
}

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

.logo {
  color: var(--secondary-color); /* White for contrast */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  /* LOGO MUST NOT use neon effects */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px;
}

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

.hamburger-icon {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--neon-glow-color-1); /* Neon color for icon */
  position: relative;
  transition: background-color 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glow */
}
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  width: 30px;
  height: 3px;
  background-color: var(--neon-glow-color-1); /* Neon color for icon */
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease, background-color 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glow */
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

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

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

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

/* Main Navigation */
.main-nav {
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-glow-color-2), /* Magenta glow for nav bar */
    0 0 20px var(--neon-glow-color-2),
    0 0 30px var(--neon-glow-color-2),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  padding: 10px 0; /* Adjusted padding for height */
  display: flex; /* Desktop default */
}

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

.nav-link {
  color: var(--secondary-color); /* White text for contrast */
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color); /* Green on hover */
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Using specified colors */
  padding: 12px 20px;
  color: var(--register-login-font-color); /* Yellow font for register/login */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px var(--register-login-font-color),
    0 0 10px var(--neon-glow-color-4); /* Orange glow */
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent text wrap on desktop */
}

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

/* Footer Section */
.site-footer {
  background-color: #111; /* Dark background */
  color: #ccc;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col h4 {
  color: var(--secondary-color); /* White heading */
  font-size: 16px;
  margin-bottom: 15px;
}

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

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

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

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

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

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

.payment-methods,
.game-providers-section,
.social-media-section {
  margin-top: 30px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.payment-methods h4,
.game-providers-section h4,
.social-media-section h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-align: center;
}

.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%;
  justify-content: center; /* Center icons */
}

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(1.5); /* Lighten for dark background */
  transition: filter 0.3s ease;
}

.payment-icons img:hover,
.game-providers-icons img:hover,
.social-media-icons img:hover {
  filter: grayscale(0%) brightness(1); /* Color on hover */
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #888;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Global mobile adjustments */
  body {
    padding-top: var(--header-offset);
  }

  .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 Section */
  .marquee-section {
    height: var(--marquee-height-mobile); /* Use variable for height */
  }
  .marquee-container {
    padding: 5px 5px; /* Adjusted padding */
    gap: 5px;
  }
  .marquee-icon {
    width: 18px;
    height: 18px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 12px;
    line-height: 1.4;
  }
  .marquee-separator {
    font-size: 12px;
    margin: 0 5px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 25s linear infinite;
  }

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

  .header-top {
    padding: 10px 0; /* Reduced padding for mobile */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Space between hamburger and logo */
    width: 100%; /* Ensure full width */
    max-width: none; /* No max-width on mobile */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Left side */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 1; /* Center */
    font-size: 20px; /* Adjust font size */
  }
  .logo img {
    max-height: 35px !important; /* Adjust image logo height */
  }

  .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; /* Padding for the button row */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    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 8px var(--neon-glow-color-5), /* Blue glow for mobile buttons */
      0 0 15px var(--neon-glow-color-5),
      inset 0 0 10px rgba(0, 170, 255, 0.2);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(var(--marquee-height-mobile) + 50px + 35px); /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    overflow-y: auto; /* Scroll if menu content is long */
    flex-direction: column;
    z-index: 1000; /* Above overlay */
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Dark background */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 10px var(--neon-glow-color-2), /* Magenta glow for nav menu */
      0 0 20px var(--neon-glow-color-2),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to left */
    padding: 20px 15px;
    gap: 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

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

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

  /* Footer Section */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  .payment-methods h4,
  .game-providers-section h4,
  .social-media-section h4 {
    text-align: left; /* Align headings left on mobile */
    padding-left: 15px;
  }
  .payment-icons,
  .game-providers-icons,
.social-media-icons {
    justify-content: flex-start; /* Align icons left on mobile */
    padding: 0 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
