:root {
  --primary-color: #004aad;
  --secondary-color: #ffcc00;
  --neon-primary: #ffcc00; /* Yellow */
  --neon-secondary: #004aad; /* Dark Blue */
  --neon-accent: #ff00ff; /* Magenta */
  --header-offset: 155px; /* Desktop: Marquee 45px + Header Top 60px + Main Nav 50px */
}

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

/* General body and container styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply offset to body */
  background-color: #1a1a2e;
  color: #ffffff;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Neon Glow Effects & Animations */
.neon-glow {
  box-shadow:
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor,
    inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.neon-tube {
  border: 2px solid;
  animation: neon-flicker 2s infinite alternate, theme-colors 4s ease-in-out infinite;
}

.cyber-grid {
  background:
    linear-gradient(90deg, transparent 95%, currentColor 100%),
    linear-gradient(180deg, transparent 95%, currentColor 100%);
  background-size: 20px 20px;
  border: 1px solid;
  animation: hue-spin 4s linear infinite;
}

.neon-pulse {
  border: 2px solid;
  animation: pulse-glow 2s ease-in-out infinite alternate, theme-colors 4s ease-in-out infinite;
}

.rainbow-flow {
  border: 2px solid;
  animation: rainbow-border 3s linear infinite;
}

.hue-rotate {
  border: 2px solid;
  filter: hue-rotate(0deg);
  animation: hue-spin 4s linear infinite;
}

.alternate-glow {
  border: 2px solid;
  animation: alternate-colors 2s ease-in-out infinite alternate;
}

.color-stream {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(45deg,
    #ff0000, #ff8000, #ffff00, #00ff00,
    #00ffff, #0000ff, #8000ff, #ff0080
  );
  background-size: 400% 400%;
  animation: gradient-flow 3s ease infinite;
}

.random-colors {
  border: 2px solid;
  animation: random-glow 5s linear infinite;
}

.theme-flow {
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
}

.led-matrix {
  border: 2px solid;
  box-shadow:
    0 0 5px currentColor,
    0 0 10px currentColor;
  position: relative;
  animation: random-glow 5s linear infinite;
}

.led-matrix::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background:
    radial-gradient(circle at 0% 0%, currentColor 2px, transparent 3px),
    radial-gradient(circle at 100% 0%, currentColor 2px, transparent 3px),
    radial-gradient(circle at 0% 100%, currentColor 2px, transparent 3px),
    radial-gradient(circle at 100% 100%, currentColor 2px, transparent 3px);
  background-size: 20px 20px;
  animation: led-blink 1s steps(2) infinite;
}

