:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1E90FF; /* Dodger Blue */
  --accent-color: #FF69B4; /* Hot Pink */

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

  /* Dark backgrounds */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --dark-bg-4: #0f3460; /* Slightly different dark blue for contrast */
}

/* Base styles for the entire page to avoid header overlap */
body {
  margin: 0;
  padding-top: 130px; /* Default for desktop, adjust for mobile */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #c0c0c0; /* Light grey for general text */
  background-color: #121212; /* General page background */
  line-height: 1.6;
}

/* Animations as provided by user, ensure they use the defined CSS variables */
/* 动态霓虹发光颜色 - 多款流动变色效果（必须实现，不能固定颜色） */

/* 基础霓虹光晕效果 */
.neon-glow {
  box-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor,
    inset 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 款式1：经典霓虹灯管效果（支持动态颜色） */
.neon-tube {
  border: 2px solid;
  animation: neon-flicker 2s infinite alternate, theme-colors 4s ease-in-out infinite;
}

/* 款式2：赛博朋克网格发光（支持动态颜色） */
.cyber-grid {
  background: 
    linear-gradient(90deg, transparent 95%, currentColor 100%),
    linear-gradient(180deg, transparent 95%, currentColor 100%);
  background-size: 20px 20px;
  border: 1px solid;
  animation: hue-spin 4s linear infinite;
}

/* 款式3：脉冲呼吸效果（支持动态颜色） */
.neon-pulse {
  border: 2px solid;
  animation: pulse-glow 2s ease-in-out infinite alternate, theme-colors 4s ease-in-out infinite;
}

/* 款式4：彩虹循环渐变（动态颜色） */
.rainbow-flow {
  border: 2px solid;
  animation: rainbow-border 3s linear infinite;
}

/* 款式5：色相旋转（动态颜色） */
.hue-rotate {
  border: 2px solid;
  filter: hue-rotate(0deg);
  animation: hue-spin 4s linear infinite;
}

/* 款式6：双色交替闪烁（动态颜色） */
.alternate-glow {
  border: 2px solid;
  animation: alternate-colors 2s ease-in-out infinite alternate;
}

/* 款式7：多色流动光带（动态颜色） */
.color-stream {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(45deg, 
    #ff0000, #ff8000, #ffff00, #00ff00, 
    #00ffff, #0000ff, #8000ff, #ff0080
  );
  background-size: 400% 400%;
  animation: gradient-flow 3s ease infinite;
}

/* 款式8：随机颜色变化（动态颜色） */
.random-colors {
  border: 2px solid;
  animation: random-glow 5s linear infinite;
}

/* 款式9：网站主题色动态变化（动态颜色，推荐使用） */
.theme-flow {
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
}

/* 款式10：LED点阵效果（支持动态颜色） */
.led-matrix {
  border: 2px solid;
  box-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor;
  position: relative;
  animation: random-glow 5s linear infinite;
}

.led-matrix::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: 
    radial-gradient(circle at 0% 0%, currentColor 2px, transparent 3px),
    radial-gradient(circle at 100% 0%, currentColor 2px, transparent 3px),
    radial-gradient(circle at 0% 100%, currentColor 2px, transparent 3px),
    radial-gradient(circle at 100% 100%, currentColor 2px, transparent 3px);
  background-size: 20px 20px;
  animation: led-blink 1s steps(2) infinite;
}

/* 动态颜色动画定义 */
@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);
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
  100% {
    filter: hue-rotate(360deg);
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
}

@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%;
    box-shadow: 
      0 0 10px #ff0000,
      0 0 20px #ff8000;
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 
      0 0 10px #00ffff,
      0 0 20px #0000ff;
  }
  100% {
    background-position: 0% 50%;
    box-shadow: 
      0 0 10px #ff0000,
      0 0 20px #ff8000;
  }
}

@keyframes random-glow {
  0% {
    border-color: var(--neon-primary);
    box-shadow: 0 0 20px var(--neon-primary);
  }
  20% {
    border-color: var(--neon-secondary);
    box-shadow: 0 0 20px var(--neon-secondary);
  }
  40% {
    border-color: var(--neon-accent);
    box-shadow: 0 0 20px var(--neon-accent);
  }
  60% {
    border-color: #00ff00; /* Green */
    box-shadow: 0 0 20px #00ff00;
  }
  80% {
    border-color: #ff0000; /* Red */
    box-shadow: 0 0 20px #ff0000;
  }
  100% {
    border-color: var(--neon-primary);
    box-shadow: 0 0 20px var(--neon-primary);
  }
}

@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); /* Gold tint */
  }
  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(30, 144, 255, 0.3); /* Dodger Blue tint */
  }
  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, 105, 180, 0.3); /* Hot Pink tint */
  }
}

/* 原有动画定义（保留兼容性） */
@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; }
}

/* 动态霓虹文字发光 */
.neon-text-dynamic {
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

/* 组合效果：动态边框+动态文字 */
.dynamic-combo {
  border: 2px solid;
  animation: 
    rainbow-border 4s linear infinite,
    text-glow-flow 3s ease-in-out infinite alternate;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex; /* Desktop: column layout for header-top and main-nav */
  flex-direction: column;
}

.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 border color */
  padding: 15px 0; /* Padding for header-top */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Internal padding for logo and buttons */
}

