/* Global Styles & Variables */
:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07; /* 登录 */
  --black-color: #000000;
  --background-color: #FFFFFF;

  /* Neon Colors - derived from primary/secondary, with dynamic variations */
  --neon-primary-base: #26A9E0; /* Vibrant blue */
  --neon-secondary-base: #FF00FF; /* Vibrant magenta */
  --neon-accent-base: #FFFF00; /* Vibrant yellow */

  /* Dynamic color cycle for neon effects */
  --neon-cycle-1-color1: #26A9E0; /* Blue */
  --neon-cycle-1-color2: #FF00FF; /* Magenta */
  --neon-cycle-1-color3: #FFFF00; /* Yellow */
  --neon-cycle-1-color4: #00FFFF; /* Cyan */
  --neon-cycle-1-color5: #FF4500; /* OrangeRed */

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

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px; /* Approx height including padding */
    --header-top-height-mobile: 50px; /* Approx height for logo/hamburger */
    --mobile-nav-buttons-height: 50px; /* Approx height for mobile buttons */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Mobile */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  background-color: #0a0a0a; /* Dark background for neon theme */
  line-height: 1.6;
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

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

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

/* Animations for Neon Effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-cycle-1-color1);
    box-shadow: 0 0 10px var(--neon-cycle-1-color1), 0 0 20px var(--neon-cycle-1-color1);
  }
  25% {
    border-color: var(--neon-cycle-1-color2);
    box-shadow: 0 0 10px var(--neon-cycle-1-color2), 0 0 20px var(--neon-cycle-1-color2);
  }
  50% {
    border-color: var(--neon-cycle-1-color3);
    box-shadow: 0 0 10px var(--neon-cycle-1-color3), 0 0 20px var(--neon-cycle-1-color3);
  }
  75% {
    border-color: var(--neon-cycle-1-color4);
    box-shadow: 0 0 10px var(--neon-cycle-1-color4), 0 0 20px var(--neon-cycle-1-color4);
  }
}

@keyframes text-glow-flow {
  0%, 100% {
    text-shadow: 
      0 0 5px var(--neon-cycle-1-color1),
      0 0 10px var(--neon-cycle-1-color1),
      0 0 15px var(--neon-cycle-1-color1);
    color: var(--secondary-color);
  }
  25% {
    text-shadow: 
      0 0 5px var(--neon-cycle-1-color2),
      0 0 10px var(--neon-cycle-1-color2),
      0 0 15px var(--neon-cycle-1-color2);
    color: var(--secondary-color);
  }
  50% {
    text-shadow: 
      0 0 5px var(--neon-cycle-1-color3),
      0 0 10px var(--neon-cycle-1-color3),
      0 0 15px var(--neon-cycle-1-color3);
    color: var(--secondary-color);
  }
  75% {
    text-shadow: 
      0 0 5px var(--neon-cycle-1-color4),
      0 0 10px var(--neon-cycle-1-color4),
      0 0 15px var(--neon-cycle-1-color4);
    color: var(--secondary-color);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 8s ease-in-out infinite alternate;
  box-shadow: 
    0 0 10px var(--neon-cycle-1-color5),
    0 0 20px var(--neon-cycle-1-color5),
    0 0 30px var(--neon-cycle-1-color5),
    inset 0 0 20px rgba(255, 69, 0, 0.1);
  z-index: 1001;
  min-height: var(--marquee-height-desktop);
  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: 5px 20px;
}

.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-cycle-1-color1),
    0 0 10px var(--neon-cycle-1-color2),
    0 0 15px var(--neon-cycle-1-color3);
  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;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 40s linear infinite;
  gap: 30px;
  padding-right: 30px; /* Ensure space for content repetition */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  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-cycle-1-color1),
    0 0 20px var(--neon-cycle-1-color2),
    0 0 30px var(--neon-cycle-1-color3),
    0 0 40px var(--neon-cycle-1-color4);
  transform: scale(1.05);
  color: var(--secondary-color);
}

.marquee-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

