:root {
  --primary-color: #FF8C1A;
  --secondary-color: #FFA53A;
  --card-bg: #17191F;
  --bg-color: #0D0E12;
  --text-main: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange: #D96800;

  /* Neon colors for dynamic effects - based on primary/secondary/accent */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: var(--glow-color); /* Using glow color as an accent for neon */

  /* Header offset calculation with marquee */
  --header-offset: 166px; /* Desktop: Marquee 44px + Header Top 68px + Main Nav 52px = 164px, +2px margin */
}

/* Base styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

/* Universal container for max-width and centering */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Animations for dynamic neon effects */
@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: 44px; /* Desktop height */
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  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; /* Ensure on top of header */
}

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

.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 Section Styles */
.site-header {
  position: fixed;
  top: 44px; /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: var(--text-main);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  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, 255, 0, 0.1); /* Yellowish glow for top */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main); /* Regular color, no neon */
  text-decoration: none;
  display: block; /* For text logo */
  line-height: 1;
  flex-shrink: 0;
}
.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 60px; /* Desktop logo max height */
  object-fit: contain;
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  position: relative;
  z-index: 1002; /* Above logo and mobile buttons */
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glow for icon */
}
.hamburger-menu div {
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary); /* Small glow for bars */
}
.hamburger-menu.active .bar1 { transform: translateY(11px) rotate(45deg); }
.hamburger-menu.active .bar2 { opacity: 0; }
.hamburger-menu.active .bar3 { transform: translateY(-11px) rotate(-45deg); }


/* Desktop navigation buttons (visible on desktop) */
.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}

/* Mobile navigation buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop height */
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Darker background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(0, 255, 255, 0.1); /* Cyanish glow for main nav */
}

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

.nav-link {
  color: var(--text-main); /* Regular color, no neon */
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  text-shadow: 0 0 5px var(--primary-color);
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%); /* Specific button gradient */
  padding: 12px 25px;
  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(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent text wrapping for desktop buttons */
  cursor: pointer;
}

.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(102, 126, 234, 0.5);
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--bg-color);
  padding: 40px 0 20px;
  color: var(--text-main);
  font-size: 14px;
}

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 30px;
}

.footer-col h4 {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: #ccc;
  text-decoration: none;
  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; /* Small gap for icons */
  width: 100%;
}
.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.game-providers-section,
.social-media-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 30px;
}
.game-providers-section h4,
.social-media-section h4 {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}


.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  color: #aaa;
}
.footer-bottom p {
  margin: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 146px; /* Mobile: Marquee 36px + Header Top 60px + Mobile Nav Buttons 48px + Main Nav 0px (hidden) = 144px, +2px margin */
  }

  /* Marquee mobile */
  .marquee-section {
    height: 36px !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 12px !important;
  }
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .marquee-icon-emoji {
    font-size: 14px !important;
  }
  .marquee-text {
    font-size: 14px !important;
  }
  .marquee-separator {
    font-size: 14px !important;
    margin: 0 10px !important;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header mobile */
  .site-header {
    top: 36px; /* Position below mobile marquee */
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    padding: 0; /* Container itself doesn't need padding, header-top handles it */
    justify-content: flex-start; /* Hamburger left, logo centered */
    position: relative;
    height: 100%;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    position: relative; /* Ensure it's not absolute and z-indexed correctly */
    z-index: 1002; /* Above logo */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute; /* Absolute position to center, then adjust */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 80px); /* Leave space for hamburger */
    font-size: 20px; /* Adjust logo font size */
  }
  .logo img {
    max-height: 56px !important; /* Mobile logo max height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjust padding */
    min-height: 48px; /* Mobile nav buttons height */
    height: auto; /* Allow height to adjust if text wraps */
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent);
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space equally */
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-in-out;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 
      5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Above overlay */
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide in */
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile container */
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    padding: 0 15px;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h4 {
    text-align: center;
  }
  .footer-description {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .game-providers-section,
  .social-media-section {
    padding: 0 15px;
  }
  .game-providers-section h4,
  .social-media-section h4 {
    text-align: center;
  }
  .game-providers-icons,
  .social-media-icons,
  .payment-icons {
    justify-content: center;
  }
  .footer-bottom {
    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;
  }
}
