:root {
  /* Site Colors */
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --background-color: #FFFFFF;
  --register-login-font-color: #FFFF00;

  /* Neon Base Colors - derived for contrast and synthwave feel */
  --neon-primary-base: #00ff00; /* Bright green, related to primary */
  --neon-secondary-base: #ff00ff; /* Magenta */
  --neon-accent-base: #ffff00; /* Yellow */

  /* Dynamic Neon Colors - for animations */
  --neon-dynamic-1: var(--neon-primary-base);
  --neon-dynamic-2: var(--neon-secondary-base);
  --neon-dynamic-3: var(--neon-accent-base);

  /* Header Offset - Desktop */
  --marquee-height-desktop: 45px; /* Est. Marquee height */
  --header-top-height-desktop: 60px; /* Est. Header top height */
  --main-nav-height-desktop: 50px; /* Est. Main nav height */
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* 155px */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px; /* Est. Marquee height mobile */
    --header-top-height-mobile: 50px; /* Est. Header top height mobile */
    --mobile-nav-buttons-height-mobile: 50px; /* Est. Mobile buttons height mobile */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* 130px */
  }
}

/* Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #e0e0e0;
  background-color: #121212; /* Dark background for overall site */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

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

@keyframes text-glow-flow {
  0% { text-shadow: 0 0 5px var(--neon-dynamic-1), 0 0 10px var(--neon-dynamic-1), 0 0 15px var(--neon-dynamic-1); color: #ffffff; }
  33% { text-shadow: 0 0 5px var(--neon-dynamic-2), 0 0 10px var(--neon-dynamic-2), 0 0 15px var(--neon-dynamic-2); color: #ffffff; }
  66% { text-shadow: 0 0 5px var(--neon-dynamic-3), 0 0 10px var(--neon-dynamic-3), 0 0 15px var(--neon-dynamic-3); color: #ffffff; }
  100% { text-shadow: 0 0 5px var(--neon-dynamic-1), 0 0 10px var(--neon-dynamic-1), 0 0 15px var(--neon-dynamic-1); color: #ffffff; }
}

@keyframes theme-colors-border {
  0%, 100% { border-color: var(--neon-dynamic-1); box-shadow: 0 0 10px var(--neon-dynamic-1), 0 0 20px var(--neon-dynamic-1); }
  33% { border-color: var(--neon-dynamic-2); box-shadow: 0 0 10px var(--neon-dynamic-2), 0 0 20px var(--neon-dynamic-2); }
  66% { border-color: var(--neon-dynamic-3); box-shadow: 0 0 10px var(--neon-dynamic-3), 0 0 20px var(--neon-dynamic-3); }
}

@keyframes theme-colors-box-shadow {
  0%, 100% { box-shadow: 0 0 10px var(--neon-dynamic-1), 0 0 20px var(--neon-dynamic-1), inset 0 0 10px rgba(0, 255, 0, 0.3); }
  33% { box-shadow: 0 0 10px var(--neon-dynamic-2), 0 0 20px var(--neon-dynamic-2), inset 0 0 10px rgba(255, 0, 255, 0.3); }
  66% { box-shadow: 0 0 10px var(--neon-dynamic-3), 0 0 20px var(--neon-dynamic-3), inset 0 0 10px rgba(255, 255, 0, 0.3); }
}

@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-border 4s ease-in-out infinite;
  box-shadow: 0 0 10px var(--neon-dynamic-1), 0 0 20px var(--neon-dynamic-1), 0 0 30px var(--neon-dynamic-1), inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  height: var(--marquee-height-desktop); /* Ensure fixed height for offset calc */
  display: flex; /* For vertical centering of content */
  align-items: center;
}

.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: 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-dynamic-1), 0 0 10px var(--neon-dynamic-1), 0 0 15px var(--neon-dynamic-1);
  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; /* To prevent abrupt cut-off at the end of content */
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  color: var(--secondary-color);
}

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

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

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  text-transform: uppercase; /* Ensure uppercase for logo text */
  padding: 5px 0;
  display: block; /* Ensure visibility on desktop */
}

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

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

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

