/* General Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #000000; /* Dark background for the whole page to complement neon */
  color: #ffffff;
  padding-top: var(--header-offset); /* Set by JS/CSS based on header height */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

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

ul {
  list-style: none;
}

/* --- Dynamic Neon Color Variables & Animations (MUST BE PRESENT) --- */
:root {
  --primary-color: #26A9E0; /* Main site color: Light Blue */
  --secondary-color: #FFFFFF; /* Secondary site color: White */
  --login-color: #EA7C07; /* Login specific color: Orange */

  /* Neon colors derived from primary/secondary, with dynamic variations */
  --neon-primary: var(--primary-color); /* Initial neon primary */
  --neon-secondary: #ff00ff; /* A vibrant magenta */
  --neon-accent: #ffff00; /* A vibrant yellow */
  
  /* Header Offset Variables */
  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 50px;
    --mobile-nav-buttons-height: 45px;
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Mobile */
  }
}

/* Dynamic color animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--primary-color);
    box-shadow: 
      0 0 10px var(--primary-color),
      0 0 20px var(--primary-color),
      inset 0 0 10px rgba(38, 169, 224, 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(--primary-color),
      0 0 10px var(--primary-color),
      0 0 15px var(--primary-color);
    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);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(38, 169, 224, 0.1);
  z-index: 1001; /* Ensure on top of header */
  height: var(--marquee-height-desktop); /* Desktop 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: 0 20px;
}

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

.marquee-icon-emoji {
  font-size: 20px; /* Adjusted for desktop */
  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;
  height: var(--marquee-height-desktop); /* Ensure content height matches section height */
  line-height: var(--marquee-height-desktop); /* Center text vertically */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  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: 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);
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: transparent; /* Background handled by header-top and main-nav */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 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(38, 169, 224, 0.1);
  height: var(--header-top-height-desktop);
  display: flex;
  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;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  display: block; /* Ensure it's not inline for flexbox alignment */
  flex-shrink: 0; /* Prevent shrinking */
  order: 1; /* For mobile centering */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo/buttons on mobile */
  flex-shrink: 0;
  order: 0; /* For mobile positioning */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
  border: 1px solid transparent; /* For glow effect */
  padding: 5px;
  border-radius: 3px;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary); /* Neon glow for bars */
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 10px; }
.hamburger-menu .bar:nth-child(3) { top: 20px; }

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

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  order: 2; /* For mobile centering */
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  padding: 10px 20px;
  background: linear-gradient(135deg, #16213e, #0f3460); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  height: var(--mobile-nav-buttons-height); /* Mobile height */
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--login-color)); /* Primary to Login color gradient */
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--primary-color);
  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; /* Faster glow on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--primary-color),
    0 0 30px var(--primary-color),
    0 0 45px var(--primary-color),
    inset 0 0 15px rgba(38, 169, 224, 0.4);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Darker background than header-top */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border color, reversed 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, 0, 255, 0.1);
  width: 100%;
  display: flex; /* Visible on desktop */
  align-items: center;
  height: var(--main-nav-height-desktop);
}

.main-nav .nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular color, no neon glow */
  padding: 8px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color); /* Highlight with primary color on hover */
  text-shadow: 0 0 5px var(--primary-color);
}

.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 mobile menu */
}

/* Footer Section */
.site-footer {
  background-color: #1a1a1a; /* Dark gray background */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-top-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  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 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 600;
}

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

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

.footer-col ul {
  padding: 0;
}

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

.footer-col ul li a {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-col ul li 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; /* Slightly more gap for game/social */
  width: 100%;
}
.payment-methods .payment-icons {
    gap: 5px; /* Smaller gap for payment icons */
}

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

.game-providers-section, .social-media-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.social-media-section {
    border-bottom: none; /* No border for the last full-width section */
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Add a top border for the copyright section */
}

.footer-bottom p {
  color: #aaaaaa;
}

/* --- Mobile Specific Styles --- */
@media (max-width: 768px) {
  /* Prevent content overflow */
  .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: var(--marquee-height-mobile);
    padding: 0;
  }
  .marquee-container {
    padding: 0 10px;
    gap: 8px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: var(--marquee-height-mobile);
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 15px;
    animation-duration: 20s; /* Faster scroll for mobile */
    height: var(--marquee-height-mobile);
    line-height: var(--marquee-height-mobile);
  }

  /* Header Mobile */
  .site-header {
    top: var(--marquee-height-mobile); /* Position below mobile marquee */
  }

  .header-top {
    height: var(--header-top-height-mobile);
    padding: 0 15px; /* Mobile padding for header-top */
  }
  .header-container {
    padding: 0; /* Remove container padding as header-top already has it */
    width: 100%;
    max-width: none; /* Full width for mobile container */
    justify-content: center; /* Center logo */
    position: relative; /* For absolute logo centering if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    align-items: center;
    justify-content: center;
    position: absolute; /* Position relative to header-top */
    left: 15px; /* Align with header-top padding */
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
  }
  .hamburger-menu .bar {
    background-color: var(--primary-color); /* Use primary color for bars */
    box-shadow: 
      0 0 3px var(--primary-color),
      0 0 6px var(--primary-color);
  }
  .hamburger-menu .bar:nth-child(1) { top: 0; }
  .hamburger-menu .bar:nth-child(2) { top: 7px; }
  .hamburger-menu .bar:nth-child(3) { top: 14px; }
  .hamburger-menu.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger-menu.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding-right: 24px; /* To visually center it when hamburger is on left */
  }
  .logo img {
    max-height: 40px; /* Smaller logo on mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    padding: 10px 15px; /* Adjusted padding for mobile */
    height: var(--mobile-nav-buttons-height);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Position below header top and mobile buttons */
    left: 0;
    width: 70%; /* Slide-out menu width */
    height: calc(100% - var(--marquee-height-mobile) - var(--header-top-height-mobile) - var(--mobile-nav-buttons-height)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: #1a1a1a; /* Simpler dark background for slide-out menu */
    border: none; /* No neon border for slide-out menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    animation: none; /* Disable neon animation for slide-out menu */
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0;
    width: 100%;
    max-width: none; /* Full width for mobile container */
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-section {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
    padding-bottom: 20px;
  }
  .game-providers-section, .social-media-section {
    padding: 15px 0;
    margin-bottom: 20px;
  }
  .footer-bottom {
    padding-top: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
