:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-login-bg: #C30808;
  --register-login-text: #FFFF00;

  /* Neon dynamic colors - based on primary/secondary for smart adaptation */
  --neon-glow-color1: #00FF00; /* Electric Green */
  --neon-glow-color2: #00FFFF; /* Cyan */
  --neon-glow-color3: #FF00FF; /* Magenta */
  --neon-glow-color4: #FFFF00; /* Electric Yellow */

  --header-offset: 155px; /* Desktop: Marquee (45) + header-top (70) + main-nav (40) */
}

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

/* Animations for dynamic neon colors */
@keyframes neon-glow-flow {
  0%, 100% {
    text-shadow: 0 0 5px var(--neon-glow-color1), 0 0 10px var(--neon-glow-color1), 0 0 15px var(--neon-glow-color1);
    box-shadow: 0 0 5px var(--neon-glow-color1), 0 0 10px var(--neon-glow-color1), 0 0 15px var(--neon-glow-color1);
  }
  25% {
    text-shadow: 0 0 5px var(--neon-glow-color2), 0 0 10px var(--neon-glow-color2), 0 0 15px var(--neon-glow-color2);
    box-shadow: 0 0 5px var(--neon-glow-color2), 0 0 10px var(--neon-glow-color2), 0 0 15px var(--neon-glow-color2);
  }
  50% {
    text-shadow: 0 0 5px var(--neon-glow-color3), 0 0 10px var(--neon-glow-color3), 0 0 15px var(--neon-glow-color3);
    box-shadow: 0 0 5px var(--neon-glow-color3), 0 0 10px var(--neon-glow-color3), 0 0 15px var(--neon-glow-color3);
  }
  75% {
    text-shadow: 0 0 5px var(--neon-glow-color4), 0 0 10px var(--neon-glow-color4), 0 0 15px var(--neon-glow-color4);
    box-shadow: 0 0 5px var(--neon-glow-color4), 0 0 10px var(--neon-glow-color4), 0 0 15px var(--neon-glow-color4);
  }
}

@keyframes neon-border-flow {
  0%, 100% {
    border-color: var(--neon-glow-color1);
    box-shadow: 0 0 10px var(--neon-glow-color1), 0 0 20px var(--neon-glow-color1);
  }
  25% {
    border-color: var(--neon-glow-color2);
    box-shadow: 0 0 10px var(--neon-glow-color2), 0 0 20px var(--neon-glow-color2);
  }
  50% {
    border-color: var(--neon-glow-color3);
    box-shadow: 0 0 10px var(--neon-glow-color3), 0 0 20px var(--neon-glow-color3);
  }
  75% {
    border-color: var(--neon-glow-color4);
    box-shadow: 0 0 10px var(--neon-glow-color4), 0 0 20px var(--neon-glow-color4);
  }
}

@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 for all elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #fff; /* Default text color for dark backgrounds */
  background-color: #000; /* Default dark background */
  overflow-x: hidden;
  padding-top: var(--header-offset); /* Use header offset for body padding */
}

body.no-scroll {
  overflow: hidden;
}

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

ul {
  list-style: none;
}

/* 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: neon-border-flow 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-glow-color1),
    0 0 20px var(--neon-glow-color1),
    0 0 30px var(--neon-glow-color1),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001; /* Ensure on top of header */
  height: 45px; /* Fixed 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: 10px 20px;
}

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

.marquee-icon-emoji {
  font-size: 20px;
  display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, neon-glow-flow 3s ease-in-out infinite alternate;
  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;
  animation: neon-glow-flow 3s ease-in-out infinite alternate;
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.marquee-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  animation: neon-glow-flow 3s ease-in-out infinite alternate;
}

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex; /* For desktop, header-top and main-nav are separate blocks but part of header */
  flex-direction: column;
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: neon-border-flow 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-glow-color1),
    0 0 20px var(--neon-glow-color1),
    0 0 30px var(--neon-glow-color1),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  padding: 15px 0; /* Vertical padding */
  min-height: 70px; /* Ensures enough space */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular styling, no neon for logo */
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0; /* Ensure no extra padding affecting alignment */
}

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

.desktop-nav-buttons {
  display: flex; /* Desktop default: show */
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  display: none; /* Desktop default: hide */
}

.btn {
  position: relative;
  background: var(--register-login-bg); /* Use specified color for buttons */
  padding: 12px 25px;
  color: var(--register-login-text); /* Use specified font color */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: neon-border-flow 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px var(--register-login-text),
    0 0 10px var(--register-login-text);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-glow-color1),
    0 0 30px var(--neon-glow-color1),
    0 0 45px var(--neon-glow-color1);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark gradient */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: neon-border-flow 5s linear infinite reverse; /* Different animation for contrast */
  box-shadow: 
    0 0 10px var(--neon-glow-color2),
    0 0 20px var(--neon-glow-color2),
    0 0 30px var(--neon-glow-color2),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Desktop default: show */
  padding: 10px 0; /* Vertical padding */
  min-height: 40px; /* Ensures enough space */
  align-items: center;
}

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

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

.nav-link:hover {
  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; /* Hidden on desktop */
}

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

.site-footer h4 {
  color: var(--primary-color); /* Use primary color for footer headings */
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: bold;
}

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

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

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

.footer-col.footer-about {
  display: flex;
  flex-direction: column;
}

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

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

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

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

.site-footer .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;
}

.footer-middle-area {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-middle-area .footer-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-providers-section, .social-media-section {
  width: 100%;
}

.footer-bottom-area {
  text-align: center;
}

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

.copyright {
  color: #b0b0b0;
  font-size: 13px;
  flex-grow: 1;
  text-align: left;
}

.footer-action-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-action-links a {
  color: var(--primary-color);
  font-weight: bold;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .marquee-section {
    height: 30px; /* Adjusted mobile marquee height */
    padding: 0px 2px;
  }
  .marquee-container {
    gap: 10px;
    padding: 0px 5px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 14px;
  }
  .marquee-separator {
    font-size: 14px;
    margin: 0 10px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  .site-header {
    top: 30px; /* Marquee height */
    flex-direction: column;
    align-items: stretch;
  }

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

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1002; /* Above logo and overlay */
    position: relative;
    flex-shrink: 0; /* Don't let it shrink */
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--neon-glow-color4); /* Neon yellow for hamburger */
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    animation: neon-glow-flow 3s ease-in-out infinite alternate;
  }

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

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

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px; /* Smaller font size for mobile logo */
    text-align: center;
  }

  .logo img {
    max-height: 30px; /* Mobile 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: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, #16213e, #0f3460); /* Dark background for mobile buttons */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100vh - var(--header-offset));
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    padding: 20px 0;
    border-right: 2px solid;
    animation: neon-border-flow 5s linear infinite;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

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

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

  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    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 */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  .footer-top-area .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .footer-bottom-area .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .copyright {
    text-align: center;
    width: 100%;
  }

  .footer-action-links {
    justify-content: center;
    width: 100%;
  }

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