:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  
  /* Neon base colors derived from primary/secondary */
  --neon-primary-base: #00FFFF; /* Vibrant Cyan */
  --neon-secondary-base: #FF00FF; /* Vibrant Magenta */
  --neon-accent-base: #FFFF00; /* Vibrant Yellow */

  /* Specific colors from instructions */
  --btn-register-bg: #C30808;
  --btn-login-bg: #C30808;
  --btn-font-color: #FFFF00;
  --page-background: #FFFFFF; /* For page body, not header/footer */

  /* Header offset calculation */
  /* Desktop: Marquee (45px) + Header-Top (60px) + Main-Nav (50px) = 155px */
  --header-offset: 155px; 
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: var(--page-background); /* Default page background */
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Helper for no-scroll on body */
body.no-scroll {
  overflow: hidden;
}

/* Neon Glow Animations (Dynamic Colors) */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary-base);
    box-shadow: 
      0 0 10px var(--neon-primary-base),
      0 0 20px var(--neon-primary-base),
      inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  33% {
    border-color: var(--neon-secondary-base);
    box-shadow: 
      0 0 10px var(--neon-secondary-base),
      0 0 20px var(--neon-secondary-base),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent-base);
    box-shadow: 
      0 0 10px var(--neon-accent-base),
      0 0 20px var(--neon-accent-base),
      inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-primary-base),
      0 0 10px var(--neon-primary-base),
      0 0 15px var(--neon-primary-base);
    color: var(--secondary-color);
  }
  33% {
    text-shadow: 
      0 0 5px var(--neon-secondary-base),
      0 0 10px var(--neon-secondary-base),
      0 0 15px var(--neon-secondary-base);
    color: var(--secondary-color);
  }
  66% {
    text-shadow: 
      0 0 5px var(--neon-accent-base),
      0 0 10px var(--neon-accent-base),
      0 0 15px var(--neon-accent-base);
    color: var(--secondary-color);
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-primary-base),
      0 0 10px var(--neon-primary-base),
      0 0 15px var(--neon-primary-base);
    color: var(--secondary-color);
  }
}

@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%;
  height: 45px; /* Fixed height for desktop */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-primary-base),
    0 0 20px var(--neon-primary-base),
    0 0 30px var(--neon-primary-base),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  z-index: 1001;
  display: flex;
  align-items: center;
}

.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; /* Adjusted width */
  height: 25px; /* Adjusted height */
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px; /* Adjusted font size */
  display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate;
  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: var(--secondary-color);
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap; /* Ensure text stays on one line */
}

.marquee-text:hover {
  text-shadow: 
    0 0 10px var(--neon-primary-base),
    0 0 20px var(--neon-primary-base),
    0 0 30px var(--neon-primary-base),
    0 0 40px var(--neon-primary-base);
  transform: scale(1.05);
  color: var(--secondary-color);
}

.marquee-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Background handled by sub-sections */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-accent-base),
    0 0 20px var(--neon-accent-base),
    0 0 30px var(--neon-accent-base),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 15px 0;
  min-height: 30px; /* Min height for logo/buttons */
  display: flex; /* Ensure flexbox for desktop */
  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 {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon for logo */
  text-decoration: none;
  display: block;
  flex-shrink: 0;
  white-space: nowrap;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

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

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

.btn {
  position: relative;
  padding: 12px 25px; /* Adjusted padding for desktop */
  color: var(--btn-font-color); /* Specific font color for buttons */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px var(--btn-font-color),
    0 0 10px var(--neon-primary-base);
  transition: all 0.3s ease;
  font-weight: bold;
  background: linear-gradient(135deg, var(--btn-register-bg), var(--btn-login-bg)); /* Use specific button colors */
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  text-shadow: 
    0 0 10px var(--btn-font-color),
    0 0 20px var(--neon-primary-base);
}

.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 border color */
  box-shadow: 
    0 0 10px var(--neon-primary-base),
    0 0 20px var(--neon-primary-base),
    0 0 30px var(--neon-primary-base),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Always flex on desktop */
  align-items: center;
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping if many links */
}

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

.nav-link:hover {
  color: var(--neon-primary-base);
  text-shadow: 0 0 5px var(--neon-primary-base);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above mobile menu overlay */
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  flex-shrink: 0;
  order: 1; /* For mobile layout */
}

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger */
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  animation: none; /* Disable glow animation when active */
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  animation: none; /* Disable glow animation when active */
}

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

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

/* Footer Section */
.site-footer {
  background: #1a1a1a; /* Dark, non-neon background for footer */
  color: #ccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

.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: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

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

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

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

.footer-nav-links ul li a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav-links ul li a:hover {
  color: var(--primary-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; /* Adjusted gap for tighter spacing */
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 40px; /* Adjusted max-height for better fit */
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  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(100%);
}

.footer-bottom-section .copyright {
  text-align: center;
  color: #888;
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Common mobile rules */
  .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 adjustments */
  .marquee-section {
    height: 30px; /* Adjusted height for mobile */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 5px; /* Reduced padding */
  }
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .marquee-icon-emoji {
    font-size: 14px !important;
  }
  .marquee-text {
    font-size: 13px !important;
  }
  .marquee-separator {
    font-size: 13px !important;
    margin: 0 10px !important;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

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

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

  .header-container {
    padding: 0 15px; /* Reduced padding */
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    justify-content: space-between;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px; /* Adjusted font size */
    order: 2; /* Center logo between hamburger and empty space */
    max-width: calc(100% - 100px); /* Ensure logo doesn't push hamburger/buttons out */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .logo img {
    max-height: 40px !important; /* Adjusted max-height for mobile logo */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button row */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Match header-top background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 5px var(--neon-accent-base),
      0 0 10px var(--neon-accent-base),
      inset 0 0 10px rgba(255, 255, 0, 0.1);
    z-index: 990; /* Below header-top and main-nav */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: 1; /* Position left */
    margin-right: auto; /* Push logo to center */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Adjusted to be below marquee + header-top + mobile-nav-buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100vh - var(--header-offset)); /* Adjust height to fill remaining viewport */
    flex-direction: column;
    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;
    background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Dark background */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 
      0 0 10px var(--neon-primary-base),
      0 0 20px var(--neon-primary-base),
      0 0 30px var(--neon-primary-base);
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    align-items: flex-start;
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
  }

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

  /* Footer mobile adjustments */
  .site-footer .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h4 {
    text-align: center;
  }
  .footer-about .footer-description {
    text-align: center;
  }
  .footer-nav-links ul {
    text-align: center;
  }
  .payment-methods .payment-icons,
  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: center; /* Center icons */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
