:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color: #ffffff; /* Default text color for neon elements */
  --dark-bg: #0a0a0a;
  --dark-bg-light: #1a1a2e;
  --dark-bg-dark: #16213e;

  /* Neon colors - vibrant and contrasting */
  --neon-primary: #00FF00; /* Bright Green */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF00FF; /* Magenta */
  --neon-yellow: #FFFF00;
  --neon-red: #FF0000;
  --neon-orange: #FF6600;

  /* Header offset calculation */
  --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)); /* Desktop */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 35px;
    --header-top-height-mobile: 50px; /* Hamburger + Logo */
    --mobile-buttons-height: 60px; /* Buttons + padding + margin */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Mobile */
  }
}

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #333; /* Dark background for the body content */
  color: #fff;
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Neon Glow Animations */
@keyframes rainbow-border {
  0% { border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red); }
  16.6% { border-color: var(--neon-orange); box-shadow: 0 0 10px var(--neon-orange), 0 0 20px var(--neon-orange); }
  33.3% { border-color: var(--neon-yellow); box-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow); }
  50% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  66.6% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
  83.3% { border-color: var(--neon-accent); box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent); }
  100% { border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red); }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes alternate-colors {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes random-glow {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 20px var(--neon-primary); }
  20% { border-color: var(--neon-secondary); box-shadow: 0 0 20px var(--neon-secondary); }
  40% { border-color: var(--neon-accent); box-shadow: 0 0 20px var(--neon-accent); }
  60% { border-color: var(--neon-yellow); box-shadow: 0 0 20px var(--neon-yellow); }
  80% { border-color: var(--neon-red); box-shadow: 0 0 20px var(--neon-red); }
  100% { border-color: var(--neon-primary); box-shadow: 0 0 20px var(--neon-primary); }
}

@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, 0, 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(0, 255, 255, 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, 0, 255, 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: var(--text-color); }
  50% { text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary); color: var(--text-color); }
  100% { text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent); color: var(--text-color); }
}

@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%;
  height: var(--marquee-height-desktop);
  background: linear-gradient(135deg, var(--dark-bg), var(--dark-bg-light), var(--dark-bg-dark));
  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, 0, 0.1);
  z-index: 1001;
  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: 40px;
  height: 40px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 24px;
  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;
  padding-right: 30px; /* Add some padding to the end of content */
}

.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: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Background handled by header-top and main-nav */
  color: var(--text-color);
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg), var(--dark-bg-light), var(--dark-bg-dark));
  height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow), 0 0 30px var(--neon-yellow), inset 0 0 20px rgba(255, 255, 0, 0.1);
}

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

.logo {
  color: var(--secondary-color); /* White for contrast */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure it's block for proper layout */
  /* NO NEON EFFECTS FOR LOGO */
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px;
  /* NO NEON EFFECTS FOR LOGO IMAGE */
}

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

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 30px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-light), var(--dark-bg-dark), #0f3460);
  height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: flex */
  align-items: center;
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite; /* Different animation for contrast */
  box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red), 0 0 30px var(--neon-red), inset 0 0 20px rgba(255, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  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;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow), 0 0 10px var(--neon-yellow);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1002; /* Above logo and overlay */
  position: relative;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Neon glow for hamburger */
}

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

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

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

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

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

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

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

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

.footer-logo {
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  margin-bottom: 15px;
}

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

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

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

.footer-col ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.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 icons */
  width: 100%;
}

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.footer-middle {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.copyright {
  color: #888;
  font-size: 13px;
}

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

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

  .header-top {
    height: var(--header-top-height-mobile);
    border-bottom: none; /* Simplify border on mobile */
    box-shadow: none; /* Simplify shadow on mobile */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For logo centering */
  }

  .hamburger-menu {
    display: flex; /* Show on mobile */
    animation: text-glow-flow 3s ease-in-out infinite alternate;
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
    position: absolute; /* Absolute position for true center */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Account for hamburger menu */
  }
  
  .logo img {
    max-height: 35px; /* Smaller logo on mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background: linear-gradient(135deg, var(--dark-bg-light), var(--dark-bg-dark));
    border-bottom: 2px solid;
    animation: alternate-colors 4s ease-in-out infinite; /* Different neon for mobile buttons */
    box-shadow: 0 0 8px var(--neon-secondary), 0 0 16px var(--neon-secondary), inset 0 0 8px rgba(0, 255, 255, 0.1);
    min-height: var(--mobile-buttons-height);
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 5px is half of the 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, shown via JS */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100vh - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(180deg, var(--dark-bg-dark), var(--dark-bg));
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    border-top: none; /* Remove top border */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: normal; /* Allow wrapping for long links */
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer */
  .footer-grid-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .footer-top, .footer-middle, .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }
  .footer-middle {
    gap: 20px;
  }

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* No scroll for body when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
