/* Global Styles */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --bg-color: #FFFFFF;
  --reg-log-font-color: #FFFF00;

  /* Neon Colors - adapted from primary/secondary for vibrancy */
  --neon-primary: #00FF00; /* Vibrant Green */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */

  --marquee-height-desktop: 45px;
  --marquee-height-mobile: 45px;
  --header-top-height-desktop: 60px;
  --header-nav-height-desktop: 50px;
  --mobile-buttons-height: 50px;

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #0a0a0a; /* Dark background for neon theme */
  color: var(--secondary-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

@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 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(0, 255, 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(255, 255, 0, 0.3);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop);
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* 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(0, 255, 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;
  height: 100%;
  box-sizing: border-box;
}

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

.marquee-icon-emoji {
  font-size: 20px;
  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;
  padding-right: 30px; /* Ensure content is visible before repeating */
}

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

.marquee-text {
  font-size: 14px;
  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: 14px;
  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: #0a0a0a;
  display: flex; /* For mobile button row */
  flex-direction: column;
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
  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(0, 255, 0, 0.1);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Regular color, not neon */
  text-decoration: none;
  display: block;
  padding: 10px 0;
  order: 1;
  flex-shrink: 0;
  line-height: 1;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  order: 2;
  flex-shrink: 0;
}

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  min-height: var(--header-nav-height-desktop);
  display: flex;
  align-items: center;
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different neon color flow */
  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(255, 0, 255, 0.1);
}

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

.nav-link {
  color: #ffffff;
  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(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 20px;
  color: var(--reg-log-font-color); /* Yellow font for buttons */
  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-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}

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

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  position: relative;
  width: 40px;
  height: 40px;
  order: 0;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(5px);
}

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

/* Footer Section */
.site-footer {
  background-color: #1a1a1a; /* Regular dark background */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

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

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

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

.footer-links li a {
  color: #cccccc;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

.footer-links li 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: 40px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

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

.footer-middle-sections {
  max-width: 1200px;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  color: #999999;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

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

  .marquee-section {
    height: var(--marquee-height-mobile);
  }

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

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

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

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

  .marquee-separator {
    font-size: 12px;
    margin: 0 5px;
  }

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

  .site-header {
    top: var(--marquee-height-mobile);
  }

  .header-container {
    padding: 0 15px;
    max-width: none; /* Mobile container must be full width */
    position: relative;
    min-height: var(--header-top-height-desktop);
  }

  .hamburger-menu {
    display: block;
    order: 0;
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
  }
  .hamburger-menu span {
    width: 20px;
    margin: 4px 0;
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 1; /* Center the logo */
    font-size: 24px;
    padding: 0;
    height: var(--header-top-height-desktop);
  }
  .logo img {
    max-height: 40px; /* Adjust image logo size for mobile */
  }

  .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; /* Ensure buttons stay in one line */
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: var(--mobile-buttons-height);
    align-items: center;
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 70%; /* Adjust as needed */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(135deg, #0f3460, #16213e, #1a1a2e);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    padding-top: 20px;
    box-sizing: border-box;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
  }

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

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

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

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col {
    text-align: center;
  }
  .footer-col h4 {
    text-align: center;
  }
  .footer-links li a {
    text-align: center;
  }
  .footer-about .footer-logo, .footer-about .footer-description {
    text-align: center;
  }

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

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }
  .mobile-nav-buttons .btn {
    font-size: 12px;
    padding: 6px 8px;
  }
  .marquee-text {
    font-size: 11px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
