/* General resets and body styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #f5f5f5; /* Default text color for dark background */
    background-color: #1a1a1a; /* Dark background for the whole page */
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

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

ul {
    list-style: none;
}

/* Custom CSS Variables for Colors and Neon Effects */
:root {
    --primary-color: #017439; /* Website main green */
    --secondary-color: #FFFFFF; /* White */
    --reg-log-color: #C30808; /* Register/Login button red */
    --reg-log-font-color: #FFFF00; /* Register/Login button font yellow */

    /* Neon colors adapted from primary green theme */
    --neon-primary: #39FF14; /* Vibrant Green */
    --neon-secondary: #00FFFF; /* Cyan */
    --neon-accent: #FFFF00; /* Yellow */
    
    /* Header offset */
    --header-offset: 155px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(50px) */
}

@media (max-width: 768px) {
    :root {
        --header-offset: 125px; /* Mobile: Marquee(25px) + HeaderTop(50px) + MobileButtons(50px) */
    }
}

/* Keyframe 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: #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%;
    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 color border */
    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(57, 255, 20, 0.1); /* Greenish glow */
    z-index: 1001; /* Above header */
    min-height: 45px; /* Ensure minimum height */
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.marquee-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 0;
}

.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;
    padding-right: 30px; /* Space for seamless loop */
}

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


/* Site Header Styles */
.site-header {
    position: fixed;
    top: 45px; /* Adjusted based on marquee height */
    left: 0;
    width: 100%;
    z-index: 1000; /* Below marquee */
    background-color: #0a0a0a; /* Fallback */
}

.site-header .header-top {
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow: 
        0 0 10px var(--neon-accent), /* Yellowish glow for header top */
        0 0 20px var(--neon-accent),
        0 0 30px var(--neon-accent),
        inset 0 0 20px rgba(255, 255, 0, 0.1);
    min-height: 60px;
    display: flex;
    align-items: center;
}

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

.site-header .logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color); /* Regular color, not neon */
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px 0;
    /* LOGO MUST NOT HAVE NEON EFFECTS */
    text-shadow: none; 
    box-shadow: none;
    filter: none;
    animation: none;
}

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

.site-header .desktop-nav-buttons {
    display: flex; /* Desktop default: visible */
    gap: 10px;
}

.site-header .desktop-nav-buttons .btn {
    background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
    padding: 12px 25px;
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    text-shadow: 
        0 0 5px #ffffff,
        0 0 10px var(--neon-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.site-header .desktop-nav-buttons .btn:hover {
    animation-duration: 2s;
    transform: translateY(-2px);
    box-shadow: 
        0 0 15px var(--neon-primary),
        0 0 30px var(--neon-primary),
        inset 0 0 15px rgba(57, 255, 20, 0.3);
}

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

/* Main Navigation (Desktop Default) */
.site-header .main-nav {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background for main nav */
    border-top: 2px solid;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse; /* Different dynamic color border, reverse animation */
    box-shadow: 
        0 0 10px var(--neon-secondary), /* Cyanish glow for main nav */
        0 0 20px var(--neon-secondary),
        0 0 30px var(--neon-secondary),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    width: 100%;
    display: flex; /* Desktop default: visible */
    align-items: center;
    min-height: 50px;
}

.site-header .main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center; /* Center menu items */
    gap: 25px;
    padding: 10px 30px;
}

.site-header .main-nav .nav-link {
    color: var(--secondary-color); /* Regular color, not neon */
    font-size: 16px;
    font-weight: 600;
    padding: 8px 15px;
    transition: all 0.3s ease;
    position: relative;
    /* Regular style for nav links */
    text-shadow: none; 
    box-shadow: none;
    filter: none;
    animation: none;
}

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

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Above mobile menu */
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    /* Neon glow for hamburger menu */
    box-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 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 Menu Overlay */
.mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below mobile menu, above content */
    transition: opacity 0.3s ease;
    opacity: 0;
}

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

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

.site-footer .footer-top-grid {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr); /* First column wider for logo+desc */
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.site-footer ul {
    padding: 0;
}

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

.site-footer ul li a {
    color: #aaaaaa;
    transition: color 0.3s ease;
}

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

.site-footer .payment-methods .payment-icons,
.site-footer .game-providers-section .game-providers-icons,
.site-footer .social-media-section .social-media-icons {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px; /* Adjusted gap for tighter spacing */
    width: 100%;
}

.site-footer .payment-methods .payment-icons img,
.site-footer .game-providers-section .game-providers-icons img,
.site-footer .social-media-section .social-media-icons img {
    max-height: 50px;
    height: auto;
    width: auto;
    filter: grayscale(80%) brightness(120%); /* Subtle effect for icons */
    transition: filter 0.3s ease;
}

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

