:root {
  --primary-color: #1A202C;
  --secondary-color: #FFD700;
  --neon-primary: #FFD700; /* Gold/Yellow from auxiliary */
  --neon-secondary: #00FFFF; /* Vibrant Cyan */
  --neon-accent: #FF00FF; /* Vibrant Magenta */
}

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0;
  background-color: #0a0a0a;
  padding-top: 140px; /* Adjust based on header and mobile button height */
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Keyframes for dynamic neon effects */
@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);
  }
}

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

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

/* Header styles - Desktop First */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  padding: 15px 0;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  width: 100%;
}

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

.logo {
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  text-transform: uppercase; /* Ensure uppercase for WEB TÀI XỈU */
}

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse;
  width: 100%;
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}

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

.nav-link {
  color: #e0e0e0;
  text-decoration: none;
  padding: 8px 15px;
  font-size: 1.1em;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

.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;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--neon-secondary), var(--neon-accent));
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-secondary);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  padding: 5px;
  border-radius: 3px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
}

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

.hamburger-menu.active {
  animation: none; /* Stop color animation when active */
  border-color: var(--neon-accent);
  box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent);
}

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

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

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

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

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

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

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

.footer-main-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 20px 40px;
  border-bottom: 1px solid #333333;
  margin-bottom: 20px;
}

.footer-col {
  padding: 10px 0;
}

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

.footer-description {
  line-height: 1.6;
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.site-footer h4 {
  color: #ffffff;
  font-size: 1.2em;
  margin-bottom: 20px;
  position: relative;
}

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

.footer-nav-list {
  list-style: none;
}

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

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

.footer-nav-list 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-methods 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 20px;
  padding: 20px;
  border-bottom: 1px solid #333333;
}

.social-media-section {
  border-bottom: none;
}

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

.copyright {
  color: #888888;
  font-size: 0.85em;
}

/* Mobile styles */
@media (max-width: 768px) {
  body {
    padding-top: 180px; /* Adjusted for mobile header + mobile buttons */
  }

  .site-header {
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  }

  .header-top {
    padding: 10px 0;
    animation: theme-colors 4s ease-in-out infinite;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Override max-width for mobile */
    justify-content: space-between;
    position: relative;
  }

  .logo {
    font-size: 1.8em;
    flex: 1;
    text-align: center;
    order: 2; /* Center logo */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place hamburger left */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(180deg, #1a1a2e, #0f3460);
    padding-top: 80px;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Ensure menu is above overlay */
    overflow-y: auto;
  }

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

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

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

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-top: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    border-bottom: 2px solid;
    z-index: 998; /* Below main nav, above content */
  }

  .mobile-nav-buttons .btn {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: calc(100% - 20px); /* Account for gap */
    padding: 10px 15px;
    font-size: 14px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
  }

  .footer-main-content {
    grid-template-columns: 1fr;
    padding: 0 15px 30px;
  }

  .footer-col {
    padding: 20px 0;
    border-bottom: 1px solid #333333;
  }

  .footer-col:last-of-type {
    border-bottom: none;
  }

  .game-providers-section,
  .social-media-section {
    padding: 15px;
  }

  .footer-bottom {
    padding: 0 15px;
  }
}