:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --bg-dark-1: #0a0a0a;
  --bg-dark-2: #1a1a2e;
  --bg-dark-3: #16213e;
  --neon-green: #00ff00;
  --neon-blue: #00ffff;
  --neon-pink: #ff00ff;
  --neon-yellow: #ffff00;
  --neon-red: #ff0000;
  --neon-orange: #ffa500;

  /* Dynamic Neon Color Variables based on primary/secondary */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: var(--neon-pink);

  /* Header Offset - Desktop */
  --header-offset: 155px;
}

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

/* Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f0f2f5;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

/* Animations for Neon Effects */
@keyframes marquee-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@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 rainbow-border {
  0% {
    border-color: var(--neon-red);
    box-shadow:
      0 0 10px var(--neon-red),
      0 0 20px var(--neon-red);
  }
  16.6% {
    border-color: var(--neon-orange);
    box-shadow:
      0 0 10px var(--neon-orange),
      0 0 20px var(--neon-orange);
  }
  33.3% {
    border-color: var(--neon-yellow);
    box-shadow:
      0 0 10px var(--neon-yellow),
      0 0 20px var(--neon-yellow);
  }
  50% {
    border-color: var(--neon-green);
    box-shadow:
      0 0 10px var(--neon-green),
      0 0 20px var(--neon-green);
  }
  66.6% {
    border-color: var(--neon-blue);
    box-shadow:
      0 0 10px var(--neon-blue),
      0 0 20px var(--neon-blue);
  }
  83.3% {
    border-color: var(--neon-pink);
    box-shadow:
      0 0 10px var(--neon-pink),
      0 0 20px var(--neon-pink);
  }
  100% {
    border-color: var(--neon-red);
    box-shadow:
      0 0 10px var(--neon-red),
      0 0 20px var(--neon-red);
  }
}

@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-blue);
    box-shadow:
      0 0 10px var(--neon-blue),
      0 0 20px var(--neon-blue);
  }
  66% {
    border-color: var(--neon-yellow);
    box-shadow:
      0 0 10px var(--neon-yellow),
      0 0 20px var(--neon-yellow);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-green),
      0 0 10px var(--neon-green),
      0 0 15px var(--neon-green);
    color: var(--text-color-light);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-blue),
      0 0 10px var(--neon-blue),
      0 0 15px var(--neon-blue);
    color: var(--text-color-light);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-pink),
      0 0 10px var(--neon-pink),
      0 0 15px var(--neon-pink);
    color: var(--text-color-light);
  }
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px; /* Fixed height for desktop */
  background: linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2), var(--bg-dark-3));
  color: var(--text-color-light);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-green),
    0 0 20px var(--neon-green),
    0 0 30px var(--neon-green),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  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: 10px 20px;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 24px;
  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-green),
    0 0 10px var(--neon-green),
    0 0 15px var(--neon-green);
  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-light);
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-green),
    0 0 10px var(--neon-green),
    0 0 15px var(--neon-green);
  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-green),
    0 0 20px var(--neon-green),
    0 0 30px var(--neon-green),
    0 0 40px var(--neon-green);
  transform: scale(1.05);
  color: var(--text-color-light);
}

.marquee-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-shadow:
    0 0 3px var(--neon-green),
    0 0 6px var(--neon-green);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2));
}

.header-top {
  background: linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2), var(--bg-dark-3));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 30px var(--neon-yellow),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 15px 0;
}

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

.logo {
  color: var(--text-color-light);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  line-height: 1;
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

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

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

.main-nav {
  background: linear-gradient(135deg, var(--bg-dark-2), var(--bg-dark-3), #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite;
  box-shadow:
    0 0 10px var(--neon-red),
    0 0 20px var(--neon-red),
    0 0 30px var(--neon-red),
    inset 0 0 20px rgba(255, 0, 0, 0.1);
  width: 100%;
  display: flex;
  min-height: 50px;
  align-items: center;
}

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

.nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  padding: 8px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 5px var(--neon-blue),
    0 0 10px var(--neon-blue);
  border-radius: 3px;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color-light);
  position: relative;
  transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

.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 {
  display: block;
  opacity: 1;
}

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

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(0, 255, 0, 0.4);
}

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

.footer-main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col {
  padding-right: 15px;
}

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

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

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

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

.footer-nav a:hover {
  color: var(--primary-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;
  filter: grayscale(100%) brightness(150%);
  transition: filter 0.3s ease;
}

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

.game-providers-section, .social-media-section {
  max-width: 1200px;
  margin: 20px auto 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #888888;
}

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

  /* Header Mobile */
  .site-header {
    top: 30px; /* Marquee mobile height */
  }
  .header-top {
    min-height: 50px;
    padding: 10px 0;
    justify-content: space-between;
  }
  .header-container {
    padding: 0 15px;
    max-width: none;
    position: relative;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
  }
  .logo img {
    max-height: 40px !important;
  }
  .desktop-nav-buttons {
    display: none;
  }
  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 50px;
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }
  .hamburger-menu {
    display: block;
    order: -1;
    margin-right: auto; /* Push to left */
    position: relative;
    z-index: 1002;
  }
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 70%; /* Adjust as needed */
    height: calc(100vh - var(--header-offset));
    background: linear-gradient(180deg, var(--bg-dark-2), var(--bg-dark-3));
    border-top: none;
    border-bottom: none;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000; /* Ensure it's above overlay but below hamburger */
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 20px;
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0);
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    max-width: none;
  }
  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer Mobile */
  .footer-main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    padding-right: 0;
  }
  .game-providers-section, .social-media-section {
    margin: 15px auto 20px;
    padding-top: 15px;
  }
  .footer-bottom {
    margin-top: 20px;
    padding-top: 15px;
  }

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
  body.no-scroll {
    overflow: 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;
  }
}
