:root {
    --primary-color: #FFD700;
    --secondary-color: #1A202C;
    --text-color: #ffffff;
    --dark-bg-1: #0a0a0a;
    --dark-bg-2: #1a1a2e;
    --dark-bg-3: #16213e;
    --neon-primary: var(--primary-color);
    --neon-secondary: #FF6600; /* A vibrant orange for contrast */
    --neon-accent: #FF00FF; /* A vibrant pink/magenta for accent */
    --header-offset: 155px; /* Desktop: Marquee 45px + Header Top 60px + Main Nav 50px */
}

@media (max-width: 768px) {
    :root {
        --header-offset: 130px; /* Mobile: Marquee 30px + Header Top 50px + Mobile Buttons 50px */
    }
}

/* Base styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--neon-primary);
}

/* Animations for Neon Effects */
@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%);
    }
}

@keyframes theme-colors {
    0%, 100% {
        border-color: var(--neon-primary);
        box-shadow:
            0 0 8px var(--neon-primary),
            0 0 15px var(--neon-primary);
    }
    33% {
        border-color: var(--neon-secondary);
        box-shadow:
            0 0 8px var(--neon-secondary),
            0 0 15px var(--neon-secondary);
    }
    66% {
        border-color: var(--neon-accent);
        box-shadow:
            0 0 8px var(--neon-accent),
            0 0 15px 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;
    }
}

/* Marquee Section */
.marquee-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
    color: var(--text-color);
    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, 255, 0, 0.1);
    z-index: 1001;
    padding: 5px 0;
    height: 45px; /* Explicit height for calculation */
    display: flex;
    align-items: center;
}

.marquee-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 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-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: 15px;
    font-weight: 600;
    color: var(--text-color);
    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.02);
    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);
}

/* Header Section */
.site-header {
    position: fixed;
    top: 45px; /* Marquee height */
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
}

.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;
    box-shadow:
        0 0 10px var(--neon-primary),
        0 0 20px var(--neon-primary),
        inset 0 0 15px rgba(255, 255, 0, 0.1);
    padding: 10px 0;
    height: 60px; /* Explicit height for calculation */
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--neon-primary);
}

/* No neon effects for LOGO */
.logo, .logo:hover {
    text-shadow: none;
    box-shadow: none;
    filter: none;
    animation: none;
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.main-nav {
    background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
    border-top: 2px solid;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
        0 0 8px var(--neon-secondary),
        0 0 15px var(--neon-secondary),
        inset 0 0 10px rgba(255, 102, 0, 0.1);
    padding: 10px 0;
    height: 50px; /* Explicit height for calculation */
    display: flex;
    align-items: center;
}

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

.nav-link {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--neon-primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--neon-primary);
}

.btn {
    position: relative;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    text-shadow:
        0 0 5px var(--text-color),
        0 0 10px var(--neon-primary);
    transition: all 0.3s ease;
    font-weight: bold;
    background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
    display: inline-block;
    white-space: nowrap;
}

.btn:hover {
    animation-duration: 2s;
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 15px var(--neon-primary),
        0 0 25px var(--neon-primary),
        inset 0 0 15px rgba(255, 255, 0, 0.3);
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1002; /* Above header and logo */
    margin-right: 15px;
    animation: theme-colors 4s ease-in-out infinite;
    border-radius: 3px;
    box-shadow:
        0 0 5px var(--neon-primary),
        0 0 10px var(--neon-primary);
}

.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s ease;
    box-shadow: 0 0 5px var(--neon-primary);
}

.hamburger-icon::before, .hamburger-icon::after {
    content: '';
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 0 5px var(--neon-primary);
}

.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-primary);
    box-shadow: 0 0 5px var(--neon-primary);
}

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

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: 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 Section */
.site-footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0 20px;
    font-size: 14px;
}

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

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

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

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

.footer-description {
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 0.7);
}

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

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

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

.footer-nav-links 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;
    width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
    max-height: 40px; /* Reduced for tighter layout */
    height: auto;
    width: auto;
    filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme better */
    opacity: 0.8;
    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;
    transform: scale(1.05);
}

.game-providers-section, .social-media-section {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.game-providers-section h4, .social-media-section h4 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 15px;
    position: relative;
}

.game-providers-section h4::after, .social-media-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-bottom-section {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .marquee-section {
        height: 30px;
        padding: 0px 0;
    }
    .marquee-container {
        gap: 10px;
        padding: 0 5px;
    }
    .marquee-icon {
        width: 20px;
        height: 20px;
    }
    .marquee-icon-emoji {
        font-size: 14px;
    }
    .marquee-text {
        font-size: 12px;
        text-shadow:
            0 0 3px var(--neon-primary),
            0 0 6px var(--neon-primary);
    }
    .marquee-separator {
        font-size: 12px;
        margin: 0 5px;
    }
    .marquee-content {
        gap: 15px;
        animation: marquee-scroll 20s linear infinite;
    }

    .site-header {
        top: 30px; /* Mobile marquee height */
        height: auto;
    }

    .header-top {
        padding: 10px 0;
        height: 50px; /* Mobile Header Top height */
    }

    .header-container {
        padding: 0 15px;
        justify-content: flex-start;
        width: 100%;
        max-width: none;
        position: relative;
        min-height: 30px;
    }

    .hamburger-menu {
        display: block;
        order: 0;
        margin-right: 0; /* Adjusted for flex centering */
        position: relative;
        left: 0;
        transform: none;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 20px;
        order: 1;
        margin-left: -30px; /* Counteract hamburger width for visual centering */
    }

    .desktop-nav-buttons {
        display: none;
    }

    .mobile-nav-buttons {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        justify-content: center;
        flex-wrap: nowrap;
        background: linear-gradient(135deg, var(--dark-bg-3), var(--dark-bg-2));
        border-top: 1px solid;
        border-bottom: 1px solid;
        animation: theme-colors 4s ease-in-out infinite;
        box-shadow:
            0 0 5px var(--neon-accent),
            0 0 10px var(--neon-accent),
            inset 0 0 5px rgba(255, 0, 255, 0.1);
        height: 50px; /* Mobile Buttons height */
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px);
        box-sizing: border-box;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 8px 12px;
        font-size: 13px;
        text-align: center;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Adjusted for mobile header total height */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        padding: 20px 0;
        border: none; /* Remove border for cleaner mobile menu */
        animation: none; /* No animations on mobile menu itself */
    }

    .main-nav.active {
        display: flex;
        transform: translateX(0);
    }

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

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

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

    .nav-link::after {
        background-color: var(--neon-primary);
        height: 1px;
    }

    .footer-top-section {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 15px 30px;
    }

    .game-providers-section, .social-media-section {
        padding: 0 15px;
    }

    .footer-bottom-section {
        padding: 15px 15px 0;
    }

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }
}

/* Ensure body overflow-x hidden for all screen sizes (prevent horizontal scroll) */
body {
    overflow-x: hidden;
}

/* Color Contrast Check */
body, .site-footer {
    color: var(--text-color);
    background-color: var(--secondary-color);
}

.marquee-text, .marquee-icon-emoji, .nav-link, .btn, .logo, .footer-logo, .footer-col h4, .game-providers-section h4, .social-media-section h4 {
    /* Ensure these elements have sufficient contrast with their respective backgrounds */
    /* Primary color #FFD700 on dark backgrounds like #1A202C has a contrast ratio of ~10.5:1, which is good. */
    /* White text on dark backgrounds also has good contrast. */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
