:root {
  --primary-color: #E44D26; /* Website main color */
  --secondary-color: #FFB800; /* Website auxiliary color */
  --neon-primary: var(--primary-color); /* Reddish-orange */
  --neon-secondary: var(--secondary-color); /* Yellowish-orange */
  --neon-accent: #00FFFF; /* Cyan for contrast in animations */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  background-color: var(--dark-bg-1);
  line-height: 1.6;
}

/* Universal Container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Neon Animations */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
    box-shadow:
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px currentColor,
      inset 0 0 15px currentColor;
  }
  20%, 24%, 55% {
    opacity: 0.8;
    box-shadow:
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      inset 0 0 10px currentColor;
  }
}

@keyframes pulse-glow {
  from {
    box-shadow:
      0 0 5px currentColor,
      0 0 10px currentColor;
  }
  to {
    box-shadow:
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 45px currentColor;
  }
}

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

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

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { filter: hue-rotate(360deg); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
}

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

@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(var(--neon-primary-rgb, 228, 77, 38), 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(var(--neon-secondary-rgb, 255, 184, 0), 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(var(--neon-accent-rgb, 0, 255, 255), 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-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 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Default for desktop to stack top and nav bars */
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  padding: 10px 0;
  border-bottom: 2px solid var(--neon-primary);
  animation: theme-colors 4s ease-in-out infinite;
  position: relative;
}

.header-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top left, rgba(var(--neon-primary-rgb, 228, 77, 38), 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px; /* Ensure minimum height for top bar */
}

.logo {
  font-size: 2em;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  text-transform: uppercase;
  padding: 5px 0;
}

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

.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 4s ease-in-out infinite;
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s; /* hover时加快颜色变化速度 */
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
  padding: 15px 0;
  border-top: 2px solid var(--neon-secondary);
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation for contrast */
  position: relative;
  display: flex; /* Desktop: show navigation */
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
}

.main-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at bottom right, rgba(var(--neon-secondary-rgb, 255, 184, 0), 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.nav-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  padding: 5px 10px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: absolute;
  left: 20px; /* Aligned with container padding */
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-menu .bar {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--neon-primary);
  margin: 6px 0;
  transition: 0.4s;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

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

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--dark-bg-2);
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 0.9em;
}

.footer-container {
  padding: 0 20px;
}

.footer-top-grid {
  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: #ffffff;
  font-size: 1.2em;
  margin-bottom: 15px;
  position: relative;
}

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

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

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

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

.footer-nav li a,
.footer-legal-nav li a {
  color: #cccccc;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-nav li a:hover,
.footer-legal-nav li a:hover {
  color: var(--primary-color);
}

.payment-methods .payment-icons,
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  margin-top: 15px;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(80%) brightness(120%);
  transition: filter 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

.game-providers-section,
.social-media-section {
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 20px;
}

.copyright {
  margin: 0;
  color: #888888;
}

.footer-legal-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .header-container, .nav-container, .footer-container {
    padding: 0 15px;
  }
  .nav-link {
    font-size: 1em;
    padding: 5px 8px;
  }
  .btn {
    padding: 10px 20px;
  }
  .hamburger-menu {
    left: 15px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 140px; /* (60px header-top + 50px mobile-buttons-area + ~30px vertical padding/margin) */
  }

  .site-header {
    flex-direction: column;
  }

  .header-top {
    padding: 10px 0;
    animation: none; /* Reduce animations on mobile for performance */
    border-bottom: none;
    box-shadow: none;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: center; /* Center logo by default */
    position: relative;
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Place hamburger first */
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .logo {
    order: 1; /* Place logo second */
    flex-grow: 1;
    text-align: center;
    font-size: 1.8em;
    animation: none; /* Reduce animations on mobile */
    margin: 0;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .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);
    animation: theme-colors 4s ease-in-out infinite;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 100px 0 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    background: linear-gradient(180deg, var(--dark-bg-3), var(--dark-bg-1));
    border-right: 2px solid var(--neon-accent);
    box-shadow: 5px 0 15px rgba(var(--neon-accent-rgb, 0, 255, 255), 0.5);
    animation: none; /* Reduce animations on mobile */
    z-index: 1002; /* Higher than overlay */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2em;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .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: 1001; /* Between header and menu */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-col:nth-child(1) {
    grid-column: span 2;
  }
  .footer-col:nth-child(2),
  .footer-col:nth-child(3),
  .footer-col:nth-child(4) {
    grid-column: span 1;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  .footer-legal-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    grid-column: span 1 !important;
  }
  .logo {
    font-size: 1.5em;
  }
  .mobile-buttons-area .btn {
    padding: 10px 15px;
    font-size: 0.9em;
  }
}