:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --accent-color: #EA7C07; /* Login/Button accent */

  /* Neon dynamic colors */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--accent-color);
  --neon-accent: #FFFF00; /* Yellow for contrast */
  --neon-alt: #FF00FF; /* Pink/Magenta */

  /* Header offset values */
  --header-offset: 165px; /* Desktop: Marquee(45) + HeaderTop(70) + MainNav(50) = 165px */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 120px; /* Mobile: Marquee(30) + HeaderTop(50) + MobileButtons(40) = 120px */
  }
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: Arial, sans-serif; /* Default font */
  line-height: 1.6;
  color: #333;
  background-color: var(--background-color, #FFFFFF);
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-top: var(--header-offset);
  overflow-x: hidden;
  background-color: var(--background-color, #FFFFFF);
  color: #333;
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  color: var(--accent-color);
}

/* Base Neon 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); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes alternate-glow {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary);
  }
  50% {
    border-color: var(--neon-secondary);
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary);
  }
}

@keyframes theme-flow {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset 0 0 10px rgba(38, 169, 224, 0.3);
  }
  33% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      inset 0 0 10px rgba(234, 124, 7, 0.3);
  }
  66% {
    border-color: var(--neon-alt);
    box-shadow:
      0 0 10px var(--neon-alt),
      0 0 20px var(--neon-alt),
      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-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: var(--secondary-color);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-alt),
      0 0 10px var(--neon-alt),
      0 0 15px var(--neon-alt);
    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: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-flow 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;
  min-height: 45px; /* Ensure minimum height */
  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: 10px 20px;
}

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

.marquee-icon-emoji {
  font-size: 20px; /* Adjusted 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));
}

.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: 15px; /* Adjusted font size */
  font-weight: 600;
  color: var(--secondary-color);
  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: var(--secondary-color);
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Set to marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Background is handled by sub-sections */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-flow 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    inset 0 0 20px rgba(38, 169, 224, 0.1);
  width: 100%;
  min-height: 70px; /* Desktop Header Top height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon for logo */
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 20px; /* Space between logo and buttons */
  /* No text-shadow, box-shadow, or neon animations for the logo */
}

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

.desktop-nav-buttons {
  display: flex; /* Default for desktop */
  gap: 15px;
  flex-shrink: 0;
  margin-left: auto; /* Push to the right */
}

.btn {
  position: relative;
  padding: 12px 25px;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-flow 4s ease-in-out infinite;
  text-shadow:
    0 0 5px var(--secondary-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  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-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(38, 169, 224, 0.5);
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 15px; /* Padding for mobile buttons */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background for mobile buttons */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  justify-content: center;
  align-items: center;
  min-height: 40px; /* Mobile buttons height */
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-glow 4s ease-in-out infinite; /* Different animation for nav */
  box-shadow:
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    inset 0 0 20px rgba(234, 124, 7, 0.1);
  width: 100%;
  display: flex; /* Default for desktop */
  min-height: 50px; /* Desktop Main Nav height */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Default for desktop */
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  width: 100%;
}

.nav-link {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 8px 15px;
  display: block;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5); /* Subtle glow for nav links */
}

.nav-link:hover {
  color: var(--neon-secondary);
  text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary);
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1002; /* Above logo */
  flex-shrink: 0;
  margin-right: 20px; /* Space between hamburger and logo */
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--neon-primary);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

.hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

.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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Section */
.site-footer {
  background: #1a1a2e; /* Dark background for footer */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

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

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col {
  margin-bottom: 20px;
}

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

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

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

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

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

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

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

.payment-methods,
.game-providers-section,
.social-media-section {
  width: 100%;
  margin-bottom: 20px;
}

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

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(0.5) brightness(1.2); /* Subtle effect */
  transition: filter 0.3s ease;
}

.payment-icons img:hover,
.game-providers-icons img:hover,
.social-media-icons img:hover {
  filter: grayscale(0) brightness(1.5);
}

.copyright {
  text-align: center;
  color: #888888;
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    min-height: 30px; /* Adjusted mobile marquee height */
    padding: 0px 2px;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: 1.3;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 5px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  .site-header {
    top: 30px; /* Mobile marquee height */
    flex-direction: column;
    align-items: stretch;
  }

  .header-top {
    min-height: 50px; /* Mobile Header Top height */
  }

  .header-container {
    padding: 10px 15px;
    flex-wrap: nowrap;
    position: relative;
    max-width: none; /* Mobile container full width */
    width: 100%;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Leftmost */
    margin-left: 0;
    margin-right: 15px;
  }

  .logo {
    order: 1; /* Center */
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px; /* Smaller logo font size */
    padding-right: 0;
  }
  .logo img {
    max-height: 35px; /* Mobile logo height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    padding: 8px 15px;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 40px; /* 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; /* Hidden by default, toggled by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(180deg, #1a1a2e, #0f3460);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Above overlay, below hamburger */
    border: none; /* Remove border for mobile nav */
    padding: 20px 0;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    max-width: none; /* Mobile container full width */
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-menu-overlay.active {
    top: var(--header-offset); /* Below header and mobile buttons */
    height: calc(100% - var(--header-offset));
  }

  .footer-container {
    grid-template-columns: 1fr; /* Single column layout for footer */
    gap: 20px;
    padding: 0 15px;
  }

  .footer-col {
    margin-bottom: 0;
  }

  .footer-top-section,
  .footer-mid-section {
    padding: 20px 0;
  }

  .copyright {
    padding: 0 15px;
  }

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