.site-footer .footer-middle-sections {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding-top: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.site-footer .footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.site-footer .footer-bottom p {
    color: #aaaaaa;
}

.site-footer .footer-legal-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.site-footer .footer-legal-nav a {
    color: #aaaaaa;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Marquee mobile adjustments */
    .marquee-section {
        min-height: 25px; /* Smaller height for mobile */
        padding: 0 5px;
    }
    .marquee-container {
        gap: 10px;
        padding: 0;
    }
    .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: 20px;
        animation-duration: 25s;
    }

    /* Header Mobile Styles */
    .site-header {
        top: 25px; /* Adjusted based on mobile marquee height */
    }

    .site-header .header-top {
        min-height: 50px;
    }

    .site-header .header-container {
        padding: 10px 15px; /* Smaller padding */
        max-width: none; /* No max-width on mobile */
        width: 100%;
        justify-content: space-between; /* Hamburger left, Logo center */
    }
    
    .hamburger-menu {
        display: flex; /* Show hamburger */
        order: 0; /* Left side */
    }

    .site-header .logo {
        flex: 1 !important; /* Take remaining space */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 22px;
        order: 1; /* Center */
        text-align: center; /* For text logo */
    }

    /* Mobile Nav Buttons - Always visible */
    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        background: linear-gradient(135deg, #0a0a0a, #1a1a2e); /* Dark background */
        border-bottom: 2px solid;
        animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
        box-shadow: 
            0 0 8px var(--neon-accent),
            0 0 15px var(--neon-accent),
            inset 0 0 10px rgba(255, 255, 0, 0.1);
        gap: 10px; /* Space between buttons */
        justify-content: center;
        flex-wrap: nowrap; /* Prevent buttons from wrapping */
    }

    .mobile-nav-buttons .btn {
        flex: 1; /* Equal width */
        min-width: 0; /* Allow shrinking */
        max-width: calc(50% - 5px); /* Max width for two buttons with gap */
        padding: 8px 12px; /* Smaller padding */
        font-size: 13px; /* Smaller font size */
        text-align: center;
        white-space: normal; /* Allow text wrap */
        word-wrap: break-word;
        overflow-wrap: break-word;
        /* Neon effects */
        box-shadow: 
            0 0 5px var(--neon-primary),
            0 0 10px var(--neon-primary) !important; /* Reduced intensity */
    }

    .site-header .desktop-nav-buttons {
        display: none; /* Hide desktop buttons */
    }

    .site-header .main-nav {
        display: none; /* Hidden by default, toggled by JS */
        flex-direction: column; /* Vertical menu */
        position: fixed;
        top: var(--header-offset); /* Below fixed header and mobile buttons */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px; /* Max menu width */
        height: calc(100vh - var(--header-offset)); /* Full height below header */
        background: linear-gradient(180deg, #1a1a2e, #0a0a0a); /* Dark background */
        border-right: 2px solid;
        animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
        box-shadow: 
            0 0 10px var(--neon-secondary),
            0 0 20px var(--neon-secondary);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease-in-out;
        z-index: 1000; /* Ensure menu is above overlay */
        overflow-y: auto; /* Scroll for long menus */
    }

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

    .site-header .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 15px;
        gap: 15px;
        max-width: none; /* No max-width on mobile */
        width: 100%;
    }

    .site-header .main-nav .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: #ffffff; /* Ensure good contrast */
        font-size: 15px;
    }
    .site-header .main-nav .nav-link:last-child {
        border-bottom: none;
    }
    .site-header .main-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--primary-color);
    }

    /* Footer Mobile Styles */
    .site-footer .footer-top-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 25px;
    }
    .site-footer .footer-col {
        text-align: center;
    }
    .site-footer .footer-logo {
        margin: 0 auto 15px;
    }
    .site-footer .footer-description {
        text-align: center;
    }
    .site-footer ul {
        padding: 0;
    }
    .site-footer ul li {
        text-align: center;
    }
    .site-footer .payment-methods .payment-icons,
    .site-footer .game-providers-section .game-providers-icons,
    .site-footer .social-media-section .social-media-icons {
        justify-content: center;
    }
    .site-footer .footer-middle-sections {
        padding-top: 20px;
    }
    .site-footer .game-providers-section h4,
    .site-footer .social-media-section h4 {
        text-align: center;
    }
    .site-footer .footer-bottom {
        padding-top: 15px;
    }
    .site-footer .footer-legal-nav {
        flex-direction: column;
        gap: 10px;
    }

    /* 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;
    }
}

/* No scroll on body when menu is open */
body.no-scroll {
    overflow: 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;
  }
}
