:root {
  --header-offset: 155px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(50px) = 155px */

  --primary-color: #017439; /* Brand primary green */
  --secondary-color: #FFFFFF; /* Brand secondary white */
  --register-color: #C30808;
  --login-color: #C30808;
  --bg-color: #FFFFFF;
  --reg-login-font-color: #FFFF00;

  /* Neon color palette derived from primary/secondary for dynamic effects */
  --neon-base-1: #00ff99; /* Bright green/teal, related to primary */
  --neon-base-2: #00ccff; /* Bright blue */
  --neon-base-3: #ff66cc; /* Bright pink */
  --neon-base-4: #ffff00; /* Bright yellow */
  --neon-base-5: #ff0000; /* Bright red */

  --neon-header-top-color: var(--neon-base-4); /* Yellow for header-top */
  --neon-main-nav-color: var(--neon-base-5); /* Red for main-nav */
  --neon-marquee-color: var(--neon-base-1); /* Green/teal for marquee */
}

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

/* Base styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #f0f0f0;
  background-color: #1a1a2e;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden;
}

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

/* Dynamic color animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-base-1);
    box-shadow:
      0 0 10px var(--neon-base-1),
      0 0 20px var(--neon-base-1),
      inset 0 0 10px rgba(0, 255, 153, 0.3);
  }
  33% {
    border-color: var(--neon-base-2);
    box-shadow:
      0 0 10px var(--neon-base-2),
      0 0 20px var(--neon-base-2),
      inset 0 0 10px rgba(0, 204, 255, 0.3);
  }
  66% {
    border-color: var(--neon-base-3);
    box-shadow:
      0 0 10px var(--neon-base-3),
      0 0 20px var(--neon-base-3),
      inset 0 0 10px rgba(255, 102, 204, 0.3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-base-1),
      0 0 10px var(--neon-base-1),
      0 0 15px var(--neon-base-1);
    color: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-base-2),
      0 0 10px var(--neon-base-2),
      0 0 15px var(--neon-base-2);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-base-3),
      0 0 10px var(--neon-base-3),
      0 0 15px var(--neon-base-3);
    color: #ffffff;
  }
}

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

/* 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: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  box-shadow:
    0 0 10px var(--neon-marquee-color),
    0 0 20px var(--neon-marquee-color),
    0 0 30px var(--neon-marquee-color),
    inset 0 0 20px rgba(0, 255, 153, 0.1);
  z-index: 1001;
  padding: 10px 0; /* Desktop padding */
  height: 45px; /* Fixed height for offset calculation */
  box-sizing: border-box;
}

.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: 24px;
  height: 24px;
  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-marquee-color),
    0 0 10px var(--neon-marquee-color),
    0 0 15px var(--neon-marquee-color);
  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-marquee-color),
    0 0 10px var(--neon-marquee-color),
    0 0 15px var(--neon-marquee-color);
  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-marquee-color),
    0 0 20px var(--neon-marquee-color),
    0 0 30px var(--neon-marquee-color),
    0 0 40px var(--neon-marquee-color);
  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-marquee-color),
    0 0 6px var(--neon-marquee-color);
}

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

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  box-shadow:
    0 0 10px var(--neon-header-top-color),
    0 0 20px var(--neon-header-top-color),
    0 0 30px var(--neon-header-top-color),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
  min-height: 40px; /* Base height for header top */
  display: flex; /* Ensure flex for hamburger/logo/buttons */
  align-items: center;
  box-sizing: border-box;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, not neon */
  text-decoration: none;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  display: block;
  line-height: 1;
}

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

.desktop-nav-buttons {
  display: flex; /* Desktop default: flex */
  gap: 15px;
  flex-shrink: 0;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-base-1), var(--neon-base-2));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-base-1);
  transition: all 0.3s ease;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-base-1),
    0 0 30px var(--neon-base-1),
    0 0 45px var(--neon-base-1),
    inset 0 0 15px rgba(0, 255, 153, 0.5);
}

.main-nav {
  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-main-nav-color),
    0 0 20px var(--neon-main-nav-color),
    0 0 30px var(--neon-main-nav-color),
    inset 0 0 20px rgba(255, 0, 0, 0.1);
  width: 100%;
  display: flex; /* Desktop default: flex */
  min-height: 50px;
  box-sizing: border-box;
}

.nav-container {
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px 0;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping in desktop nav */
}

.nav-link:hover {
  color: var(--primary-color);
  text-shadow: 0 0 5px var(--primary-color);
}

/* Hamburger Menu (Desktop hidden) */
.hamburger-menu {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1002; /* Above logo and buttons */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow:
    0 0 5px var(--neon-base-4),
    0 0 10px var(--neon-base-4);
}

/* Footer */
.site-footer {
  background-color: #111;
  color: #ccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

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

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

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

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

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

.footer-col ul 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;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  transition: filter 0.3s ease;
}

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

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

.game-providers-section h4, .social-media-section h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
  padding: 0 20px; /* Match container padding */
}

.game-providers-section .game-providers-icons, .social-media-section .social-media-icons {
  padding: 0 20px; /* Match container padding */
}

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

.footer-bottom p {
  margin-bottom: 15px;
  color: #aaa;
}

.footer-legal-nav a {
  color: #aaa;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

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

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

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

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

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

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

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

  .marquee-content {
    animation: marquee-scroll 25s linear infinite; /* Adjust speed for mobile */
  }

  .site-header {
    top: 30px; /* Marquee height */
  }

  .header-top {
    padding: 10px 0;
    min-height: 50px;
  }

  .header-container {
    padding: 0 15px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    position: relative; /* For absolute logo positioning if needed */
  }

  .hamburger-menu {
    display: flex;
    order: 1;
    flex-shrink: 0;
    margin-right: 15px;
  }

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

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

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

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2;
    font-size: 20px;
    padding-right: 45px; /* Offset for right alignment of buttons/empty space */
  }

  .logo img {
    max-height: 35px; /* Smaller logo for mobile */
  }

  .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;
    background-color: #1a1a2e; /* Dark background for mobile buttons */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 40px;
    box-shadow:
      0 5px 10px rgba(0, 0, 0, 0.3),
      inset 0 0 5px rgba(255, 255, 255, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    flex-direction: column; /* Mobile default: column */
    position: fixed;
    top: 120px; /* Marquee + HeaderTop + MobileButtons height */
    left: 0;
    width: 70%; /* Adjust width as needed */
    height: calc(100% - 120px); /* Fill remaining height */
    background-color: #16213e; /* Darker background for mobile menu */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    display: flex; /* Ensure it's flex so column layout works */
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
    max-width: none;
    height: 100%; /* Ensure container fills parent height for scrolling */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

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

  .footer-container {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .footer-col {
    margin-bottom: 20px;
  }

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

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

  .footer-legal-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-legal-nav a {
    margin: 0;
  }

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Overlay for mobile menu */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Body no-scroll for mobile menu */
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;
  }
}
