html {
  box-sizing: border-box;
  font-size: 16px;
}
*,
*::before,
*::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: #000000; /* Dark background as per neon style */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

/* Color Variables */
:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07; /* 登录颜色 */
  --background-color: #FFFFFF; /* Not for header, but general background if needed */

  /* Neon Colors - adapted from primary/secondary/login */
  --neon-primary: var(--primary-color); /* Bright blue */
  --neon-secondary: #00ffff; /* Cyan for contrast */
  --neon-accent: #ff00ff; /* Magenta for contrast */
  --neon-glow-main: #26A9E0; /* Based on primary for main glow */
  --neon-glow-alt: #EA7C07; /* Based on login for alternative glow */

  /* Header Offset - calculated based on content */
  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* 155px */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 50px;
    --mobile-nav-buttons-height-mobile: 40px;
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* 120px */
  }
}

/* Neon Glow Animations */
@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); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { filter: hue-rotate(360deg); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
}
@keyframes alternate-colors {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
}
@keyframes gradient-flow {
  0% { background-position: 0% 50%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; }
  50% { background-position: 100% 50%; box-shadow: 0 0 10px #00ffff, 0 0 20px #0000ff; }
  100% { background-position: 0% 50%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; }
}
@keyframes random-glow {
  0% { border-color: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
  20% { border-color: #00ffff; box-shadow: 0 0 20px #00ffff; }
  40% { border-color: #ffff00; box-shadow: 0 0 20px #ffff00; }
  60% { border-color: #00ff00; box-shadow: 0 0 20px #00ff00; }
  80% { border-color: #ff0000; box-shadow: 0 0 20px #ff0000; }
  100% { border-color: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
}
@keyframes theme-colors {
  0%, 100% { border-color: var(--neon-glow-main); box-shadow: 0 0 10px var(--neon-glow-main), 0 0 20px var(--neon-glow-main); }
  33% { border-color: var(--neon-glow-alt); box-shadow: 0 0 10px var(--neon-glow-alt), 0 0 20px var(--neon-glow-alt); }
  66% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
}
@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-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; }
}

/* Marquee Section Styles */
.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); /* Using primary color for inset glow */
  z-index: 1001;
  min-height: var(--marquee-height-desktop); /* Ensure height for offset calculation */
  display: flex; /* For vertical centering */
  align-items: center; /* For vertical centering */
}
.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 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 Styles (Desktop First) */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color for entire header */
  border-bottom: 2px solid; /* For animation */
}

.header-top {
  display: flex;
  align-items: center;
  min-height: var(--header-top-height-desktop); /* Ensure height for offset calculation */
  padding: 15px 0; /* Vertical padding */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* Regular white color for logo, no neon */
  text-decoration: none;
  display: block; /* Ensure it takes up space */
  /* No neon effects for logo */
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-glow-main), var(--neon-glow-alt)); /* Use primary and login colors */
  padding: 12px 30px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-glow-main);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
  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-glow-main),
    0 0 30px var(--neon-glow-main),
    inset 0 0 15px rgba(38, 169, 224, 0.5);
}

.main-nav {
  display: flex; /* Desktop default: visible, horizontal */
  justify-content: center;
  align-items: center;
  min-height: var(--main-nav-height-desktop); /* Ensure height for offset calculation */
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark gradient */
  border-top: 2px solid; /* For animation */
  border-bottom: 2px solid; /* For animation */
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic border color for main nav */
  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(0, 255, 255, 0.1); /* Using secondary color for inset glow */
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav links */
  gap: 30px;
  padding: 10px 20px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff; /* Regular white color for nav links */
  padding: 5px 0;
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: var(--primary-color); /* Hover with primary color */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
}
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
  background-color: #000000; /* Dark background */
  color: #ffffff;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-top > .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color); /* Use primary color for footer headings */
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}
.footer-links a:hover {
  color: var(--primary-color);
}

.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;
}

.game-providers-section,
.social-media-section {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.game-providers-section h4,
.social-media-section h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
}
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
}
.footer-bottom p {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.7);
}
.footer-bottom-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}
.footer-bottom-links a:hover {
  color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Marquee Mobile */
  .marquee-section {
    min-height: var(--marquee-height-mobile); /* Ensure height for offset calculation */
    padding-top: 0px !important;
    padding-bottom: 0px !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0px 5px; /* Reduced padding */
  }
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .marquee-icon-emoji {
    font-size: 14px !important;
  }
  .marquee-text {
    font-size: 14px !important;
  }
  .marquee-separator {
    font-size: 14px !important;
    margin: 0 10px !important;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

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

  .header-top {
    min-height: var(--header-top-height-mobile); /* Ensure height for offset calculation */
    padding: 10px 0;
    border-bottom: none; /* Remove separator */
  }

  .header-container {
    padding: 0 15px; /* Smaller horizontal padding */
    justify-content: space-between; /* Hamburger left, logo center, right empty */
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Above logo and overlay */
    position: relative;
    outline: none;
  }
  .hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
    /* Neon glow for hamburger lines */
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  }
  .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);
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 22px; /* Smaller font for mobile */
    text-align: center;
  }
  /* If logo is an image, ensure it scales and centers */
  .logo img {
    max-height: 40px !important; /* Smaller max height for mobile logo */
    width: auto !important;
    height: auto !important;
    display: block !important;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for buttons container */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: var(--mobile-nav-buttons-height-mobile); /* Ensure height for offset calculation */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, with 10px gap */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Initially off-screen to the left */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Scrollable if menu content is long */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column; /* Vertical links */
    padding: 20px 15px;
    gap: 15px;
    align-items: flex-start; /* Align links to left */
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }
  .nav-link {
    width: 100%; /* Full width links */
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  /* Footer Mobile */
  .site-footer {
    padding: 30px 0 15px;
  }
  .footer-top > .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-col {
    text-align: center; /* Center content in single column */
  }
  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-links {
    text-align: center;
  }
  .payment-methods .payment-icons,
  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: center; /* Center icons */
  }
  .footer-bottom-links {
    flex-direction: column; /* Vertical links */
    gap: 10px;
  }
  .footer-bottom p {
    font-size: 13px;
  }

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

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