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

  /* Neon colors based on primary color scheme */
  --neon-primary: #00FFC0; /* Vibrant Aqua Green */
  --neon-secondary: #FFD700; /* Gold Yellow */
  --neon-accent: #FF00FF; /* Magenta */

  /* Header offsets */
  --header-offset: 141px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(36px) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 140px; /* Mobile: Marquee(35px) + HeaderTop(56px) + MobileButtons(49px) */
  }
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: #1a1a2e; /* Dark background for the page content */
  color: #e0e0e0;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

/* Fixed Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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 theme colors for 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, 192, 0.1); /* Aqua green glow */
  z-index: 1001; /* Ensure on top of header */
  height: 45px; /* Desktop height */
  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-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;
  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 10px;
  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%); }
}

/* Fixed Header Section */
.site-header {
  position: fixed;
  top: 45px; /* Below marquee desktop height */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic theme colors for 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, 192, 0.1); /* Aqua green glow */
}

.header-top {
  width: 100%;
  padding: 10px 0; /* 20px vertical padding */
  min-height: 40px; /* Content area for logo/buttons */
  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; /* Horizontal padding for desktop container */
}

/* LOGO - No neon effects */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White, for clear contrast */
  text-decoration: none;
  display: block; /* Ensure it's a block for proper flex alignment */
  flex-shrink: 0; /* Prevent logo from shrinking */
}

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 10px;
  flex-shrink: 0; /* Prevent buttons from shrinking */
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
}

/* Main Navigation */
.main-nav {
  width: 100%;
  background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic color for border */
  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, 215, 0, 0.1); /* Gold yellow glow */
  display: flex; /* Desktop: display flex */
  flex-direction: row; /* Desktop: horizontal */
  align-items: center;
  padding: 10px 0; /* 20px vertical padding */
  min-height: 16px; /* Content area for nav links */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  padding: 0 20px; /* Horizontal padding for nav container */
  gap: 25px; /* Space between nav links */
}

.nav-link {
  color: var(--secondary-color); /* White for nav links */
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover {
  color: var(--neon-primary); /* Hover with neon color */
  text-shadow: 0 0 8px var(--neon-primary), 0 0 15px var(--neon-primary);
}

/* Buttons - Neon Style with Dynamic Colors */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 20px; /* Adjusted padding */
  font-size: 15px; /* Adjusted font size */
  color: var(--register-login-font-color); /* Yellow font for buttons */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic theme colors for border */
  text-shadow:
    0 0 5px var(--register-login-font-color),
    0 0 10px var(--register-login-font-color); /* Yellow glow for text */
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent text wrapping by default */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    0 0 45px var(--neon-primary),
    inset 0 0 15px rgba(0, 255, 192, 0.3); /* Aqua green glow */
}

/* Animations for dynamic neon colors */
@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, 192, 0.3); /* Aqua green glow */
  }
  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, 215, 0, 0.3); /* Gold yellow glow */
  }
  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, 0, 255, 0.3); /* Magenta glow */
  }
}

@keyframes alternate-colors { /* For main-nav border */
  0%, 100% {
    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, 215, 0, 0.3); /* Gold yellow glow */
  }
  50% {
    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, 0, 255, 0.3); /* Magenta glow */
  }
}

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

/* Footer Section */
.site-footer {
  background-color: #1a1a2e; /* Dark background */
  color: #e0e0e0;
  padding-top: 40px;
  font-size: 14px;
  line-height: 1.6;
}

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

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

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

.footer-col h4 {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color); /* Green for footer logo */
  margin-bottom: 10px;
  display: block;
}

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

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

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

.footer-nav-links li a:hover {
  color: var(--primary-color);
}

/* Payment Methods, Game Providers, Social Media Icons */
.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: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  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%); /* Colorize on hover */
}

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

.game-providers-section, .social-media-section {
  margin-bottom: 20px;
}
.social-media-section {
  margin-bottom: 0; /* No margin-bottom for the last section in middle */
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  padding-top: 20px;
  padding-bottom: 20px;
}

.footer-bottom .copyright {
  margin: 0;
  color: #b0b0b0;
  flex-grow: 1;
  text-align: left; /* Align left on desktop */
}

.footer-action-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end; /* Align right on desktop */
}

.footer-action-links li a {
  color: var(--register-color); /* Red for action links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-action-links li a:hover {
  color: var(--register-login-font-color); /* Yellow on hover */
}

/* Hamburger Menu Icon */
.hamburger-menu {
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  z-index: 1002; /* Above logo and overlay */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--neon-primary); /* Neon color for lines */
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  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 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 999; /* Below hamburger and mobile menu */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Page content mobile image overflow protection */
@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;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    height: 35px; /* Mobile marquee height */
  }

  .site-header {
    top: 35px; /* Below mobile marquee */
  }

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

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

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

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

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

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

  .header-top {
    padding: 8px 0; /* Smaller vertical padding (16px total) */
    min-height: 40px; /* Content area for logo/buttons */
  }

  .header-container {
    padding: 0 15px; /* Smaller horizontal padding */
    justify-content: flex-start; /* Align hamburger to start */
    position: relative; /* For absolute positioning of logo if needed */
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
    margin-right: 15px; /* Space between hamburger and logo */
  }

  /* Logo centering for mobile (Method 1: Flexbox + !important) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Smaller font size for mobile logo */
    order: 2; /* Place logo second */
  }
  .logo img {
    max-height: 40px; /* Mobile logo height */
  }

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

  /* Mobile Navigation Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button bar */
    overflow: hidden;
    gap: 10px; /* Space between buttons */
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e); /* Dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space equally */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller 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 */
    position: fixed;
    top: 0; /* Full height menu */
    left: 0;
    height: 100%;
    width: 280px; /* Width of mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    border: none; /* Remove border */
  }

  .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: 80px 20px 20px; /* Padding for menu items, accounting for fixed header */
    gap: 15px; /* Space between mobile nav links */
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
  }

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

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

  .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

  .footer-bottom .copyright {
    text-align: center;
    order: 2; /* Put copyright below action links on mobile */
  }

  .footer-action-links {
    justify-content: center; /* Center action links on mobile */
    width: 100%;
    order: 1; /* Put action links above copyright on mobile */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
