:root {
  /* Site Colors */
  --primary-color: #017439; /* Dark Green */
  --secondary-color: #FFFFFF; /* White */
  --register-color: #C30808; /* Red for Register */
  --login-color: #C30808; /* Red for Login */
  --button-text-color: #FFFF00; /* Yellow for button text */

  /* Neon Dark Backgrounds */
  --neon-dark-bg-1: #0a0a0a;
  --neon-dark-bg-2: #1a1a2e;
  --neon-dark-bg-3: #16213e;

  /* Dynamic Flow Colors - intelligently chosen to complement site colors */
  --neon-flow-1: #00FF00; /* Bright Green - related to primary */
  --neon-flow-2: #FF00FF; /* Magenta - vibrant contrast */
  --neon-flow-3: #00FFFF; /* Cyan - vibrant contrast */
  --neon-flow-4: #FFFF00; /* Yellow - vibrant contrast */
  --neon-flow-5: #FF0000; /* Red - for register/login type buttons */

  /* Header Offset - calculated based on marquee and header heights */
  --header-offset: 155px; /* Desktop: Marquee (45px) + Header (60px + 50px) = 155px */
}

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

/* Global styles for body to prevent content being covered by fixed header */
body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #cccccc; /* Default text color for dark backgrounds */
  background-color: var(--neon-dark-bg-1); /* Ensure body has a dark background */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

body.no-scroll {
  overflow: hidden;
}

/* --- Neon Animations (Dynamic Colors) --- */

/* Theme Color Flow Animation */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-flow-1);
    box-shadow:
      0 0 10px var(--neon-flow-1),
      0 0 20px var(--neon-flow-1),
      inset 0 0 10px rgba(0, 255, 0, 0.3);
  }
  33% {
    border-color: var(--neon-flow-2);
    box-shadow:
      0 0 10px var(--neon-flow-2),
      0 0 20px var(--neon-flow-2),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-flow-3);
    box-shadow:
      0 0 10px var(--neon-flow-3),
      0 0 20px var(--neon-flow-3),
      inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
}

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

/* Marquee Pulse Animation for Icon */
@keyframes marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

/* Marquee Scroll Animation */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Marquee Section Styles --- */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2), var(--neon-dark-bg-3));
  color: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid; /* Base for animation */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-flow-1),
    0 0 20px var(--neon-flow-1),
    0 0 30px var(--neon-flow-1),
    inset 0 0 20px rgba(0, 255, 0, 0.1); /* Initial glow */
  z-index: 1001;
  height: 45px; /* Desktop marquee height */
  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; /* Padding for the container, not the section */
}

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

.marquee-icon-emoji {
  font-size: 20px; /* Adjust emoji 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-flow-1),
    0 0 10px var(--neon-flow-1),
    0 0 15px var(--neon-flow-1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%; /* Ensure wrapper takes full height */
  display: flex;
  align-items: center;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  line-height: 1; /* Adjust line height to fit in small marquee */
}

.marquee-text {
  font-size: 16px;
  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;
  padding: 2px 0; /* Small padding to make text more clickable without affecting height too much */
}

.marquee-text:hover {
  text-shadow:
    0 0 10px var(--neon-flow-1),
    0 0 20px var(--neon-flow-1),
    0 0 30px var(--neon-flow-1),
    0 0 40px var(--neon-flow-1);
  transform: scale(1.02); /* Slightly smaller scale for subtle effect */
  color: var(--secondary-color);
}

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

/* --- Header Section Styles (Desktop First) --- */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stack top and nav areas */
  background: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2), var(--neon-dark-bg-3));
}

/* Header Top Area */
.header-top {
  width: 100%;
  padding: 15px 0; /* Vertical padding */
  border-bottom: 2px solid; /* Base for animation */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-flow-1), /* Neon green glow */
    0 0 20px var(--neon-flow-1),
    0 0 30px var(--neon-flow-1),
    inset 0 0 20px rgba(0, 255, 0, 0.1); /* Initial glow */
  display: flex; /* For centering content within */
  align-items: center;
  justify-content: center;
  position: relative; /* For mobile logo absolute positioning if needed */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  flex-shrink: 0;
  display: block; /* Ensure it's block for proper spacing */
  /* NO neon effects on LOGO */
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px; /* Desktop logo height */
  /* NO neon effects on LOGO image */
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
  align-items: center;
}

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

/* Main Navigation Area */
.main-nav {
  width: 100%;
  padding: 10px 0; /* Vertical padding */
  background: linear-gradient(135deg, var(--neon-dark-bg-2), var(--neon-dark-bg-3), #0f3460); /* Slightly different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different dynamic color for contrast */
  box-shadow:
    0 0 10px var(--neon-flow-5), /* Neon red glow for contrast */
    0 0 20px var(--neon-flow-5),
    0 0 30px var(--neon-flow-5),
    inset 0 0 20px rgba(255, 0, 0, 0.1); /* Initial glow */
  display: flex; /* Visible on desktop */
  justify-content: center;
  align-items: center;
  position: static; /* Default desktop position */
}

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

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
  /* NO neon effects on nav links */
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-flow-5); /* Hover color for nav links */
  border-bottom: 2px solid var(--neon-flow-5);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none;
}

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

