:root {
  --header-offset: 120px; /* Desktop: Header + button area height */
  --marquee-height-desktop: 50px;
  --header-main-height-desktop: 70px;
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: #FF6600; /* Orange for accent */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Marquee + Header Top + Mobile Buttons */
    --marquee-height-mobile: 40px;
    --header-top-height-mobile: 60px;
    --mobile-buttons-height: 80px; /* Approx height of mobile buttons area */
  }
}

/* Keyframe Animations for Neon Effects */
@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 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;
  }
}

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

/* 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, 215, 0, 0.1);
  z-index: 1001;
  padding: 5px 0; /* Adjusted padding */
}

.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; /* Reduced icon size */
  height: 30px; /* Reduced icon size */
  z-index: 2;
  position: relative;
}

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

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  color: #ffffff;
  min-height: var(--header-main-height-desktop);
}

.header-top {
  width: 100%;
  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 */
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  padding: 10px 0;
}

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

.logo {
  color: #ffffff; /* Regular color for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  /* NO NEON EFFECTS on LOGO */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
}

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

.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 12px;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: #ffffff;
  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 #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary);
}

.main-nav {
  width: 100%;
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite; /* Different dynamic border for main nav */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    inset 0 0 20px rgba(139, 0, 0, 0.1);
  padding: 5px 0;
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  position: static; /* Desktop default: normal flow */
}

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

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
  /* Regular text style, no neon effects */
  text-shadow: none;
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo and overlay */
  margin-right: 15px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger */
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 11px; }
.hamburger-menu span:nth-child(3) { top: 22px; }

.hamburger-menu.active span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  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;
}

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

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

.footer-col h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 5px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

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

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

.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(--primary-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;
  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;
  filter: grayscale(100%) brightness(150%); /* For better visibility on dark background */
  transition: filter 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 {
  filter: grayscale(0%) brightness(100%);
}

.game-providers-section,
.social-media-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 20px 25px;
  background-color: var(--dark-bg-2);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.game-providers-section h4,
.social-media-section h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 5px;
}

.game-providers-section h4::after,
.social-media-section h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 25px 0;
  border-top: 1px solid #333333;
  text-align: center;
  color: #999999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-buttons-height));
  }

  /* Mobile Marquee */
  .marquee-section {
    padding: 2px 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    gap: 15px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 10px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Mobile Header */
  .site-header {
    top: var(--marquee-height-mobile);
  }
  .header-top {
    padding: 5px 0;
    min-height: var(--header-top-height-mobile);
  }
  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    position: relative; /* For absolute logo positioning */
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Leftmost */
    margin-left: 0;
    margin-right: 15px;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    padding: 0;
    margin-left: -45px; /* Offset for hamburger menu */
  }
  .logo img {
    max-height: 40px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--dark-bg-3), var(--dark-bg-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-accent),
      0 0 15px var(--neon-accent);
    gap: 10px; /* Spacing between buttons */
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

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

  .main-nav {
    display: none; /* Hidden by default, JS adds 'active' */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Below marquee and header top and mobile buttons */
    left: 0;
    width: 70%;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(180deg, var(--dark-bg-3), var(--dark-bg-1));
    padding: 20px 0;
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1000; /* Above overlay */
    border: none; /* Remove desktop border */
    animation: none; /* Remove desktop animation */
    box-shadow: none; /* Remove desktop box-shadow */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none;
  }

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

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

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

  .footer-col {
    text-align: center;
  }
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .footer-logo {
    text-align: center;
  }
  .footer-description {
    text-align: center;
  }

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

  .game-providers-section,
  .social-media-section {
    padding: 15px;
    margin: 0 auto 20px;
  }

  .game-providers-section h4::after,
  .social-media-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-bottom {
    padding: 15px 15px 0;
  }

  /* 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;
  }
}
