:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --reg-btn-color: #C30808;
  --login-btn-color: #C30808;
  --reg-login-font-color: #FFFF00;
  --bg-color: #FFFFFF;

  /* Neon dynamic colors */
  --neon-primary: #00FF00; /* Vibrant Green */
  --neon-secondary: #FF00FF; /* Vibrant Magenta */
  --neon-accent: #FFFF00; /* Vibrant Yellow */

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

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: Marquee (30px) + Header Top (50px) + Mobile Buttons (40px) = 120px */
  }
}

/* Common animations for neon effects */
@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%);
  }
}

@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-border-glow {
  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.2);
  }
  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(255, 0, 255, 0.2);
  }
  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, 255, 0, 0.2);
  }
}

/* General Body and Page Content Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--bg-color);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll for mobile */
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-border-glow 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);
  z-index: 1001;
  height: 45px; /* Fixed height for desktop marquee */
  display: flex;
  align-items: center;
  justify-content: center;
}

.marquee-container {
  width: 100%;
  max-width: 1200px; /* Match header container width for consistency */
  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: 28px;
  height: 28px;
  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),
    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;
  padding-right: 30px; /* Ensure space for seamless loop */
}

.marquee-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.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.02);
  color: var(--secondary-color);
}

.marquee-separator {
  font-size: 15px;
  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: 45px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stacks header-top and main-nav */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-border-glow 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);
  padding: 10px 0;
  min-height: 40px; /* Ensure some height for content */
  display: flex;
  align-items: center;
  height: 60px; /* Fixed height for desktop header top */
}

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

.logo {
  color: var(--secondary-color); /* No neon for logo */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block; /* Ensures it's visible */
  order: 0; /* Default order for desktop */
  flex-shrink: 0;
  text-shadow: none; /* Explicitly remove text-shadow */
  filter: none; /* Explicitly remove filters */
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--reg-btn-color), var(--login-btn-color));
  padding: 12px 25px;
  color: var(--reg-login-font-color);
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-border-glow 4s ease-in-out infinite;
  transition: all 0.3s ease;
  text-shadow: 
    0 0 5px var(--reg-login-font-color),
    0 0 10px var(--reg-login-font-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(0, 255, 0, 0.3);
  color: var(--reg-login-font-color);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-border-glow 4s ease-in-out infinite reverse; /* Different glow for distinction */
  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(255, 0, 255, 0.1);
  padding: 10px 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 50px; /* Fixed height for desktop main nav */
}

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

.nav-link {
  color: var(--secondary-color); /* No neon for nav links */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

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

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

.mobile-menu-overlay {
  display: none;
}

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

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

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

.footer-col h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

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

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

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

.game-providers-section, .social-media-section {
  margin-bottom: 30px;
}

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

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

.footer-bottom p {
  margin: 0 0 10px 0;
  color: #888;
}

.footer-legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

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

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    height: 30px; /* Reduced height for mobile marquee */
  }

  .marquee-container {
    padding: 0 10px;
    gap: 10px;
  }

  .marquee-icon {
    width: 20px;
    height: 20px;
  }

  .marquee-icon-emoji {
    font-size: 14px;
  }

  .marquee-text {
    font-size: 13px;
  }

  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }

  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  .site-header {
    top: 30px; /* Below mobile marquee */
  }

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

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Ensure space between hamburger and logo */
  }

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

  .logo img {
    max-height: 35px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-bottom: 2px solid;
    animation: theme-border-glow 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-accent),
      0 0 15px var(--neon-accent),
      inset 0 0 8px rgba(255, 255, 0, 0.1);
    padding: 10px 15px;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
    justify-content: center;
    height: 40px; /* Fixed height for mobile buttons */
  }

  .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;
    word-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a);
    padding: 20px 0;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-border-glow 4s ease-in-out infinite reverse;
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile container fills width */
  }

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

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

  .hamburger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001; /* Above logo */
    flex-shrink: 0;
    order: 0;
    margin-right: 15px;
  }

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

  .hamburger-icon::before, .hamburger-icon::after {
    content: '';
    width: 100%;
    height: 3px;
    background-color: var(--neon-primary);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
    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;
    box-shadow: none;
  }

  .hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--neon-secondary);
    box-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary);
  }

  .hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--neon-secondary);
    box-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary);
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-legal-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-container {
    max-width: 100%;
    padding: 0 15px;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
