:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --background-color: #FFFFFF;
  --register-login-font-color: #FFFF00;

  --neon-primary: #39FF14; /* Bright green, related to primary */
  --neon-secondary: #FF00FF; /* Bright magenta for contrast */
  --neon-accent: #FFFF00; /* Bright yellow for accent */

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

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

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #e0e0e0;
  background-color: #1a1a1a;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

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

/* Animations for Neon Effects */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, inset 0 0 15px currentColor; }
  20%, 24%, 55% { opacity: 0.8; box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, inset 0 0 10px currentColor; }
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
  to { box-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor; }
}

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

@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); }
  50% { text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary); color: var(--secondary-color); }
  100% { text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent); color: var(--secondary-color); }
}

@keyframes theme-colors-border {
  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(57, 255, 20, 0.3); }
  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.3); }
  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.3); }
}

@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);
  color: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors-border 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(57, 255, 20, 0.1);
  z-index: 1001;
  height: 45px; /* Desktop 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;
}

.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, 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;
}

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

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

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

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Background handled by header-top and main-nav */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors-border 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(57, 255, 20, 0.1);
  width: 100%;
  min-height: 60px; /* Desktop height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular style, no neon */
  text-transform: uppercase;
  display: block;
}

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

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Use custom colors for buttons */
  padding: 12px 25px;
  color: var(--register-login-font-color); /* Custom font color */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors-border 4s ease-in-out infinite;
  text-shadow: 0 0 5px var(--register-login-font-color), 0 0 10px var(--register-login-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors-border 4s ease-in-out infinite;
  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);
  width: 100%;
  min-height: 50px; /* Desktop height */
  display: flex;
  align-items: center;
}

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

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular style, no neon */
  padding: 8px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary);
  border-bottom: 2px solid var(--neon-primary);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002;
  width: 30px;
  height: 30px;
  animation: theme-colors-border 4s ease-in-out infinite;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  border-radius: 3px;
}

.hamburger-menu::before,
.hamburger-menu::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--neon-primary);
  left: 3px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px var(--neon-primary);
}

.hamburger-menu::before {
  top: 8px;
}

.hamburger-menu::after {
  bottom: 8px;
}

.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 14px;
  background-color: var(--neon-secondary);
  text-shadow: 0 0 5px var(--neon-secondary);
}

.hamburger-menu.active::after {
  transform: rotate(-45deg);
  bottom: 14px;
  background-color: var(--neon-secondary);
  text-shadow: 0 0 5px var(--neon-secondary);
}

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

.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;
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
}

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

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

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

.footer-top-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 {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

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

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

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

.footer-nav-list a {
  color: #aaa;
  transition: color 0.3s ease;
}

.footer-nav-list 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;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: 30px; /* Mobile height */
  }
  .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 5px;
  }
  .marquee-content {
    animation: marquee-scroll 25s linear infinite;
    gap: 20px;
  }

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

  .header-top {
    min-height: 60px; /* Mobile height */
    padding: 0 15px;
    box-sizing: border-box;
  }

  .header-container {
    padding: 0;
    justify-content: flex-start;
    position: relative;
  }

  .hamburger-menu {
    display: block;
    margin-right: auto;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  }
  
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    margin-right: 40px; /* Account for hamburger width */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-bottom: 2px solid;
    animation: theme-colors-border 4s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent), inset 0 0 20px rgba(255, 255, 0, 0.1);
    min-height: 60px; /* Mobile height */
  }

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

  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 70%;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e, #0a0a0a);
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    border-right: 2px solid;
    animation: theme-colors-border 4s ease-in-out infinite;
    overflow-y: auto;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    max-width: none;
    width: 100%;
    gap: 15px;
  }

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

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

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h4, .footer-logo {
    text-align: center;
  }
  .footer-nav-list {
    text-align: center;
  }
  .footer-description {
    text-align: center;
  }
  .payment-methods, .game-providers-section, .social-media-section {
    text-align: center;
  }
  .payment-icons, .game-providers-icons, .social-media-icons {
    justify-content: center;
  }

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

/* General utility for no scroll */
.no-scroll {
  overflow: hidden;
}

/* Color contrast check (comments for clarity, not actual CSS) */
/* Ensure all text has sufficient contrast against its background */
/* .marquee-text, .marquee-icon-emoji, .marquee-separator, .logo, .nav-link, .btn, .footer-col h4, .footer-logo, .footer-description, .footer-nav-list a, .game-providers-section h4, .social-media-section h4, .copyright {
  Default text color for dark backgrounds is white or bright neon, which generally ensures good contrast.
  Specific checks for custom colors:
  .btn background: #C30808 (dark red) with text #FFFF00 (bright yellow) -> good contrast.
  Footer background: #222 (dark grey) with text #ccc (light grey) or #aaa (lighter grey) -> good contrast.
  Primary color #017439 (dark green) with white text #FFFFFF -> good contrast.
} */
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
