/* Universal Styles */
:root {
  --primary-color: #26A9E0; /* Light Blue */
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07; /* Orange */
  --background-color: #FFFFFF;

  /* Neon Colors - derived from primary/secondary/accent */
  --neon-primary: #00FFFF; /* Cyan, contrasting with light blue primary */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */
  --neon-dark-bg: #0a0a0a;
  --neon-dark-bg-gradient-start: #1a1a2e;
  --neon-dark-bg-gradient-end: #16213e;

  /* Header Offset - MUST be calculated based on actual structure */
  /* Marquee (45px) + Header Top (60px) + Main Nav (50px) = 155px */
  --header-offset: 155px; 
}

@media (max-width: 768px) {
  /* Marquee (40px) + Header Top (55px) + Mobile Nav Buttons (50px) = 145px */
  --header-offset: 145px; 
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

*, *::before, *::after {
  box-sizing: border-box;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  line-height: 1.2;
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Neon Animations - Dynamic 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); 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; box-shadow: 0 0 20px #00ff00; }
  80% { border-color: #ff0000; 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); }
  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 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; }
}

@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(--secondary-color); }
  50% { text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary); color: var(--secondary-color); }
  100% { text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent); color: var(--secondary-color); }
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-gradient-start), var(--neon-dark-bg-gradient-end));
  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(0, 255, 255, 0.1);
  z-index: 1001;
  height: 45px; /* Fixed height for calculation */
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 5px 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%;
}

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

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

/* Header Styles - Desktop First */
.site-header {
  position: fixed;
  top: 45px; /* Adjust based on marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-gradient-start), var(--neon-dark-bg-gradient-end));
  color: var(--secondary-color);
}

.header-top {
  padding: 10px 0;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-accent), /* Using neon-accent for header-top glow */
    0 0 20px var(--neon-accent),
    0 0 30px var(--neon-accent),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  height: 60px; /* Fixed height for calculation */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon for logo */
  text-decoration: none;
  display: flex; 
  align-items: center;
  justify-content: flex-start; /* Align left for desktop */
  height: 100%;
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px; /* Desktop logo height */
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex; /* Desktop default: visible */
  gap: 15px;
  align-items: center;
}

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

.main-nav {
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  border-top: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-secondary), /* Using neon-secondary for main-nav glow */
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  height: 50px; /* Fixed height for calculation */
}

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

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color); /* Regular color, no neon for nav links */
  padding: 5px 10px;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Hamburger Menu - Hidden by default on desktop */
.hamburger-menu {
  display: none; 
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1002; /* Ensure it's above everything when open */
  margin-right: 20px; /* Space from logo */
  animation: theme-colors 4s ease-in-out infinite;
  border-radius: 5px;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  left: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary);
}

.hamburger-icon {
  top: 13px;
}

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

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

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

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--neon-secondary);
  box-shadow: 0 0 5px var(--neon-secondary);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--neon-secondary);
  box-shadow: 0 0 5px var(--neon-secondary);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--login-color)); /* Using defined colors */
  padding: 10px 20px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--primary-color); /* Glow based on primary color */
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  text-shadow: 
    0 0 8px #ffffff,
    0 0 15px var(--primary-color),
    0 0 25px var(--primary-color);
}

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

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

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

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

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

.footer-top .footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-col {
  margin-bottom: 20px;
}

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

.footer-description {
  line-height: 1.6;
  color: #aaa;
  word-wrap: break-word; /* Ensure text wraps */
  overflow-wrap: break-word;
}

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

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

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

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

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

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

.game-providers-section,
.social-media-section {
  margin-bottom: 30px;
}

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

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

.copyright-text {
  margin: 0;
}

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

  /* Header */
  .site-header {
    top: 40px; /* Adjust based on mobile marquee height */
  }

  .header-top {
    height: 55px; /* Adjust height for mobile */
    padding: 10px 0;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Mobile: full width */
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center, space right */
  }

  .hamburger-menu {
    display: block; /* Mobile: visible */
    margin-right: 0;
    position: relative;
    z-index: 1002;
  }

  .logo {
    flex: 1 !important; /* Take remaining space for centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
  }

  .logo img {
    max-height: 35px; /* Mobile logo height */
  }

  .desktop-nav-buttons {
    display: none; /* Mobile: hide desktop buttons */
  }

  .main-nav {
    display: none; /* Mobile: hidden by default, shown by JS */
    flex-direction: column; /* Mobile: vertical */
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 70%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(180deg, var(--neon-dark-bg-gradient-start), var(--neon-dark-bg));
    padding: 20px 0;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay */
    border-right: 2px solid;
    animation: alternate-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
    overflow-y: auto; /* Allow scrolling for long menus */
    min-height: calc(100% - var(--header-offset));
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Mobile: full width */
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0 15px;
  }

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

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

  /* Mobile Nav Buttons - Always visible */
  .mobile-nav-buttons {
    display: flex !important; /* Mobile: visible */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-gradient-start));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      inset 0 0 10px rgba(0, 255, 255, 0.1);
    height: 50px; /* Fixed height for calculation */
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    text-align: center;
  }

  /* Footer */
  .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column layout for mobile */
  }

  .footer-col {
    margin-bottom: 30px;
  }

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

  .footer-container {
    padding: 0 15px;
  }

  /* Mobile content overflow prevention */
  .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;
  }
}