/* --- Buttons --- */
.btn {
  position: relative;
  padding: 12px 25px;
  color: var(--button-text-color); /* Yellow text for buttons */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow:
    0 0 5px var(--button-text-color),
    0 0 10px var(--button-text-color);
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping by default on desktop */
}

/* Custom background for register/login buttons if needed, overrides linear-gradient from theme-colors */
.btn-register {
  background: var(--register-color); /* Custom red background for register */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-flow-5), /* Red glow for register button */
    0 0 20px var(--neon-flow-5),
    inset 0 0 10px rgba(255, 0, 0, 0.3); /* Initial glow */
}

.btn-login {
  background: var(--login-color); /* Custom red background for login */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-flow-5), /* Red glow for login button */
    0 0 20px var(--neon-flow-5),
    inset 0 0 10px rgba(255, 0, 0, 0.3); /* Initial glow */
}

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

/* --- Footer Section Styles --- */
.site-footer {
  background-color: var(--neon-dark-bg-1); /* Dark background */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
  direction: ltr;
}

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

.footer-col h4 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

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

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

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

.footer-nav a {
  color: #aaaaaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.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; /* Consistent gap for all icon sections */
  width: 100%;
}

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 40px; /* Adjust icon size */
  height: auto;
  width: auto;
  object-fit: contain;
}

.game-providers-section,
.social-media-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
  text-align: center;
}

.game-providers-section h4,
.social-media-section h4 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  text-align: left; /* Align title left */
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
  color: #888888;
  margin: 0;
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  /* Marquee Mobile Adjustments */
  .marquee-section {
    height: 30px; /* Mobile marquee height */
    padding: 0; /* Remove padding from section */
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px; /* Smaller padding */
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    padding: 0;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 15px; /* Smaller gap for mobile */
    animation-duration: 20s; /* Faster scroll on mobile */
  }

  /* Header Mobile Adjustments */
  .site-header {
    top: 30px; /* Marquee mobile height */
    flex-direction: column;
  }

  .header-top {
    padding: 10px 0; /* Smaller vertical padding */
    height: 60px; /* Fixed height for top bar */
    box-shadow: none; /* Remove desktop glow to simplify */
    border-bottom: none; /* Remove desktop border */
    display: flex; /* Ensure flex context */
    align-items: center;
    /* Removed justify-content for mobile */
  }

  .header-container {
    padding: 0 15px; /* Smaller horizontal padding */
    justify-content: space-between; /* Use space-between for hamburger and logo */
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    position: relative; /* For logo centering */
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: flex; /* Show on mobile */
    position: relative;
    z-index: 1002; /* Above logo and overlay */
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    /* Removed margin-right: auto */
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    /* Neon glow for hamburger */
    box-shadow:
      0 0 5px var(--neon-flow-3),
      0 0 10px var(--neon-flow-3);
    border-radius: 3px;
    flex-shrink: 0;
  }

  .hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--neon-flow-3); /* Neon color */
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    /* Text shadow for bar glow */
    box-shadow:
      0 0 3px var(--neon-flow-3),
      0 0 6px var(--neon-flow-3);
  }

  .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 Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo content */
    align-items: center !important;
    font-size: 24px; /* Adjust mobile logo size */
    /* No padding-left here, let the flex distribution handle it */
  }
  .logo img {
    max-height: 40px !important; /* 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; /* Vertical and horizontal padding */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2));
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    border-bottom: 2px solid; /* Base for animation */
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow:
      0 0 5px var(--neon-flow-4), /* Yellow glow for mobile buttons area */
      0 0 10px var(--neon-flow-4),
      inset 0 0 10px rgba(255, 255, 0, 0.1); /* Initial glow */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 10px gap */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    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 */
    position: fixed;
    top: var(--header-offset); /* Below the header top and mobile buttons */
    left: 0;
    width: 70%; /* Slide-in menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background: linear-gradient(180deg, var(--neon-dark-bg-2), var(--neon-dark-bg-3)); /* Dark background */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid; /* Base for animation */
    animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border color */
    box-shadow:
      0 0 10px var(--neon-flow-5), /* Red glow for nav */
      0 0 20px var(--neon-flow-5),
      0 0 30px var(--neon-flow-5),
      inset 0 0 20px rgba(255, 0, 0, 0.1); /* Initial glow */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px; /* Smaller gap */
    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); /* Separator */
  }
  .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 */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

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

  /* Footer Mobile Adjustments */
  .site-footer {
    padding: 30px 0 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    padding: 0 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .footer-col h4 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-logo {
    font-size: 20px;
  }

  .footer-description {
    font-size: 13px;
  }

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

  .game-providers-section,
  .social-media-section {
    padding: 0 15px;
    margin-bottom: 20px;
  }

  .game-providers-section h4,
  .social-media-section h4 {
    font-size: 16px;
    text-align: center; /* Center align titles */
  }

  .social-media-section {
    padding-top: 20px;
  }

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

  .footer-bottom {
    padding: 15px 15px 0;
  }

  .copyright {
    font-size: 12px;
  }

  /* Prevent content images from overflowing */
  .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;
  }
}
