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

  /* Neon colors based on primary/secondary */
  --neon-primary: #FF1493; /* Pinkish for a vibrant neon */
  --neon-secondary: #00FFFF; /* Cyan for a vibrant neon */
  --neon-accent: #FFFF00; /* Yellow for a vibrant neon */

  /* Header offset calculation */
  --header-offset: 155px; /* Desktop: Marquee (45) + Header Top (60) + Main Nav (50) */
  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Marquee (30) + Header Top (50) + Mobile Nav Buttons (50) */
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 50px;
    --mobile-nav-buttons-height: 50px;
  }
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--background-color);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}
*, *::before, *::after {
  box-sizing: border-box;
}
a {
  text-decoration: none;
  color: var(--primary-color);
}
a:hover {
  text-decoration: underline;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #f0f0f0; /* Dark background text color */
}

/* Animations for Neon Effects */
@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}
@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: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
  20% { border-color: #00ffff; box-shadow: 0 0 20px #00ffff; }
  40% { border-color: #ffff00; box-shadow: 0 0 20px #ffff00; }
  60% { border-color: #00ff00; box-shadow: 0 0 20px #00ff00; }
  80% { border-color: #ff0000; box-shadow: 0 0 20px #ff0000; }
  100% { border-color: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
}
@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 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 Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop);
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  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; /* Ensure content is vertically centered */
  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;
}
.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 Styles (Desktop First) */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stacks header-top and main-nav */
  background: transparent; /* Background handled by sub-sections */
}

/* Header Top Section */
.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    inset 0 0 15px rgba(255, 0, 255, 0.1);
  min-height: var(--header-top-height-desktop);
  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: 10px 30px; /* Padding for logo and buttons */
}
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon for logo */
  text-decoration: none;
  display: block;
  flex-shrink: 0;
  padding: 0;
  /* No text-shadow, box-shadow, or neon animations for logo */
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px; /* Desktop logo max height */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

/* Main Navigation Section */
.main-nav {
  background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* Different dark gradient */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite; /* Different dynamic color effect */
  box-shadow: 
    0 0 8px var(--neon-secondary),
    0 0 16px var(--neon-secondary),
    inset 0 0 10px rgba(0, 255, 255, 0.1);
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: visible */
  align-items: center;
}
.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}
.nav-link {
  color: var(--secondary-color); /* Regular color for nav links */
  font-size: 16px;
  font-weight: 500;
  padding: 15px 20px;
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--neon-primary); /* Use a neon color on hover */
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

/* Hamburger Menu (Hidden by default on desktop) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute; /* Position for mobile */
  left: 15px; /* Adjust for mobile */
  top: 50%; /* Adjust for mobile */
  transform: translateY(-50%); /* Adjust for mobile */
  z-index: 1002;
}
.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary); /* Neon glow */
}
.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;
}
.mobile-menu-overlay.active {
  opacity: 1;
}

/* Button Styles */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--login-color), var(--neon-primary)); /* Use login color with neon */
  padding: 12px 25px;
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  text-shadow: 
    0 0 5px var(--secondary-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}
.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Footer Styles */
.site-footer {
  background: linear-gradient(135deg, #1a1a2e, #0a0a0a, #16213e);
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 14px;
}
.site-footer a {
  color: #c0c0c0;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-top-section {
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-top-section .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.footer-col h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: block;
}
.footer-description {
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #a0a0a0;
}
.footer-links li {
  margin-bottom: 8px;
}
.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 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: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  transition: filter 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%) brightness(100%); /* Colorize on hover */
}
.footer-middle-section {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-middle-section .full-width-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.footer-middle-section h4 {
  margin-bottom: 15px;
}
.footer-bottom-section {
  padding-top: 20px;
  text-align: center;
}
.copyright {
  margin: 0;
  color: #a0a0a0;
}

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

  /* Header Mobile Adjustments */
  .site-header {
    top: var(--marquee-height-mobile); /* Adjust for mobile marquee height */
  }
  .header-top {
    min-height: var(--header-top-height-mobile);
    padding: 10px 0; /* Adjust padding */
    display: flex;
    align-items: center;
    justify-content: space-between; /* To push hamburger left and logo center */
    position: relative; /* For absolute positioning of logo if needed */
  }
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    flex-wrap: nowrap;
    justify-content: center; /* Center logo */
  }
  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute; /* Force absolute positioning for centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  .logo img {
    max-height: 35px; /* Mobile logo max 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;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
    box-shadow: 
      0 0 8px var(--neon-accent),
      0 0 16px var(--neon-accent),
      inset 0 0 10px rgba(255, 255, 0, 0.1);
    min-height: var(--mobile-nav-buttons-height);
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }
  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 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;
  }

  .hamburger-menu {
    display: block;
    position: relative; /* Relative to header-top */
    left: 0;
    top: auto; /* Reset top for flex layout */
    transform: none; /* Reset transform for flex layout */
    margin-right: auto; /* Push to left */
    z-index: 1002;
    padding: 10px 15px; /* Adjust padding */
  }
  .hamburger-menu.active .hamburger-icon:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger-menu.active .hamburger-icon:nth-child(2) { opacity: 0; }
  .hamburger-menu.active .hamburger-icon:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header elements */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    flex-direction: column;
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a, #16213e); /* Sidebar dark background */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 15px var(--neon-primary),
      0 0 30px var(--neon-primary);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }
  .nav-container {
    flex-direction: column;
    padding: 20px 0;
    width: 100%; /* Occupy full width of sidebar */
    max-width: none; /* Remove max-width for mobile */
    align-items: flex-start; /* Align links to left */
  }
  .nav-link {
    width: 100%;
    padding: 12px 25px; /* Adjust padding for mobile links */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  /* Footer Mobile Adjustments */
  .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .footer-middle-section .full-width-content {
    padding: 0 15px; /* Adjust padding for full-width content */
  }
  .footer-bottom-section .footer-container {
    padding: 0 15px;
  }

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