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

  /* Neon colors derived from primary/secondary, made vibrant */
  --neon-primary-bright: #00FF00; /* Vibrant Green */
  --neon-secondary-bright: #00FFFF; /* Vibrant Cyan */
  --neon-accent-bright: #FF00FF; /* Vibrant Magenta */

  --header-offset: 155px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 125px; /* Mobile: Marquee(30px) + HeaderTop(50px) + MobileNavButtons(45px) */
  }
}

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

.page-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}
.page-content {
  overflow-x: hidden;
  max-width: 100%;
}

/* Neon Dynamic Color Animations */
@keyframes rainbow-border {
  0% { border-color: var(--neon-primary-bright); box-shadow: 0 0 10px var(--neon-primary-bright), 0 0 20px var(--neon-primary-bright); }
  16.6% { border-color: #FF00FF; box-shadow: 0 0 10px #FF00FF, 0 0 20px #FF00FF; }
  33.3% { border-color: #00FFFF; box-shadow: 0 0 10px #00FFFF, 0 0 20px #00FFFF; }
  50% { border-color: #FFFF00; box-shadow: 0 0 10px #FFFF00, 0 0 20px #FFFF00; }
  66.6% { border-color: #FF8000; box-shadow: 0 0 10px #FF8000, 0 0 20px #FF8000; }
  83.3% { border-color: #FF0000; box-shadow: 0 0 10px #FF0000, 0 0 20px #FF0000; }
  100% { border-color: var(--neon-primary-bright); box-shadow: 0 0 10px var(--neon-primary-bright), 0 0 20px var(--neon-primary-bright); }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes alternate-colors {
  0% { border-color: var(--neon-primary-bright); box-shadow: 0 0 10px var(--neon-primary-bright), 0 0 20px var(--neon-primary-bright); }
  100% { border-color: var(--neon-secondary-bright); box-shadow: 0 0 10px var(--neon-secondary-bright), 0 0 20px var(--neon-secondary-bright); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes random-glow {
  0% { border-color: var(--neon-primary-bright); box-shadow: 0 0 20px var(--neon-primary-bright); }
  20% { border-color: var(--neon-secondary-bright); box-shadow: 0 0 20px var(--neon-secondary-bright); }
  40% { border-color: var(--neon-accent-bright); box-shadow: 0 0 20px var(--neon-accent-bright); }
  60% { border-color: #FFFF00; box-shadow: 0 0 20px #FFFF00; }
  80% { border-color: #FF0000; box-shadow: 0 0 20px #FF0000; }
  100% { border-color: var(--neon-primary-bright); box-shadow: 0 0 20px var(--neon-primary-bright); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary-bright);
    box-shadow: 
      0 0 10px var(--neon-primary-bright),
      0 0 20px var(--neon-primary-bright);
  }
  33% {
    border-color: var(--neon-secondary-bright);
    box-shadow: 
      0 0 10px var(--neon-secondary-bright),
      0 0 20px var(--neon-secondary-bright);
  }
  66% {
    border-color: var(--neon-accent-bright);
    box-shadow: 
      0 0 10px var(--neon-accent-bright),
      0 0 20px var(--neon-accent-bright);
  }
}

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

/* Marquee Section Styles */
.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 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary-bright),
    0 0 20px var(--neon-primary-bright),
    0 0 30px var(--neon-primary-bright),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  height: 45px; /* Desktop 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: 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-primary-bright),
    0 0 10px var(--neon-primary-bright),
    0 0 15px var(--neon-primary-bright);
  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;
  padding-right: 30px; /* Space for seamless loop */
}

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

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
}

.header-top {
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary-bright),
    0 0 20px var(--neon-primary-bright),
    0 0 30px var(--neon-primary-bright),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  padding: 10px 0;
  min-height: 40px; /* Ensure some height for content */
  display: flex; /* For hamburger/logo/buttons alignment */
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  display: block; /* Ensure it's not hidden */
  padding: 5px 0;
}

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

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary-bright), var(--neon-secondary-bright));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary-bright);
  transition: all 0.3s ease;
  font-weight: bold;
  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-bright),
    0 0 30px var(--neon-primary-bright),
    inset 0 0 15px rgba(0, 255, 0, 0.5);
}

.main-nav {
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-secondary-bright),
    0 0 20px var(--neon-secondary-bright),
    0 0 30px var(--neon-secondary-bright),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  padding: 10px 0;
  display: flex; /* Desktop default: show nav */
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 30px; /* Minimum height for nav bar */
}

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

.nav-link {
  color: #ffffff; /* Regular color for nav links */
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary-bright);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
  box-shadow: 
    0 0 5px var(--neon-primary-bright),
    0 0 10px var(--neon-primary-bright);
}

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

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: 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;
}

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

.site-footer h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.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: 30px;
}

.footer-col .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White, for contrast */
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

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

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

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

.footer-nav a:hover {
  color: var(--primary-color); /* Green highlight */
}

.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; /* Consistent gap */
  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;
  object-fit: contain;
}

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

.game-providers-section,
.social-media-section {
  margin-bottom: 20px; /* Space between sections */
}
.game-providers-section:last-child,
.social-media-section:last-child {
  margin-bottom: 0;
}


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

.footer-bottom .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.footer-nav-action {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px;
}

.footer-nav-action a {
  color: var(--primary-color); /* Green for action links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-nav-action a:hover {
  text-decoration: underline;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    height: 30px; /* Mobile 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;
  }
  
  .marquee-separator {
    font-size: 13px;
    margin: 0 10px;
  }
  
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

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

  .header-top {
    padding: 8px 0;
    min-height: 40px;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile container fills width */
    position: relative; /* For logo centering */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
  }
  .logo img {
    max-height: 40px; /* Adjust logo size for mobile */
  }

  .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;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 5px var(--neon-accent-bright),
      0 0 10px var(--neon-accent-bright);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header content */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a);
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 15px;
  }

  .footer-nav-action {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-nav-action li {
    margin: 0 5px;
  }
}

/* Ensure no-scroll works for body */
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;
  }
}
