:root {
  --primary-color: #017439;
  --auxiliary-color: #FFFFFF;
  --text-color: #ffffff; /* Default text color for dark backgrounds */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Neon Colors - derived from primary/auxiliary */
  --neon-primary: hsl(120, 100%, 60%); /* Bright Green */
  --neon-secondary: hsl(180, 100%, 60%); /* Bright Cyan */
  --neon-accent: hsl(300, 100%, 60%); /* Bright Magenta */

  /* Button specific colors from prompt */
  --button-bg-color-register: #C30808;
  --button-bg-color-login: #C30808;
  --button-text-color-register-login: #FFFF00;

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

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

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--dark-bg-1); /* Default dark background */
  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;
}

/* Common Container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Neon Glow Animations */
@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes alternate-colors {
  0%, 100% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  50% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes random-glow {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 20px var(--neon-primary); }
  20% { border-color: var(--neon-secondary); box-shadow: 0 0 20px var(--neon-secondary); }
  40% { border-color: var(--neon-accent); box-shadow: 0 0 20px var(--neon-accent); }
  60% { border-color: hsl(240, 100%, 70%); box-shadow: 0 0 20px hsl(240, 100%, 70%); }
  80% { border-color: hsl(0, 100%, 70%); box-shadow: 0 0 20px hsl(0, 100%, 70%); }
  100% { border-color: var(--neon-primary); box-shadow: 0 0 20px var(--neon-primary); }
}

@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(0, 255, 0, 0.3); /* Green glow */
  }
  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); /* Cyan glow */
  }
  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); /* Magenta glow */
  }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, inset 0 0 15px currentColor; }
  20%, 24%, 55% { opacity: 0.8; box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, inset 0 0 10px currentColor; }
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
  to { box-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor; }
}

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

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

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px; /* Desktop height */
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  color: var(--auxiliary-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(0, 255, 0, 0.1); /* Green glow */
  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));
}

@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;
  height: 100%; /* Ensure wrapper takes full height to center content */
  display: flex;
  align-items: center;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  padding-left: 100%; /* Start off-screen */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--auxiliary-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;
}

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

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

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  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(0, 255, 0, 0.1); /* Green glow */
}

.header-top {
  display: flex;
  align-items: center;
  height: 60px; /* Desktop height */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--auxiliary-color); /* Regular color, no neon */
  text-transform: uppercase;
  padding: 0; /* No extra padding, container handles it */
  z-index: 1; /* Ensure logo is above hamburger menu on mobile */
}

/* No neon effects for logo */
.logo:hover {
  color: var(--auxiliary-color);
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
}

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

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

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

.main-nav {
  display: flex; /* Visible on desktop */
  width: 100%;
  height: 50px; /* Desktop height */
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different animation for nav bar */
  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); /* Cyan glow */
  position: static; /* Explicitly static for desktop */
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.nav-link {
  color: var(--auxiliary-color);
  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(--neon-primary); /* Use a neon color for hover */
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
  margin-right: 15px; /* Space between hamburger and logo */
  z-index: 1001; /* Above mobile menu overlay */
  outline: none;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 10px; }
.hamburger-menu .bar:nth-child(3) { top: 20px; }

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

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

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

/* Footer Section */
.site-footer {
  background-color: var(--dark-bg-1);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

.footer-col .footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color); /* Use primary brand color */
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-nav-list a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

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

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 40px; /* Adjust as needed */
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  transition: filter 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

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

.game-providers-section .footer-container, .social-media-section .footer-container {
    padding: 0 20px; /* Ensure full width but with padding */
}

.footer-bottom {
  padding-top: 20px;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.copyright {
  color: rgba(255, 255, 255, 0.6);
}

.footer-action-links {
  display: flex;
  gap: 15px;
}

.footer-action-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: 35px; /* Mobile height */
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 18px;
  }
  .marquee-text {
    font-size: 13px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    animation: marquee-scroll 25s linear infinite; /* Faster scroll on mobile */
  }

  /* Header */
  .site-header {
    top: 35px; /* Below mobile marquee */
  }
  .header-top {
    height: 50px; /* Mobile height */
  }
  .header-top .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Align hamburger left */
    max-width: none; /* Ensure no max-width limit on mobile */
    width: 100%;
  }
  .hamburger-menu {
    display: block; /* Visible on mobile */
    margin-right: 10px;
  }
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding-right: 40px; /* Offset for right side balance */
  }
  /* Hide desktop buttons on mobile */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile specific buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 5px 15px; /* Vertical padding, horizontal padding for container */
    background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    height: 50px; /* Mobile height */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font */
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
  }

  /* Mobile Navigation Menu */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 135px; /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - 135px); /* Fill remaining height */
    background: linear-gradient(180deg, var(--dark-bg-2), var(--dark-bg-3));
    padding: 20px 0;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      5px 0 15px rgba(0, 255, 0, 0.2), /* Green glow */
      inset 0 0 10px rgba(0, 255, 0, 0.1);
    overflow-y: auto; /* Enable scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }
  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    max-width: none; /* Ensure no max-width limit on mobile */
    width: 100%;
  }
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer */
  .site-footer .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 15px;
  }
  .footer-action-links {
    justify-content: center;
    width: 100%;
  }

  /* Mobile content overflow fix */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
  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;
  }
}
