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

  /* Neon colors for dynamic effects */
  --neon-primary: #39FF14; /* Fluorescent Green */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FFFF00; /* Yellow */

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: #0a0a0a; /* Dark background for neon theme */
  color: #ffffff;
  overflow-x: hidden; /* Prevent horizontal scroll for mobile content */
}

/* Base Container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Neon Animations */
@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(57, 255, 20, 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(0, 255, 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(255, 255, 0, 0.3);
  }
}

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

@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%;
  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),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(57, 255, 20, 0.1);
  z-index: 1001;
  height: 45px; /* Desktop 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: 0px 20px;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px;
  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));
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  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%;
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  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: #ffffff;
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-top {
  display: flex;
  align-items: center;
  height: 60px; /* Desktop Header Top Height */
  background: linear-gradient(135deg, #16213e, #1a1a2e, #0a0a0a); /* Darker background for header-top */
  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(57, 255, 20, 0.1);
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: var(--secondary-color); /* Regular color, no neon glow */
  padding: 0 10px; /* Keep some padding, not tight to edge */
  /* NO neon effects for logo */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  position: relative;
  z-index: 1001; /* Above mobile-menu-overlay */
  padding: 5px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  padding: 0 10px; /* Keep some padding, not tight to edge */
}

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

.btn {
  position: relative;
  padding: 10px 20px;
  color: var(--register-login-font-color); /* Custom font color for buttons */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  background: var(--register-color); /* Use custom register/login color for button background */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px var(--register-login-font-color),
    0 0 10px var(--register-login-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
}

.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(57, 255, 20, 0.5);
}

.main-nav {
  display: flex; /* Visible on desktop */
  justify-content: center;
  align-items: center;
  height: 50px; /* Desktop Main Nav Height */
  background: linear-gradient(135deg, #0f3460, #16213e, #1a1a2e); /* Distinct darker 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-secondary), /* Different neon color for main-nav */
    0 0 20px var(--neon-secondary),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px;
}

.nav-link {
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.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;
  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-color: #1a1a2e; /* Regular dark background for footer */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

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

.footer-col h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

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

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

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

.payment-icons, .game-providers-icons, .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Slightly more space for these */
  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-section {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-middle-section .footer-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-providers-section h4, .social-media-section h4 {
  margin-bottom: 15px;
  color: var(--secondary-color);
  font-size: 16px;
  text-transform: uppercase;
}

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

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

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

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

.footer-utility-nav a {
  color: #999999;
}

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

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

  .site-header {
    top: 30px; /* Below mobile marquee */
  }

  .header-top {
    height: 50px; /* Mobile Header Top Height */
    padding: 0 15px;
  }
  
  .header-top .header-container {
    padding: 0; /* Remove container padding as header-top itself has padding */
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    flex: 0 0 auto; /* Don't grow/shrink */
    width: 25px;
    height: 18px;
    z-index: 1002; /* Ensure it's above overlay and main-nav */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0;
    text-align: center;
    max-width: calc(100% - 50px); /* Account for hamburger width */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    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, #16213e, #1a1a2e, #0a0a0a); /* Same dark background as header-top */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-primary),
      0 0 15px var(--neon-primary),
      inset 0 0 10px rgba(57, 255, 20, 0.1);
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 10px gap */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    line-height: 1.2;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Adjust height based on dynamic offset */
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a); /* Side menu background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    padding-top: 20px;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
    width: 100%; /* Ensure container takes full width of main-nav */
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link:hover {
    color: var(--primary-color);
    transform: none; /* No translateY on mobile hover */
  }
  .nav-link::after {
    display: none; /* Hide underline for mobile menu */
  }

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

  .footer-bottom-section .footer-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-utility-nav {
    justify-content: center;
  }

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