:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF; /* 白色 */
  --accent-color-login: #EA7C07; /* 登录按钮色 */
  --dark-background: #0a0a0a;
  --dark-secondary-bg: #1a1a2e;
  --dark-tertiary-bg: #16213e;

  /* Neon colors derived from primary/secondary/accent */
  --neon-primary: var(--primary-color); /* 主色调作为霓虹主色 */
  --neon-secondary: #00ffff; /* 辅助霓虹色 */
  --neon-accent: #ff00ff; /* 强调霓虹色 */

  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px; /* Approx (padding + content) */
  --main-nav-height-desktop: 50px; /* Approx (padding + content) */
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* 45+60+50 = 155px */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 35px;
    --header-top-height-mobile: 60px; /* Approx (padding + content) */
    --mobile-nav-buttons-height: 50px; /* Approx (padding + content) */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* 35+60+50 = 145px */
  }
}

/* 霓虹发光动画 */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent);
  }
}

@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-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: var(--secondary-color);
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    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%);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #e0e0e0;
  background-color: var(--dark-background);
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent body overflow-x */
}

a {
  text-decoration: none;
  color: inherit;
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop); /* Fixed height for calculation */
  background: linear-gradient(135deg, var(--dark-background), var(--dark-secondary-bg), var(--dark-tertiary-bg));
  color: var(--secondary-color);
  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(255, 255, 255, 0.1);
  z-index: 1001;
  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: 0px 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));
}

.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 content from disappearing abruptly */
}

.marquee-text {
  font-size: 16px;
  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: 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);
}

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Background handled by sub-sections */
}

.site-header .header-top {
  background: linear-gradient(135deg, var(--dark-background), var(--dark-secondary-bg), var(--dark-tertiary-bg));
  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(255, 255, 255, 0.1);
  padding: 10px 0;
  min-height: calc(var(--header-top-height-desktop) - 20px); /* Adjust for padding, keep content height */
  display: flex;
  align-items: center;
}

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

.site-header .main-nav {
  background: linear-gradient(135deg, var(--dark-secondary-bg), var(--dark-tertiary-bg), #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation for contrast */
  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(255, 255, 255, 0.1);
  padding: 10px 0;
  min-height: calc(var(--main-nav-height-desktop) - 20px); /* Adjust for padding, keep content height */
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
}

.site-header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap; /* Allow nav items to wrap if too many */
}

/* LOGO styles - NO NEON */
.site-header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* White for contrast */
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.site-header .logo:hover {
  color: var(--primary-color);
}

.site-header .logo img {
  display: block;
  max-height: 40px;
  height: auto;
  width: auto;
}

/* Nav Links - NO NEON */
.site-header .nav-link {
  padding: 8px 15px;
  color: var(--secondary-color);
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.site-header .nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Desktop Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 20px;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 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;
  white-space: nowrap;
}

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

/* Mobile specific elements */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1002; /* Above logo */
  position: relative;
  padding: 5px;
  transition: all 0.3s ease;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
  text-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

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

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Section */
.site-footer {
  background-color: var(--dark-secondary-bg);
  color: #e0e0e0;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.site-footer .footer-col h4 {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  position: relative;
}

.site-footer .footer-col h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 5px;
}

.site-footer .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: block;
}

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

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

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

.site-footer .footer-nav a {
  color: #b0b0b0;
  transition: color 0.3s ease;
}

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

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

.site-footer .payment-icons {
  gap: 5px; /* Slightly tighter for payment methods */
}

.site-footer .payment-icons img,
.site-footer .game-providers-icons img,
.site-footer .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

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

.site-footer .game-providers-section h4,
.site-footer .social-media-section h4 {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  position: relative;
}

.site-footer .game-providers-section h4::after,
.site-footer .social-media-section h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 5px;
}

.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .copyright {
  color: #b0b0b0;
  margin: 0;
  flex-shrink: 0;
}

.site-footer .footer-action-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer .footer-action-nav a {
  color: var(--accent-color-login); /* Use login accent color */
  font-weight: bold;
  transition: color 0.3s ease;
}

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

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

  /* Header */
  .site-header {
    top: var(--marquee-height-mobile); /* Marquee height for mobile */
  }
  .site-header .header-top {
    padding: 10px 0;
    min-height: calc(var(--header-top-height-mobile) - 20px);
  }
  .site-header .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    justify-content: space-between; /* Hamburger left, Logo center, space right */
    position: relative; /* For absolute logo centering if needed */
  }

  /* Mobile Logo Centering (Method 1: Flexbox + !important) */
  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0; /* Remove padding that might affect centering */
    text-align: center; /* Fallback for text logo */
  }
  .site-header .logo img {
    max-height: 35px; /* Adjust logo height for mobile */
  }
  
  /* Hamburger Menu */
  .hamburger-menu {
    display: flex; /* Show on mobile */
    order: -1; /* Place at the beginning */
    margin-right: auto; /* Push logo to center */
    z-index: 1002;
  }

  /* Desktop Buttons - Hide on Mobile */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Buttons - Always Visible Below Header Top */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Add padding to container */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, var(--dark-secondary-bg), var(--dark-tertiary-bg));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      inset 0 0 10px rgba(255, 255, 255, 0.1);
    z-index: 998; /* Below header-top and main-nav */
    min-height: calc(var(--mobile-nav-buttons-height) - 20px);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 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 - Hidden by default on mobile, then fixed and column */
  .site-header .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Calculate based on mobile specific heights */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background: linear-gradient(135deg, var(--dark-background), var(--dark-secondary-bg));
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay, below hamburger */
    overflow-y: auto; /* Allow scrolling if menu content is long */
    border: none; /* Remove border from desktop nav */
    box-shadow: none; /* Remove box-shadow from desktop nav */
    animation: none; /* Remove animation from desktop nav */
  }

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

  .site-header .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    align-items: flex-start; /* Align links to left */
  }

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

  /* Footer */
  .site-footer .footer-grid {
    grid-template-columns: 1fr; /* Single column layout */
  }
  .site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  .site-footer .footer-action-nav {
    justify-content: center;
  }
  .site-footer .copyright {
    order: 2; /* Put copyright below action nav */
  }

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

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