:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Neon colors - based on primary/secondary, with flexibility */
  --neon-primary: var(--secondary-color); /* Gold for primary glow */
  --neon-secondary: #FF00FF; /* Pink/Magenta */
  --neon-accent: #00FFFF; /* Cyan */

  /* Header offset values */
  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 45px; /* Adjust if mobile marquee is different */
    --header-top-height-mobile: 60px; /* Logo + hamburger */
    --mobile-nav-buttons-height: 50px; /* Mobile buttons */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Mobile */
  }
}

/* Common animations for 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(255, 0, 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(0, 255, 255, 0.3);
  }
}

@keyframes alternate-colors {
  0% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }
  100% {
    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;
  }
}

/* Marquee specific animations */
@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%);
  }
}

/* Marquee Section styles */
.marquee-section {
  position: fixed; /* Fixed at page top */
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3)); /* Dark background */
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  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, 215, 0, 0.1);
  z-index: 1001; /* Ensure on top of header */
  height: var(--marquee-height-desktop);
  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: 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-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: #ffffff;
  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);
}

/* Site Header styles */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below the marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  font-family: 'Arial', sans-serif;
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  color: #ffffff;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  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, 215, 0, 0.1);
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: var(--header-top-height-desktop); /* Fixed height for desktop header top */
  box-sizing: border-box;
}

.logo {
  color: #ffffff; /* Regular color for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase; /* Ensure uppercase for "I9 BET" */
  /* NO NEON EFFECTS for logo */
}

.desktop-nav-buttons {
  display: flex; /* Desktop default: flex */
  gap: 10px;
}

.mobile-nav-buttons {
  display: none; /* Desktop default: hidden */
}

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

.btn:hover {
  animation-duration: 2s; /* hover时加快颜色变化速度 */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 215, 0, 0.5);
}

.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic color border */
  box-shadow:
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Desktop default: flex */
  min-height: var(--main-nav-height-desktop);
  align-items: center;
}

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

.nav-link {
  color: #ffffff; /* Regular color for nav links */
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-primary); /* Use neon primary for hover */
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 3px;
}

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

/* Site Footer styles */
.site-footer {
  background: var(--dark-bg-1);
  color: #cccccc;
  font-family: 'Arial', sans-serif;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

.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 {
  margin-bottom: 10px;
}

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

.footer-nav 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; /* Consistent gap for all icon sections */
  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 {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section .footer-container, .social-media-section .footer-container {
  display: block; /* Override grid for full width */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-bottom {
  padding-top: 20px;
}

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

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

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

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

/* Hamburger menu styles */
.hamburger-menu {
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above overlay and menu */
  transition: all 0.3s ease;
  padding: 5px; /* Add padding for better click area */
  box-sizing: content-box;
}

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

/* Hamburger menu active state (X icon) */
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0; /* Full height */
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below hamburger, above main-nav (when main-nav is z-index 1000) */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

/* Responsive styles */
@media (max-width: 768px) {
  /* Header Offset for mobile */
  body {
    padding-top: var(--header-offset);
  }

  /* Marquee mobile adjustments */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0 !important;
  }

  .marquee-container {
    gap: 10px !important;
    padding: 0px 5px;
  }

  .marquee-icon {
    width: 25px !important;
    height: 25px !important;
  }

  .marquee-icon-emoji {
    font-size: 16px !important;
  }

  .marquee-text {
    font-size: 13px !important;
  }

  .marquee-separator {
    font-size: 13px !important;
    margin: 0 8px !important;
  }

  .marquee-content {
    gap: 15px;
    animation-duration: 20s; /* Faster scroll on mobile */
  }

  /* Site Header mobile adjustments */
  .site-header {
    top: var(--marquee-height-mobile); /* Position below mobile marquee */
  }

  .header-top {
    min-height: var(--header-top-height-mobile);
    padding: 10px 0;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    justify-content: space-between; /* Hamburger left, Logo center */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
