html {
  scroll-behavior: smooth;
  font-family: Arial, sans-serif; /* Fallback font */
}

body {
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  color: #f0f0f0; /* Default text color for dark background */
  background-color: #0a0a0a; /* Default dark background */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

:root {
  --primary-color: #1A202C;
  --secondary-color: #FFD700;

  /* Neon colors for dynamic effects - intelligently chosen based on site colors */
  --neon-primary: #FFD700; /* Gold */
  --neon-secondary: #FF6600; /* Orange */
  --neon-accent: #FF00FF; /* Magenta */

  /* Header offset values */
  --header-offset: 155px; /* Desktop: Marquee (45px) + Header Top (70px) + Main Nav (40px) */
}

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

/* Animations for dynamic neon colors and effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary, #FFD700);
    box-shadow: 
      0 0 10px var(--neon-primary, #FFD700),
      0 0 20px var(--neon-primary, #FFD700);
  }
  33% {
    border-color: var(--neon-secondary, #FF6600);
    box-shadow: 
      0 0 10px var(--neon-secondary, #FF6600),
      0 0 20px var(--neon-secondary, #FF6600);
  }
  66% {
    border-color: var(--neon-accent, #FF00FF);
    box-shadow: 
      0 0 10px var(--neon-accent, #FF00FF),
      0 0 20px var(--neon-accent, #FF00FF);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-primary, #FFD700),
      0 0 10px var(--neon-primary, #FFD700),
      0 0 15px var(--neon-primary, #FFD700);
    color: #ffffff;
  }
  50% {
    text-shadow: 
      0 0 5px var(--neon-secondary, #FF6600),
      0 0 10px var(--neon-secondary, #FF6600),
      0 0 15px var(--neon-secondary, #FF6600);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-accent, #FF00FF),
      0 0 10px var(--neon-accent, #FF00FF),
      0 0 15px var(--neon-accent, #FF00FF);
    color: #ffffff;
  }
}

@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 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; /* For theme-colors animation */
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary, #FFD700),
    0 0 20px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  z-index: 1001;
  padding: 10px 0; /* Vertical padding, horizontal handled by container */
  min-height: 45px; /* Ensure minimum height */
  box-sizing: border-box;
}

.marquee-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px; /* Horizontal padding for desktop */
}

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

.marquee-icon-emoji {
  font-size: 20px;
  display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate;
  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;
  padding-right: 30px; /* To prevent abrupt cut-off at the end */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: all 0.3s ease;
}

.marquee-text:hover {
  text-shadow: 
    0 0 10px var(--neon-primary, #FFD700),
    0 0 20px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    0 0 40px var(--neon-primary, #FFD700);
  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, #FFD700),
    0 0 6px var(--neon-primary, #FFD700);
}

/* Site Header Styles */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Background handled by sections */
  box-sizing: border-box;
}

.header-top {
  background: linear-gradient(135deg, #1A202C, #0f1318); /* Dark background for top */
  border-bottom: 2px solid; /* For theme-colors animation */
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary, #FFD700),
    0 0 20px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  padding-top: 15px;
  padding-bottom: 15px;
  min-height: 70px; /* Estimated height */
  box-sizing: border-box;
  display: flex; /* Ensure flex for hamburger/logo/buttons */
  align-items: center;
}

.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 {
  color: #FFFFFF; /* Regular white for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block; /* Ensure visibility */
  flex-shrink: 0;
  padding: 0; /* Remove any padding that might shift it */
  margin: 0; /* Remove any margin that might shift it */
}

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

.desktop-nav-buttons {
  display: flex; /* Desktop default: show */
  gap: 10px;
  margin-left: auto; /* Push to right */
}

.mobile-nav-buttons {
  display: none; /* Desktop default: hide */
}

.main-nav {
  background: linear-gradient(135deg, #0f1318, #1A202C); /* Darker background for nav */
  border-top: 2px solid; /* For theme-colors animation */
  border-bottom: 2px solid; /* For theme-colors animation */
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation for contrast */
  box-shadow: 
    0 0 10px var(--neon-secondary, #FF6600),
    0 0 20px var(--neon-secondary, #FF6600),
    0 0 30px var(--neon-secondary, #FF6600),
    inset 0 0 20px rgba(255, 102, 0, 0.1);
  width: 100%;
  display: flex; /* Desktop default: show */
  min-height: 40px; /* Estimated height */
  box-sizing: border-box;
}

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

.nav-link {
  color: #f0f0f0; /* Regular text color for nav links */
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--secondary-color, #FFD700); /* Highlight color */
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 3px;
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Desktop default: hide */
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  z-index: 1002; /* Above logo on mobile */
  padding: 0;
  margin-right: 15px; /* Space between hamburger and logo */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #f0f0f0;
  margin-bottom: 5px;
  position: relative;
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  /* Neon glow for hamburger lines */
  box-shadow: 
    0 0 5px var(--neon-primary, #FFD700),
    0 0 10px var(--neon-primary, #FFD700);
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary, #FFD700), var(--neon-secondary, #FF6600));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid; /* For theme-colors animation */
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary, #FFD700);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    0 0 45px var(--neon-primary, #FFD700),
    inset 0 0 15px rgba(255, 215, 0, 0.2);
}

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

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

/* Body no scroll when menu is open */
body.no-scroll {
  overflow: hidden;
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color, #1A202C);
  color: #f0f0f0;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-top-section .footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.footer-links li {
  margin-bottom: 10px;
}

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

.footer-links a:hover {
  color: var(--secondary-color, #FFD700);
}

.payment-methods .payment-icons,
.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; /* Consistent gap */
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 50px; /* Consistent icon height */
  height: auto;
  width: auto;
  object-fit: contain;
}

.game-providers-section,
.social-media-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  color: #b0b0b0;
}

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

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

  /* Header Mobile */
  .site-header {
    top: 30px; /* Mobile marquee height */
  }

  .header-top {
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 50px; /* Mobile estimated height */
  }

  .header-container {
    padding: 0 15px; /* Mobile horizontal padding */
    justify-content: flex-start; /* Adjust for hamburger */
    position: relative; /* For absolute logo positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important; /* For centering logo */
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
    max-width: calc(100% - 60px); /* Account for hamburger width */
    margin: 0 auto; /* Ensure logo is centered when flex item */
  }

  .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 on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button bar */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: linear-gradient(135deg, #1A202C, #0f1318); /* Match header-top background */
    border-bottom: 2px solid; /* For theme-colors animation */
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-primary, #FFD700),
      0 0 15px var(--neon-primary, #FFD700),
      inset 0 0 10px rgba(255, 215, 0, 0.1);
    min-height: 40px; /* Estimated height */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, 10px gap */
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header components */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column; /* Vertical menu */
    background: linear-gradient(180deg, #1A202C, #0f1318); /* Dark background for sidebar */
    border-right: 2px solid; /* For theme-colors animation */
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 
      0 0 10px var(--neon-secondary, #FF6600),
      0 0 20px var(--neon-secondary, #FF6600),
      inset 0 0 20px rgba(255, 102, 0, 0.1);
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Ensure it's above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links */
    align-items: flex-start; /* Align links to left */
    padding: 20px 15px; /* Adjust padding for mobile menu */
    width: 100%;
    max-width: none; /* Remove max-width for mobile container */
  }

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

  .nav-link:last-child {
    border-bottom: none;
  }

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

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
