:root {
  --primary-color: #017439; /* Brand primary green */
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;

  /* Custom colors from requirements */
  --register-color: #C30808;
  --login-color: #C30808;
  --background-color: #FFFFFF;
  --register-login-font-color: #FFFF00;

  /* Neon specific colors - derived from primary scheme, but vibrant */
  --neon-primary: #00FF00; /* Bright Green */
  --neon-secondary: #FF00FF; /* Bright Magenta */
  --neon-accent: #FFFF00; /* Bright Yellow */
  
  /* Header Offset - Desktop */
  --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: Marquee (45) + Header Top (60) + Main Nav (50) = 155px */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 25px;
    --header-top-height-mobile: 60px;
    --mobile-buttons-height: 50px;
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Mobile: Marquee (25) + Header Top (60) + Mobile Buttons (50) = 135px */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-color-dark);
  line-height: 1.6;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* General Link Styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Neon Dynamic Color Animations */
@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: var(--text-color-light);
  }
  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-light);
  }
  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-light);
  }
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--text-color-light);
  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, 0, 0.1); /* Green glow from neon-primary */
  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: 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));
}

@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: 16px;
  font-weight: 600;
  color: var(--text-color-light);
  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: var(--text-color-light);
}

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

@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(--text-color-light);
  min-height: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop));
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  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);
  width: 100%;
  height: var(--header-top-height-desktop); /* Fixed height */
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: var(--secondary-color); /* Logo no neon effect */
  display: block;
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu div {
  width: 30px;
  height: 3px;
  background-color: var(--neon-primary); /* Neon color for bars */
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

/* Main Navigation (Desktop) */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background for contrast */
  border-top: 2px solid;
  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),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(255, 0, 255, 0.1); /* Magenta glow from neon-secondary */
  width: 100%;
  display: flex; /* Desktop default: flex */
  height: var(--main-nav-height-desktop); /* Fixed height */
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-link {
  color: var(--text-color-light);
  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-accent); /* Highlight with neon accent color */
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--register-color), var(--login-color)); /* Use custom colors */
  padding: 12px 25px;
  color: var(--register-login-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(--register-login-font-color),
    0 0 10px var(--register-login-font-color);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s;
  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, 0, 0.4);
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* Footer Section Styles */
.site-footer {
  background-color: #1a1a2e; /* Dark background, not neon */
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  box-sizing: border-box;
}

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

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full display */
  overflow-wrap: break-word;
}

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

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

.footer-nav-list a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

.payment-methods h4,
.game-providers-section h4,
.social-media-section h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

.game-providers-section,
.social-media-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center; /* Center titles */
}
.game-providers-section .footer-container,
.social-media-section .footer-container {
    display: block; /* Override grid for full width */
    text-align: left; /* Reset text align for content */
}
.game-providers-section h4,
.social-media-section h4 {
    text-align: center; /* Center title */
}
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
    justify-content: center; /* Center icons */
}


.footer-bottom {
  padding-top: 20px;
  text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Marquee Mobile Styles */
  .marquee-section {
    height: var(--marquee-height-mobile); /* Mobile fixed height */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .marquee-container {
    gap: 10px !important;
    padding: 0 5px;
  }
  
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  
  .marquee-icon-emoji {
    font-size: 14px !important;
  }
  
  .marquee-text {
    font-size: 13px !important;
  }
  
  .marquee-separator {
    font-size: 13px !important;
    margin: 0 8px !important;
  }
  
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header Mobile Styles */
  .site-header {
    top: var(--marquee-height-mobile); /* Position below mobile marquee */
    min-height: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height));
  }

  .header-top {
    height: var(--header-top-height-mobile);
    border-bottom: none; /* Remove border for cleaner look */
    box-shadow: none; /* Remove box shadow */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For logo centering */
    max-width: none; /* Crucial: no max-width on mobile */
  }

  .hamburger-menu {
    display: flex;
    order: 0; /* Left side */
    z-index: 1001; /* Ensure on top */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    flex-wrap: nowrap; /* Prevent wrapping */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-primary),
      0 0 15px var(--neon-primary),
      inset 0 0 10px rgba(0, 255, 0, 0.1);
    height: var(--mobile-buttons-height); /* Fixed height */
    align-items: center;
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 10px gap */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    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;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    max-width: none; /* Crucial: no max-width on mobile */
  }

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

  .nav-link:last-child {
    border-bottom: none;
  }

  .hamburger-menu.active .bar1 { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger-menu.active .bar2 { opacity: 0; }
  .hamburger-menu.active .bar3 { transform: rotate(-45deg) translate(5px, -5px); }

  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below header and buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below menu */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show when active */
    opacity: 1;
  }

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

  .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    padding: 0 15px;
    max-width: none; /* Crucial: no max-width on mobile */
  }

  .footer-col {
    text-align: center;
  }

  .footer-col:first-child {
    text-align: center;
  }
  
  .footer-logo {
      margin-bottom: 10px;
  }

  .footer-col h4 {
    margin-bottom: 10px;
  }

  .footer-nav-list {
    margin-bottom: 15px;
  }
  
  .payment-icons,
  .game-providers-icons,
  .social-media-icons {
      justify-content: center; /* Center icons on mobile */
  }

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

  .footer-bottom {
    padding-top: 15px;
  }
}

/* Mobile overflow prevention */
@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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
