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

  /* Neon colors derived from primary/secondary, with vibrant accents */
  --neon-primary-base: #26A9E0; /* Light Blue */
  --neon-secondary-base: #FFFFFF; /* White */
  --neon-accent-base: #EA7C07; /* Orange */

  /* Dynamic neon colors for animations */
  --neon-glow-color-1: #00FFFF; /* Cyan */
  --neon-glow-color-2: #FF00FF; /* Magenta */
  --neon-glow-color-3: #FFFF00; /* Yellow */
  --neon-glow-color-4: #FF1493; /* Deep Pink */
  --neon-glow-color-5: #00FF00; /* Lime Green */

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

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

/* Base styles and dynamic neon animations */
@keyframes rainbow-border {
  0% { border-color: var(--neon-glow-color-1); box-shadow: 0 0 10px var(--neon-glow-color-1), 0 0 20px var(--neon-glow-color-1); }
  25% { border-color: var(--neon-glow-color-2); box-shadow: 0 0 10px var(--neon-glow-color-2), 0 0 20px var(--neon-glow-color-2); }
  50% { border-color: var(--neon-glow-color-3); box-shadow: 0 0 10px var(--neon-glow-color-3), 0 0 20px var(--neon-glow-color-3); }
  75% { border-color: var(--neon-glow-color-4); box-shadow: 0 0 10px var(--neon-glow-color-4), 0 0 20px var(--neon-glow-color-4); }
  100% { border-color: var(--neon-glow-color-1); box-shadow: 0 0 10px var(--neon-glow-color-1), 0 0 20px var(--neon-glow-color-1); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-glow-color-1);
    box-shadow: 0 0 10px var(--neon-glow-color-1), 0 0 20px var(--neon-glow-color-1), inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  33% {
    border-color: var(--neon-glow-color-2);
    box-shadow: 0 0 10px var(--neon-glow-color-2), 0 0 20px var(--neon-glow-color-2), inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-glow-color-3);
    box-shadow: 0 0 10px var(--neon-glow-color-3), 0 0 20px var(--neon-glow-color-3), inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

@keyframes text-glow-flow {
  0% { text-shadow: 0 0 5px var(--neon-glow-color-1), 0 0 10px var(--neon-glow-color-1), 0 0 15px var(--neon-glow-color-1); color: var(--secondary-color); }
  50% { text-shadow: 0 0 5px var(--neon-glow-color-2), 0 0 10px var(--neon-glow-color-2), 0 0 15px var(--neon-glow-color-2); color: var(--secondary-color); }
  100% { text-shadow: 0 0 5px var(--neon-glow-color-3), 0 0 10px var(--neon-glow-color-3), 0 0 15px var(--neon-glow-color-3); color: var(--secondary-color); }
}

@keyframes marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

/* Global body styling for fixed header offset */
body {
  padding-top: var(--header-offset);
  overflow-x: hidden; /* For mobile content overflow */
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px; /* Desktop height */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  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-glow-color-1), 0 0 20px var(--neon-glow-color-1), 0 0 30px var(--neon-glow-color-1), inset 0 0 20px rgba(0, 255, 255, 0.1);
  z-index: 1001; /* Ensure on top of header */
  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;
}

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

.marquee-icon-emoji {
  font-size: 20px; /* Adjusted for better fit */
  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-glow-color-1), 0 0 10px var(--neon-glow-color-1), 0 0 15px var(--neon-glow-color-1);
  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;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-shadow: 0 0 5px var(--neon-glow-color-1), 0 0 10px var(--neon-glow-color-1), 0 0 15px var(--neon-glow-color-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-glow-color-1), 0 0 20px var(--neon-glow-color-1), 0 0 30px var(--neon-glow-color-1), 0 0 40px var(--neon-glow-color-1);
  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-glow-color-1), 0 0 6px var(--neon-glow-color-1);
}

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

/* Header Section Styles (Desktop First) */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--secondary-color);
}

.header-top {
  height: 60px; /* Desktop height */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 0 0 10px var(--neon-glow-color-3), 0 0 20px var(--neon-glow-color-3), inset 0 0 20px rgba(255, 255, 0, 0.1);
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: var(--secondary-color); /* No neon effects on logo */
  line-height: 1;
  display: block;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary-base), var(--neon-accent-base));
  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 */
  text-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-glow-color-1);
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
}

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

.main-nav {
  height: 50px; /* Desktop height */
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Darker background for contrast */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite; /* Different dynamic border color */
  box-shadow: 0 0 10px var(--neon-glow-color-4), 0 0 20px var(--neon-glow-color-4), inset 0 0 20px rgba(255, 20, 147, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--black-color);
  color: var(--secondary-color);
  padding: 40px 0 20px 0;
  font-size: 14px;
}

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

.footer-columns {
  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 {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

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

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

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

.footer-nav-list li {
  margin-bottom: 8px;
}

.footer-nav-list a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.payment-icons,
.game-providers-icons,
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Adjusted to 8px for all, as per prompt for game/social, apply to payment too for consistency */
  width: 100%;
}

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  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 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.copyright {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.footer-bottom-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-bottom-nav a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* 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;
  }

  /* Marquee Mobile */
  .marquee-section {
    height: 25px; /* Mobile height */
    padding: 0px 0px;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 12px;
  }
  .marquee-separator {
    font-size: 12px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header Mobile */
  .site-header {
    top: 25px; /* Marquee mobile height */
  }

  .header-top {
    height: 50px; /* Mobile height */
    padding: 0 15px;
  }
  .header-container {
    padding: 0 15px;
    position: relative;
    min-height: 50px;
  }

  .hamburger-menu {
    display: flex;
    position: relative;
    z-index: 1002; /* Above logo, below overlay */
    width: 30px;
    height: 20px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    background: none;
    border: none;
    flex-shrink: 0;
    animation: theme-colors 4s ease-in-out infinite; /* Neon glow for hamburger */
    box-shadow: 0 0 5px var(--neon-glow-color-1), 0 0 10px var(--neon-glow-color-1);
    border-radius: 3px;
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    text-align: center;
    max-width: calc(100% - 70px); /* Account for hamburger width + some margin */
  }
  .logo img {
    max-height: 35px !important; /* Adjusted for mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e); /* Dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    height: 40px; /* Mobile height */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% width minus half the gap */
    padding: 8px 12px; /* Reduced padding for mobile */
    font-size: 13px; /* Reduced font size for mobile */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    border-right: 2px solid;
    animation: rainbow-border 6s linear infinite;
    box-shadow: 0 0 10px var(--neon-glow-color-4), 0 0 20px var(--neon-glow-color-4);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000; /* Above overlay */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0 15px;
    align-items: flex-start;
    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.1);
    font-size: 16px;
  }
  .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 */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  /* Footer Mobile */
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h4, .footer-logo {
    text-align: center;
  }
  .footer-nav-list {
    text-align: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-nav {
    flex-direction: column;
    gap: 8px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
