html {
  scroll-behavior: smooth;
}

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

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --register-login-font-color: #FFFF00;
  --neon-primary: #00FF00; /* Bright Green */
  --neon-secondary: #FFFF00; /* Bright Yellow */
  --neon-accent: #FF00FF; /* Bright Magenta */
  --header-offset: 155px; /* Desktop: Marquee 45px + Header-top 60px + Main-nav 50px */
}

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

/* Animations for Neon Effects */
@keyframes theme-colors {
  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(0, 255, 0, 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, 255, 0, 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, 0, 255, 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: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-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, #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),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  height: 45px; /* Assumed height */
}

.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: 25px;
  height: 25px;
  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;
  padding-right: 30px; /* Ensure content doesn't abruptly end */
}

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

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

.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),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  min-height: 60px; /* Assumed 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;
}

.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  line-height: 1;
}

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

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

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Use specific colors for buttons */
  padding: 12px 25px;
  color: var(--register-login-font-color);
  font-weight: bold;
  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(--register-login-font-color);
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  font-size: 15px;
}

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

.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 reverse;
  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, 255, 0, 0.1);
  width: 100%;
  display: flex;
  min-height: 50px; /* Assumed height */
  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: 10px 20px;
  gap: 25px;
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary);
  transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: relative;
  transition: background-color 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

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

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

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--neon-accent);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--neon-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 */
.site-footer {
  background: #1e1e1e;
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: bold;
}

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

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

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

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

.payment-methods .payment-icons,
.game-providers-section .game-providers-icons,
.social-media-section .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;
  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 {
  padding: 20px 0;
  border-top: 1px solid #333;
}

.game-providers-section .footer-container,
.social-media-section .footer-container {
  display: block; /* Override grid for full width */
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-top: 20px;
}

.footer-bottom .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.footer-legal-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-legal-nav li a {
  white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .marquee-section {
    height: 30px; /* Smaller marquee height on mobile */
    padding: 0px 5px;
  }

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

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

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

  .marquee-text {
    font-size: 13px;
    padding: 0 5px;
  }

  .marquee-separator {
    font-size: 13px;
    margin: 0 5px;
  }

  .marquee-content {
    gap: 15px;
    animation-duration: 20s;
  }

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

  .header-top {
    min-height: 50px; /* Adjusted height for mobile top bar */
  }

  .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Align hamburger to left */
    gap: 10px;
  }

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

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

  .logo img {
    max-height: 35px; /* Adjusted logo size for mobile */
  }

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

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

  .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;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Adjusted for mobile marquee + header-top + mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(90deg, #111, #222);
    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 reverse;
    box-shadow:
      5px 0 15px rgba(0, 255, 0, 0.5),
      10px 0 30px rgba(0, 255, 0, 0.3);
  }

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

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

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

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

  body.no-scroll {
    overflow: hidden;
  }

  /* Footer Mobile */
  .site-footer .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

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

  .footer-legal-nav {
    flex-direction: column;
    gap: 10px;
  }

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