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

  --neon-primary-glow: #39FF14; /* Vibrant Green, derived from primary */
  --neon-secondary-glow: #00FFFF; /* Cyan for contrast */
  --neon-accent-glow: #FF00FF; /* Magenta for contrast */

  --header-offset: 140px; /* Desktop: Marquee (50px) + HeaderTop (50px) + MainNav (40px) */
}

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

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
}

/* Global Neon Animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary-glow);
    box-shadow:
      0 0 10px var(--neon-primary-glow),
      0 0 20px var(--neon-primary-glow);
  }
  33% {
    border-color: var(--neon-secondary-glow);
    box-shadow:
      0 0 10px var(--neon-secondary-glow),
      0 0 20px var(--neon-secondary-glow);
  }
  66% {
    border-color: var(--neon-accent-glow);
    box-shadow:
      0 0 10px var(--neon-accent-glow),
      0 0 20px var(--neon-accent-glow);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-primary-glow),
      0 0 10px var(--neon-primary-glow),
      0 0 15px var(--neon-primary-glow);
    color: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary-glow),
      0 0 10px var(--neon-secondary-glow),
      0 0 15px var(--neon-secondary-glow);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent-glow),
      0 0 10px var(--neon-accent-glow),
      0 0 15px var(--neon-accent-glow);
    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);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  z-index: 1001;
  height: 50px; /* Fixed 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;
  height: 100%;
  box-sizing: border-box;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  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-primary-glow),
    0 0 10px var(--neon-primary-glow),
    0 0 15px var(--neon-primary-glow);
  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: #ffffff;
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-primary-glow),
    0 0 10px var(--neon-primary-glow),
    0 0 15px var(--neon-primary-glow);
  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;
  white-space: normal; /* Allow text wrapping for long messages */
  word-wrap: break-word;
}

.marquee-text:hover {
  text-shadow:
    0 0 10px var(--neon-primary-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    0 0 40px var(--neon-primary-glow);
  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-primary-glow),
    0 0 6px var(--neon-primary-glow);
}

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

.site-header .header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 20px rgba(57, 255, 20, 0.1);
  padding: 15px 0;
  height: 50px; /* Fixed height for calculation */
  box-sizing: border-box;
}

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

.site-header .logo {
  color: #ffffff;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  /* LOGO NO NEON EFFECTS */
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

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

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

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

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

.site-header .btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 15px rgba(57, 255, 20, 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-glow),
    0 0 20px var(--neon-secondary-glow),
    0 0 30px var(--neon-secondary-glow),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  padding: 10px 0;
  height: 40px; /* Fixed height for calculation */
  box-sizing: border-box;
}

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

.site-header .nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease;
  /* Regular style, NO neon effect */
  text-shadow: none;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo and overlay */
  margin-right: 20px;
  transition: all 0.3s ease;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--neon-primary-glow);
  border-radius: 5px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
  box-shadow:
    0 0 5px var(--neon-primary-glow),
    0 0 10px var(--neon-primary-glow);
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 11px; }
.hamburger-menu span:nth-child(3) { top: 22px; }

.hamburger-menu.active span:nth-child(1) { top: 11px; transform: rotate(135deg); background: var(--neon-accent-glow); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 11px; transform: rotate(-135deg); background: var(--neon-accent-glow); }

.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: #1a1a2e; /* Dark background for footer */
  color: #ffffff;
  padding-top: 40px;
  font-size: 14px;
}

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

.site-footer h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--neon-primary-glow); /* Use neon color for footer headings */
  text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
}

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

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

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

.site-footer .footer-logo {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

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

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

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

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

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

.site-footer .payment-icons img:hover,
.site-footer .game-providers-icons img:hover,
.site-footer .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

.site-footer .footer-middle-section {
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .game-providers-section,
.site-footer .social-media-section {
  margin-bottom: 30px;
}

.site-footer .footer-bottom-section {
  padding: 40px 0;
}

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

.site-footer .footer-copyright p {
  margin: 0;
  color: #cccccc;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    height: 50px;
  }

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

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

  .marquee-icon-emoji {
    font-size: 14px !important;
  }

  .marquee-text {
    font-size: 14px !important;
  }

  .marquee-separator {
    font-size: 14px !important;
    margin: 0 10px !important;
  }

  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  .site-header {
    top: 50px; /* Below the marquee */
  }

  .site-header .header-top {
    padding: 10px 0;
    height: 40px; /* Adjusted height for mobile */
  }

  .site-header .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: flex-start;
    position: relative;
  }

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

  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    padding-left: 15px; /* Adjust for hamburger menu */
    padding-right: 15px;
  }

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

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

  .site-header .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: linear-gradient(135deg, #16213e, #1a1a2e);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 8px var(--neon-accent-glow),
      0 0 15px var(--neon-accent-glow);
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    height: 50px; /* Fixed height for calculation */
  }

  .site-header .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Adjusted for 2 buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .site-header .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(50px + 40px + 50px); /* Marquee + HeaderTop + MobileNavButtons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-primary-glow),
      0 0 20px var(--neon-primary-glow);
  }

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

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

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

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

  .footer-top-section .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer .footer-bottom-section .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .site-footer .footer-col.footer-login-register {
    order: -1; /* Move login/register to top in mobile bottom section */
  }

  .site-footer .footer-nav {
    text-align: center;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
