:root {
  --primary-color: #017439; /* Green */
  --secondary-color: #FFFFFF; /* White */
  --register-color: #C30808; /* Red */
  --login-color: #C30808; /* Red */
  --bg-color: #FFFFFF; /* White */
  --reg-log-font-color: #FFFF00; /* Yellow */

  /* Neon colors for dynamic effects - fluorescent, contrasting */
  --neon-primary: #00FFFF; /* Cyan */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */

  --header-offset: 155px; /* Desktop: Marquee(45) + HeaderTop(60) + MainNav(50) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 135px; /* Mobile: Marquee(40) + HeaderTop(50) + MobileButtons(40) */
  }
}

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: #121212; /* Dark background for overall neon theme */
  color: #e0e0e0;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

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

/* Animations for Neon Effects */
@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, #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, 255, 0.1);
  z-index: 1001; /* Ensure on top of header */
  height: 45px; /* Fixed height for offset calculation */
  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: 24px; /* Reduced size for better fit */
  height: 24px; /* Reduced size for better fit */
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px; /* Reduced 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;
  height: 100%; /* Occupy full height of marquee-section */
  display: flex;
  align-items: center;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  height: 100%; /* Occupy full height of marquee-wrapper */
}

.marquee-text {
  font-size: 16px;
  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: 16px;
  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; /* Below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--secondary-color);
  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),
    inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.header-top {
  width: 100%;
  min-height: 60px; /* Fixed height for offset calculation */
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f0f0f, #22223b, #1e2a4d); /* Slightly different dark gradient */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

.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: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular white color, no neon for logo */
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 20px; /* Space between logo and potential nav on desktop */
}

.desktop-nav-buttons {
  display: flex; /* Always flex on desktop */
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  position: relative;
  background: var(--register-color); /* Use custom color for buttons */
  padding: 12px 25px;
  color: var(--reg-log-font-color); /* Custom font color for buttons */
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  text-shadow: 
    0 0 5px var(--reg-log-font-color),
    0 0 10px var(--reg-log-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

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

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

.main-nav {
  width: 100%;
  min-height: 50px; /* Fixed height for offset calculation */
  background: linear-gradient(135deg, #16213e, #0f3460, #0a1128); /* Different dark gradient for contrast */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic color border, reversed animation */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    inset 0 0 10px rgba(255, 0, 255, 0.1);
  display: flex; /* Default to flex for desktop */
  align-items: center;
  padding: 0;
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--secondary-color); /* Regular white color, no neon for nav links */
  padding: 10px 15px;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary); /* Hover with neon color */
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo on mobile */
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary); /* Neon color for hamburger */
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary); /* Neon glow */
}

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below mobile menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

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

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

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

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

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

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color); /* Green hover for footer links */
}

.payment-icons,
.game-providers-icons,
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Consistent gap for all icon sections */
  width: 100%;
}

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(150%); /* Subtle effect for icons */
  transition: filter 0.3s ease;
}

.payment-icons img:hover,
.game-providers-icons img:hover,
.social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%); /* Color on hover */
}

.footer-middle {
  margin-bottom: 30px;
}

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

.game-providers-section h4,
.social-media-section h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333333;
  color: #999999;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .marquee-section {
    height: 40px; /* Smaller marquee on mobile */
  }
  .marquee-container {
    padding: 0 10px;
    gap: 10px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text, .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    animation-duration: 20s; /* Faster scroll on mobile */
  }

  .site-header {
    top: 40px; /* Below smaller marquee */
  }

  .header-top {
    min-height: 50px; /* Smaller header top on mobile */
    padding: 5px 0;
  }
  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, logo center */
    position: relative;
    min-height: 50px; /* Ensure space for logo and hamburger */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Left side */
    margin-right: 15px;
  }

  .logo {
    order: 2; /* Center logo */
    flex: 1 !important; /* Take remaining space */
    display: flex !important; /* Flex container for centering */
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px; /* Smaller logo font */
    margin: 0; /* Remove desktop margin */
    max-width: calc(100% - 60px); /* Account for hamburger width */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button container */
    background-color: #1a1a1a; /* Dark background for buttons row */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: 40px; /* Fixed height for offset calculation */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below marquee, header top, and mobile buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    background: linear-gradient(180deg, #16213e, #0f3460, #0a1128); /* Dark gradient */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      5px 0 15px var(--neon-secondary),
      10px 0 30px var(--neon-secondary);
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .footer-col:not(.footer-about) {
    text-align: center;
  }
  .footer-col h4 {
    text-align: center;
  }
  .footer-nav {
    align-items: center;
    display: flex;
    flex-direction: column;
  }
  .payment-methods,
  .game-providers-section,
  .social-media-section {
    text-align: center;
  }
  .payment-icons,
  .game-providers-icons,
  .social-media-icons {
    justify-content: center; /* Center icons on mobile */
  }

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