:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --dark-bg-4: #0f3460;
  --text-color: #ffffff;
  --nav-link-color: #cccccc;
  --nav-link-hover-color: var(--secondary-color);
  --neon-primary: var(--secondary-color); /* Intelligent配色: Using auxiliary color as vibrant neon primary */
  --neon-secondary: #ff00ff; /* Contrasting neon color */
  --neon-accent: #00ffff; /* Another contrasting neon color */
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-color);
  background-color: var(--dark-bg-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: var(--text-color);
}

/* CSS Animations for Neon Effects */
/* Dynamic color animation - based on website theme colors */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow:
      0 0 8px var(--neon-primary),
      0 0 16px var(--neon-primary),
      inset 0 0 8px rgba(255, 255, 255, 0.1);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 8px var(--neon-secondary),
      0 0 16px var(--neon-secondary),
      inset 0 0 8px rgba(255, 255, 255, 0.1);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 8px var(--neon-accent),
      0 0 16px var(--neon-accent),
      inset 0 0 8px rgba(255, 255, 255, 0.1);
  }
}

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

/* Neon tube effect */
.neon-tube {
  border: 2px solid;
  animation: theme-colors 4s linear infinite;
}

/* Neon pulse effect */
@keyframes pulse-glow {
  0% {
    box-shadow:
      0 0 5px currentColor,
      0 0 10px currentColor;
  }
  50% {
    box-shadow:
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 45px currentColor;
  }
  100% {
    box-shadow:
      0 0 5px currentColor,
      0 0 10px currentColor;
  }
}

.neon-pulse {
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

/* Header Styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 100px; /* Minimum height for header to ensure content is not clipped */
}

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
}

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--text-color);
  white-space: nowrap;
  padding: 5px 0;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow */
}

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

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

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 25px var(--neon-secondary),
    inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), var(--dark-bg-4));
  padding: 10px 0;
  border-top: 2px solid var(--neon-accent);
  border-bottom: 2px solid var(--neon-accent);
  box-shadow:
    0 0 8px var(--neon-accent),
    0 0 16px var(--neon-accent),
    inset 0 0 10px rgba(255, 255, 255, 0.05);
  animation: theme-colors 5s ease-in-out infinite reverse; /* Different animation for nav */
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow navigation items to wrap if screen is too small */
}

.main-nav .nav-link {
  color: var(--nav-link-color);
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--nav-link-hover-color);
  text-shadow: 0 0 5px var(--nav-link-hover-color), 0 0 10px var(--nav-link-hover-color);
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 25px;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above mobile menu overlay */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

/* Footer Styles */
.site-footer {
  background: var(--dark-bg-2);
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 0.9em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-main,
.site-footer .game-providers-section,
.site-footer .social-media-section,
.site-footer .footer-bottom {
  padding: 20px 0;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

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

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

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

.site-footer .footer-nav li a {
  display: block;
  padding: 5px 0;
  color: #c0c0c0;
  transition: color 0.3s ease;
}

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

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

.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 {
  background-color: var(--dark-bg-3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.game-providers-section .footer-container,
.social-media-section .footer-container {
  display: block; /* Override grid for these full-width sections */
}

.footer-bottom {
  background-color: var(--dark-bg-1);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  padding: 10px 0;
  flex-basis: 100%;
}

.footer-bottom .footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  flex-basis: 100%;
}

.footer-bottom .footer-legal li a {
  padding: 5px 10px;
}

/* Responsive Styles (Mobile Overrides) */
@media (max-width: 768px) {
  /* Adjust padding-top for fixed header and button area */
  body {
    padding-top: 160px; /* Approx. header-top (70px) + main-nav (50px) + mobile-buttons-area (40px) */
  }

  .site-header {
    min-height: auto;
  }

  .header-container,
  .main-nav .nav-container,
  .site-footer .footer-container,
  .game-providers-section .footer-container,
  .social-media-section .footer-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-top {
    padding: 10px 0;
    display: flex;
    align-items: center;
  }

  .header-top .header-container {
    justify-content: space-between;
    padding: 0 15px;
  }

  .logo {
    flex-grow: 1;
    text-align: center;
    font-size: 1.8em;
    order: 2; /* Logo in center */
    margin-left: -30px; /* Offset hamburger menu width for centering */
  }

  .hamburger-menu {
    display: flex;
    order: 1; /* Hamburger on left */
    margin-right: auto;
  }

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

  .main-nav {
    display: none; /* Mobile default: hidden */
    flex-direction: column; /* Mobile: vertical */
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background: var(--dark-bg-3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    padding-top: 20px;
    align-items: flex-start;
    border: none; /* Remove border for cleaner mobile menu */
    box-shadow: none; /* Remove box-shadow for cleaner mobile menu */
    z-index: 1001;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* IMPORTANT: Must be flex to show */
    transform: translateX(0); /* Slide in */
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

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

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
  }

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

  .mobile-buttons-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
    border-bottom: 2px solid var(--neon-primary);
    box-shadow:
      0 0 8px var(--neon-primary),
      0 0 16px var(--neon-primary),
      inset 0 0 10px rgba(255, 255, 255, 0.1);
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border/shadow colors */
    z-index: 998; /* Below main-nav and overlay */
    position: fixed;
    width: 100%;
    top: 70px; /* Position below header-top */
  }

  .mobile-buttons-area .btn {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .site-footer .footer-container {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-col {
    margin-bottom: 20px;
  }

  .footer-bottom .footer-container {
    flex-direction: column;
  }

  .footer-bottom .footer-legal {
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
  }

  .footer-bottom .footer-legal li a {
    padding: 5px 0;
  }
}

/* Ensure body no-scroll works */
body.no-scroll {
  overflow: hidden;
}
