:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: #00ffff; /* Complementary for dynamic glow */

  --header-offset: 135px; /* Desktop: Marquee (45px) + HeaderTop (50px) + MainNav (40px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Marquee (40px) + HeaderTop (50px) + MobileButtons (40px) */
  }
}

/* Base styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #121212;
  color: #e0e0e0;
  overflow-x: hidden; /* Prevent body overflow-x */
  line-height: 1.6;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #ffffff;
}

/* Dynamic Neon Glow Animations */
@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); }
  100% { filter: hue-rotate(360deg); }
}

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

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  color: #ffffff;
  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 a yellow tint for inner shadow */
  z-index: 1001;
  min-height: 45px; /* Minimum height for marquee */
  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: 30px; /* Reduced width */
  height: 30px; /* Reduced height */
  z-index: 2;
  position: relative;
}

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

@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: 15px; /* Reduced font size */
  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: 15px; /* Reduced font size */
  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 is 45px */
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 90px; /* header-top (50) + main-nav (40) */
  box-sizing: border-box;
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color for top bar */
  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 a yellow tint for inner shadow */
  width: 100%;
  min-height: 50px;
  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;
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff; /* Regular color, no neon */
  text-decoration: none;
  padding: 5px 0; /* Add padding to match visual height with buttons */
  /* LOGO MUST NOT have neon effects */
  text-shadow: none;
  box-shadow: none;
  animation: none;
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px; /* Desktop logo height */
  /* LOGO MUST NOT have neon effects */
}

.desktop-nav-buttons {
  display: flex; /* Default to flex for desktop */
  gap: 10px;
  align-items: center;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 25px; /* Slightly reduced padding */
  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-size: 14px; /* Slightly reduced font size */
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.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(255, 255, 0, 0.5);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark gradient for nav bar */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic color for nav bar */
  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(139, 0, 0, 0.1); /* Using a red tint for inner shadow */
  width: 100%;
  display: flex; /* Default to flex for desktop */
  min-height: 40px;
  align-items: center;
}

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

.nav-link {
  color: #e0e0e0;
  font-size: 15px;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--primary-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop, shown by media query */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above logo and other elements */
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: relative;
  transition: background-color 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff; /* Initial glow */
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: absolute;
  transition: transform 0.3s ease, top 0.3s ease, box-shadow 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff; /* Initial glow */
}

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

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

/* Hamburger menu active state */
.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
  box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color); /* Active glow */
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color); /* Active glow */
}

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

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown by media query */
}

/* Footer Section */
.site-footer {
  background-color: #1c1c1c;
  color: #a0a0a0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer a {
  color: #a0a0a0;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--primary-color);
}

.footer-top {
  padding-bottom: 30px;
  border-bottom: 1px solid #333;
}

.footer-middle {
  padding: 30px 0;
  border-bottom: 1px solid #333;
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-col {
  flex: 1;
  min-width: 200px;
}

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

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

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

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

.footer-nav a {
  font-size: 14px;
  text-transform: uppercase;
}

.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 */
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 40px; /* Reduced icon size */
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(0%); /* Ensure colors are visible */
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  opacity: 1;
}

.game-providers-section, .social-media-section {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #777;
}

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

.footer-action-links {
  display: flex;
  gap: 15px;
}

.footer-action-links a {
  color: #ffffff;
  background-color: var(--secondary-color);
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  text-transform: uppercase;
}

.footer-action-links a:hover {
  background-color: var(--primary-color);
  color: #1c1c1c;
}


/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    padding: 0px 5px; /* Reduced padding */
    min-height: 40px; /* Adjusted min-height */
  }

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

  .marquee-icon {
    width: 25px; /* Further reduced width */
    height: 25px; /* Further reduced height */
  }

  .marquee-icon-emoji {
    font-size: 16px; /* Further reduced font size */
  }

  .marquee-text {
    font-size: 13px; /* Further reduced font size */
  }

  .marquee-separator {
    font-size: 13px; /* Further reduced font size */
    margin: 0 8px;
  }

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

  .site-header {
    top: 40px; /* Marquee height is 40px on mobile */
    min-height: 90px; /* header-top (50) + mobile-buttons (40) */
  }

  .header-top {
    min-height: 50px;
  }

  .header-container {
    padding: 0 15px; /* Adjusted padding */
    justify-content: flex-start; /* Align items to start */
    gap: 15px;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0; /* Place to the left */
    margin-right: 0; /* Reset margin */
  }

  .logo {
    order: 1; /* Place logo in the middle */
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px; /* Adjusted font size */
    padding: 0;
  }

  .logo img {
    max-height: 35px !important; /* Adjusted mobile logo height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for mobile buttons row */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background-color: var(--dark-bg-1); /* Consistent dark background */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px; /* Max sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(180deg, var(--dark-bg-2), var(--dark-bg-3));
    z-index: 1000; /* Above overlay */
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color for nav menu */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5), inset -5px 0 10px rgba(255, 255, 255, 0.05);
    overflow-y: auto; /* Enable scrolling for long menus */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
  }

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

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

  /* Footer Mobile */
  .site-footer {
    padding: 30px 0 15px;
  }

  .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column layout for top footer */
    gap: 30px;
  }

  .footer-col {
    min-width: unset; /* Remove min-width for mobile */
    width: 100%;
    text-align: center; /* Center content for single column */
  }

  .footer-logo {
    margin-bottom: 10px;
  }

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

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
  }

  .footer-nav li {
    margin-bottom: 0;
  }

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

  .footer-middle .footer-container {
    flex-direction: column;
    gap: 25px;
  }

  .game-providers-section h4,
  .social-media-section h4 {
    text-align: center;
  }

  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: center;
  }

  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 15px;
  }

  .footer-action-links {
    justify-content: center;
    gap: 10px;
  }

  .footer-action-links a {
    padding: 6px 10px;
    font-size: 12px;
  }

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

/* Scroll lock for mobile menu */
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;
  }
}
