:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-dark: #0a0a0a;
  --bg-dark-light: #1a1a2e;
  --bg-dark-accent: #16213e;

  /* Neon Colors - derived from primary/secondary for synthwave theme */
  --neon-primary: #00ffcc; /* Vibrant Cyan/Greenish Blue, contrasting with dark background */
  --neon-secondary: #ff00ff; /* Vibrant Magenta */
  --neon-accent: #ffff00; /* Vibrant Yellow */

  --header-offset: 170px; /* Desktop: Marquee(45) + HeaderTop(70) + MainNav(55) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 125px; /* Mobile: Marquee(25) + HeaderTop(50) + MobileNavButtons(50) */
  }
}

/* Common styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--secondary-color); /* Page background */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden;
}

/* Animations for Neon Effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary, #00ffcc);
    box-shadow:
      0 0 10px var(--neon-primary, #00ffcc),
      0 0 20px var(--neon-primary, #00ffcc),
      inset 0 0 10px rgba(0, 255, 204, 0.3);
  }
  33% {
    border-color: var(--neon-secondary, #ff00ff);
    box-shadow:
      0 0 10px var(--neon-secondary, #ff00ff),
      0 0 20px var(--neon-secondary, #ff00ff),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent, #ffff00);
    box-shadow:
      0 0 10px var(--neon-accent, #ffff00),
      0 0 20px var(--neon-accent, #ffff00),
      inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-primary, #00ffcc),
      0 0 10px var(--neon-primary, #00ffcc),
      0 0 15px var(--neon-primary, #00ffcc);
    color: var(--text-light);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary, #ff00ff),
      0 0 10px var(--neon-secondary, #ff00ff),
      0 0 15px var(--neon-secondary, #ff00ff);
    color: var(--text-light);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent, #ffff00),
      0 0 10px var(--neon-accent, #ffff00),
      0 0 15px var(--neon-accent, #ffff00);
    color: var(--text-light);
  }
}

@keyframes marquee-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-light), var(--bg-dark-accent));
  color: var(--text-light);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary, #00ffcc),
    0 0 20px var(--neon-primary, #00ffcc),
    0 0 30px var(--neon-primary, #00ffcc),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  z-index: 1001;
  height: 45px; /* Explicit height for calculation */
}

.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: 24px;
  display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, text-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;
  padding-right: 30px; /* Ensure space for seamless loop */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  animation: text-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-primary, #00ffcc),
    0 0 20px var(--neon-primary, #00ffcc),
    0 0 30px var(--neon-primary, #00ffcc),
    0 0 40px var(--neon-primary, #00ffcc);
  transform: scale(1.05);
  color: var(--text-light);
}

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

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

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Adjust based on marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-light));
  color: var(--text-light);
}

