/* General Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #e0e0e0; /* Default text color for dark theme */
  background-color: #121212; /* Dark background */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  min-height: 100vh; /* Ensure body takes full viewport height */
}

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

ul {
  list-style: none;
}

/* Custom Properties for Colors and Neon Effects */
:root {
  --primary-color: #017439; /* Site's primary green */
  --secondary-color: #FFFFFF; /* Site's secondary white */
  --neon-primary: #ff00ff; /* Vibrant Magenta for neon */
  --neon-secondary: #00ffff; /* Vibrant Cyan for neon */
  --neon-accent: #ffff00; /* Vibrant Yellow for neon */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Header Offset - Calculated based on estimated heights */
  --marquee-height: 45px; /* Estimated marquee height */
  --header-top-height-desktop: 60px; /* Estimated header-top height desktop */
  --main-nav-height-desktop: 50px; /* Estimated main-nav height desktop */
  --header-offset: calc(var(--marquee-height) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop */
}

/* Keyframe Animations for Neon Effects */
@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%); }
}

@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(255, 0, 255, 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, 255, 0, 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: #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;
  }
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height); /* Explicit height for offset calculation */
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  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(255, 0, 255, 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; /* Adjusted padding to fit height */
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Reduced width for better fit */
  height: 30px; /* Reduced height 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;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
}

.marquee-text {
  font-size: 15px; /* Reduced font size */
  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; /* Reduced font size */
  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 Styles */
.site-header {
  position: fixed;
  top: var(--marquee-height); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stack header-top and main-nav vertically */
  min-height: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Min height for desktop */
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  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(255, 0, 255, 0.1);
  width: 100%;
  min-height: var(--header-top-height-desktop); /* Explicit height for offset calculation */
  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 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon for logo */
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.3s ease;
  flex-shrink: 0;
}
.logo:hover {
  color: var(--primary-color);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Above mobile-menu-overlay */
  position: relative;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary); /* Neon glow for hamburger */
}

/* Hamburger menu active state (X icon) */
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Distinct dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  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(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Display on desktop */
  min-height: var(--main-nav-height-desktop); /* Explicit height for offset calculation */
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap; /* Allow wrapping for many links on desktop if needed */
}

.nav-link {
  color: #ffffff; /* Regular color, no neon for nav links */
  font-weight: 500;
  padding: 8px 15px;
  margin: 0 5px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Button Styles */
.btn {
  position: relative;
  background: linear-gradient(135deg, #C30808, #ff3366); /* Using custom red/pink for buttons */
  padding: 10px 20px; /* Adjusted padding */
  color: #FFFF00; /* Custom font color for register/login */
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  text-shadow: 
    0 0 5px #FFFF00,
    0 0 10px #C30808; /* Text glow matching custom colors */
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  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(255, 0, 255, 0.4);
}

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

.site-footer h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-top-area, .footer-middle-area, .footer-bottom-area {
  width: 100%;
  padding-bottom: 20px;
}

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

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

.footer-col {
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

.footer-nav-list 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; /* Adjusted gap for all icon sections */
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 40px; /* Consistent height for all icons */
  height: auto;
  width: auto;
  filter: grayscale(10%); /* Slight grayscale for consistency */
  opacity: 0.8;
  transition: all 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

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

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

.copyright {
  text-align: center;
  margin-top: 20px;
  color: #999999;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  :root {
    --header-top-height-mobile: 50px; /* Estimated mobile header-top height */
    --mobile-buttons-height: 50px; /* Estimated mobile buttons height */
    --header-offset: calc(var(--marquee-height) + var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Mobile */
  }

  /* Fixed header offset for body content */
  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure content does not overflow horizontally */
  }

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

  /* Marquee mobile adjustments */
  .marquee-section {
    height: 40px; /* Smaller marquee height on mobile */
    --marquee-height: 40px;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation-duration: 20s; /* Faster scroll on mobile */
  }

  /* Header mobile adjustments */
  .site-header {
    top: var(--marquee-height); /* Adjust top based on mobile marquee height */
    min-height: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Mobile header min height */
  }

  .header-top {
    min-height: var(--header-top-height-mobile); /* Explicit height for offset calculation */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding on mobile */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    position: relative; /* For absolute logo centering */
    justify-content: space-between; /* To push hamburger left, logo center, empty right */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0; /* Place to the left */
    flex: 0 0 auto; /* Don't grow */
    position: relative; /* Ensure it's above the logo for clickability */
    z-index: 2;
  }
  
  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    font-size: 22px; /* Smaller logo font size on mobile */
    padding: 5px 0;
    order: 1; /* Center position */
    max-width: calc(100% - 60px); /* Adjust max-width to not overlap hamburger */
  }
  
  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 8px 15px; /* Padding for the button container */
    background: linear-gradient(135deg, #1a1a2e, #0f3460); /* Background for button row */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-secondary),
      0 0 15px var(--neon-secondary),
      inset 0 0 10px rgba(0, 255, 255, 0.2);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    min-height: var(--mobile-buttons-height); /* Explicit height for offset calculation */
    align-items: center;
  }

  .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; /* 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;
    line-height: 1.2; /* Adjust line height for wrapped text */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile, toggled by JS */
    flex-direction: column;
    position: fixed;
    top: calc(var(--marquee-height) + var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Position below mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100% - var(--marquee-height) - var(--header-top-height-mobile) - var(--mobile-buttons-height)); /* Full height below header */
    background-color: #1c1c1c; /* Dark background for mobile menu */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay, below hamburger */
    overflow-y: auto; /* Scroll if menu content is long */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset -5px 0 15px rgba(255, 0, 255, 0.2);
  }

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

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

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

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

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

  .footer-top-area .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .footer-col {
    margin-bottom: 15px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }

  .site-footer .footer-container {
    padding: 0 15px; /* Smaller footer padding */
  }
}

/* Body padding for fixed header */
body {
  padding-top: var(--header-offset);
}

/* Class to prevent background scroll */
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;
  }
}
