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

  /* Neon base colors for animation, derived from primary/secondary but vibrant */
  --neon-base-blue: #00FFFF; /* Cyan */
  --neon-base-magenta: #FF00FF; /* Magenta */
  --neon-base-yellow: #FFFF00; /* Yellow */
  --neon-base-red: #FF3366; /* Pinkish Red */

  /* Dynamic neon variables, will be animated */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--login-color);
  --neon-accent: var(--neon-base-yellow);

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

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

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

.no-scroll {
  overflow: hidden;
}

/* Animations for neon effects */
@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 hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

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

@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-base-magenta); box-shadow: 0 0 20px var(--neon-base-magenta); }
  20% { border-color: var(--neon-base-blue); box-shadow: 0 0 20px var(--neon-base-blue); }
  40% { border-color: var(--neon-base-yellow); box-shadow: 0 0 20px var(--neon-base-yellow); }
  60% { border-color: #00ff00; box-shadow: 0 0 20px #00ff00; }
  80% { border-color: var(--neon-base-red); box-shadow: 0 0 20px var(--neon-base-red); }
  100% { border-color: var(--neon-base-magenta); box-shadow: 0 0 20px var(--neon-base-magenta); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), inset 0 0 10px rgba(38, 169, 224, 0.3);
  }
  33% {
    border-color: var(--neon-secondary); /* Login color */
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary), inset 0 0 10px rgba(234, 124, 7, 0.3);
  }
  66% {
    border-color: var(--neon-accent); /* Yellow */
    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 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-base-blue), 0 0 10px var(--neon-base-blue), 0 0 15px var(--neon-base-blue); color: #ffffff; }
  33% { text-shadow: 0 0 5px var(--neon-base-magenta), 0 0 10px var(--neon-base-magenta), 0 0 15px var(--neon-base-magenta); color: #ffffff; }
  66% { text-shadow: 0 0 5px var(--neon-base-yellow), 0 0 10px var(--neon-base-yellow), 0 0 15px var(--neon-base-yellow); color: #ffffff; }
  100% { text-shadow: 0 0 5px var(--neon-base-blue), 0 0 10px var(--neon-base-blue), 0 0 15px var(--neon-base-blue); color: #ffffff; }
}

/* 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(38, 169, 224, 0.1);
  z-index: 1001;
  height: var(--marquee-height); /* Set height dynamically from variable */
  display: flex; /* Use flex to center content vertically */
  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; /* Adjusted padding for height */
}

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

.marquee-icon-emoji {
  font-size: 20px; /* Smaller font size */
  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;
  height: 100%; /* Ensure wrapper takes full height for vertical centering */
  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: 15px; /* Slightly smaller font */
  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: 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);
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: var(--marquee-height); /* Position below the marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: #ffffff;
}

.site-header a {
  text-decoration: none;
  color: #ffffff;
}

/* Header Top Section (Desktop) */
.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  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(38, 169, 224, 0.1);
  padding: 10px 0; /* Adjusted padding */
  display: flex;
  align-items: center;
  min-height: 60px; /* Desktop Header Top height */
}

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

/* Logo - NO NEON EFFECTS */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White for clear contrast */
  text-transform: uppercase; /* Ensure uppercase */
  display: block; /* Default for desktop */
}

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

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

/* Mobile Nav Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  display: none;
}

/* Main Navigation (Desktop) */
.main-nav {
  background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Different dark gradient */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic border color */
  box-shadow: 0 0 10px var(--neon-base-blue), 0 0 20px var(--neon-base-blue), inset 0 0 20px rgba(0, 255, 255, 0.1);
  padding: 10px 0;
  display: flex; /* Default desktop display */
  min-height: 50px; /* Desktop Main Nav height */
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  color: #ffffff; /* Regular white for menu items */
}

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

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

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

/* Hamburger Menu (Hidden by default on desktop) */
.hamburger-menu {
  display: none;
}

/* 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 text wrap 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(38, 169, 224, 0.5);
}

/* Footer */
.site-footer {
  background-color: #1a1a1a; /* Dark gray for footer */
  color: #e0e0e0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer a {
  color: #e0e0e0;
  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-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

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

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure text wraps */
  overflow-wrap: break-word; /* Ensure text wraps */
  color: #b0b0b0;
}

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

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

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

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

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

.footer-bottom-section p {
  margin: 0 0 10px;
  color: #b0b0b0;
}

.footer-action-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.footer-action-links a {
  font-weight: bold;
  color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .marquee-section {
    height: var(--marquee-height); /* Mobile marquee height */
    padding: 0;
  }
  .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 8px;
  }
  .marquee-content {
    gap: 20px;
    animation-duration: 25s;
  }

  .site-header {
    top: var(--marquee-height); /* Position below mobile marquee */
  }

  /* Header Top Section (Mobile) */
  .header-top {
    min-height: 50px; /* Mobile Header Top height */
    padding: 10px 0;
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative; /* For absolute logo positioning if needed */
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1002; /* Above logo and overlay */
    position: relative;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  }

  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
    text-shadow: 0 0 3px var(--neon-primary); /* Neon effect for lines */
  }

  .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 Logo Centering (Method 1: Flexbox + !important) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
    position: relative; /* Ensure z-index works with flex-1 */
    z-index: 1; /* Below hamburger */
  }

  .logo img {
    max-height: 35px !important; /* Adjust image height for mobile */
  }
  
  /* Hide desktop buttons, show mobile buttons */
  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjust padding for mobile buttons */
    background: linear-gradient(135deg, #0f3460, #16213e, #0a0a0a); /* Dark background */
    border-bottom: 2px 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(38, 169, 224, 0.1);
    min-height: 40px; /* Mobile Nav Buttons height */
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

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

  /* Main Navigation (Mobile - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100vh - var(--header-offset));
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay, below hamburger */
    overflow-y: auto; /* Enable scrolling for long menus */
    padding: 20px 0;
    border-right: 2px solid;
    animation: alternate-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 0 0 10px var(--neon-base-magenta), 0 0 20px var(--neon-base-magenta), inset 0 0 20px rgba(255, 0, 255, 0.1);
  }

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

  .nav-container {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Adjust padding */
    max-width: none; /* No max-width on mobile */
    width: 100%; /* Full width on mobile */
    align-items: flex-start; /* Align menu items to left */
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  .nav-link::after {
    display: none; /* Hide underline animation on mobile */
  }
  .nav-link:hover {
    color: var(--primary-color);
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above content */
  }

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

  /* Footer Mobile */
  .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
  }

  .footer-col:not(:last-child) {
    margin-bottom: 20px;
  }

  .footer-action-links {
    flex-direction: column;
    gap: 10px;
  }

  .footer-action-links a {
    width: 100%;
    padding: 10px 0;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    text-align: center;
  }

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

/* Ensure body overflow-x hidden for mobile */
@media (max-width: 768px) {
  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;
  }
}
