:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --background-color: #FFFFFF;
  --register-login-font-color: #FFFF00;

  /* Neon colors derived from primary green scheme, with vibrant accents */
  --neon-primary: #00FF00; /* Bright Green */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF00FF; /* Fuchsia */
  --neon-glow-color1: #00FF00;
  --neon-glow-color2: #00FFFF;
  --neon-glow-color3: #FF00FF;
  --neon-glow-color4: #FFFF00;

  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* 桌面端：45px + 60px + 50px = 155px */

  --marquee-height-mobile: 30px;
  --header-top-height-mobile: 50px;
  --mobile-nav-buttons-height-mobile: 45px;
  --header-offset-mobile: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* 移动端：30px + 50px + 45px = 125px */
}

@media (max-width: 768px) {
  :root {
    --header-offset: var(--header-offset-mobile); /* 移动端：125px */
  }
}

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

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Neon Glow Animations - Dynamic Colors */
@keyframes text-glow-flow {
  0% {
    text-shadow: 0 0 5px var(--neon-glow-color1), 0 0 10px var(--neon-glow-color1), 0 0 15px var(--neon-glow-color1);
    color: var(--secondary-color);
  }
  33% {
    text-shadow: 0 0 5px var(--neon-glow-color2), 0 0 10px var(--neon-glow-color2), 0 0 15px var(--neon-glow-color2);
    color: var(--secondary-color);
  }
  66% {
    text-shadow: 0 0 5px var(--neon-glow-color3), 0 0 10px var(--neon-glow-color3), 0 0 15px var(--neon-glow-color3);
    color: var(--secondary-color);
  }
  100% {
    text-shadow: 0 0 5px var(--neon-glow-color4), 0 0 10px var(--neon-glow-color4), 0 0 15px var(--neon-glow-color4);
    color: var(--secondary-color);
  }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-glow-color1);
    box-shadow: 0 0 10px var(--neon-glow-color1), 0 0 20px var(--neon-glow-color1), inset 0 0 10px rgba(0, 255, 0, 0.3);
  }
  33% {
    border-color: var(--neon-glow-color2);
    box-shadow: 0 0 10px var(--neon-glow-color2), 0 0 20px var(--neon-glow-color2), inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
  66% {
    border-color: var(--neon-glow-color3);
    box-shadow: 0 0 10px var(--neon-glow-color3), 0 0 20px var(--neon-glow-color3), inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
}

@keyframes neon-pulse {
  from {
    box-shadow: 0 0 5px var(--neon-glow-color1), 0 0 10px var(--neon-glow-color1);
  }
  to {
    box-shadow: 0 0 15px var(--neon-glow-color1), 0 0 30px var(--neon-glow-color1), 0 0 45px var(--neon-glow-color1);
  }
}

@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, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 0 0 10px var(--neon-glow-color1), 0 0 20px var(--neon-glow-color1), 0 0 30px var(--neon-glow-color1), inset 0 0 20px rgba(0, 255, 0, 0.1);
  z-index: 1001;
  height: var(--marquee-height-desktop);
  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: 0 20px;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  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-glow-color1), 0 0 10px var(--neon-glow-color1), 0 0 15px var(--neon-glow-color1);
  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; /* To ensure seamless loop */
}

.marquee-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  text-shadow: 0 0 5px var(--neon-glow-color1), 0 0 10px var(--neon-glow-color1), 0 0 15px var(--neon-glow-color1);
  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-glow-color1), 0 0 20px var(--neon-glow-color1), 0 0 30px var(--neon-glow-color1), 0 0 40px var(--neon-glow-color1);
  transform: scale(1.05);
  color: var(--secondary-color);
}

.marquee-separator {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-shadow: 0 0 3px var(--neon-glow-color1), 0 0 6px var(--neon-glow-color1);
}

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop);
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
}

.header-top {
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  box-shadow: 0 0 10px var(--neon-glow-color1), 0 0 20px var(--neon-glow-color1), inset 0 0 10px rgba(0, 255, 0, 0.3);
  height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  padding: 0;
  margin: 0;
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  display: none; /* Hidden 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 reverse;
  box-shadow: 0 0 10px var(--neon-glow-color2), 0 0 20px var(--neon-glow-color2), inset 0 0 10px rgba(0, 255, 255, 0.3);
  height: var(--main-nav-height-desktop);
  display: flex;
  align-items: center;
}

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

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color);
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002;
}

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

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

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(2px, -1px);
}

.mobile-menu-overlay {
  display: none;
  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;
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Using custom register/login colors */
  padding: 10px 25px;
  color: var(--register-login-font-color); /* Using custom font color */
  font-weight: bold;
  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-size: 14px;
  white-space: nowrap;
}

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

/* Footer Section */
.site-footer {
  background-color: #1a1a1a;
  color: #cccccc;
  padding-top: 40px;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: bold;
}

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

.footer-top {
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.footer-col ul li a {
  display: block;
  padding: 5px 0;
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

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

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

.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;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

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

.footer-middle {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section, .social-media-section {
  margin-bottom: 20px;
}

.game-providers-section:last-child, .social-media-section:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
}

.footer-bottom .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.copyright {
  margin: 0 0 10px 0;
  color: #aaaaaa;
}

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

.footer-actions li a {
  color: var(--primary-color);
  font-weight: 500;
}

.footer-actions li a:hover {
  text-decoration: underline;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0;
  }

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

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

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

  .marquee-text,
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }

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

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

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

  .header-container {
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none;
  }

  .hamburger-menu {
    display: block;
    order: 0;
    margin-right: auto;
  }

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

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

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

  .mobile-nav-buttons {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 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-glow-color1), 0 0 10px var(--neon-glow-color1), inset 0 0 5px rgba(0, 255, 0, 0.2);
    height: var(--mobile-nav-buttons-height-mobile);
    flex-wrap: nowrap;
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset-mobile);
    left: 0;
    width: 70%;
    max-width: 300px;
    height: calc(100vh - var(--header-offset-mobile));
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a);
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    z-index: 1000;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5), 0 0 10px var(--neon-glow-color3);
  }

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

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

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

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

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

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

  .footer-col h4 {
    margin-top: 20px;
  }

  .footer-actions {
    flex-direction: column;
    gap: 10px;
  }

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

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