:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;
  --black-color: #000000;

  /* Neon colors derived from primary/secondary for dynamic effects */
  --neon-primary: #00FFFF; /* Cyan, related to blue */
  --neon-secondary: #FF00FF; /* Magenta, contrasting */
  --neon-accent: #FFFF00; /* Yellow, for highlights */

  --marquee-height-desktop: 45px;
  --marquee-height-mobile: 30px;

  --header-offset-desktop: 155px;
  --header-offset-mobile: 120px;

  --header-offset: var(--header-offset-desktop); /* Desktop default */
  --marquee-height: var(--marquee-height-desktop); /* Desktop default */
}

@media (max-width: 768px) {
  :root {
    --header-offset: var(--header-offset-mobile);
    --marquee-height: var(--marquee-height-mobile);
  }
}

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Apply header offset to body */
  background-color: #121212; /* Dark background for overall site */
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll from content */
}

/* Universal container for consistent width */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Neon Glow Animations - Dynamic 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);
  }
  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 neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
    box-shadow: 
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px currentColor,
      inset 0 0 15px currentColor;
  }
  20%, 24%, 55% {
    opacity: 0.8;
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      inset 0 0 10px currentColor;
  }
}

@keyframes pulse-glow {
  from {
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor;
  }
  to {
    box-shadow: 
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 45px currentColor;
  }
}

/* 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-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(0, 255, 255, 0.1); /* Use var(--neon-primary) base for inset */
  z-index: 1001;
  height: var(--marquee-height); /* Set height using variable */
  display: flex; /* For vertical centering of content */
  align-items: center;
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0px 20px; /* Adjust padding to fit height */
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Smaller icon */
  height: 30px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 20px; /* Smaller icon 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));
}

@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;
  padding-top: 5px; /* Adjust for vertical alignment */
  padding-bottom: 5px; /* Adjust for vertical alignment */
}

.marquee-text {
  font-size: 15px; /* Slightly smaller font for marquee */
  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 15px;
  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%); }
}

/* Header Styles */
.site-header {
  position: fixed;
  top: var(--marquee-height); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 60px; /* Min height for desktop header top */
  display: flex; /* For header-top and main-nav stacking */
  flex-direction: column; /* Stack header-top and main-nav */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  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); /* Use var(--neon-primary) base for inset */
  width: 100%;
  min-height: 60px; /* Ensure desktop header top has enough height */
  display: flex; /* For content inside header-top */
  align-items: center;
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* Ensure container takes full width within its padding */
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above mobile menu */
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  box-sizing: border-box;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 5px var(--neon-accent),
    0 0 10px var(--neon-accent);
}

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

.header-right-balance {
  display: none; /* Hidden by default on desktop */
}

/* Logo Styles */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon */
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure it's visible */
  padding: 5px 0;
  /* LOGO must NOT have neon effects */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
}

.logo img {
  display: block;
  max-height: 40px;
  height: auto;
  width: auto;
  /* LOGO must NOT have neon effects */
  box-shadow: none;
  filter: none;
  animation: none;
}

/* Desktop Navigation Buttons (visible on desktop, hidden on mobile) */
.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden on desktop, visible on mobile) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  width: 100%;
  box-sizing: border-box;
  padding: 10px 20px;
  background: linear-gradient(135deg, #16213e, #1a1a2e, #0a0a0a); /* Dark background */
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  box-shadow: 
    0 0 8px var(--neon-secondary),
    0 0 16px var(--neon-secondary),
    inset 0 0 10px rgba(255, 0, 255, 0.1);
  z-index: 999; /* Below main nav but above content */
  justify-content: center;
  flex-wrap: nowrap; /* Ensure buttons stay in one line */
}

/* Main Navigation (Desktop styles) */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Darker background for distinction */
  border-top: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic color border, reverse for contrast */
  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, 0, 255, 0.1);
  width: 100%;
  display: flex; /* Visible on desktop */
  min-height: 50px; /* Ensure desktop nav has enough height */
  align-items: center;
  justify-content: center; /* Center nav items */
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center; /* Center nav links */
  align-items: center;
  gap: 25px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.nav-link {
  color: var(--secondary-color); /* Regular color for nav links */
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  /* No neon effects for nav links */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
}

.nav-link:hover {
  color: var(--neon-primary); /* Use a neon color on hover */
  text-shadow: 0 0 8px var(--neon-primary); /* Subtle glow on hover */
}

/* Button Styles */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: #ffffff;
  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 #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

.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),
    inset 0 0 15px rgba(0, 255, 255, 0.4);
}

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

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

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

.footer-col {
  margin-bottom: 20px;
}

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

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

.footer-links a {
  display: block;
  color: #cccccc;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

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

.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;
  object-fit: contain;
}

.game-providers-section, .social-media-section {
  padding: 20px 0;
  border-top: 1px solid #333333;
}

.game-providers-section .footer-container, .social-media-section .footer-container {
  padding-left: 0;
  padding-right: 0;
}

.game-providers-section h4, .social-media-section h4 {
  padding-left: 20px;
  padding-right: 20px;
}


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

.copyright {
  color: #999999;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: var(--marquee-height);
  }
  .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 5px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header */
  .site-header {
    min-height: 0; /* Allow height to be determined by content */
  }

  .header-top {
    min-height: 50px; /* Adjust for mobile */
    padding: 0;
  }

  .header-top .header-container {
    width: 100%;
    max-width: none; /* Important for mobile full width */
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .header-right-balance {
    display: block; /* Visible on mobile to balance hamburger */
    width: 40px; /* Balance the hamburger menu */
    height: 40px;
    flex-shrink: 0;
  }

  .logo {
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center; /* Center the text within its flex item */
    font-size: 24px; /* Adjust font size for mobile */
  }

  .logo img {
    max-height: 35px; /* Adjust image logo height for mobile */
  }

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

  /* Mobile Navigation Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Force display on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Adjusted padding */
    gap: 10px;
    flex-wrap: nowrap; /* Prevent wrapping */
  }

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

  /* Main Navigation (Mobile styles - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    overflow-y: auto;
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease-out;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow: 
      5px 0 15px rgba(0, 0, 0, 0.5),
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
    z-index: 1000; /* Above overlay */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    padding: 20px 15px;
    gap: 15px;
    width: 100%;
    max-width: none; /* Important for mobile full width */
  }

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

  /* Footer */
  .site-footer {
    padding: 30px 0 15px;
  }

  .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-top .footer-container .footer-col:first-child {
    grid-column: 1 / -1; /* Ensure first column spans full width */
  }

  .footer-logo {
    font-size: 20px;
  }

  .footer-description {
    font-size: 13px;
  }
  .footer-links h4 {
    font-size: 16px;
  }
  .footer-links a {
    font-size: 13px;
  }

  .payment-methods .payment-icons,
  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: center; /* Center icons on mobile */
  }
  .game-providers-section h4, .social-media-section h4 {
    text-align: center;
  }

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

/* Overlay for mobile menu */
.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 menu, above content */
  transition: opacity 0.3s ease-out;
  opacity: 0;
}

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

/* Body no-scroll 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;
  }
}
