:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --reg-btn-color: #C30808;
  --login-btn-color: #C30808;
  --btn-font-color: #FFFF00;
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Neon colors for dynamic effects - derived from vibrant palette */
  --neon-glow-primary: #00FF00; /* Bright Green */
  --neon-glow-secondary: #FFFF00; /* Bright Yellow */
  --neon-glow-accent: #00FFFF; /* Cyan */

  --header-offset: 155px; /* Desktop: Marquee (45px) + Header Top (60px) + Main Nav (50px) */
}

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

/* Common styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0;
  background-color: #121212;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

@keyframes alternate-glow {
  0% {
    border-color: var(--neon-glow-secondary);
    box-shadow:
      0 0 10px var(--neon-glow-secondary),
      0 0 20px var(--neon-glow-secondary);
  }
  100% {
    border-color: var(--neon-glow-accent);
    box-shadow:
      0 0 10px var(--neon-glow-accent),
      0 0 20px var(--neon-glow-accent);
  }
}

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

.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: 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-glow-primary),
    0 0 10px var(--neon-glow-primary),
    0 0 15px var(--neon-glow-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: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-glow-primary),
    0 0 10px var(--neon-glow-primary),
    0 0 15px var(--neon-glow-primary);
  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-glow-primary),
    0 0 20px var(--neon-glow-primary),
    0 0 30px var(--neon-glow-primary),
    0 0 40px var(--neon-glow-primary);
  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-glow-primary),
    0 0 6px var(--neon-glow-primary);
}

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-glow-primary),
    0 0 20px var(--neon-glow-primary),
    0 0 30px var(--neon-glow-primary),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  padding: 10px 0;
  min-height: 60px; /* Desktop */
  display: flex; /* Ensure flex context for container */
  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;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  flex-shrink: 0;
  display: block;
}

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

.desktop-nav-buttons {
  display: flex; /* Desktop default: show */
  gap: 12px;
  align-items: center;
}

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

.btn {
  position: relative;
  padding: 12px 25px;
  color: var(--btn-font-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow:
    0 0 5px var(--btn-font-color),
    0 0 10px var(--neon-glow-primary);
}

.btn-register {
  background: linear-gradient(135deg, var(--reg-btn-color), darken(var(--reg-btn-color), 10%));
}

.btn-login {
  background: linear-gradient(135deg, var(--login-btn-color), darken(var(--login-btn-color), 10%));
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-glow-primary),
    0 0 30px var(--neon-glow-primary),
    inset 0 0 15px rgba(255, 255, 255, 0.3);
  text-shadow:
    0 0 8px var(--btn-font-color),
    0 0 15px var(--neon-glow-primary),
    0 0 20px var(--neon-glow-primary);
}

.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-glow 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-glow-secondary),
    0 0 20px var(--neon-glow-secondary),
    0 0 30px var(--neon-glow-secondary),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  width: 100%;
  display: flex; /* Desktop default: show */
  min-height: 50px;
  align-items: center;
}

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

.nav-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color);
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--neon-glow-accent);
}

.hamburger-menu {
  display: none; /* Desktop default: hide */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above logo */
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--neon-glow-primary);
  border-radius: 3px;
  position: relative;
  transition: background-color 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-glow-primary),
    0 0 10px var(--neon-glow-primary);
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: var(--neon-glow-primary);
  border-radius: 3px;
  position: absolute;
  transition: transform 0.3s ease, background-color 0.3s ease, top 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-glow-primary),
    0 0 10px var(--neon-glow-primary);
}

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

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background: transparent;
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
  background: var(--neon-glow-accent);
  box-shadow:
    0 0 5px var(--neon-glow-accent),
    0 0 10px var(--neon-glow-accent);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
  background: var(--neon-glow-accent);
  box-shadow:
    0 0 5px var(--neon-glow-accent),
    0 0 10px var(--neon-glow-accent);
}

.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: #1a1a1a;
  color: #f0f0f0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-main {
  padding-bottom: 30px;
}

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

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: block;
}

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

.footer-col ul {
  padding: 0;
}

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

.footer-col ul li a {
  color: #ccc;
  transition: color 0.3s ease;
}

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

.payment-methods, .game-providers-section, .social-media-section {
  margin-top: 30px;
}

.payment-methods h4, .game-providers-section h4, .social-media-section h4 {
  margin-bottom: 15px;
  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;
  filter: grayscale(100%) brightness(150%); /* Make icons visible on dark background */
  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 */
}

.footer-bottom {
  background-color: #121212;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid #333;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .marquee-section {
    height: 30px; /* Mobile marquee height */
    padding: 0px 2px;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0px 2px;
  }
  .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: 30px; /* Below mobile marquee */
  }

  .header-top {
    padding: 8px 0;
    min-height: 50px; /* Mobile header-top height */
  }

  .header-container {
    padding: 0 15px;
    position: relative;
  }

  .hamburger-menu {
    display: flex; /* Mobile default: show */
    order: 1;
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    order: 2;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
  }

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

  .desktop-nav-buttons {
    display: none; /* Mobile: hide desktop buttons */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Mobile: show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, var(--dark-bg-3), var(--dark-bg-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 8px var(--neon-glow-accent),
      0 0 15px var(--neon-glow-accent),
      inset 0 0 10px rgba(0, 255, 255, 0.1);
  }

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

  .main-nav {
    display: none; /* Mobile default: hide, JS will show */
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-3));
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-glow-primary),
      0 0 20px var(--neon-glow-primary),
      inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    z-index: 1000;
    overflow-y: auto;
  }

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

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

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