:root {
    --site-primary: #017439; /* Green */
    --site-secondary: #FFFFFF; /* White */
    --site-register: #C30808; /* Red */
    --site-login: #C30808; /* Red */
    --site-register-login-font: #FFFF00; /* Yellow */

    /* Neon Colors - derived from site primary/secondary, but vibrant */
    --neon-primary: #39FF14; /* Bright Green */
    --neon-secondary: #00FFFF; /* Cyan */
    --neon-accent: #FF00FF; /* Magenta */
    --neon-bg-dark: #0a0a0a;
    --neon-bg-medium: #1a1a2e;
    --neon-bg-light: #16213e;

    /* Header offset calculations */
    --marquee-height-desktop: 45px;
    --header-top-height-desktop: 60px;
    --main-nav-height-desktop: 50px;
    --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop: Marquee + Header Top + Main Nav */
  }

  @media (max-width: 768px) {
    :root {
      --marquee-height-mobile: 30px;
      --header-top-height-mobile: 50px; /* Logo + Hamburger */
      --mobile-nav-buttons-height-mobile: 50px; /* Buttons */
      --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height-mobile)); /* Mobile: Marquee + Header Top + Mobile Buttons */
    }
  }

  /* Universal box-sizing for consistency */
  *, *::before, *::after {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #eee;
    background-color: #121212; /* Dark background for neon theme */
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on body */
  }

  /* Fixed Header Offset for body */
  @media (max-width: 768px) {
    body {
      overflow-x: hidden; /* Ensure no horizontal scroll on mobile */
    }
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
  }

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

  @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: var(--marquee-height-desktop); /* Fixed height */
    background: linear-gradient(135deg, var(--neon-bg-dark), var(--neon-bg-medium), var(--neon-bg-light));
    color: var(--site-secondary);
    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(255, 0, 255, 0.1);
    z-index: 1001;
    display: flex;
    align-items: center;
    padding: 0 20px; /* Add padding to prevent content from touching edges */
  }

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

  .marquee-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
  }

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

  .marquee-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--site-secondary);
    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: var(--site-secondary);
  }

  .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: var(--marquee-height-desktop); /* Position below marquee */
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent; /* Background handled by sub-sections */
  }

  .header-top {
    background: linear-gradient(135deg, var(--neon-bg-dark), var(--neon-bg-medium));
    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(var(--neon-primary), 0.1);
    padding: 15px 0; /* Adjusted for desktop height */
    height: var(--header-top-height-desktop);
    display: flex;
    align-items: center;
  }

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

  .logo {
    color: var(--site-secondary); /* LOGO is regular style, white for contrast */
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
    /* LOGO MUST NOT have neon effects */
    text-shadow: none; 
    box-shadow: none;
    animation: none;
  }

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

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

  .btn {
    position: relative;
    background: linear-gradient(135deg, var(--site-register), var(--site-login)); /* Red gradient for buttons */
    padding: 12px 25px;
    color: var(--site-register-login-font); /* Yellow font for buttons */
    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 var(--site-register-login-font),
      0 0 10px var(--site-register);
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  .btn:hover {
    animation-duration: 2s;
    transform: translateY(-2px);
    box-shadow: 
      0 0 15px var(--neon-primary),
      0 0 30px var(--neon-primary),
      0 0 45px var(--neon-primary),
      inset 0 0 15px rgba(var(--neon-primary), 0.4);
  }

  .main-nav {
    background: linear-gradient(135deg, var(--neon-bg-medium), var(--neon-bg-light));
    border-top: 2px solid;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse; /* Different dynamic color for nav */
    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(var(--neon-secondary), 0.1);
    padding: 10px 0; /* Adjusted for desktop height */
    height: var(--main-nav-height-desktop);
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    align-items: center;
    position: static; /* Desktop default: static */
    width: 100%;
  }

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

  .nav-link {
    color: var(--site-secondary); /* Regular text, white for contrast */
    text-decoration: none;
    font-weight: 500;
    font-size: 17px;
    padding: 5px 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    white-space: nowrap;
    /* No neon effects for nav links */
    text-shadow: none;
  }

  .nav-link:hover {
    color: var(--neon-primary); /* Hover with neon color */
    text-shadow: 0 0 8px var(--neon-primary), 0 0 15px var(--neon-primary);
  }

  .hamburger-menu {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1002; /* Above logo on mobile */
    flex-shrink: 0;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
  }

  .hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--site-secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
    text-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
    animation: text-glow-flow 3s ease-in-out infinite alternate;
  }

  .hamburger-menu.active {
    border-color: var(--neon-primary);
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

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

  .mobile-menu-overlay {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    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: linear-gradient(135deg, #0f1c2c, #0a111a); /* Darker, non-neon background */
    color: #a0a0a0;
    padding: 40px 0 20px;
    font-size: 14px;
  }

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

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

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

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

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

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

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

  .footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
  }

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

  .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;
    object-fit: contain;
    filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
    transition: filter 0.3s ease;
  }

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

  .footer-middle-sections {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .game-providers-section h4, .social-media-section h4 {
    color: var(--site-secondary);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
  }

  .footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
  }

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

  /* Responsive Styles */
  @media (max-width: 768px) {
    .marquee-section {
      height: var(--marquee-height-mobile);
      padding: 0 10px;
    }

    .marquee-icon {
      width: 20px;
      height: 20px;
    }

    .marquee-icon-emoji {
      font-size: 14px;
    }

    .marquee-text {
      font-size: 13px;
    }

    .marquee-separator {
      font-size: 13px;
      margin: 0 8px;
    }

    .marquee-content {
      gap: 15px;
      animation: marquee-scroll 25s linear infinite;
      padding-right: 15px;
    }

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

    .header-top {
      padding: 10px 0; /* Adjusted for mobile height */
      height: var(--header-top-height-mobile);
      justify-content: flex-start; /* Align hamburger to start */
    }

    .header-container {
      padding: 0 15px; /* Smaller padding for mobile */
      max-width: none; /* Full width on mobile */
      width: 100%;
    }

    .hamburger-menu {
      display: flex; /* Show hamburger on mobile */
      margin-right: 15px; /* Space between hamburger and logo */
    }

    .logo {
      flex: 1 !important; /* Take remaining space */
      display: flex !important;
      justify-content: center !important; /* Center logo horizontally */
      align-items: center !important;
      font-size: 22px;
      margin: 0; /* Remove any default margin */
    }

    .logo img {
      max-height: 35px; /* Smaller logo on mobile */
    }

    .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;
      overflow: hidden;
      gap: 10px;
      justify-content: center;
      flex-wrap: nowrap; /* Prevent buttons from wrapping */
      background: linear-gradient(135deg, var(--neon-bg-light), var(--neon-bg-dark)); /* Dark background for button row */
      border-bottom: 1px solid rgba(var(--neon-accent), 0.2);
      height: var(--mobile-nav-buttons-height-mobile);
      align-items: center;
    }

    .mobile-nav-buttons .btn {
      flex: 1;
      min-width: 0;
      max-width: calc(50% - 5px); /* Max width for two buttons with 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;
      text-align: center;
    }

    .main-nav {
      display: none; /* Hidden by default on mobile */
      flex-direction: column; /* Vertical layout for mobile menu */
      position: fixed;
      top: var(--header-offset); /* Position below entire header area */
      left: 0;
      width: 80%; /* Menu width */
      max-width: 300px;
      height: calc(100vh - var(--header-offset)); /* Full height below header */
      background: linear-gradient(180deg, var(--neon-bg-dark), var(--neon-bg-medium));
      box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
      transform: translateX(-100%); /* Start off-screen */
      transition: transform 0.3s ease;
      z-index: 1000; /* Above overlay */
      padding: 20px 0;
      overflow-y: auto; /* Allow scrolling for long menus */
      border-right: 2px solid;
      animation: theme-colors 4s ease-in-out infinite;
    }

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

    .nav-container {
      flex-direction: column;
      gap: 15px;
      padding: 0 15px;
      max-width: none; /* Full width on mobile */
      width: 100%;
      align-items: flex-start; /* Align links to left */
    }

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

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

    .footer-grid {
      grid-template-columns: 1fr; /* Single column on mobile */
      gap: 30px;
    }

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

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

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

    .footer-links {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }

    .footer-links li {
      margin-bottom: 0;
    }

    .footer-links a {
      white-space: normal;
    }

    .payment-methods, .game-providers-section, .social-media-section {
      text-align: center;
    }

    .payment-icons, .game-providers-icons, .social-media-icons {
      justify-content: center;
    }
  }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
