:root {
  --header-offset: 120px; /* Desktop: total height of header + button area should not exceed this value */
  --primary-color: #1A202C;
  --secondary-color: #FFD700;
  --neon-primary: var(--secondary-color); /* Gold for neon primary */
  --neon-secondary: #FF4500; /* OrangeRed for neon secondary */
  --neon-accent: #00FFFF; /* Cyan for neon accent */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: total height of marquee/header/button area should not exceed this value */
  }
}

/* Base styles for the body to apply header offset */
body {
  padding-top: var(--header-offset);
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors-marquee 4s ease-in-out infinite; /* Dynamic color for border and shadow */
  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(255, 215, 0, 0.1);
  z-index: 1001;
  padding: 5px 0;
}

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

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

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

.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: #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: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-shadow:
    0 0 3px var(--neon-primary),
    0 0 6px var(--neon-primary);
}

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: 40px; /* Adjusted to be below the marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: top 0.3s ease;
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors-header-top 4s ease-in-out infinite; /* Dynamic color for border and shadow */
  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(255, 215, 0, 0.1);
  padding: 10px 0;
}

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

.logo {
  color: #ffffff;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--secondary-color);
}

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

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors-main-nav 4s ease-in-out infinite; /* Dynamic color for border and shadow */
  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, 69, 0, 0.1);
  padding: 10px 0;
  display: flex;
}

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

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  margin: 0 5px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color);
  text-shadow: 0 0 8px var(--secondary-color), 0 0 15px var(--secondary-color);
}

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

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: relative;
  transition: background-color 0.3s ease;
  border-radius: 2px;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: absolute;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border-radius: 2px;
}

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

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

.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;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Button Styles */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors-btn 4s ease-in-out infinite; /* Dynamic color for border and shadow */
  font-weight: bold;
  font-size: 15px;
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color);
  color: #c0c0c0;
  padding: 40px 0 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 5px;
}

.site-footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color);
}

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

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

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

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

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

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

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

.footer-links a:hover {
  color: var(--secondary-color);
}

.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-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(0.8);
  transition: filter 0.3s ease;
}

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

.game-providers-section,
.social-media-section {
  max-width: 1200px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 0 20px;
  border-top: 1px solid #333;
  text-align: center;
  color: #a0a0a0;
}

/* Dynamic Color Animations */
@keyframes theme-colors-marquee {
  0%, 100% {
    border-color: var(--neon-primary);
    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(255, 215, 0, 0.1);
  }
  33% {
    border-color: var(--neon-secondary);
    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, 69, 0, 0.1);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
  }
}

@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 theme-colors-header-top {
  0%, 100% {
    border-color: var(--neon-primary);
    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(255, 215, 0, 0.1);
  }
  33% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
  }
  66% {
    border-color: var(--neon-secondary);
    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, 69, 0, 0.1);
  }
}

@keyframes theme-colors-main-nav {
  0%, 100% {
    border-color: var(--neon-secondary);
    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, 69, 0, 0.1);
  }
  33% {
    border-color: var(--neon-primary);
    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(255, 215, 0, 0.1);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
  }
}

@keyframes theme-colors-btn {
  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(255, 215, 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, 69, 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(0, 255, 255, 0.3);
  }
}

/* Mobile 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 {
    padding: 2px 0;
  }

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

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

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

  .marquee-text {
    font-size: 13px;
    margin: 0 5px;
    text-shadow: 0 0 3px var(--neon-primary), 0 0 6px var(--neon-primary);
  }
  
  .marquee-text:hover {
    text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), 0 0 15px var(--neon-primary);
  }

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

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

  .site-header {
    top: 40px; /* Adjust if marquee height changes on mobile */
  }

  .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Adjust for hamburger menu */
    position: relative;
    min-height: 50px;
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Place hamburger first */
    padding-left: 0; /* Remove extra padding */
    margin-right: 15px; /* Space between hamburger and logo */
    animation: theme-colors-btn 4s ease-in-out infinite; /* Apply neon glow to hamburger */
    border-radius: 5px;
    box-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
  }

  .hamburger-menu .hamburger-icon,
  .hamburger-menu .hamburger-icon::before,
  .hamburger-menu .hamburger-icon::after {
    background-color: #ffffff;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 1; /* Place logo second */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Adjust max-width to prevent overlap with hamburger */
  }

  .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, #0f3460, #16213e);
    border-bottom: 2px solid;
    animation: theme-colors-main-nav 4s ease-in-out infinite; /* Apply contrasting neon glow */
    box-shadow:
      0 0 8px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    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: calc(40px + 50px + 45px); /* Marquee + Header-top + Mobile buttons height */
    left: 0;
    width: 70%;
    height: calc(100% - (40px + 50px + 45px)); /* Full height below header */
    background: linear-gradient(135deg, #1a1a2e, #0a0a0a);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Ensure menu is above overlay */
    overflow-y: auto;
    padding: 20px 0;
    border-right: 2px solid;
    animation: theme-colors-main-nav 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }

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

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

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

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

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

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links {
    padding: 0;
  }

  .footer-links li {
    display: inline-block;
    margin: 0 10px 10px 10px;
  }
  
  .footer-description {
    text-align: center;
  }

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

  .game-providers-section,
  .social-media-section {
    padding: 0 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
