: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 based on primary/secondary, for dynamic effects */
  --neon-primary: #00FF00; /* Bright Green */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF00FF; /* Magenta */
  --neon-glow-color-1: #00FF00; /* Green */
  --neon-glow-color-2: #00FFFF; /* Cyan */
  --neon-glow-color-3: #FF00FF; /* Magenta */

  /* Header offsets - Desktop: Marquee(45) + HeaderTop(60) + MainNav(50) = 155px */
  --header-offset: 155px; 
  --marquee-height-desktop: 45px;
  --marquee-height-mobile: 30px;
}

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

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  background-color: #1a1a2e; /* Dark background for overall site */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

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

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

/* Keyframe Animations for Neon Effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-glow-color-1);
    box-shadow: 
      0 0 10px var(--neon-glow-color-1),
      0 0 20px var(--neon-glow-color-1);
  }
  33% {
    border-color: var(--neon-glow-color-2);
    box-shadow: 
      0 0 10px var(--neon-glow-color-2),
      0 0 20px var(--neon-glow-color-2);
  }
  66% {
    border-color: var(--neon-glow-color-3);
    box-shadow: 
      0 0 10px var(--neon-glow-color-3),
      0 0 20px var(--neon-glow-color-3);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-1),
      0 0 10px var(--neon-glow-color-1),
      0 0 15px var(--neon-glow-color-1);
    color: #ffffff;
  }
  33% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-2),
      0 0 10px var(--neon-glow-color-2),
      0 0 15px var(--neon-glow-color-2);
    color: #ffffff;
  }
  66% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-3),
      0 0 10px var(--neon-glow-color-3),
      0 0 15px var(--neon-glow-color-3);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-glow-color-1),
      0 0 10px var(--neon-glow-color-1),
      0 0 15px var(--neon-glow-color-1);
    color: #ffffff;
  }
}

/* Marquee Section Styles */
.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-glow-color-1),
    0 0 20px var(--neon-glow-color-1),
    0 0 30px var(--neon-glow-color-1),
    inset 0 0 20px rgba(0, 255, 0, 0.1); /* Green glow */
  z-index: 1001;
  height: var(--marquee-height-desktop); /* Fixed 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-glow-color-1),
    0 0 10px var(--neon-glow-color-1),
    0 0 15px var(--neon-glow-color-1);
  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;
  height: 100%; /* Ensure wrapper takes full height */
  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%; /* Ensure content takes full height */
}

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

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  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-glow-color-2), /* Cyan glow */
    0 0 20px var(--neon-glow-color-2),
    0 0 30px var(--neon-glow-color-2),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.header-top {
  display: flex;
  align-items: center;
  min-height: 60px; /* Desktop top bar height */
}

.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); /* White for logo, no neon */
  text-transform: uppercase;
  display: block;
  flex-shrink: 0;
  padding: 10px 0; /* Adjust padding to match header-top height */
  /* LOGO must not have neon effects */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 20px;
  color: var(--reg-log-font-color); /* Yellow for button text */
  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(--neon-glow-color-1);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-glow-color-1),
    0 0 25px var(--neon-glow-color-1),
    0 0 35px var(--neon-glow-color-1),
    inset 0 0 15px rgba(0, 255, 0, 0.3);
}

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

.main-nav {
  display: flex;
  background: linear-gradient(135deg, #16213e, #0f3460); /* Darker background for nav */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic color border, reverse animation */
  box-shadow: 
    0 0 10px var(--neon-glow-color-3), /* Magenta glow */
    0 0 20px var(--neon-glow-color-3),
    0 0 30px var(--neon-glow-color-3),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  min-height: 50px; /* Desktop nav height */
}

.main-nav .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 {
  color: var(--secondary-color); /* White for nav links, no neon */
  font-size: 16px;
  font-weight: 500;
  padding: 10px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-glow-color-1); /* Greenish hover */
  text-shadow: 0 0 5px var(--neon-glow-color-1), 0 0 10px var(--neon-glow-color-1);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above logo */
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin-right: 15px;
}

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--neon-glow-color-1); /* Green glow for lines */
  margin-bottom: 5px;
  position: relative;
  transform-origin: 4px 0px;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  box-shadow: 0 0 5px var(--neon-glow-color-1), 0 0 10px var(--neon-glow-color-1);
}

.hamburger-menu span:first-child {
  transform-origin: 0% 0%;
}
.hamburger-menu span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

.hamburger-menu.active span:first-child {
  transform: rotate(45deg) translate(5px, 0px);
  background-color: var(--neon-glow-color-2);
  box-shadow: 0 0 5px var(--neon-glow-color-2), 0 0 10px var(--neon-glow-color-2);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

.hamburger-menu.active span:nth-last-child(1) {
  transform: rotate(-45deg) translate(5px, 0px);
  background-color: var(--neon-glow-color-2);
  box-shadow: 0 0 5px var(--neon-glow-color-2), 0 0 10px var(--neon-glow-color-2);
}

.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;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

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

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

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

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

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

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

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

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

.footer-col ul li a {
  color: #cccccc;
  transition: color 0.3s ease;
}

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

.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: 40px; /* Reduced max-height for all icons */
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  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 */
}

.game-providers-section,
.social-media-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.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;
  color: #888888;
  font-size: 13px;
  margin-top: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* General mobile adjustments */
  body {
    padding-top: var(--header-offset);
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Marquee mobile adjustments */
  .marquee-section {
    height: var(--marquee-height-mobile);
    padding: 0;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 14px;
  }
  .marquee-text {
    font-size: 12px;
  }
  .marquee-separator {
    font-size: 12px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 25s linear infinite;
  }

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

  .header-top {
    min-height: 50px; /* Mobile top bar height */
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .header-container {
    padding: 0; /* Reset padding for mobile, handled by header-top */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    margin-right: 0;
    order: 0; /* Ensure it's on the left */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    padding: 0;
    order: 1; /* Center the logo */
  }
  .logo img {
    max-height: 40px; /* Adjust logo image size for mobile */
  }

  .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 row */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: rgba(0, 0, 0, 0.4); /* Slightly transparent background */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    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, shown with JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below header + mobile buttons */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a); /* Dark gradient for menu */
    padding: 20px 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  }

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

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

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

  /* Footer mobile adjustments */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    margin-bottom: 30px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .footer-col ul li {
    margin-bottom: 0;
  }
  .footer-col ul li a {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }
  .footer-logo {
    text-align: center;
  }
  .footer-description {
    text-align: center;
  }
  .game-providers-section,
  .social-media-section {
    text-align: center;
  }
  .payment-icons,
  .game-providers-icons,
  .social-media-icons {
    justify-content: center;
  }
  .payment-icons img,
  .game-providers-icons img,
  .social-media-icons img {
    max-height: 35px; /* Further reduce icon size for mobile */
  }
}

/* Ensure color contrast */
/* Main text on dark background */
body, .marquee-text, .nav-link, .footer-description, .footer-col ul li a, .footer-bottom p {
  color: #ffffff; /* Or #cccccc for secondary text */
}
/* Headings on dark background */
.footer-col h4, .game-providers-section h4, .social-media-section h4 {
  color: #ffffff;
}
/* Buttons on dark background */
.btn {
  color: var(--reg-log-font-color); /* Yellow for contrast */
}
/* Logo on dark background */
.logo, .footer-logo {
  color: var(--secondary-color); /* White for contrast */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
