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

  /* Neon colors derived from primary/secondary, with dynamic flow */
  --neon-base-1: #26A9E0; /* Primary blue */
  --neon-base-2: #00FFFF; /* Cyan for contrast */
  --neon-base-3: #FF00FF; /* Magenta for accent */
  --neon-base-4: #FFFF00; /* Yellow for accent */

  /* Header offset calculation */
  --marquee-height-desktop: 45px; /* Approximate height of marquee */
  --header-top-height-desktop: 60px; /* Approximate height of header-top */
  --main-nav-height-desktop: 50px; /* Approximate height of main-nav */
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop header offset */

  --marquee-height-mobile: 45px;
  --header-top-height-mobile: 60px;
  --mobile-buttons-height-mobile: 50px; /* Approximate height of mobile buttons */
  --header-offset-mobile: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-buttons-height-mobile)); /* Mobile header offset */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: var(--background-color, #FFFFFF);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Animations for dynamic neon colors */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-base-1);
    box-shadow: 0 0 10px var(--neon-base-1), 0 0 20px var(--neon-base-1);
  }
  33% {
    border-color: var(--neon-base-2);
    box-shadow: 0 0 10px var(--neon-base-2), 0 0 20px var(--neon-base-2);
  }
  66% {
    border-color: var(--neon-base-3);
    box-shadow: 0 0 10px var(--neon-base-3), 0 0 20px var(--neon-base-3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 0 0 5px var(--neon-base-1), 0 0 10px var(--neon-base-1), 0 0 15px var(--neon-base-1);
    color: var(--secondary-color);
  }
  33% {
    text-shadow: 0 0 5px var(--neon-base-2), 0 0 10px var(--neon-base-2), 0 0 15px var(--neon-base-2);
    color: var(--secondary-color);
  }
  66% {
    text-shadow: 0 0 5px var(--neon-base-3), 0 0 10px var(--neon-base-3), 0 0 15px var(--neon-base-3);
    color: var(--secondary-color);
  }
  100% {
    text-shadow: 0 0 5px var(--neon-base-4), 0 0 10px var(--neon-base-4), 0 0 15px var(--neon-base-4);
    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%;
  height: var(--marquee-height-desktop);
  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-base-1),
    0 0 20px var(--neon-base-1),
    0 0 30px var(--neon-base-1),
    inset 0 0 20px rgba(38, 169, 224, 0.1); /* Using var(--neon-base-1) for consistency */
  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: 0px 20px; /* Adjusted for height calculation */
  height: 100%;
}

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

.marquee-icon-emoji {
  font-size: 20px; /* Adjusted for height calculation */
  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-base-1),
    0 0 10px var(--neon-base-1),
    0 0 15px var(--neon-base-1);
  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: 15px; /* Adjusted for height calculation */
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-base-1),
    0 0 10px var(--neon-base-1),
    0 0 15px var(--neon-base-1);
  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-base-1),
    0 0 20px var(--neon-base-1),
    0 0 30px var(--neon-base-1),
    0 0 40px var(--neon-base-1);
  transform: scale(1.05);
  color: var(--secondary-color);
}

.marquee-separator {
  font-size: 15px; /* Adjusted for height calculation */
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-shadow:
    0 0 3px var(--neon-base-1),
    0 0 6px var(--neon-base-1);
}

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Default to column for easier mobile transition */
}

/* Header Top Bar - Desktop */
.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-base-1),
    0 0 20px var(--neon-base-1),
    inset 0 0 10px rgba(38, 169, 224, 0.1); /* Using var(--neon-base-1) for consistency */
  width: 100%;
  min-height: var(--header-top-height-desktop); /* Ensure minimum height */
  display: flex;
  align-items: center;
}

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