/* Header */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
  border-bottom: 2px solid;
  animation: theme-colors 6s ease-in-out infinite alternate; /* Dynamic glow */
  box-shadow: 
    0 0 10px var(--neon-cycle-1-color3),
    0 0 20px var(--neon-cycle-1-color3),
    0 0 30px var(--neon-cycle-1-color3),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Regular color, no neon glow */
  text-decoration: none;
  white-space: nowrap;
  display: block;
  flex-shrink: 0;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 50px;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary-base), var(--neon-secondary-base));
  padding: 12px 25px;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite alternate; /* Dynamic glow */
  text-shadow: 
    0 0 5px var(--secondary-color),
    0 0 10px var(--neon-primary-base);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px; /* Limit button width on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster glow on hover */
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-cycle-1-color1),
    0 0 30px var(--neon-cycle-1-color2),
    0 0 45px var(--neon-cycle-1-color3);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 1002; /* Above mobile buttons and menu */
  animation: theme-colors 5s ease-in-out infinite alternate;
  border: 2px solid transparent;
  padding: 5px;
  border-radius: 3px;
  box-shadow: 
    0 0 5px var(--neon-cycle-1-color1),
    0 0 10px var(--neon-cycle-1-color1);
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--secondary-color);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 7s ease-in-out infinite alternate; /* Dynamic glow */
  box-shadow: 
    0 0 10px var(--neon-cycle-1-color2),
    0 0 20px var(--neon-cycle-1-color2),
    0 0 30px var(--neon-cycle-1-color2),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  padding: 10px 0;
  width: 100%;
  display: flex; /* Visible on desktop */
  align-items: center;
  min-height: var(--main-nav-height-desktop);
}

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

.nav-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color); /* Regular color, not neon */
  padding: 8px 15px;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
}

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

/* Footer */
.site-footer {
  background-color: #1a1a2e; /* Darker background for footer */
  padding: 40px 0 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-col h4 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

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

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-links 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; /* Consistent gap for icons */
  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;
}

.footer-middle {
  padding: 30px 0;
  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;
}

.footer-bottom {
  padding-top: 20px;
}

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

.footer-bottom p {
  margin: 0;
  flex-shrink: 0;
}

.footer-bottom .action-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.footer-bottom .action-links li {
  margin-bottom: 0;
}

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

  /* Header Mobile */
  .site-header {
    top: var(--marquee-height-mobile); /* Position below mobile marquee */
  }

  .header-top {
    padding: 10px 0;
    min-height: var(--header-top-height-mobile);
    display: flex;
    align-items: center;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Mobile container fills width */
    position: relative; /* For absolute logo positioning if needed */
  }

  .logo {
    font-size: 24px;
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important;
    order: 2; /* Place logo in the middle */
  }
  .logo img {
    max-height: 40px; /* Adjust for mobile */
  }

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

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    order: 1; /* Place hamburger on the left */
    margin-right: auto; /* Push logo to center */
    box-shadow: 
      0 0 5px var(--neon-cycle-1-color1),
      0 0 10px var(--neon-cycle-1-color1);
  }

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0f3460, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 5s ease-in-out infinite alternate;
    box-shadow: 
      0 0 8px var(--neon-cycle-1-color4),
      0 0 16px var(--neon-cycle-1-color4);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    min-height: var(--mobile-nav-buttons-height);
    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 */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    box-shadow: 
      0 0 5px var(--neon-cycle-1-color1),
      0 0 10px var(--neon-cycle-1-color1);
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max menu width */
    height: calc(100% - var(--header-offset)); /* Full height below fixed header parts */
    background: linear-gradient(135deg, #0f3460, #16213e, #0a0a0a); /* Dark background */
    border-right: 2px solid;
    animation: theme-colors 6s ease-in-out infinite alternate;
    box-shadow: 
      0 0 15px var(--neon-cycle-1-color5),
      0 0 30px var(--neon-cycle-1-color5),
      inset -5px 0 20px rgba(255, 69, 0, 0.1);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-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 */
  }

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

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

  /* Overlay for mobile menu */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above page content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Footer Mobile */
  .footer-top {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
  }
  .footer-bottom .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .footer-bottom .action-links {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .footer-bottom .action-links li {
    width: 100%;
  }
  .footer-bottom .action-links a {
    display: block;
    text-align: left;
    padding: 5px 0;
  }

  /* 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
