:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF; /* 白色 */
  --login-color: #EA7C07; /* 登录按钮橙色 */
  --black-color: #000000; /* 黑色 */

  /* Neon specific vibrant colors */
  --neon-primary-glow: #00FFFF; /* Vibrant Cyan */
  --neon-secondary-glow: #FF00FF; /* Vibrant Magenta */
  --neon-accent-glow: #FFFF00; /* Vibrant Yellow */

  /* Marquee/Header backgrounds */
  --header-bg-dark-1: #0a0a0a;
  --header-bg-dark-2: #1a1a2e;
  --header-bg-dark-3: #16213e;

  /* Header offsets */
  --header-offset: 155px; /* Desktop: Marquee(45) + HeaderTop(60) + MainNav(50) */
  --marquee-height: 45px; /* Fixed marquee height */
}

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

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

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

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height); /* Explicit height */
  background: linear-gradient(135deg, var(--header-bg-dark-1), var(--header-bg-dark-2), var(--header-bg-dark-3));
  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-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 20px rgba(0, 255, 255, 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; /* Adjusted padding */
  height: 100%; /* Ensure container fills marquee section 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-glow),
    0 0 10px var(--neon-primary-glow),
    0 0 15px var(--neon-primary-glow);
  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%;
  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 for marquee */
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-primary-glow),
    0 0 10px var(--neon-primary-glow),
    0 0 15px var(--neon-primary-glow);
  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-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    0 0 40px var(--neon-primary-glow);
  transform: scale(1.05);
  color: var(--secondary-color);
}

.marquee-separator {
  font-size: 15px; /* Slightly smaller */
  color: rgba(255, 255, 255, 0.6);
  margin: 0 10px;
  text-shadow:
    0 0 3px var(--neon-primary-glow),
    0 0 6px var(--neon-primary-glow);
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: transparent; /* Background handled by sub-sections */
}

/* Header Top Area (Desktop default) */
.header-top {
  background: linear-gradient(135deg, var(--header-bg-dark-1), var(--header-bg-dark-2), var(--header-bg-dark-3));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary-glow),
    0 0 20px var(--neon-primary-glow),
    0 0 30px var(--neon-primary-glow),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  min-height: 60px; /* Desktop height */
  display: flex;
  align-items: center;
  position: relative; /* For mobile logo absolute positioning */
}

.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; /* Ensure uppercase for KU99 */
  display: block; /* Ensure visibility */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px; /* Desktop logo height */
}

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

/* Main Navigation Area (Desktop default) */
.main-nav {
  background: linear-gradient(135deg, var(--header-bg-dark-2), var(--header-bg-dark-3), #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors-nav 4s ease-in-out infinite; /* Different animation for nav */
  box-shadow:
    0 0 10px var(--neon-secondary-glow), /* Different neon color */
    0 0 20px var(--neon-secondary-glow),
    0 0 30px var(--neon-secondary-glow),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  width: 100%;
  display: flex; /* Desktop default: visible */
  align-items: center;
  min-height: 50px; /* Desktop height */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

.nav-link {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-accent-glow);
  text-shadow: 0 0 5px var(--neon-accent-glow), 0 0 10px var(--neon-accent-glow);
}

/* Hamburger Menu (Mobile only) */
.hamburger-menu {
  display: none; /* Desktop default: hidden */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above logo and buttons */
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary-glow); /* Neon glow for hamburger */
}
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Buttons (Mobile default: visible, Desktop default: hidden) */
.mobile-nav-buttons {
  display: none; /* Desktop default: hidden */
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Desktop default: hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below mobile menu, above content */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary-glow), var(--neon-secondary-glow));
  padding: 12px 25px; /* Adjusted padding for desktop */
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow:
    0 0 5px var(--secondary-color),
    0 0 10px var(--neon-primary-glow);
  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-glow),
    0 0 30px var(--neon-primary-glow),
    0 0 45px var(--neon-primary-glow),
    inset 0 0 15px rgba(0, 255, 255, 0.4);
}

