
/* Root Variables for Neon Colors (Intelligent配色) */
:root {
  --primary-color: #FFD700; /* Gold/Yellow */
  --secondary-color: #8B0000; /* Dark Red */
  --accent-color: #FF4500; /* Orange Red */

  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: var(--accent-color);

  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
}

/* Animations for Dynamic Neon Colors */
@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),
      inset 0 0 10px rgba(255, 215, 0, 0.3); /* Primary color with opacity */
  }
  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(139, 0, 0, 0.3); /* Secondary color with opacity */
  }
  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, 69, 0, 0.3); /* Accent color with opacity */
  }
}

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

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

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

body {
  font-family: 'Arial', sans-serif;
  color: #e0e0e0;
  background-color: #000;
  line-height: 1.6;
  padding-top: 100px; /* Adjust based on marquee + header height */
  overflow-x: hidden; /* Prevent horizontal scroll from fixed elements */
}

/* Marquee Section (Fixed at top, above Header) */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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; /* 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(255, 215, 0, 0.1); /* Primary color with opacity */
  z-index: 1001; /* Ensure it's above the header */
  height: 50px; /* Fixed height for calculation */
}

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

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

.marquee-icon-emoji {
  font-size: 20px;
  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;
  height: 100%;
}

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

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-text {
  font-size: 15px;
  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);
}

/* Header Section (Fixed, below Marquee) */
.site-header {
  position: fixed;
  top: 50px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Background handled by sub-elements */
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  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),
    inset 0 0 10px rgba(255, 215, 0, 0.2); /* Primary color with opacity */
  padding: 10px 0;
  display: flex; /* Global for desktop layout */
  align-items: center;
  justify-content: 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-family: 'Electrolize', sans-serif; /* Example futuristic font */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow */
  text-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  flex-shrink: 0;
}

.desktop-nav-buttons {
  display: flex; /* Default for desktop */
  gap: 10px;
  align-items: center;
}

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

/* Main Navigation (Desktop) */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
  border-top: 1px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Secondary color border */
  box-shadow: 
    0 0 8px var(--neon-secondary),
    0 0 16px var(--neon-secondary),
    inset 0 0 8px rgba(139, 0, 0, 0.2); /* Secondary color with opacity */
  padding: 10px 0;
  display: flex; /* Default for desktop */
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 0 20px;
}

.main-nav .nav-link {
  color: #c0c0c0;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.main-nav .nav-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-accent));
  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;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping for desktop buttons */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Above logo and overlay */
  padding: 0;
  flex-shrink: 0;
  margin-right: auto; /* Push logo to center */
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--neon-primary);
  position: absolute;
  left: 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: var(--neon-primary);
  position: absolute;
  left: 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color */
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background: transparent;
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--neon-primary); /* Ensure color on active */
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
  background: var(--neon-primary); /* Ensure color on active */
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Section */
.site-footer {
  background-color: var(--dark-bg-1);
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer a {
  color: #c0c0c0;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

.site-footer .footer-col h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 15px;
}

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

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

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

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

.site-footer .payment-methods .payment-icons,
.site-footer .game-providers-section .game-providers-icons,
.site-footer .social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.site-footer .payment-methods .payment-icons img,
.site-footer .game-providers-section .game-providers-icons img,
.site-footer .social-media-section .social-media-icons img {
  max-height: 40px; /* Adjusted for tighter layout */
  height: auto;
  width: auto;
  object-fit: contain;
  filter: grayscale(80%) brightness(120%); /* Subtle effect for footer icons */
  transition: filter 0.3s ease;
}

.site-footer .payment-methods .payment-icons img:hover,
.site-footer .game-providers-section .game-providers-icons img:hover,
.site-footer .social-media-section .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

.site-footer .game-providers-section,
.site-footer .social-media-section {
  margin-bottom: 30px;
  padding-top: 20px; /* Separator from grid */
  border-top: 1px solid rgba(255,255,255,0.1);
}

.site-footer .game-providers-section h4,
.site-footer .social-media-section h4 {
  margin-bottom: 15px;
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-nav .nav-container {
    gap: 15px;
  }
  .main-nav .nav-link {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 130px; /* Marquee (40px) + Header Top (50px) + Mobile Buttons (40px) */
  }

  /* Marquee Mobile */
  .marquee-section {
    height: 40px; /* Smaller height for mobile */
  }
  .marquee-container {
    padding: 5px 10px;
    gap: 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 10px;
  }
  .marquee-content {
    animation: marquee-scroll 25s linear infinite; /* Faster scroll on mobile */
  }

  /* Header Mobile */
  .site-header {
    top: 40px; /* Marquee mobile height */
  }

  .header-top {
    padding: 10px 0;
    justify-content: flex-start; /* Align hamburger left */
  }

  .header-container {
    padding: 0 15px;
    flex-wrap: nowrap; /* Keep logo and hamburger on one line */
  }
  
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    margin-right: 0; /* Reset margin */
  }
  
  .header-top .logo {
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center; /* Center logo */
    margin-left: -30px; /* Counteract hamburger width to truly center */
    font-size: 24px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Keep buttons on one line */
    background: linear-gradient(135deg, var(--dark-bg-3), var(--dark-bg-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-accent),
      0 0 16px var(--neon-accent),
      inset 0 0 8px rgba(255, 69, 0, 0.2);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: 130px; /* Marquee + Header Top + Mobile Buttons height */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - 130px); /* Adjust height */
    background: linear-gradient(180deg, var(--dark-bg-3), var(--dark-bg-1));
    border-right: 2px solid;
    animation: rainbow-border 5s linear infinite; /* Different dynamic color for menu */
    box-shadow: 
      0 0 15px rgba(0, 255, 255, 0.8),
      0 0 30px rgba(0, 255, 255, 0.6);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    padding-bottom: 20px;
  }

  .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;
    gap: 15px;
    max-width: none; /* Remove max-width for mobile menu */
    width: 100%;
  }

  .main-nav .nav-link {
    width: 100%;
    font-size: 16px;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    padding-top: 10px;
  }

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

  /* Footer Mobile */
  .site-footer .footer-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

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

  .site-footer .footer-about .footer-description {
    text-align: left; /* Keep description left-aligned */
    padding: 0 15px;
  }

  .site-footer .footer-col ul {
    padding: 0;
  }

  .site-footer .footer-col ul li {
    display: inline-block; /* Inline list items for better use of space */
    margin: 0 10px 8px 10px;
  }
  
  .site-footer .payment-methods .payment-icons,
  .site-footer .game-providers-section .game-providers-icons,
  .site-footer .social-media-section .social-media-icons {
    justify-content: center; /* Center icons on mobile */
  }
}