.logo {
  font-family: 'Electrolize', sans-serif; /* A more modern techy font */
  font-size: 2.2em;
  font-weight: bold;
  color: var(--neon-primary); /* Base color for text glow animation */
  text-decoration: none;
  white-space: nowrap; /* Prevent logo from wrapping */
  /* Neon text-glow-flow animation is applied via .neon-text-dynamic class */
}

.desktop-nav-buttons {
  display: flex; /* Display on desktop */
  gap: 12px;
  align-items: center;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  /* Dynamic border color and shadow from .theme-flow class */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.2);
}

/* Main Navigation (Desktop - visible, horizontal) */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3)); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic border color */
  width: 100%;
  display: flex; /* Default for desktop */
  padding: 10px 0;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

.nav-link {
  color: #c0c0c0; /* Regular text color for menu items */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary);
  text-shadow: 0 0 8px var(--neon-primary);
}

/* Mobile specific elements (hidden by default on desktop) */
.hamburger-menu, .mobile-nav-buttons, .mobile-menu-overlay {
  display: none;
}

/* Footer Styles */
.site-footer {
  background-color: var(--dark-bg-1);
  color: #c0c0c0;
  padding: 40px 0 20px 0;
  font-size: 0.9em;
  border-top: 1px solid #333;
}

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

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

.site-footer h4 {
  color: #ffffff;
  font-size: 1.1em;
  margin-bottom: 15px;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

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

.footer-top-section {
  padding-bottom: 30px;
}

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

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

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

.footer-logo {
  font-family: 'Electrolize', sans-serif; /* Use the same retro font as header */
  font-size: 1.8em;
  font-weight: bold;
  color: var(--primary-color); /* Use primary color, no neon glow */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

.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 all icon sections */
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Subtle effect for footer icons */
  opacity: 0.7;
  transition: all 0.3s ease;
}

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

.footer-middle-section {
  padding: 30px 0;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  margin-bottom: 20px;
}

.footer-middle-section .footer-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-bottom-section .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.copyright {
  margin: 0;
  color: #888;
}

.footer-legal-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 15px;
}

.footer-legal-nav li a {
  color: #888;
}

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

/* Responsive styles for Header */
@media (max-width: 768px) {
  body {
    padding-top: 170px; /* Adjust for mobile header + mobile button section */
  }

  .site-header {
    flex-direction: column; /* Ensure header-top and mobile-nav-buttons stack */
  }

  .header-top {
    padding: 10px 0;
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px; /* Adjusted height to fit 3 lines */
    position: relative;
    z-index: 1002; /* Above logo and buttons */
    padding: 0;
    color: var(--neon-primary); /* Base color for glow */
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow */
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    order: 1;
  }

  .hamburger-menu::before,
  .hamburger-menu::after,
  .hamburger-menu .middle-bar {
    content: ''; /* For ::before and ::after */
    position: absolute; /* Relative to hamburger-menu */
    width: 100%;
    height: 3px;
    background-color: currentColor;
    border-radius: 2px;
    left: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; /* Glow for lines */
  }

  .hamburger-menu::before {
    top: 0;
  }

  .hamburger-menu .middle-bar {
    top: 50%;
    transform: translateY(-50%);
  }

  .hamburger-menu::after {
    bottom: 0;
  }

  .hamburger-menu.active::before {
    transform: translateY(10.5px) rotate(45deg); /* Adjusted for 24px height */
  }

  .hamburger-menu.active::after {
    transform: translateY(-10.5px) rotate(-45deg); /* Adjusted for 24px height */
  }

  .hamburger-menu.active .middle-bar {
    opacity: 0;
  }

  .logo {
    flex-grow: 1; /* Allows logo to take remaining space */
    text-align: center; /* Centers the logo text within its flex item */
    margin: 0; /* Remove specific margins */
    font-size: 1.8em; /* Adjust size for mobile */
    order: 2;
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }
  
  .header-container::after { /* Pseudo-element to balance hamburger on the right */
    content: '';
    width: 30px; /* Same width as hamburger */
    order: 3;
  }

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3)); /* Different dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    padding: 10px 15px;
    justify-content: center; /* Center buttons */
    gap: 10px;
    flex-wrap: wrap;
    z-index: 990; /* Below hamburger menu, above main content */
  }

  /* Main Navigation (Mobile - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Full height */
    left: 0;
    width: 70%; /* Slide in from left */
    height: 100%;
    background-color: var(--dark-bg-3); /* Solid dark background for menu */
    flex-direction: column;
    padding-top: 80px; /* Space for fixed header content */
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1001; /* Above overlay */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  }

  .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 menu items to left */
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
  }
  
  .main-nav .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: 1000; /* Below menu, above content */
    transition: opacity 0.3s ease;
    opacity: 0;
  }

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

  /* Prevent body scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

  /* Responsive styles for Footer */
  .site-footer .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Stack columns on mobile */
    gap: 20px;
  }

  .site-footer .footer-col {
    text-align: center; /* Center footer content on mobile */
  }

  .site-footer .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-bottom-section .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-legal-nav {
    justify-content: center;
  }
}

/* Responsive color intensity adjustment */
@media (max-width: 768px) {
  .neon-glow, .neon-tube, .cyber-grid, .neon-pulse, .rainbow-flow, .hue-rotate, 
  .alternate-glow, .color-stream, .random-colors, .theme-flow, .led-matrix {
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor !important; /* Reduce glow intensity on mobile */
  }
  .neon-text-dynamic {
    text-shadow: 
      0 0 3px var(--neon-primary),
      0 0 6px var(--neon-primary) !important;
  }
}