/* Keyframes for dynamic neon colors (for nav, different from header-top) */
@keyframes theme-colors-nav {
  0%, 100% {
    border-color: var(--neon-secondary-glow); /* Magenta */
    box-shadow:
      0 0 10px var(--neon-secondary-glow),
      0 0 20px var(--neon-secondary-glow);
  }
  33% {
    border-color: var(--neon-accent-glow); /* Yellow */
    box-shadow:
      0 0 10px var(--neon-accent-glow),
      0 0 20px var(--neon-accent-glow);
  }
  66% {
    border-color: var(--neon-primary-glow); /* Cyan */
    box-shadow:
      0 0 10px var(--neon-primary-glow),
      0 0 20px var(--neon-primary-glow);
  }
}

/* Footer Section */
.site-footer {
  background: var(--header-bg-dark-1); /* Regular dark background */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-top-grid {
  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 h4 {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

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

.footer-col ul li a {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full text display */
  overflow-wrap: break-word; /* Ensure full text display */
}

.payment-icons, .game-providers-icons, .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Adjusted gap for tighter icons */
  width: 100%;
}
.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 40px; /* Smaller icon height */
  height: auto;
  width: auto;
  object-fit: contain;
}

.footer-middle-sections {
  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;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  color: #999999;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .header-container, .nav-container, .footer-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 768px) {
  /* Mobile general overrides */
  body {
    padding-top: var(--header-offset);
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Marquee Mobile */
  .marquee-section {
    height: 45px; /* Consistent height */
  }
  .marquee-container {
    padding: 0 10px;
    gap: 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 18px;
  }
  .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);
  }
  .header-top {
    min-height: 50px; /* Mobile height */
    padding: 0 15px; /* Keep padding for hamburger */
    justify-content: space-between; /* Align hamburger left, logo center */
  }
  .header-container {
    padding: 0; /* Remove container padding, handled by header-top */
    flex-wrap: nowrap;
    justify-content: space-between; /* For hamburger and logo */
    position: relative; /* For absolute logo positioning */
  }
  .hamburger-menu {
    display: block; /* Mobile default: visible */
    order: 0; /* Left */
    margin-right: auto; /* Push logo to center */
    padding-left: 0; /* No extra padding */
  }
  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    order: 1; /* Center */
    padding: 0; /* Remove logo padding */
    margin: 0; /* Remove logo margin */
    max-width: calc(100% - 60px); /* Adjust max-width to not overlap hamburger */
  }
  .logo img {
    max-height: 40px !important; /* Mobile logo height */
  }
  .desktop-nav-buttons {
    display: none; /* Mobile default: hidden */
  }
  .mobile-nav-buttons {
    display: flex !important; /* Mobile default: visible */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, var(--header-bg-dark-1), var(--header-bg-dark-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 8px var(--neon-primary-glow),
      0 0 15px var(--neon-primary-glow),
      inset 0 0 10px rgba(0, 255, 255, 0.1);
    min-height: 50px; /* Mobile buttons height */
  }
  .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 */
    text-align: center;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Mobile default: hidden */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Corrected top for mobile fixed menu */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max menu width */
    height: calc(100vh - var(--header-offset)); /* Full height below fixed header */
    overflow-y: auto;
    transform: translateX(-100%); /* Slide out to left */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    background: linear-gradient(180deg, var(--header-bg-dark-2), var(--header-bg-dark-3));
    border-right: 2px solid;
    animation: theme-colors-nav 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-secondary-glow),
      0 0 20px var(--neon-secondary-glow),
      inset 0 0 15px rgba(255, 0, 255, 0.1);
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide in */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  .footer-description {
    font-size: 13px;
  }
  .payment-icons img, .game-providers-icons img, .social-media-icons img {
    max-height: 35px; /* Smaller icons on mobile */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