/* Logo - NO NEON EFFECTS */
.logo {
  color: var(--secondary-color); /* White for contrast */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 0; /* Adjust padding to match overall height */
  display: block; /* Ensure it's block for centering on mobile if needed */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px; /* Adjust as needed */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Main Navigation Bar - Desktop */
.main-nav {
  background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Different dark gradient */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation for distinction */
  box-shadow:
    0 0 10px var(--neon-base-2), /* Different neon color */
    0 0 20px var(--neon-base-2),
    inset 0 0 10px rgba(0, 255, 255, 0.1); /* Using var(--neon-base-2) for consistency */
  width: 100%;
  min-height: var(--main-nav-height-desktop); /* Ensure minimum height */
  display: flex; /* Default to flex for desktop */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--secondary-color); /* Regular white text for links */
  text-decoration: none;
  padding: 8px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color); /* Primary blue on hover */
  background-color: rgba(38, 169, 224, 0.1); /* Using var(--primary-color) for consistency */
  text-shadow: 0 0 5px var(--primary-color); /* Subtle glow on hover */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above mobile-nav-buttons */
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin-bottom: 5px;
  position: relative;
  transform-origin: 4px 0px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-base-4); /* Neon glow for hamburger */
}
.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(2px, 2px); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(2px, -2px); }

/* Buttons - NEON STYLE */
.btn {
  position: relative;
  padding: 10px 20px; /* Adjusted padding */
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  text-shadow:
    0 0 5px var(--secondary-color),
    0 0 10px var(--neon-base-1);
  transition: all 0.3s ease;
  font-size: 15px; /* Adjusted font size */
  font-weight: bold;
  background: linear-gradient(135deg, var(--neon-base-1), var(--neon-base-2)); /* Gradient background */
  display: inline-block;
  text-align: center;
  white-space: nowrap; /* Prevent wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 15px var(--neon-base-1),
    0 0 30px var(--neon-base-1),
    inset 0 0 15px rgba(38, 169, 224, 0.3); /* Using var(--neon-base-1) for consistency */
}

/* Mobile Navigation Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  width: 100%;
  padding: 10px 20px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Same as header-top */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-base-1),
    0 0 20px var(--neon-base-1),
    inset 0 0 10px rgba(38, 169, 224, 0.1); /* Using var(--neon-base-1) for consistency */
  z-index: 999; /* Below header-top and main-nav */
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  flex-wrap: nowrap; /* Prevent wrapping */
  gap: 10px;
  min-height: var(--mobile-buttons-height-mobile); /* Ensure minimum height */
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998; /* Below menu, above content */
  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; /* Dark background for footer */
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

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

.site-footer ul li {
  margin-bottom: 8px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Footer Top Section - 4 Columns */
.footer-top-section .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

/* Payment Methods */
.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: 50px;
  height: auto;
  width: auto;
}

/* Footer Middle Section - Game Providers & Social Media */
.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;
}
.game-providers-section:last-child,
.social-media-section:last-child {
  margin-bottom: 0;
}

.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: 50px;
  height: auto;
  width: auto;
}

/* Footer Bottom Section - Copyright */
.footer-bottom-section {
  padding-top: 20px;
}

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

.copyright {
  margin: 0;
}

.footer-action-links {
  display: flex;
  gap: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-offset-mobile); /* Mobile header offset */
  }

  /* Marquee Mobile */
  .marquee-section {
    height: var(--marquee-height-mobile);
  }
  .marquee-container {
    gap: 10px;
    padding: 0px 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;
  }

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

  .header-top {
    min-height: var(--header-top-height-mobile);
  }

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

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0;
  }
  .logo img {
    max-height: 35px; /* Adjust image logo size for mobile */
  }

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

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

  /* Mobile Navigation Buttons (Always visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    padding: 8px 15px; /* Adjust padding */
    min-height: var(--mobile-buttons-height-mobile);
  }
  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px; /* Reduced padding */
    font-size: 13px; /* Reduced font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation (Mobile - Hidden by default, shown on active) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset-mobile); /* Position below header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset-mobile)); /* Full height below header */
    background-color: #1a1a2e; /* Dark background for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
    border-top: none; /* Remove top border for mobile menu */
    border-bottom: none; /* Remove bottom border for mobile menu */
    box-shadow: none; /* Remove box shadow for mobile menu */
    animation: none; /* Disable animation for mobile menu */
  }

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

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

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

  /* Footer Mobile */
  .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
  }

  .footer-bottom-section .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-action-links {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .footer-action-links a {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 5px;
    box-sizing: border-box;
  }

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

/* Body no-scroll class for mobile menu */
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;
  }
}
