html {
  lang: "vi-VN";
}

:root {
  --primary-color: #300060;
  --secondary-color: #FFD700;
  --text-color: #ffffff;
  --dark-bg: #0a0a0a;
  --darker-bg: #1a1a2e;
  --darkest-bg: #16213e;

  /* Neon dynamic colors - adapting to theme */
  --neon-primary: var(--secondary-color); /* Gold/Yellow for marquee & header-top */
  --neon-secondary: #FF6600; /* Orange for main-nav */
  --neon-accent: #FF00FF; /* Magenta for buttons */

  --header-offset: 155px; /* Desktop: Marquee (45px) + Header Top (60px) + Main Nav (50px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Marquee (30px) + Header Top (50px) + Mobile Buttons (50px) */
  }
}

/* Basic Reset & Body */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--dark-bg);
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden;
}

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

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

/* Common container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* --- Dynamic Neon Color Animations --- */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent);
  }
}

@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 marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

/* --- Marquee Section --- */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
  color: var(--text-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  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(255, 255, 0, 0.1); /* Using yellow for marquee border */
  z-index: 1002; /* Ensure on top of header */
  height: 45px; /* Desktop Marquee 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: 30px;
  height: 30px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px;
  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));
}

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

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  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: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1001; /* Below marquee, above content */
  background: transparent; /* Background for entire header will be handled by sub-sections */
}

/* Header Top Bar */
.header-top {
  background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg), var(--darkest-bg));
  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(255, 255, 0, 0.1); /* Yellow glow for header-top */
  padding: 10px 0;
  height: 60px; /* Desktop Header Top Height */
  box-sizing: border-box;
  display: flex; /* Ensure flex for container */
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color); /* Regular color, no neon for logo */
  text-decoration: none;
  display: block; /* Ensure it's visible */
  line-height: 1;
  /* NO NEON EFFECTS FOR LOGO */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px; /* Desktop logo height */
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex; /* Show on desktop */
  gap: 10px;
}

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

/* Hamburger Menu - Hidden on Desktop */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1003; /* Above logo on mobile */
}

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

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

/* Main Navigation Bar */
.main-nav {
  background: linear-gradient(135deg, var(--darker-bg), var(--darkest-bg), var(--primary-color));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-secondary), /* Orange glow for main-nav */
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(255, 102, 0, 0.1);
  padding: 5px 0;
  height: 50px; /* Desktop Main Nav Height */
  box-sizing: border-box;
  display: flex; /* Show on desktop */
  align-items: center;
  justify-content: center;
}

.nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color); /* Regular color for nav links */
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary-color); /* Gold on hover */
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-accent), var(--secondary-color)); /* Magenta to Gold gradient */
  padding: 10px 20px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow:
    0 0 5px var(--text-color),
    0 0 10px var(--neon-accent); /* Neon glow for button text */
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 15px var(--neon-accent),
    0 0 25px var(--neon-accent),
    inset 0 0 15px rgba(255, 0, 255, 0.3);
}

/* --- Footer Section --- */
.site-footer {
  background-color: var(--darkest-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
}

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

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

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

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

.footer-col ul li a:hover {
  color: var(--secondary-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; /* Consistent gap for all icon sections */
  width: 100%;
}

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

.footer-middle {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section, .social-media-section {
  margin-bottom: 20px; /* Space between game providers and social media */
}
.game-providers-section:last-child, .social-media-section:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  text-align: center;
}

.footer-bottom .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-bottom p {
  margin: 0;
  line-height: 1.5;
}

.footer-action-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-action-links a {
  color: var(--secondary-color);
  font-weight: bold;
}

.footer-action-links .separator {
  color: rgba(255, 255, 255, 0.5);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Prevent body scroll when menu is open */
body.no-scroll {
  overflow: hidden;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: 30px; /* Mobile Marquee Height */
    padding: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 12px;
  }
  .marquee-separator {
    font-size: 12px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 20s linear infinite; /* Faster scroll on mobile */
  }

  /* Header */
  .site-header {
    top: 30px; /* Mobile Marquee Height */
  }
  .header-top {
    height: 50px; /* Mobile Header Top Height */
    padding: 0;
  }
  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center, right empty */
  }

  /* Hamburger Menu - Visible on Mobile */
  .hamburger-menu {
    display: flex; /* Show on mobile */
    order: 1; /* Left side */
  }

  /* Logo - Centered on Mobile */
  .logo {
    order: 2; /* Center */
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
  }
  .logo img {
    max-height: 35px !important; /* Mobile logo height */
  }

  /* Desktop Nav Buttons - Hidden on Mobile */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Nav Buttons - Visible on Mobile, independent row */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background: linear-gradient(135deg, var(--darkest-bg), var(--primary-color));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent);
    height: 50px; /* Mobile Buttons Height */
    align-items: center;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation - Hidden by default on mobile, revealed by JS */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 130px; /* Marquee (30) + Header Top (50) + Mobile Buttons (50) */
    left: 0;
    width: 70%; /* Slide-out menu width */
    height: calc(100% - 130px); /* Full height below header */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(180deg, var(--darkest-bg), var(--primary-color));
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      5px 0 10px var(--neon-secondary),
      10px 0 20px var(--neon-secondary);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Scroll for long menus */
  }

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

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

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

  /* Footer */
  .site-footer {
    padding: 30px 0 15px;
  }
  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    padding: 0 15px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h4 {
    margin-bottom: 10px;
  }
  .footer-logo {
    font-size: 20px;
    margin-bottom: 10px;
  }
  .footer-description {
    font-size: 13px;
  }
  .footer-action-links {
    flex-direction: column;
    gap: 5px;
  }
  .footer-action-links .separator {
    display: none;
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
