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

  /* Neon base colors - derived from site colors */
  --neon-green: #00ff00; /* Bright green for primary theme */
  --neon-yellow: #ffff00; /* Bright yellow for accent */
  --neon-cyan: #00ffff; /* Bright cyan for secondary accent */
  --neon-pink: #ff00ff; /* Bright pink for contrast */
  --neon-red: #ff0000; /* Bright red for alerts/buttons */

  /* Dynamic Neon Colors for animations */
  --neon-primary-dynamic: var(--neon-green);
  --neon-secondary-dynamic: var(--neon-yellow);
  --neon-accent-dynamic: var(--neon-cyan);

  --header-offset: 155px; /* Desktop: Marquee 45px + Header-top 60px + Main-nav 50px */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 145px; /* Mobile: Marquee 45px + Header-top 50px + Mobile-nav-buttons 50px */
  }
}

/* General Body & HTML */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: #121212;
  color: #e0e0e0;
  overflow-x: hidden;
}

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

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

@keyframes text-glow-flow {
  0%, 100% {
    text-shadow: 
      0 0 5px var(--neon-green),
      0 0 10px var(--neon-green),
      0 0 15px var(--neon-green);
    color: var(--secondary-color);
  }
  33% {
    text-shadow: 
      0 0 5px var(--neon-yellow),
      0 0 10px var(--neon-yellow),
      0 0 15px var(--neon-yellow);
    color: var(--secondary-color);
  }
  66% {
    text-shadow: 
      0 0 5px var(--neon-cyan),
      0 0 10px var(--neon-cyan),
      0 0 15px var(--neon-cyan);
    color: var(--secondary-color);
  }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-green);
    box-shadow: 
      0 0 10px var(--neon-green),
      0 0 20px var(--neon-green);
  }
  33% {
    border-color: var(--neon-yellow);
    box-shadow: 
      0 0 10px var(--neon-yellow),
      0 0 20px var(--neon-yellow);
  }
  66% {
    border-color: var(--neon-cyan);
    box-shadow: 
      0 0 10px var(--neon-cyan),
      0 0 20px var(--neon-cyan);
  }
}

@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px; /* Fixed height for offset calculation */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-green),
    0 0 20px var(--neon-green),
    0 0 30px var(--neon-green),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
}

.marquee-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px;
  height: 100%;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  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-green),
    0 0 10px var(--neon-green),
    0 0 15px var(--neon-green);
  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-green),
    0 0 20px var(--neon-green),
    0 0 30px var(--neon-green),
    0 0 40px var(--neon-green);
  transform: scale(1.02);
  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-green),
    0 0 6px var(--neon-green);
}

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

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

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  height: 60px; /* Fixed height for offset calculation */
  display: flex;
  align-items: center;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 30px var(--neon-yellow),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
}

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

.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  box-shadow:
    0 0 5px var(--neon-green),
    0 0 10px var(--neon-green);
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
  background-color: var(--neon-red);
  box-shadow:
    0 0 5px var(--neon-red),
    0 0 10px var(--neon-red);
}

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

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
  background-color: var(--neon-red);
  box-shadow:
    0 0 5px var(--neon-red),
    0 0 10px var(--neon-red);
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  padding: 0;
  /* LOGO must NOT have neon effects */
}

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

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  width: 100%;
  box-sizing: border-box;
  padding: 10px 20px;
  background: linear-gradient(135deg, #16213e, #1a1a2e, #0a0a0a);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-cyan),
    0 0 20px var(--neon-cyan),
    0 0 30px var(--neon-cyan),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  overflow: hidden; /* Prevent content overflow */
  flex-wrap: nowrap; /* Ensure buttons stay in one line */
  justify-content: center;
  align-items: center;
  height: 50px; /* Fixed height for offset calculation */
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  height: 50px; /* Fixed height for offset calculation */
  display: flex;
  align-items: center;
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 3s linear infinite; /* Example: Rainbow effect for main nav */
  box-shadow:
    0 0 10px var(--neon-red),
    0 0 20px var(--neon-red),
    0 0 30px var(--neon-red),
    inset 0 0 20px rgba(255, 0, 0, 0.1);
}

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

.nav-link {
  color: var(--secondary-color);
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
  /* Nav links use regular style, no neon */
}

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

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

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 15px var(--neon-red),
    0 0 30px var(--neon-red),
    inset 0 0 15px rgba(255, 0, 0, 0.3);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  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;
}

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

/* Footer */
.site-footer {
  background-color: #1a1a1a;
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--secondary-color);
  font-size: 18px;
  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 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
}

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

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

.footer-col ul li a {
  color: #cccccc;
  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;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.payment-icons img:hover,
.game-providers-icons img:hover,
.social-media-icons img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

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

.game-providers-section h4,
.social-media-section h4 {
  margin-bottom: 15px;
}

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

.copyright {
  margin: 0;
}

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

  .marquee-section {
    height: 40px; /* Smaller height for mobile */
    padding: 0 5px;
  }
  .marquee-container {
    padding: 0 10px;
    gap: 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 18px;
  }
  .marquee-text {
    font-size: 13px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  @keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* Adjust for shorter content */
  }

  .site-header {
    top: 40px; /* Marquee height on mobile */
  }

  .header-top {
    height: 50px; /* Smaller height for mobile */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    max-width: none; /* Occupy full width */
  }

  .hamburger-menu {
    display: flex;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: static; /* Reset absolute positioning if any */
    transform: none; /* Reset transform if any */
    max-width: calc(100% - 60px); /* Account for hamburger menu width */
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    gap: 10px;
    padding: 8px 15px;
    height: 50px;
  }

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

  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: calc(40px + 50px + 50px); /* Marquee + Header-top + Mobile-nav-buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - (40px + 50px + 50px)); /* Full height below header parts */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-cyan),
      0 0 20px var(--neon-cyan),
      0 0 30px var(--neon-cyan),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Must be set to show */
    transform: translateX(0);
  }

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

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

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

  .footer-grid-container {
    grid-template-columns: 1fr;
  }

  .footer-col {
    text-align: center;
  }

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