html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Arial', sans-serif; background-color: var(--bg-color, #121212); color: #e0e0e0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --register-login-font-color: #FFFF00;
  --bg-color: #0a0a0a;
  --neon-primary: #00ffcc; /* Bright Cyan/Green for glow, derived from primary green */
  --neon-secondary: #ff33cc; /* Bright Pink/Magenta */
  --neon-accent: #ffff00; /* Bright Yellow, from custom font color */
  --header-offset: 155px; /* Desktop: Marquee 45px + Header-top 60px + Main-nav 50px */
}
@media (max-width: 768px) {
  :root {
    --header-offset: 140px; /* Mobile: Marquee 30px + Header-top 50px + Mobile-buttons 60px */
  }
}

/* Animations for Neon Effects */
@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%); }
}
@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, 204, 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, 51, 204, 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);
  }
}
@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 Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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), 0 0 20px var(--neon-primary), 0 0 30px var(--neon-primary), inset 0 0 20px rgba(0, 255, 204, 0.1);
  z-index: 1001;
  height: 45px; /* Fixed height for calculation */
}
.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: 25px;
  height: 25px;
  z-index: 2;
  position: relative;
}
.marquee-icon-emoji {
  font-size: 18px;
  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;
  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;
  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: 45px; /* Offset by marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Background handled by header-top and main-nav */
}
.header-top {
  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), 0 0 20px var(--neon-primary), 0 0 30px var(--neon-primary), inset 0 0 20px rgba(0, 255, 204, 0.1);
  min-height: 60px; /* For offset calculation */
  display: flex; /* Ensure flex for container */
  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;
  min-height: 60px;
}
.logo {
  color: var(--secondary-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  padding: 0;
  transition: color 0.3s ease;
  order: 0; /* Default order for desktop */
}
.logo:hover { color: var(--primary-color); }
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  order: 1; /* Default order for desktop */
}
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Use custom colors for buttons */
  padding: 12px 25px;
  color: var(--register-login-font-color); /* Use custom font color */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 0 0 5px var(--register-login-font-color), 0 0 10px var(--register-login-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
}
.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(0, 255, 204, 0.4);
}
.main-nav {
  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), 0 0 20px var(--neon-secondary), 0 0 30px var(--neon-secondary), inset 0 0 20px rgba(255, 51, 204, 0.1);
  width: 100%;
  display: flex;
  min-height: 50px; /* For offset calculation */
  align-items: center;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  gap: 25px;
}
.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-link:hover { color: var(--primary-color); }
.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  order: -1; /* Place at the beginning */
  margin-right: 15px; /* Space from logo */
}
.hamburger-icon, .hamburger-icon::before, .hamburger-icon::after {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}
.hamburger-icon::before, .hamburger-icon::after {
  content: '';
}
.hamburger-icon::before {
  transform: translateY(-8px);
}
.hamburger-icon::after {
  transform: translateY(8px);
}
.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
  box-shadow: none;
}
.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(0) rotate(45deg);
  background-color: var(--neon-accent);
  box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
}
.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(0) rotate(-45deg);
  background-color: var(--neon-accent);
  box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
}
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}
.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;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active { display: block; opacity: 1; }

/* Footer Section */
.site-footer {
  background-color: #1a1a2e;
  color: #e0e0e0;
  padding: 40px 0 20px;
  font-size: 14px;
}
.footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 30px;
}
.footer-grid-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 20px;
}
.footer-col h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-col ul li a:hover { color: var(--primary-color); }
.footer-logo {
  color: var(--secondary-color);
  font-size: 24px;
  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;
}
.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;
  display: block;
  object-fit: contain;
}
.footer-middle {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
}
.game-providers-section, .social-media-section {
  margin-bottom: 20px;
}
.game-providers-section:last-child, .social-media-section:last-child {
  margin-bottom: 0;
}
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-action-links {
  display: flex;
  gap: 15px;
}
.footer-action-links a {
  color: var(--register-login-font-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  background-color: var(--register-color);
  border-radius: 3px;
  transition: background-color 0.3s ease;
}
.footer-action-links a:hover { background-color: #a00606; }

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    height: 30px;
    padding: 0;
  }
  .marquee-container {
    padding: 5px 10px;
    gap: 10px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 13px;
    margin: 0;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 5px;
  }
  .marquee-content {
    gap: 15px;
    animation-duration: 20s;
  }

  .site-header {
    top: 30px; /* Offset by mobile marquee height */
  }
  .header-top {
    min-height: 50px;
  }
  .header-container {
    padding: 0 15px;
    min-height: 50px;
    width: 100%;
    max-width: none;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .desktop-nav-buttons {
    display: none;
  }
  .hamburger-menu {
    display: flex;
    width: 40px;
    height: 40px;
    margin-left: 0; /* Remove default margin for positioning */
    margin-right: 0; /* Adjusted in header-container */
  }
  .mobile-nav-buttons {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), inset 0 0 10px rgba(0, 255, 204, 0.1);
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 60px; /* For offset calculation */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    padding: 8px 12px;
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Offset by combined header height */
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    align-items: flex-start;
    padding-top: 20px;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary), inset 0 0 20px rgba(0, 255, 204, 0.1);
  }
  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none;
    gap: 15px;
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child { border-bottom: none; }

  .footer-grid-container {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  .footer-top, .footer-middle, .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
  }
  .footer-bottom {
    text-align: left;
    align-items: flex-start;
  }
  .footer-action-links {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .footer-action-links a {
    width: calc(100% - 20px);
    text-align: 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
