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

  /* Neon colors derived/complementary to primary green */
  --neon-green-light: #39FF14; /* Bright green, derived from primary */
  --neon-cyan-light: #00FFFF; /* Bright cyan */
  --neon-magenta-light: #FF00FF; /* Bright magenta */

  /* For elements with register/login background color */
  --neon-red-light: #FF3366; /* Bright red */
  --neon-orange-light: #FFA500; /* Bright orange */
  --neon-yellow-light: #FFFF00; /* Bright yellow */

  --header-offset: 160px; /* Desktop: Marquee (45px) + Header Top (70px) + Main Nav (45px) = 160px */
}

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

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  background-color: #1a1a1a;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* Accessibility: WCAG AA contrast */
.marquee-text, .nav-link, .btn, .logo, .footer-logo, .footer-description, .footer-heading, .copyright, .hamburger-menu {
  color: #ffffff;
}

/* Neon Glow Animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-green-light);
    box-shadow:
      0 0 10px var(--neon-green-light),
      0 0 20px var(--neon-green-light),
      inset 0 0 10px rgba(57, 255, 20, 0.3);
  }
  33% {
    border-color: var(--neon-cyan-light);
    box-shadow:
      0 0 10px var(--neon-cyan-light),
      0 0 20px var(--neon-cyan-light),
      inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  66% {
    border-color: var(--neon-magenta-light);
    box-shadow:
      0 0 10px var(--neon-magenta-light),
      0 0 20px var(--neon-magenta-light),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
}

@keyframes alternate-glow {
  0% {
    border-color: var(--neon-red-light);
    box-shadow:
      0 0 10px var(--neon-red-light),
      0 0 20px var(--neon-red-light),
      inset 0 0 10px rgba(255, 51, 102, 0.3);
  }
  100% {
    border-color: var(--neon-yellow-light);
    box-shadow:
      0 0 10px var(--neon-yellow-light),
      0 0 20px var(--neon-yellow-light),
      inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-green-light),
      0 0 10px var(--neon-green-light),
      0 0 15px var(--neon-green-light);
    color: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-cyan-light),
      0 0 10px var(--neon-cyan-light),
      0 0 15px var(--neon-cyan-light);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-magenta-light),
      0 0 10px var(--neon-magenta-light),
      0 0 15px var(--neon-magenta-light);
    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 Styles */
.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;
  z-index: 1001;
  min-height: 45px; /* Ensure consistent height for offset */
}

.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-green-light),
    0 0 10px var(--neon-green-light),
    0 0 15px var(--neon-green-light);
  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-green-light),
    0 0 10px var(--neon-green-light),
    0 0 15px var(--neon-green-light);
  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-green-light),
    0 0 20px var(--neon-green-light),
    0 0 30px var(--neon-green-light),
    0 0 40px var(--neon-green-light);
  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-green-light),
    0 0 6px var(--neon-green-light);
}

/* Header Section Styles */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
  min-height: 115px; /* header-top (70px) + main-nav (45px) */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  padding: 15px 0;
  min-height: 70px; /* For offset calculation */
  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;
}

.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  order: 2; /* Default order for desktop (middle if hamburger is left) */
}

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

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

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

.btn {
  position: relative;
  background-color: var(--register-login-bg);
  padding: 12px 30px;
  color: var(--register-login-text);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: alternate-glow 2s ease-in-out infinite alternate;
  text-shadow:
    0 0 5px var(--register-login-text),
    0 0 10px var(--neon-red-light);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  animation-duration: 1.5s;
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-red-light),
    0 0 30px var(--neon-red-light),
    inset 0 0 15px rgba(255, 51, 102, 0.5);
}

.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;
  width: 100%;
  display: flex;
  min-height: 45px; /* For offset calculation */
}

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

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above logo */
  order: 1;
}

.hamburger-icon {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--secondary-color);
  position: relative;
  transition: background-color 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-green-light),
    0 0 10px var(--neon-green-light);
}

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

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

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

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

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

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

.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; /* Below main-nav */
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: #0a0a0a;
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-col {
  flex: 1;
}

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

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

.footer-heading {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

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

.footer-nav 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: brightness(0.8) contrast(1.2);
  transition: filter 0.3s ease;
}

.payment-icons img:hover, .game-providers-icons img:hover, .social-media-icons img:hover {
  filter: brightness(1) contrast(1);
}

.footer-full-width-section {
  margin-bottom: 40px;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    padding: 0;
    min-height: 20px; /* Reduced height for mobile */
  }

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

  .marquee-icon {
    width: 25px;
    height: 25px;
  }

  .marquee-icon-emoji {
    font-size: 16px;
  }

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

  .marquee-separator {
    font-size: 14px;
    margin: 0 8px;
  }

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

  .site-header {
    top: 20px; /* Marquee height for mobile */
    min-height: 105px; /* header-top (50px) + mobile-buttons (55px) */
  }

  .header-top {
    padding: 10px 0;
    min-height: 50px;
  }

  .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Adjust for hamburger menu */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: block;
    order: 1;
    margin-right: 15px; /* Space between hamburger and logo */
  }

  .logo {
    order: 2;
    font-size: 24px;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-right: 40px; /* Push logo left to compensate for hamburger */
  }
  
  .logo img {
    max-height: 35px;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Prevent wrapping */
    min-height: 55px; /* For offset calculation */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #111111; /* Darker background for mobile menu */
    padding: 20px 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000; /* Ensure it's above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    overflow-y: auto;
  }

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

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

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

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

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

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

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-description {
    padding: 0 10px;
  }

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

  .payment-icons, .game-providers-icons, .social-media-icons {
    justify-content: center;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
