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

  /* Neon specific colors for dynamic effects */
  --neon-green: #00FF00;
  --neon-cyan: #00FFFF;
  --neon-magenta: #FF00FF;
  --neon-red: #FF0000;
  --neon-yellow: #FFFF00;
  --neon-orange: #FFA500;

  /* Theme-flow specific dynamic colors */
  --neon-primary: var(--neon-green);
  --neon-secondary: var(--neon-cyan);
  --neon-accent: var(--neon-magenta);

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

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

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

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

/* Animations for neon effects */
@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%); }
}

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

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px; /* Desktop height */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-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(0, 255, 0, 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: 0 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;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
}

.marquee-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary-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(--secondary-color);
}

.marquee-separator {
  font-size: 15px;
  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-color: transparent; /* Handled by child elements */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Neon yellow for top border */
  box-shadow:
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    inset 0 0 15px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
  min-height: 40px; /* Base height for desktop */
  display: flex;
  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: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon */
  text-transform: uppercase;
  text-decoration: none;
  display: block; /* Ensure it's not display: none */
  flex-shrink: 0;
}

/* LOGO: No neon effects */
.logo, .logo img {
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), #FF4444); /* Base colors for button */
  padding: 10px 20px;
  color: var(--register-login-font-color); /* Yellow font for button */
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors-button 4s ease-in-out infinite; /* Dynamic red/orange glow */
  text-shadow:
    0 0 5px var(--register-login-font-color),
    0 0 10px rgba(255, 255, 0, 0.7);
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

/* Separate animation for buttons using red/orange neon colors */
@keyframes theme-colors-button {
  0%, 100% {
    border-color: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red), inset 0 0 10px rgba(255, 0, 0, 0.3);
  }
  33% {
    border-color: var(--neon-orange);
    box-shadow: 0 0 10px var(--neon-orange), 0 0 20px var(--neon-orange), inset 0 0 10px rgba(255, 165, 0, 0.3);
  }
  66% {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 10px var(--neon-magenta), 0 0 20px var(--neon-magenta), inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002; /* Above logo and overlay */
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--secondary-color);
  margin-bottom: 5px;
  position: relative;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
  box-shadow: 0 0 5px var(--neon-cyan), 0 0 10px var(--neon-cyan); /* Neon glow for hamburger */
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  box-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-red);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  box-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-red);
}

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Neon green/cyan/magenta for main nav border */
  box-shadow:
    0 0 10px var(--neon-green),
    0 0 20px var(--neon-green),
    inset 0 0 15px rgba(0, 255, 0, 0.1);
  padding: 10px 0;
  min-height: 30px; /* Base height for desktop */
  display: flex; /* Default to flex on desktop */
  align-items: center;
  justify-content: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Default to row on desktop */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular color, no neon */
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.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;
  transition: opacity 0.3s ease;
}

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

/* Footer Section */
.site-footer {
  background-color: #0a0a0a; /* Dark background for footer */
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-top-columns {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr); /* 4 columns, first one wider */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h4 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 20px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 8px;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
}

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

.payment-methods .payment-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.payment-methods .payment-icons img {
  max-height: 40px; /* Reduced height for payment icons */
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make them blend with dark theme */
  opacity: 0.7;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.payment-methods .payment-icons img:hover {
  filter: grayscale(0%) brightness(100%);
  opacity: 1;
}

.footer-middle-sections {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section,
.social-media-section {
  margin-bottom: 30px;
}

.game-providers-section h4,
.social-media-section h4 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  position: relative;
}

.game-providers-section h4::after,
.social-media-section h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 8px;
}

.game-providers-icons,
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-copyright {
  margin-bottom: 10px;
}

.footer-copyright p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
}

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

.footer-action-links a {
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-action-links a:hover {
  color: var(--secondary-color);
}

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

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

  .header-top {
    padding: 10px 0;
    min-height: 30px; /* Smaller height for mobile top bar */
  }

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

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 22px;
    order: 2; /* Place logo in the middle */
    max-width: calc(100% - 70px); /* Adjust max-width to not overlap with hamburger */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
    margin-right: auto; /* Push logo to center */
    z-index: 1002;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Always show mobile buttons */
    background: linear-gradient(135deg, #16213e, #0f3460); /* Separate dark background */
    border-top: 1px solid;
    border-bottom: 1px solid;
    animation: theme-colors-button 4s ease-in-out infinite; /* Dynamic red/orange glow */
    box-shadow:
      0 0 8px var(--neon-red),
      0 0 15px var(--neon-red),
      inset 0 0 10px rgba(255, 0, 0, 0.2);
    padding: 8px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    z-index: 999; /* Below header top bar, above main content */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    box-shadow: none; /* Remove border/shadow when open */
    border: none;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000; /* Above overlay */
    padding-bottom: 20px; /* Add some padding at bottom */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
    width: 100%;
    max-width: none; /* Mobile container fills width */
  }

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

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

  .footer-top-columns {
    grid-template-columns: 1fr; /* Single column layout on mobile */
    gap: 25px;
    margin-bottom: 25px;
    padding-bottom: 25px;
  }

  .footer-col {
    text-align: center; /* Center footer columns */
  }

  .footer-col h4::after {
    margin: 8px auto 0; /* Center underline */
  }

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

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

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

  .payment-methods .payment-icons {
    justify-content: center; /* Center payment icons */
  }

  .footer-middle-sections {
    margin-bottom: 25px;
    padding-top: 15px;
  }

  .game-providers-section h4,
  .social-media-section h4 {
    text-align: center;
  }
  .game-providers-section h4::after,
  .social-media-section h4::after {
    margin: 8px auto 0;
  }

  .game-providers-icons,
  .social-media-icons {
    justify-content: center; /* Center game/social icons */
  }

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

  .footer-copyright p {
    font-size: 12px;
  }

  .footer-action-links {
    gap: 10px;
    font-size: 13px;
  }

  /* 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;
  }
}

/* No scroll for body when menu is active */
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;
  }
}
