:root {
  --primary-color: #017439; /* Dark Green */
  --secondary-color: #FFFFFF; /* White */
  --accent-color: #C30808; /* Red for register/login */
  --text-color-light: #FFFFFF;
  --text-color-dark: #333333;

  /* Neon Colors - Vibrant and contrasting */
  --neon-primary: #FFFF00; /* Neon Yellow */
  --neon-secondary: #FF00FF; /* Neon Magenta */
  --neon-accent: #00FFFF; /* Neon Cyan */

  /* Header Offset Calculation */
  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: 155px; /* Desktop: 45px (marquee) + 60px (header-top) + 50px (main-nav) */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 50px;
    --mobile-nav-buttons-height-mobile: 50px; /* Approx height for mobile buttons */
    --header-offset: 130px; /* Mobile: 30px (marquee) + 50px (header-top) + 50px (mobile-buttons) */
  }
}

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #FFFFFF; /* Default background */
  color: var(--text-color-dark);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll from body */
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--text-color-dark);
}

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

/* Animations for Neon Effects */

/* Dynamic Text Glow Flow */
@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: var(--text-color-light);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: var(--text-color-light);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: var(--text-color-light);
  }
}

/* Dynamic Theme Colors for Borders/Box Shadows */
@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(255, 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, 0, 255, 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);
  }
}

/* Pulse Glow for Buttons/Icons */
@keyframes neon-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      0 0 15px var(--neon-primary),
      0 0 30px var(--neon-primary),
      0 0 45px var(--neon-primary);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--text-color-light);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  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, 255, 0, 0.1);
  z-index: 1001; /* Ensure on top of header */
  height: var(--marquee-height-desktop); /* Fixed height for desktop */
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

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

.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: neon-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate; /* Pulse + dynamic glow */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%; /* Ensure wrapper takes full height to align content */
  display: flex;
  align-items: center;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  height: 100%; /* Align content within wrapper */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color-light);
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glow */
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  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: var(--text-color-light);
}

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

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

/* Site Header */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: transparent; /* Background handled by header-top and main-nav */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  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, 255, 0, 0.1);
  padding: 15px 0;
  height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

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

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

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

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite, neon-pulse 2s ease-in-out infinite alternate; /* Dynamic border + pulse glow */
  text-shadow:
    0 0 5px var(--text-color-light),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1002; /* Above logo and buttons on mobile */
  flex-shrink: 0;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease-in-out;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for bars */
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 10px; }
.hamburger-menu .bar:nth-child(3) { top: 20px; }

.hamburger-menu.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  box-shadow:
    0 0 10px var(--neon-secondary), /* Different neon color for nav */
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  padding: 10px 0;
  height: var(--main-nav-height-desktop);
  display: flex; /* Visible on desktop */
  align-items: center;
  box-sizing: border-box;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row; /* Horizontal on desktop */
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 25px; /* Spacing between nav items */
}

.main-nav .nav-link {
  color: var(--text-color-light);
  font-weight: 500;
  padding: 5px 10px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover {
  color: var(--neon-primary); /* Highlight on hover */
  text-shadow: 0 0 8px var(--neon-primary);
}

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer */
.site-footer {
  background-color: #1a1a2e; /* Dark background, no neon for footer */
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer h4 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: bold;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--neon-primary); /* Use neon-primary for hover in footer */
}

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

.footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 30px;
}

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

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

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

.footer-col ul li:last-child {
  margin-bottom: 0;
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full text display */
  overflow-wrap: break-word;
}

.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;
  object-fit: contain;
}

.footer-middle {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 30px;
}

.footer-middle .footer-container > div {
  margin-bottom: 20px;
}
.footer-middle .footer-container > div:last-child {
  margin-bottom: 0;
}


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

.footer-legal-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.copyright-info {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 14px;
  }
  .marquee-separator {
    font-size: 14px;
    margin: 0 10px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header */
  .site-header {
    top: var(--marquee-height-mobile); /* Position below mobile marquee */
  }

  .header-top {
    padding: 10px 0;
    height: var(--header-top-height-mobile);
  }

  .header-top .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile container full width */
    justify-content: space-between; /* Hamburger left, Logo center, right empty */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Left */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    order: 1; /* Center */
  }

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

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }
  
  /* Mobile Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      inset 0 0 10px rgba(255, 255, 0, 0.1);
    height: var(--mobile-nav-buttons-height-mobile);
    align-items: center;
    box-sizing: border-box;
  }

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

  /* Main Navigation (Mobile Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* Below header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--marquee-height-mobile) - var(--header-top-height-mobile) - var(--mobile-nav-buttons-height-mobile)); /* Full height below header */
    overflow-y: auto;
    background: #1a1a2e; /* Solid dark background for menu */
    flex-direction: column; /* Vertical on mobile */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    border: none; /* No border for side menu */
    box-shadow: none;
    animation: none;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile container full width */
    gap: 0; /* No gap for vertical links */
  }

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

  /* Footer */
  .site-footer .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
  }

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

  .footer-top .footer-container,
  .footer-middle .footer-container,
  .footer-bottom .footer-container {
    padding: 0 15px; /* Adjust padding for mobile */
    max-width: none; /* Full width on mobile */
  }

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