/* General reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  color: #ffffff; /* Default text color for dark background */
  background-color: #0a0a0a; /* Dark background */
  line-height: 1.6;
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

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

ul {
  list-style: none;
}

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

  /* Neon colors based on primary/secondary */
  --neon-primary: var(--primary-color); /* #26A9E0 */
  --neon-secondary: #00ffff; /* A vibrant cyan */
  --neon-accent: #ff00ff; /* A vibrant magenta */
  --neon-glow-intensity: 0 0 10px, 0 0 20px, 0 0 30px;

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

@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Marquee(30) + HeaderTop(50) + MobileButtons(50) */
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 50px;
    --mobile-buttons-height-mobile: 50px;
  }
}

/* Common container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

@media (max-width: 768px) {
  .header-container, .nav-container, .footer-container {
    padding: 0 15px;
    max-width: none; /* Mobile container must be full width */
  }
}

/* Neon Glow Animations - MUST BE DYNAMIC */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow: var(--neon-glow-intensity) var(--neon-primary), inset 0 0 10px rgba(38, 169, 224, 0.3);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: var(--neon-glow-intensity) var(--neon-secondary), inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: var(--neon-glow-intensity) 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);
  }
}

@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; /* 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);
  z-index: 1001;
  height: var(--marquee-height-desktop); /* Fixed height for desktop */
  display: flex;
  align-items: center;
}

.marquee-container {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px; /* Padding for container */
}

.marquee-icon {
  flex-shrink: 0;
  width: 24px; /* Smaller icon for better fit */
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.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;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  padding-right: 30px; /* Ensure gap at the end for seamless loop */
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  color: var(--secondary-color);
}

.site-header .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: var(--neon-glow-intensity) var(--neon-primary), inset 0 0 20px rgba(38, 169, 224, 0.1);
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

.site-header .header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* LOGO NO NEON EFFECT */
  text-decoration: none;
  display: block; /* Ensure it's visible */
  padding: 10px 0; /* Add some vertical padding */
}

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

.site-header .desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 15px;
  align-items: center;
}

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

.site-header .main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark gradient */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 5s ease-in-out infinite reverse; /* Different animation for distinction */
  box-shadow: var(--neon-glow-intensity) var(--neon-secondary), inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Visible on desktop */
  align-items: center;
}

.site-header .main-nav .nav-container {
  display: flex;
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 30px;
  padding: 10px 0;
}

.site-header .nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular text, no neon */
  padding: 8px 0;
  transition: color 0.3s ease, transform 0.3s ease;
}

.site-header .nav-link:hover {
  color: var(--neon-primary); /* Hover with primary neon color */
  transform: translateY(-2px);
}

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

/* Buttons */
.btn {
  position: relative;
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  text-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--neon-glow-intensity) var(--neon-primary), 0 0 40px var(--neon-primary), inset 0 0 15px rgba(38, 169, 224, 0.5);
}

/* Footer Section */
.site-footer {
  background-color: #111111; /* Darker background for footer */
  color: #cccccc;
  padding-top: 40px;
  font-size: 14px;
}

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

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

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

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

.site-footer .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
  gap: 30px;
}

.site-footer .footer-col ul {
  padding-left: 0;
}

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

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

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

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

.site-footer .payment-icons img,
.site-footer .game-providers-icons img,
.site-footer .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

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

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

.site-footer .footer-bottom-area {
  padding: 20px 0;
}

.site-footer .copyright-info {
  text-align: center;
  margin-bottom: 10px;
}

.site-footer .footer-legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Marquee Mobile */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0; /* Remove vertical padding */
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px; /* Smaller padding */
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 13px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite; /* Faster scroll on mobile */
  }

  /* Header Mobile */
  .site-header {
    top: var(--marquee-height-mobile); /* Below marquee */
  }

  .site-header .header-top {
    min-height: var(--header-top-height-mobile);
    padding: 10px 0;
  }

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

  .site-header .logo {
    flex: 1 !important; /* For flex-based logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0; /* Remove vertical padding for better alignment */
    max-width: calc(100% - 100px); /* Restrict logo width to prevent overlap with hamburger */
  }
  .site-header .logo img {
    max-height: 35px; /* Smaller logo for mobile */
  }

  /* Hamburger Menu (Mobile - Visible) */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1002; /* Above logo for clickability */
    color: var(--secondary-color);
    animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger */
    text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
    font-size: 24px;
  }

  .hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--secondary-color);
    position: relative;
    transition: background-color 0.3s ease;
  }

  .hamburger-icon::before,
  .hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    position: absolute;
    transition: transform 0.3s ease, top 0.3s ease;
  }

  .hamburger-icon::before {
    top: -8px;
  }

  .hamburger-icon::after {
    top: 8px;
  }

  .hamburger-menu.active .hamburger-icon {
    background-color: transparent; /* Hide middle bar */
  }

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

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

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

  .site-header .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: 10px 15px; /* Vertical padding for the button row */
    background: linear-gradient(135deg, #0f3460, #16213e); /* Dark background for button row */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border color */
    box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), inset 0 0 10px rgba(255, 0, 255, 0.1);
    min-height: var(--mobile-buttons-height-mobile); /* Fixed height */
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

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

  /* Main Nav (Mobile - Hidden by default, slides in) */
  .site-header .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Full viewport height */
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(26, 33, 46, 0.95), rgba(22, 33, 62, 0.95)); /* Semi-transparent dark overlay */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay, below hamburger */
    border: none; /* No border for full screen menu */
    box-shadow: none;
  }

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

  .site-header .main-nav .nav-container {
    flex-direction: column;
    gap: 20px;
    padding: 50px 15px; /* Add vertical padding for content */
  }

  .site-header .nav-link {
    font-size: 20px; /* Larger font for mobile menu */
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }

  /* 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); /* Dark semi-transparent overlay */
    z-index: 999; /* Below menu, above page content */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  /* Body no scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer Mobile */
  .site-footer .footer-container {
    grid-template-columns: 1fr; /* Single column for mobile */
  }

  .site-footer .footer-col {
    margin-bottom: 30px;
  }
  .site-footer .footer-col:last-child {
    margin-bottom: 0;
  }

  .site-footer .footer-col h4 {
    text-align: center;
  }
  .site-footer .footer-col ul {
    text-align: center;
  }
  .site-footer .footer-logo {
    text-align: center;
  }
  .site-footer .footer-description {
    text-align: center;
  }
  
  .site-footer .payment-methods,
  .site-footer .game-providers-section,
  .site-footer .social-media-section {
    text-align: center;
  }
  .site-footer .payment-icons,
  .site-footer .game-providers-icons,
  .site-footer .social-media-icons {
    justify-content: center; /* Center icons on mobile */
  }

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