@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, #ffcc00),
      0 0 20px var(--neon-primary, #ffcc00);
  }
  100% {
    filter: hue-rotate(360deg);
    box-shadow:
      0 0 10px var(--neon-primary, #ffcc00),
      0 0 20px var(--neon-primary, #ffcc00);
  }
}

@keyframes alternate-colors {
  0% {
    border-color: var(--neon-primary, #ffcc00);
    box-shadow:
      0 0 10px var(--neon-primary, #ffcc00),
      0 0 20px var(--neon-primary, #ffcc00);
  }
  100% {
    border-color: var(--neon-secondary, #004aad);
    box-shadow:
      0 0 10px var(--neon-secondary, #004aad),
      0 0 20px var(--neon-secondary, #004aad);
  }
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
    box-shadow:
      0 0 10px #ff0000,
      0 0 20px #ff8000;
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 0 10px #00ffff,
      0 0 20px #0000ff;
  }
  100% {
    background-position: 0% 50%;
    box-shadow:
      0 0 10px #ff0000,
      0 0 20px #ff8000;
  }
}

@keyframes random-glow {
  0% {
    border-color: #ff00ff;
    box-shadow: 0 0 20px #ff00ff;
  }
  20% {
    border-color: #00ffff;
    box-shadow: 0 0 20px #00ffff;
  }
  40% {
    border-color: #ffff00;
    box-shadow: 0 0 20px #ffff00;
  }
  60% {
    border-color: #00ff00;
    box-shadow: 0 0 20px #00ff00;
  }
  80% {
    border-color: #ff0000;
    box-shadow: 0 0 20px #ff0000;
  }
  100% {
    border-color: #ff00ff;
    box-shadow: 0 0 20px #ff00ff;
  }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary, #ffcc00);
    box-shadow:
      0 0 10px var(--neon-primary, #ffcc00),
      0 0 20px var(--neon-primary, #ffcc00);
  }
  33% {
    border-color: var(--neon-secondary, #004aad);
    box-shadow:
      0 0 10px var(--neon-secondary, #004aad),
      0 0 20px var(--neon-secondary, #004aad);
  }
  66% {
    border-color: var(--neon-accent, #ff00ff);
    box-shadow:
      0 0 10px var(--neon-accent, #ff00ff),
      0 0 20px var(--neon-accent, #ff00ff);
  }
}

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

.neon-text-dynamic {
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-primary, #ffcc00),
      0 0 10px var(--neon-primary, #ffcc00),
      0 0 15px var(--neon-primary, #ffcc00);
    color: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary, #004aad),
      0 0 10px var(--neon-secondary, #004aad),
      0 0 15px var(--neon-secondary, #004aad);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent, #ff00ff),
      0 0 10px var(--neon-accent, #ff00ff),
      0 0 15px var(--neon-accent, #ff00ff);
    color: #ffffff;
  }
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px; /* Fixed height for calculation */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary, #ffcc00),
    0 0 20px var(--neon-primary, #ffcc00),
    0 0 30px var(--neon-primary, #ffcc00),
    inset 0 0 20px rgba(255, 204, 0, 0.1);
  z-index: 1001;
}

.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-primary, #ffcc00),
    0 0 10px var(--neon-primary, #ffcc00),
    0 0 15px var(--neon-primary, #ffcc00);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes marquee-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

.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, #ffcc00),
    0 0 10px var(--neon-primary, #ffcc00),
    0 0 15px var(--neon-primary, #ffcc00);
  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, #ffcc00),
    0 0 20px var(--neon-primary, #ffcc00),
    0 0 30px var(--neon-primary, #ffcc00),
    0 0 40px var(--neon-primary, #ffcc00);
  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, #ffcc00),
    0 0 6px var(--neon-primary, #ffcc00);
}

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
  box-sizing: border-box;
}

.header-top {
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary, #ffcc00),
    0 0 20px var(--neon-primary, #ffcc00),
    0 0 30px var(--neon-primary, #ffcc00),
    inset 0 0 20px rgba(255, 204, 0, 0.1);
  min-height: 60px; /* Fixed height for calculation */
  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;
}

.logo {
  color: #ffffff; /* Regular style, no neon */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  padding: 8px 0; /* Adjust padding for better visual alignment */
}

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

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

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

.main-nav {
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-secondary, #004aad),
    0 0 20px var(--neon-secondary, #004aad),
    0 0 30px var(--neon-secondary, #004aad),
    inset 0 0 20px rgba(0, 74, 173, 0.1);
  min-height: 50px; /* Fixed height for calculation */
  display: flex; /* Desktop default: flex */
  align-items: center;
  justify-content: center;
}

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

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
}

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

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

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

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

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

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

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary, #ffcc00), var(--neon-secondary, #004aad));
  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, #ffcc00);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

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

/* Footer Styles */
.site-footer {
  background-color: #0d1117;
  color: #c9d1d9;
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color, #ffcc00);
  margin-top: 5px;
}

.footer-logo {
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

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

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

.footer-col ul li a {
  color: #c9d1d9;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--secondary-color, #ffcc00);
}

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

.game-providers-section, .social-media-section {
  margin-top: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #30363d;
}

.game-providers-section h4, .social-media-section h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
  position: relative;
}

.game-providers-section h4::after, .social-media-section h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color, #ffcc00);
  margin-top: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #30363d;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-bottom p {
  margin: 0;
}

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

.footer-legal-links li a {
  color: #c9d1d9;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal-links li a:hover {
  color: var(--secondary-color, #ffcc00);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Marquee Mobile */
  .marquee-section {
    height: 25px; /* Mobile height for calculation */
  }

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

  .marquee-icon {
    width: 20px;
    height: 20px;
  }

  .marquee-icon-emoji {
    font-size: 14px;
  }

  .marquee-text {
    font-size: 14px;
  }

  .marquee-separator {
    font-size: 14px;
    margin: 0 10px;
  }

  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header Mobile */
  .site-header {
    top: 25px; /* Marquee mobile height */
  }

  .header-top {
    min-height: 50px; /* Fixed height for calculation */
    padding: 0 15px;
  }

  .header-container {
    padding: 0;
    justify-content: flex-start; /* Align hamburger to start */
  }

  .hamburger-menu {
    display: flex;
    margin-right: 15px;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0;
  }

  .logo img {
    max-height: 35px;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-secondary, #004aad),
      0 0 20px var(--neon-secondary, #004aad),
      inset 0 0 20px rgba(0, 74, 173, 0.1);
    min-height: 60px; /* Fixed height for calculation */
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: calc(25px + 50px + 60px); /* Marquee height + Header Top height + Mobile Buttons height */
    left: 0;
    width: 250px;
    height: calc(100vh - (25px + 50px + 60px)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    background-color: #0a0a0a;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-primary, #ffcc00),
      0 0 20px var(--neon-primary, #ffcc00),
      inset 0 0 20px rgba(255, 204, 0, 0.1);
  }

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

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

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

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

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above content */
    display: none;
  }

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

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* No scroll for body when menu is active */
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;
  }
}
