:root {
  --header-offset: 120px; /* 桌面端：页头+按钮区总高度不超过此值 */
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-color: #ffffff;
  --dark-bg: #0a0a0a;
  --darker-bg: #1a1a2e;
  --darkest-bg: #16213e;

  /* Neon Glow Colors - Vibrant versions for dynamic effects */
  --neon-primary-light: #00FFFF; /* Cyan */
  --neon-secondary-light: #FFD700; /* Gold */
  --neon-accent-light: #FF00FF; /* Magenta */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 141px; /* 移动端：含跑马灯/页头/按钮区总高度不超过此值 */
  }
}

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

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

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg), var(--darkest-bg));
  color: var(--text-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary-light),
    0 0 20px var(--neon-primary-light),
    0 0 30px var(--neon-primary-light),
    inset 0 0 20px rgba(0, 255, 255, 0.1); /* Cyan glow inset */
  z-index: 1001;
  line-height: 1; /* Ensure minimal height */
  min-height: 40px; /* Base 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: 5px 20px; /* Reduced padding */
}

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

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

@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: 15px; /* Smaller text */
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1; /* Compact line height */
}

.marquee-text:hover {
  animation-duration: 1.5s; /* Faster glow on hover */
  transform: scale(1.03);
}

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

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

/* Site Header Styles */
.site-header {
  position: fixed;
  top: 40px; /* Adjusted based on marquee min-height */
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 70px; /* Base height for header-top */
  background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg)); /* Darker gradient for header */
}

.site-header .header-top {
  background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg), var(--darkest-bg));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary-light),
    0 0 20px var(--neon-primary-light),
    0 0 30px var(--neon-primary-light),
    inset 0 0 20px rgba(0, 255, 255, 0.1); /* Cyan glow inset */
  padding: 10px 0;
}

.site-header .header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.site-header .logo {
  color: var(--text-color); /* Regular text color for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 20px; /* Space between logo and buttons/menu */
}
.site-header .logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

.site-header .hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px;
  box-sizing: content-box;
  z-index: 1002; /* Above logo */
}

.site-header .hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-secondary-light); /* Gold neon */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  box-shadow: 
    0 0 5px var(--neon-secondary-light),
    0 0 10px var(--neon-secondary-light);
}

.site-header .hamburger-menu.active span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.site-header .hamburger-menu.active span:nth-child(2) { opacity: 0; }
.site-header .hamburger-menu.active span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

.site-header .desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 15px;
  margin-left: auto;
  flex-shrink: 0;
}

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

.site-header .btn {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--darker-bg)); /* Use brand colors for button base */
  padding: 12px 25px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  text-shadow: 
    0 0 5px var(--text-color),
    0 0 10px var(--neon-primary-light);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-primary-light),
    0 0 30px var(--neon-primary-light),
    inset 0 0 15px rgba(0, 255, 255, 0.5); /* Enhanced glow on hover */
}

.site-header .main-nav {
  background: linear-gradient(135deg, var(--darker-bg), var(--darkest-bg), var(--primary-color)); /* Distinct background for main nav */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 5s linear infinite reverse; /* Different animation for main nav */
  box-shadow: 
    0 0 8px var(--neon-secondary-light),
    0 0 16px var(--neon-secondary-light),
    inset 0 0 15px rgba(255, 215, 0, 0.1); /* Gold glow inset */
  width: 100%;
  display: flex; /* Visible on desktop */
  padding: 10px 0;
  min-height: 50px;
}

.site-header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping if many links */
}

.site-header .nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent wrapping for individual links */
}

.site-header .nav-link:hover {
  color: var(--neon-primary-light);
  text-shadow: 0 0 8px var(--neon-primary-light);
}

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Use primary dark blue for footer */
  color: var(--text-color);
  padding: 40px 0 20px 0;
  font-size: 14px;
}

.site-footer .footer-top-section,
.site-footer .footer-middle-section,
.site-footer .footer-bottom-section {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}
.site-footer .footer-bottom-section {
  border-bottom: none;
}

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

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

.site-footer .footer-col h4 {
  font-size: 18px;
  color: var(--secondary-color); /* Gold for footer headings */
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

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

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

.site-footer .footer-col ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.site-footer .payment-methods .payment-icons,
.site-footer .game-providers-section .game-providers-icons,
.site-footer .social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.site-footer .payment-methods .payment-icons img,
.site-footer .game-providers-section .game-providers-icons img,
.site-footer .social-media-section .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(10%) brightness(1.2); /* Slightly enhance visibility on dark background */
}
.site-footer .payment-methods .payment-icons {
  gap: 5px; /* Smaller gap for payment icons */
}

.site-footer .footer-middle-section .footer-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.site-footer .footer-bottom-section .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 20px;
}

.site-footer .footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.site-footer .footer-legal-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.site-footer .footer-legal-links a:hover {
  color: var(--secondary-color);
}

.site-footer .copyright {
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}


/* Responsive Styles */
@media (max-width: 768px) {
  /* Mobile Overflow Protection */
  .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 {
    min-height: 35px; /* Smaller height for mobile marquee */
    top: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 2px 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header Mobile */
  .site-header {
    top: 35px; /* Adjust top based on mobile marquee height */
    min-height: auto;
  }

  .site-header .header-top {
    padding: 8px 0;
  }

  .site-header .header-container {
    padding: 0 15px;
    justify-content: space-between;
    flex-wrap: nowrap;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .site-header .hamburger-menu {
    display: flex; /* Visible on mobile */
    order: 0; /* Leftmost */
    margin-right: 15px;
  }

  .site-header .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding: 0; /* Remove desktop padding */
  }
  .site-header .logo img {
    max-height: 40px; /* Smaller logo on mobile */
  }

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

  .site-header .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(90deg, var(--darker-bg), var(--darkest-bg)); /* Separate background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 5px rgba(0, 255, 255, 0.1);
  }
  .site-header .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  .site-header .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below all fixed header components */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(180deg, var(--darkest-bg), var(--darker-bg)); /* Sidebar background */
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    border: none; /* Remove border for sidebar */
  }
  .site-header .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide in */
  }

  .site-header .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto; /* Scrollable if many links */
    width: 100%;
    max-width: none;
  }

  .site-header .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    text-align: left;
  }
  .site-header .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer Mobile */
  .site-footer .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .site-footer .footer-col {
    text-align: center;
  }
  .site-footer .footer-col h4,
  .site-footer .footer-logo {
    text-align: center;
  }
  .site-footer .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .site-footer .footer-col ul li {
    margin-bottom: 0;
  }
  .site-footer .payment-methods .payment-icons,
  .site-footer .game-providers-section .game-providers-icons,
  .site-footer .social-media-section .social-media-icons {
    justify-content: center;
  }
  .site-footer .footer-legal-links {
    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;
  }
}