.site-header .main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors-border 4s ease-in-out infinite reverse; /* Different animation for contrast */
  box-shadow: 0 0 10px var(--neon-dynamic-2), 0 0 20px var(--neon-dynamic-2), inset 0 0 10px rgba(255, 0, 255, 0.3);
  padding: 0;
  min-height: var(--main-nav-height-desktop); /* Ensure height for offset */
  display: flex; /* Visible on desktop */
  align-items: center;
}

.site-header .main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
  flex-wrap: wrap; /* Allow wrapping on larger screens if many items */
}

.site-header .main-nav .nav-link {
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  padding: 8px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.site-header .main-nav .nav-link:hover {
  color: var(--neon-dynamic-1); /* Use a neon color on hover */
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Use specific button colors */
  padding: 12px 20px;
  color: var(--register-login-font-color); /* Use specific font color */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors-border 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 0 0 10px var(--neon-dynamic-1), 0 0 20px var(--neon-dynamic-1), inset 0 0 10px rgba(0, 255, 0, 0.3);
  text-shadow: 0 0 5px var(--register-login-font-color), 0 0 10px var(--neon-dynamic-1); /* Neon text shadow */
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

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

/* Hamburger Menu */
.hamburger-menu {
  width: 30px;
  height: 25px;
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above logo and overlay */
  margin-right: 15px;
}

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

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

/* Mobile Menu Overlay */
.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 active menu */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

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

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

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

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

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

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

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

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

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

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

.site-footer .payment-icons,
.site-footer .game-providers-icons,
.site-footer .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
}

.site-footer .payment-icons {
  gap: 5px;
}

.site-footer .payment-icons img,
.site-footer .game-providers-icons img,
.site-footer .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(150%); /* Subtle effect for icons */
  transition: filter 0.3s ease;
}

.site-footer .payment-icons img:hover,
.site-footer .game-providers-icons img:hover,
.site-footer .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

.site-footer .game-providers-section,
.site-footer .social-media-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.site-footer .game-providers-icons,
.site-footer .social-media-icons {
  gap: 8px;
  width: 100%;
}

.site-footer .footer-bottom {
  padding-top: 20px;
}

.site-footer .footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer .copyright {
  margin: 0;
  color: #aaaaaa;
}

.site-footer .footer-legal-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

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

.site-footer .footer-legal-links .separator {
  color: #888888;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Prevent content overflow */
  .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 Mobile */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: 1.3;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header Mobile */
  .site-header {
    top: var(--marquee-height-mobile);
  }
  .site-header .header-top {
    padding: 8px 0;
    min-height: var(--header-top-height-mobile);
  }
  .site-header .header-container {
    padding: 0 15px;
    justify-content: space-between;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
  }
  
  .hamburger-menu {
    display: flex; /* Visible on mobile */
    margin-right: 0; /* Adjust margin for mobile */
  }

  .site-header .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    margin: 0; /* Remove default margin */
  }
  .site-header .logo img {
    max-height: 35px; /* Smaller logo for mobile */
  }

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

  .site-header .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    border-bottom: 2px solid;
    animation: theme-colors-border 4s ease-in-out infinite;
    box-shadow: 0 0 8px var(--neon-dynamic-1), 0 0 15px var(--neon-dynamic-1), inset 0 0 8px rgba(0, 255, 0, 0.2);
    padding: 10px 15px;
    box-sizing: border-box;
    width: 100%;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    min-height: var(--mobile-nav-buttons-height-mobile); /* Ensure height for offset */
  }

  .site-header .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 0 5px var(--neon-dynamic-1), 0 0 10px var(--neon-dynamic-1); /* Less intense glow for mobile */
  }

  .site-header .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header + mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors-border 4s ease-in-out infinite reverse;
    box-shadow: 0 0 10px var(--neon-dynamic-2), 0 0 20px var(--neon-dynamic-2);
  }

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

  .site-header .main-nav .nav-container {
    flex-direction: column;
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    align-items: flex-start;
  }

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

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

  .site-footer .footer-bottom .footer-container {
    flex-direction: column;
    gap: 15px;
  }
  .site-footer .footer-legal-links {
    justify-content: center;
  }
}

/* Ensure no-scroll on body when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