.site-header .header-top {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-light), var(--bg-dark-accent));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary, #00ffcc),
    0 0 20px var(--neon-primary, #00ffcc),
    0 0 30px var(--neon-primary, #00ffcc),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  padding: 15px 0;
  display: flex;
  align-items: center;
  height: 40px; /* Explicit height for calculation */
}

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

.site-header .logo {
  color: var(--text-light);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  /* LOGO EXCEPTION: No neon effects for logo */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  transition: none;
  animation: none;
}

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

.site-header .desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

.site-header .btn {
  position: relative;
  background: linear-gradient(135deg, #C30808, #FF0000); /* Use custom colors for buttons */
  padding: 12px 25px;
  color: #FFFF00; /* Use custom font color for buttons */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow:
    0 0 5px #FFFF00,
    0 0 10px #C30808;
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary, #00ffcc),
    0 0 30px var(--neon-primary, #00ffcc),
    0 0 45px var(--neon-primary, #00ffcc),
    inset 0 0 15px rgba(0, 255, 204, 0.5);
}

.site-header .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-secondary, #ff00ff),
    0 0 20px var(--neon-secondary, #ff00ff),
    0 0 30px var(--neon-secondary, #ff00ff),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  height: 30px; /* Explicit height for calculation */
}

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

.site-header .nav-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
  /* Regular style, no neon for nav links */
  text-shadow: none;
}

.site-header .nav-link:hover {
  color: var(--neon-primary, #00ffcc);
  text-shadow: 0 0 5px var(--neon-primary, #00ffcc);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
  margin-right: 20px;
}

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

.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);
  background-color: var(--neon-secondary, #ff00ff);
}
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
  background-color: var(--neon-secondary, #ff00ff);
}

.mobile-menu-overlay {
  display: none;
  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(--bg-dark);
  color: var(--text-light);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.site-footer .footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.site-footer .footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer .footer-col ul li a:hover {
  color: var(--primary-color);
}

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

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

.site-footer .payment-icons,
.site-footer .game-providers-icons,
.site-footer .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.site-footer .payment-icons img,
.site-footer .game-providers-icons img,
.site-footer .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  border-radius: 3px;
}

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

.site-footer .game-providers-section h4,
.site-footer .social-media-section h4 {
  margin-top: 0;
}

.site-footer .footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-footer .copyright {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
}

.site-footer .footer-legal-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .site-header .nav-link {
    padding: 8px 10px;
    font-size: 15px;
  }
  .site-header .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  /* Mobile 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;
  }

  .marquee-section {
    height: 25px; /* Mobile marquee height */
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 18px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: 1.3;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation-duration: 20s; /* Faster scroll on mobile */
  }

  .site-header {
    top: 25px; /* Adjust based on mobile marquee height */
  }

  .site-header .header-top {
    padding: 10px 0;
    height: 30px; /* Mobile header top height */
  }
  .site-header .header-container {
    padding: 0 15px;
    max-width: none; /* Remove max-width on mobile */
    width: 100%;
    justify-content: flex-start; /* Align items to start */
  }

  .hamburger-menu {
    display: block;
    order: 0;
  }

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

  .site-header .logo img {
    max-height: 30px;
  }

  .site-header .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .site-header .mobile-nav-buttons {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-light));
    border-bottom: 1px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 5px var(--neon-accent, #ffff00),
      0 0 10px var(--neon-accent, #ffff00),
      inset 0 0 10px rgba(255, 255, 0, 0.1);
    height: 30px; /* Mobile buttons height, adjust if padding changes */
  }

  .site-header .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of gap */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px; /* Reduced padding for mobile */
    font-size: 13px; /* Reduced font size for mobile */
    text-align: center;
    height: auto; /* Allow height to adjust based on content */
  }

  .site-header .main-nav {
    display: none; /* Hidden by default, shown with JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below header elements */
    left: 0;
    width: 70%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-accent));
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-secondary, #ff00ff),
      0 0 20px var(--neon-secondary, #ff00ff),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    padding: 20px 0;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto; /* Remove fixed height for main nav on mobile */
    min-height: calc(100vh - var(--header-offset)); /* Ensure it fills viewport */
    z-index: 1000;
  }

  .site-header .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

  .site-header .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
  }

  .site-header .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    text-align: left;
  }
  .site-header .nav-link:last-child {
    border-bottom: none;
  }

  .site-footer .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .site-footer .footer-col {
    text-align: center;
  }
  .site-footer .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .site-footer .footer-col ul li {
    margin: 0 10px 10px;
  }
  .site-footer .footer-logo {
    text-align: center;
  }
  .site-footer .footer-description {
    text-align: center;
  }
  .site-footer .footer-legal-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .site-footer .footer-legal-nav a {
    margin: 5px 8px;
  }
  .site-footer .payment-methods h4,
  .site-footer .game-providers-section h4,
  .site-footer .social-media-section h4 {
    text-align: center;
  }
  .site-footer .payment-icons,
  .site-footer .game-providers-icons,
  .site-footer .social-media-icons {
    justify-content: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
