/* Basic Reset & Body Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #f5f5f5; /* For overall text on dark background */
  background-color: #0a0a0a; /* Dark background */
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Custom CSS Variables */
:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;

  /* Neon Colors - based on primary/secondary, with vibrant accents */
  --neon-primary: #00FFFF; /* Cyan/Aqua for primary glow */
  --neon-secondary: #FF00FF; /* Magenta for secondary glow */
  --neon-accent: #FFFF00; /* Yellow for accent glow */
  --neon-dark-bg: #0a0a0a; /* Dark background */
  --neon-dark-bg-light: #1a1a2e; /* Slightly lighter dark background */

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

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

/* --- Marquee Section --- */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-light), #16213e);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors-marquee 4s ease-in-out infinite; /* Dynamic border color */
  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(0, 255, 255, 0.1);
  z-index: 1001;
  height: 45px; /* Explicit height for offset calculation */
  display: flex; /* For vertical centering of content */
  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; /* Adjust padding for content */
}

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

@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;
  padding-right: 30px; /* Ensure gap before loop starts again */
}

.marquee-text {
  font-size: 15px; /* Slightly smaller font for marquee */
  font-weight: 600;
  color: #ffffff;
  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: #ffffff;
}

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

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

/* --- Header Section --- */
.site-header {
  position: fixed;
  top: 45px; /* Directly below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 110px; /* Desktop: header-top (60) + main-nav (50) */
}

.header-top {
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-light), #16213e);
  border-bottom: 2px solid;
  animation: theme-colors-header-top 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-accent),
    0 0 20px var(--neon-accent),
    0 0 30px var(--neon-accent),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  height: 60px; /* Explicit height for offset calculation */
  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;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  transition: color 0.3s ease;
  flex-shrink: 0;
  /* LOGO MUST NOT HAVE NEON EFFECTS */
  /* NO text-shadow, box-shadow, filter: drop-shadow, or neon animations */
}

.logo:hover {
  color: var(--primary-color); /* Simple hover effect */
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

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

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(0, 255, 255, 0.4);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors-main-nav 4s ease-in-out infinite; /* Dynamic border color */
  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, 0, 255, 0.1);
  width: 100%;
  display: flex; /* Desktop default: flex */
  align-items: center;
  height: 50px; /* Explicit height for offset calculation */
}

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

.nav-link {
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  padding: 10px 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(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.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 and overlay */
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  margin-bottom: 5px;
  position: relative;
  border-radius: 3px;
  z-index: 1;
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

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

/* Hamburger menu active state */
.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);
}

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

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

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

/* --- Footer Section --- */
.site-footer {
  background-color: #1a1a2e; /* Dark background, no neon */
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 30px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
  padding-right: 15px;
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full text visibility */
  overflow-wrap: break-word;
}

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

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

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

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

.footer-nav 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 gap for tighter spacing */
  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 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section, .social-media-section {
  margin-bottom: 30px;
}

.game-providers-section:last-child, .social-media-section:last-child {
  margin-bottom: 0;
}


.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 30px 0;
  text-align: center;
  color: #888;
}

/* Dynamic Neon Glow Animations */
@keyframes theme-colors-marquee {
  0%, 100% {
    border-color: var(--neon-primary);
    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(0, 255, 255, 0.1);
  }
  33% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(255, 255, 0, 0.1);
  }
  66% {
    border-color: var(--neon-secondary);
    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, 0, 255, 0.1);
  }
}

@keyframes theme-colors-header-top {
  0%, 100% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(255, 255, 0, 0.1);
  }
  33% {
    border-color: var(--neon-primary);
    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(0, 255, 255, 0.1);
  }
  66% {
    border-color: var(--neon-secondary);
    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, 0, 255, 0.1);
  }
}

@keyframes theme-colors-main-nav {
  0%, 100% {
    border-color: var(--neon-secondary);
    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, 0, 255, 0.1);
  }
  33% {
    border-color: var(--neon-primary);
    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(0, 255, 255, 0.1);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(255, 255, 0, 0.1);
  }
}

@keyframes theme-colors-button {
  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(0, 255, 255, 0.3);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      inset 0 0 10px rgba(255, 255, 0, 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: #ffffff;
  }
  50% {
    text-shadow: 
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: #ffffff;
  }
}


/* --- Mobile 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 adjustments */
  .marquee-section {
    height: 40px; /* Smaller height for mobile */
  }
  .marquee-container {
    padding: 0 10px;
    gap: 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 {
    animation-duration: 20s; /* Faster scroll on mobile */
    gap: 20px;
    padding-right: 20px;
  }

  /* Header mobile adjustments */
  .site-header {
    top: 40px; /* Below smaller mobile marquee */
    min-height: 90px; /* HeaderTop(50) + MobileNavButtons(40) */
  }
  
  .header-top {
    height: 50px; /* Smaller header top for mobile */
    padding: 0; /* No padding on header-top itself */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for container */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative;
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 0; /* Ensure it's on the left */
  }

  .logo {
    order: 1; /* Center logo */
    flex: 1 !important; /* Take available space to center */
    display: flex !important; /* Force flex for centering */
    justify-content: center !important; /* Center logo text/image */
    align-items: center !important;
    font-size: 22px; /* Smaller logo font */
    max-width: calc(100% - 70px); /* Adjust max-width to not overlap hamburger */
  }

  .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: 0 15px 10px; /* Padding for the button row */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    height: 40px; /* Explicit height for offset calculation */
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, evenly spaced */
    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;
    line-height: 1.2;
  }

  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    background-color: #1a1a2e; /* Solid background for menu */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors-main-nav 4s ease-in-out infinite;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    align-items: flex-start;
    width: 100%;
    max-width: none; /* No max-width on mobile container */
  }

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

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

  /* Footer mobile adjustments */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    padding: 0 20px 30px;
    gap: 20px;
  }

  .footer-col {
    padding-right: 0;
    margin-bottom: 10px;
  }
  .footer-middle-sections {
    padding: 30px 20px;
  }
  .footer-bottom {
    padding: 15px 20px 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
