/* Base styles for the document body to ensure fixed header doesn't overlap content */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #0a0a0a; /* Dark background for the whole page */
  color: #f0f0f0;
  line-height: 1.6;
  padding-top: 120px; /* Adjust based on header + mobile buttons height */
}

/* CSS Variables for dynamic neon colors - based on site color scheme */
:root {
  --primary-color: #FFD700; /* Gold/Yellow */
  --secondary-color: #1A1A2E; /* Dark Blue/Purple */
  --neon-primary: var(--primary-color);
  --neon-secondary: #00FFFF; /* Cyan for contrast */
  --neon-accent: #FF00FF; /* Magenta for accent */
}

/* --- Keyframe Animations for Dynamic Glows --- */

/* Theme colors dynamic animation (recommended for primary elements) */
@keyframes theme-colors {
  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(255, 215, 0, 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(0, 255, 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, 0, 255, 0.3);
  }
}

/* Rainbow border animation */
@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}

/* Alternate colors animation */
@keyframes alternate-colors {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
}

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

/* --- Header Styles (Desktop First) --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  min-height: 80px; /* Base height, content will adapt */
  display: flex; /* Use flex to arrange header-top and main-nav vertically */
  flex-direction: column;
}

/* Header Top (Logo and Buttons) - Neon style */
.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid; /* For dynamic border */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  padding: 15px 0;
  position: relative;
  z-index: 1010; /* Ensure header-top is above main-nav and overlay */
}

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

/* Logo */
.logo {
  font-family: 'Electrolize', sans-serif; /* Example font for cyberpunk feel */
  font-size: 2.2em;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glowing text */
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: block; /* Ensure logo is visible */
}

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

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
  background: linear-gradient(135deg, #16213e, #0f3460); /* Slightly different dark gradient */
  padding: 10px 0;
  border-bottom: 2px solid;
  animation: alternate-colors 3s ease-in-out infinite alternate; /* Dynamic border color */
  z-index: 1005; /* Above main-nav but below header-top */
}

/* Main Navigation (Menu Links) */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid; /* For dynamic border */
  border-bottom: 2px solid; /* For dynamic border */
  animation: rainbow-border 4s linear infinite; /* Dynamic rainbow border */
  padding: 10px 0;
  position: static; /* Default for desktop */
  display: flex; /* Default for desktop */
  width: 100%;
  z-index: 990; /* Below header-top */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px;
}

.nav-link {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 1.05em;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover {
  color: var(--neon-primary);
  text-shadow: 0 0 5px var(--neon-primary);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1020; /* Ensure it's above everything */
  margin-right: 15px;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glowing border for hamburger */
  border-radius: 3px;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px var(--neon-primary); /* Glow for lines */
}

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

/* Button styles - Neon, dynamic colors */
.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; /* For dynamic border */
  animation: theme-colors 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: bold;
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Speed up color change on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    0 0 45px var(--neon-primary),
    inset 0 0 15px rgba(255, 255, 255, 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 active menu */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* --- Footer Styles --- */
.site-footer {
  background-color: #1A1A2E; /* Dark blue/purple from secondary color */
  color: #f0f0f0;
  padding: 40px 20px 20px;
  font-size: 0.9em;
  text-align: center;
}

.footer-main-content {
  max-width: 1200px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
  gap: 30px;
  text-align: left;
}

.footer-col h4 {
  color: var(--neon-primary); /* Primary neon color for headings */
  font-size: 1.2em;
  margin-bottom: 15px;
  position: relative;
}

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

.footer-logo {
  font-family: 'Electrolize', sans-serif;
  font-size: 1.8em;
  font-weight: bold;
  color: var(--neon-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full display */
  overflow-wrap: break-word;
  /* No text-overflow: ellipsis or -webkit-line-clamp */
}

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

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

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

.footer-links a:hover {
  color: var(--neon-primary);
}

.payment-icons,
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Consistent gap for icons */
  width: 100%;
  margin-top: 10px;
}

.payment-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: drop-shadow(0 0 3px rgba(0, 255, 255, 0.5)); /* Subtle glow for icons */
}

.social-media-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.social-media-section h4 {
  margin-left: 20px; /* Align with container padding */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #aaaaaa;
}

/* --- Responsive Styles (Mobile) --- */
@media (max-width: 768px) {
  /* Adjust body padding for mobile header + mobile buttons */
  body {
    padding-top: 160px; /* Example: 80px (header-top) + 60px (mobile-nav-buttons) + 20px (extra space) */
  }

  /* Header Top */
  .header-top {
    padding: 10px 0;
  }

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

  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    text-align: center; /* Center the logo */
    font-size: 1.8em;
    margin-left: -40px; /* Counteract hamburger width for better centering */
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it first */
    margin-right: 0;
  }

  /* Desktop Buttons (hide on mobile) */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Buttons (show on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Force display on mobile */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    box-sizing: border-box;
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with 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 Navigation (Mobile Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile, shown via JS */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: 0; /* Will be adjusted by JS */
    left: 0;
    width: 70%; /* Side menu width */
    height: 100%;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-in-out;
    background: linear-gradient(180deg, #1a1a2e, #0f3460); /* Darker background for side menu */
    padding-top: 80px; /* Space for fixed header-top */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Ensure menu is above overlay */
    border: none; /* Remove border for side menu */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
    max-width: none; /* Remove max-width for mobile container */
    width: 100%; /* Ensure container fills parent */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1em;
    white-space: normal; /* Allow menu items to wrap if needed */
  }

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

  /* Footer Layout */
  .footer-main-content {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    text-align: center;
  }

  .footer-col h4::after {
    margin: 5px auto 0; /* Center underline for mobile */
  }

  .social-media-section h4 {
    margin-left: 0; /* Center for mobile */
    text-align: center;
  }

  .social-media-icons {
    justify-content: center; /* Center social icons */
  }
}

/* Base style for no-scroll on body */
body.no-scroll {
  overflow: hidden;
}
/* Payment Methods 图标容器样式 */
.payment-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.payment-icons img,
.payment-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Game Providers 图标容器样式 */
.game-providers-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.game-providers-icons img,
.game-provider-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Social Media 图标容器样式 */
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.social-media-icons img,
.social-media-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}
