:root {
  --primary-color: #017439; /* Green */
  --secondary-color: #FFFFFF; /* White */
  --register-color: #C30808; /* Red */
  --login-color: #C30808; /* Red */
  --login-font-color: #FFFF00; /* Yellow */
  --background-color: #FFFFFF; /* White */

  /* Neon colors derived from brand scheme for dynamic glow */
  --neon-primary: var(--login-font-color); /* Bright yellow for glow */
  --neon-secondary: var(--register-color); /* Bright red for glow */
  --neon-accent: #00FFFF; /* Bright cyan for contrast in dynamic flow */
  --neon-text-color: #FFFFFF; /* White text for contrast */

  /* Header Offset - calculated based on actual structure */
  --marquee-height: 45px; /* Marquee height */
  --header-top-desktop-height: 70px; /* Header top bar desktop height */
  --main-nav-desktop-height: 40px; /* Main nav desktop height */
  --header-offset: calc(var(--marquee-height) + var(--header-top-desktop-height) + var(--main-nav-desktop-height)); /* Desktop offset */
}

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

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

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

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

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

/* Animations for neon effects */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, inset 0 0 15px currentColor; }
  20%, 24%, 55% { opacity: 0.8; box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, inset 0 0 10px currentColor; }
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
  to { box-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor; }
}

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}

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

@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, 102, 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); }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--neon-text-color);
  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(255, 255, 0, 0.1);
  z-index: 1001;
  min-height: var(--marquee-height);
  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: 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-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: 16px;
  font-weight: 600;
  color: var(--neon-text-color);
  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: var(--neon-text-color);
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary), inset 0 0 20px rgba(255, 255, 0, 0.1);
}

.header-top {
  width: 100%;
  min-height: var(--header-top-desktop-height);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Darker background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 0 0 8px var(--neon-secondary), 0 0 15px var(--neon-secondary), inset 0 0 15px rgba(255, 102, 0, 0.1);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White, no neon effect */
  text-decoration: none;
  transition: color 0.3s ease;
  flex-shrink: 0;
  display: block; /* Ensure it's not hidden */
}

.logo:hover {
  color: var(--primary-color); /* Hover color for contrast */
}

.desktop-nav-buttons {
  display: flex; /* Always flex on desktop */
  gap: 15px;
  align-items: center;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Red gradient */
  padding: 12px 25px;
  color: var(--login-font-color); /* Yellow font */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 0 0 5px var(--login-font-color), 0 0 10px var(--register-color);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.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(255, 255, 0, 0.4);
}

.main-nav {
  width: 100%;
  min-height: var(--main-nav-desktop-height);
  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-accent), 0 0 20px var(--neon-accent), inset 0 0 20px rgba(255, 0, 255, 0.1);
  display: flex; /* Always flex on desktop */
  align-items: center;
  justify-content: center;
}

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

.nav-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color); /* White, regular style */
  padding: 10px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color); /* Green on hover/active */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo and buttons on mobile */
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--neon-primary);
  border-radius: 5px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
  box-shadow: 0 0 5px var(--neon-primary);
}

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

.hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(135deg); background: var(--neon-accent); box-shadow: 0 0 5px var(--neon-accent); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); background: var(--neon-accent); box-shadow: 0 0 5px var(--neon-accent); }

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  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;
  transition: opacity 0.3s ease;
}

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

body.no-scroll {
  overflow: hidden;
}

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

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

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

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

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

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

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

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

.footer-nav a {
  color: #aaaaaa;
  transition: color 0.3s ease;
}

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

.payment-methods-section, .game-providers-section, .social-media-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333333;
}

.payment-methods-section h4, .game-providers-section h4, .social-media-section h4 {
  text-align: center;
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.payment-icons, .game-providers-icons, .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center; /* Center icons */
  gap: 8px; /* Small gap for tight layout */
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Adjust for dark background */
  opacity: 0.7;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333333;
}

.copyright {
  color: #aaaaaa;
  margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    padding: 0;
    min-height: var(--marquee-height);
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: 1.2;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 5px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header */
  .site-header {
    top: var(--marquee-height); /* Ensure it's below the marquee */
  }

  .header-top {
    min-height: var(--header-top-mobile-height);
    padding: 0 15px; /* Reduced padding for mobile */
    justify-content: space-between;
  }
  
  .header-container {
    padding: 0; /* Remove container padding as header-top has it */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Leftmost */
    margin-right: auto; /* Push logo to center */
    margin-left: 0; /* No left margin */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    order: 1; /* Center */
    margin: 0 auto; /* Ensure it's centered */
  }
  
  .logo img {
    max-height: 40px !important; /* Adjust logo height for mobile */
    width: auto;
  }

  .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 container */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-top: 1px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), inset 0 0 10px rgba(255, 255, 0, 0.1);
    min-height: var(--mobile-nav-buttons-height);
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-top: 1px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent), inset 0 0 20px rgba(255, 0, 255, 0.1);
    transform: translateX(-100%); /* Slide out initially */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
    padding-bottom: 20px; /* Space at bottom of menu */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link:hover, .nav-link.active {
    color: var(--primary-color);
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Footer */
  .site-footer {
    padding: 30px 0 15px;
  }

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

  .footer-col h4 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-logo {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-nav li {
    margin-bottom: 5px;
  }

  .payment-methods-section, .game-providers-section, .social-media-section {
    margin-top: 15px;
    padding-top: 15px;
  }

  .payment-methods-section h4, .game-providers-section h4, .social-media-section h4 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .payment-icons, .game-providers-icons, .social-media-icons {
    gap: 5px;
  }

  .payment-icons img, .game-providers-icons img, .social-media-icons img {
    max-height: 40px;
  }

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

  .copyright {
    font-size: 12px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
