:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;
  --black-color: #000000;

  /* Neon colors - intelligent selection based on primary/secondary */
  --neon-primary: var(--primary-color); /* Light blue */
  --neon-secondary: #00ff00; /* Green for contrast */
  --neon-accent: #ff00ff; /* Magenta for contrast */

  /* RGB values for box-shadow rgba */
  --primary-color-rgb: 38, 169, 224;
  --neon-secondary-rgb: 0, 255, 0;
  --neon-accent-rgb: 255, 0, 255;

  /* Header offset values (marquee + header-top + main-nav for desktop; marquee + header-top + mobile-nav-buttons for mobile) */
  --header-offset: 155px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(50px) */
}

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

/* Base styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #cccccc; /* Default text color for dark background */
  background-color: #121212; /* Dark background for overall page */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

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

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: 45px; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 110px; /* HeaderTop (60px) + MainNav (50px) */
  display: flex;
  flex-direction: column;
}

.header-top {
  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),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(var(--primary-color-rgb), 0.1);
  width: 100%;
  padding: 10px 0; /* Vertical padding */
  min-height: 60px; /* Desktop Header Top height */
  box-sizing: border-box;
}

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

.logo {
  color: var(--secondary-color); /* White for logo text, no neon */
  text-decoration: none;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 0;
  display: block;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px; /* Desktop logo height */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Show by default for desktop */
  gap: 10px;
}

/* Mobile Navigation Buttons (hidden by default for desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default for desktop */
}

/* Main Navigation */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Darker gradient for nav */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors-alt 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(var(--neon-secondary-rgb), 0.1);
  width: 100%;
  display: flex; /* Show by default for desktop */
  flex-direction: row; /* Horizontal for desktop */
  padding: 0;
  min-height: 50px; /* Desktop main nav height */
  box-sizing: border-box;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  height: 100%;
}

.nav-link {
  color: var(--secondary-color); /* White for nav links, no neon */
  text-decoration: none;
  font-size: 16px;
  padding: 10px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(var(--primary-color-rgb), 0.1);
}

/* Hamburger Menu (hidden by default for desktop) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
  border-radius: 3px;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
  text-shadow:
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

.hamburger-menu.active .hamburger-icon:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.hamburger-menu.active .hamburger-icon:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  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);
  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),
    0 0 30px var(--neon-primary),
    0 0 45px var(--neon-primary);
}

/* Footer Section Styles */
.site-footer {
  background-color: #1e1e1e; /* Dark grey for footer */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Four columns for desktop */
  gap: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  margin: 0;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.site-footer h4 {
  color: var(--primary-color); /* Primary color for footer headings */
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: bold;
}

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

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

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

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

.payment-icons, .game-providers-icons, .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Consistent gap for all icon sections */
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.game-providers-section, .social-media-section {
  padding: 30px 0;
  border-bottom: 1px solid #333333;
}

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

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

/* Global 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(var(--primary-color-rgb), 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(var(--neon-secondary-rgb), 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(var(--neon-accent-rgb), 0.3);
  }
}

/* A slightly different animation for contrast if needed */
@keyframes theme-colors-alt {
  0%, 100% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 10px rgba(var(--neon-secondary-rgb), 0.3);
  }
  33% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      inset 0 0 10px rgba(var(--neon-accent-rgb), 0.3);
  }
  66% {
    border-color: var(--neon-primary);
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset 0 0 10px rgba(var(--primary-color-rgb), 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;
  }
}

/* LOGO NO NEON - Explicitly remove any neon effects */
.logo, .logo * {
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}
.footer-logo {
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

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

  .site-header {
    top: 30px; /* Below mobile marquee */
    min-height: 100px; /* HeaderTop (50px) + MobileNavButtons (50px) */
  }

  .header-top {
    padding: 5px 0;
    min-height: 50px;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width for mobile */
    padding: 0 15px;
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .logo img {
    max-height: 40px !important; /* Mobile logo height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
    min-height: 50px;
    align-items: center;
  }

  .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;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place hamburger menu to the left */
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e, #0f3460, #16213e); /* Dark background for mobile menu */
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%); /* Hidden off-screen by default */
    z-index: 1000; /* Above overlay */
    border: none;
    box-shadow: none;
    animation: none;
  }

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

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

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

  /* Footer Responsive */
  .footer-container {
    grid-template-columns: 1fr; /* Single column for mobile footer */
    gap: 20px;
  }
  .footer-col {
    align-items: center;
    text-align: center;
  }
  .footer-nav ul {
    width: 100%;
  }
  .footer-nav li {
    text-align: center;
  }
  .payment-methods h4, .game-providers-section h4, .social-media-section h4 {
    text-align: center;
  }
  .payment-icons, .game-providers-icons, .social-media-icons {
    justify-content: center;
  }

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

/* Overlay for mobile menu */
.mobile-menu-overlay {
  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-in-out, visibility 0.3s ease-in-out;
}

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

/* Helper class to prevent body scroll */
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;
  }
}
