/**
 * JLBoss Games - Core Stylesheet
 * Prefix: w9861-
 * Color Palette: #0D1117 (dark bg) | #F0F0F0 (text) | #E0FFFF (accent) | #BDC3C7 #C0C0C0 #808080 (silver/gray)
 * Mobile-first design, max-width: 430px
 */

:root {
    --w9861-primary: #BDC3C7;
    --w9861-bg: #0D1117;
    --w9861-bg-light: #161B22;
    --w9861-bg-card: #1C2128;
    --w9861-text: #F0F0F0;
    --w9861-text-muted: #C0C0C0;
    --w9861-text-dim: #808080;
    --w9861-accent: #E0FFFF;
    --w9861-accent-hover: #B0E0E6;
    --w9861-border: #2D333B;
    --w9861-gradient: linear-gradient(135deg, #0D1117 0%, #1C2128 100%);
    --w9861-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --w9861-radius: 10px;
    --w9861-radius-sm: 6px;
    --w9861-max-width: 430px;
    --w9861-header-h: 56px;
    --w9861-bottom-h: 62px;
    --w9861-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--w9861-font);
    background: var(--w9861-bg);
    color: var(--w9861-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--w9861-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--w9861-accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== Layout Container ===== */
.w9861-container {
    max-width: var(--w9861-max-width);
    margin: 0 auto;
    padding: 0 12px;
    width: 100%;
}
.w9861-section {
    padding: 20px 0;
}
.w9861-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--w9861-accent);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--w9861-border);
}

/* ===== Header ===== */
.w9861-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--w9861-header-h);
    background: var(--w9861-bg);
    border-bottom: 1px solid var(--w9861-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    max-width: 100%;
}
.w9861-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--w9861-max-width);
    margin: 0 auto;
}
.w9861-logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}
.w9861-logo-area img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}
.w9861-logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w9861-accent);
    letter-spacing: 0.5px;
}
.w9861-header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.w9861-btn-register, .w9861-btn-login {
    padding: 6px 14px;
    border-radius: var(--w9861-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}
.w9861-btn-register {
    background: var(--w9861-accent);
    color: var(--w9861-bg);
}
.w9861-btn-register:hover { background: var(--w9861-accent-hover); transform: scale(1.03); }
.w9861-btn-login {
    background: transparent;
    color: var(--w9861-accent);
    border: 1px solid var(--w9861-accent);
}
.w9861-btn-login:hover { background: rgba(224, 255, 255, 0.1); }
.w9861-menu-toggle {
    background: none;
    border: none;
    color: var(--w9861-text);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* ===== Mobile Menu Overlay ===== */
.w9861-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.w9861-overlay-active { opacity: 1; visibility: visible; }

.w9861-mobile-menu {
    position: fixed;
    top: 0; right: -280px;
    width: 270px;
    height: 100%;
    background: var(--w9861-bg-light);
    z-index: 9999;
    transition: right 0.35s ease;
    overflow-y: auto;
    padding: 60px 16px 20px;
}
.w9861-menu-active { right: 0; }
.w9861-mobile-menu .w9861-menu-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none;
    border: none;
    color: var(--w9861-text);
    font-size: 1.5rem;
    cursor: pointer;
}
.w9861-mobile-menu ul { padding: 0; }
.w9861-mobile-menu li {
    border-bottom: 1px solid var(--w9861-border);
}
.w9861-mobile-menu li a {
    display: block;
    padding: 13px 8px;
    color: var(--w9861-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s, padding-left 0.2s;
}
.w9861-mobile-menu li a:hover {
    color: var(--w9861-accent);
    padding-left: 14px;
}
.w9861-menu-promo {
    margin-top: 20px;
    padding: 14px;
    background: var(--w9861-bg-card);
    border-radius: var(--w9861-radius);
    text-align: center;
}
.w9861-menu-promo p {
    color: var(--w9861-text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.w9861-menu-promo-btn {
    display: inline-block;
    padding: 10px 28px;
    background: var(--w9861-accent);
    color: var(--w9861-bg);
    border-radius: var(--w9861-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.w9861-menu-promo-btn:hover { background: var(--w9861-accent-hover); }

/* ===== Main Content ===== */
.w9861-main {
    margin-top: var(--w9861-header-h);
    padding-bottom: 20px;
}

/* ===== Banner Slider ===== */
.w9861-banner-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    overflow: hidden;
    border-radius: 0 0 var(--w9861-radius) var(--w9861-radius);
}
.w9861-banner-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.w9861-slide-active { opacity: 1; }
.w9861-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.w9861-banner-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 14px 12px;
    background: linear-gradient(transparent, rgba(13, 17, 23, 0.9));
}
.w9861-banner-overlay h2 {
    font-size: 1.1rem;
    color: var(--w9861-accent);
    margin-bottom: 4px;
}
.w9861-banner-overlay p {
    font-size: 0.8rem;
    color: var(--w9861-text-muted);
}

/* ===== Category Tabs ===== */
.w9861-cat-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.w9861-cat-tabs::-webkit-scrollbar { display: none; }
.w9861-cat-tab {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--w9861-bg-card);
    color: var(--w9861-text-muted);
    border: 1px solid var(--w9861-border);
    transition: all 0.25s ease;
}
.w9861-cat-tab-active {
    background: var(--w9861-accent);
    color: var(--w9861-bg);
    border-color: var(--w9861-accent);
}

/* ===== Game Grid ===== */
.w9861-game-grid {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.w9861-grid-active { display: grid; }
.w9861-game-card {
    position: relative;
    background: var(--w9861-bg-card);
    border-radius: var(--w9861-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--w9861-border);
}
.w9861-game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--w9861-shadow);
}
.w9861-game-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: var(--w9861-bg-light);
}
.w9861-game-card span {
    display: block;
    padding: 4px 5px;
    font-size: 0.65rem;
    color: var(--w9861-text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Content Modules ===== */
.w9861-info-box {
    background: var(--w9861-bg-card);
    border: 1px solid var(--w9861-border);
    border-radius: var(--w9861-radius);
    padding: 16px;
    margin-bottom: 16px;
}
.w9861-info-box h2, .w9861-info-box h3 {
    color: var(--w9861-accent);
    margin-bottom: 10px;
}
.w9861-info-box h2 { font-size: 1.1rem; }
.w9861-info-box h3 { font-size: 0.95rem; }
.w9861-info-box p {
    color: var(--w9861-text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 8px;
}
.w9861-info-box ul, .w9861-info-box ol {
    padding-left: 18px;
    margin-bottom: 8px;
}
.w9861-info-box li {
    color: var(--w9861-text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 4px;
    list-style: disc;
}
.w9861-info-box li::marker { color: var(--w9861-accent); }

/* ===== CTA / Promo Buttons ===== */
.w9861-cta-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--w9861-accent);
    color: var(--w9861-bg);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-align: center;
}
.w9861-cta-btn:hover {
    background: var(--w9861-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(224, 255, 255, 0.3);
}
.w9861-cta-center { text-align: center; margin: 16px 0; }

/* ===== Features Grid ===== */
.w9861-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.w9861-feature-item {
    background: var(--w9861-bg-card);
    border: 1px solid var(--w9861-border);
    border-radius: var(--w9861-radius);
    padding: 14px;
    text-align: center;
}
.w9861-feature-item .w9861-icon {
    font-size: 1.6rem;
    color: var(--w9861-accent);
    margin-bottom: 8px;
}
.w9861-feature-item h4 {
    font-size: 0.85rem;
    color: var(--w9861-text);
    margin-bottom: 4px;
}
.w9861-feature-item p {
    font-size: 0.75rem;
    color: var(--w9861-text-dim);
}

/* ===== Steps / How-to ===== */
.w9861-steps {
    counter-reset: w9861-step;
}
.w9861-step-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.w9861-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--w9861-accent);
    color: var(--w9861-bg);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.w9861-step-text {
    flex: 1;
}
.w9861-step-text h4 {
    font-size: 0.9rem;
    color: var(--w9861-text);
    margin-bottom: 2px;
}
.w9861-step-text p {
    font-size: 0.8rem;
    color: var(--w9861-text-muted);
}

/* ===== Footer ===== */
.w9861-footer {
    background: var(--w9861-bg-light);
    border-top: 1px solid var(--w9861-border);
    padding: 24px 12px 20px;
    text-align: center;
}
.w9861-footer-partners {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.w9861-footer-partners span {
    font-size: 0.7rem;
    color: var(--w9861-text-dim);
    background: var(--w9861-bg-card);
    padding: 4px 10px;
    border-radius: 4px;
}
.w9861-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.w9861-footer-links a {
    font-size: 0.75rem;
    color: var(--w9861-text-muted);
}
.w9861-footer-copy {
    font-size: 0.7rem;
    color: var(--w9861-text-dim);
}

/* ===== Bottom Navigation ===== */
.w9861-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--w9861-bottom-h);
    background: var(--w9861-bg-light);
    border-top: 1px solid var(--w9861-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 4px 0 8px;
}
.w9861-bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 52px;
    background: none;
    border: none;
    color: var(--w9861-text-dim);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
    padding: 2px;
}
.w9861-bottom-btn:hover, .w9861-bottom-btn:focus {
    color: var(--w9861-accent);
}
.w9861-bottom-btn:active {
    transform: scale(0.92);
}
.w9861-bottom-btn .w9861-bnav-icon {
    font-size: 22px;
    margin-bottom: 2px;
    line-height: 1;
}
.w9861-bottom-btn .w9861-bnav-label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
}
.w9861-bottom-btn.w9861-bnav-active {
    color: var(--w9861-accent);
}
.w9861-bnav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--w9861-accent);
    margin-top: 2px;
}

/* ===== Scroll to Top ===== */
.w9861-scroll-top {
    position: fixed;
    bottom: 74px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--w9861-bg-card);
    border: 1px solid var(--w9861-border);
    color: var(--w9861-accent);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.w9861-scroll-top-visible { opacity: 1; visibility: visible; }
.w9861-scroll-top:hover { background: var(--w9861-accent); color: var(--w9861-bg); }

/* ===== Toast Notifications ===== */
.w9861-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 10px 22px;
    border-radius: var(--w9861-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.w9861-toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.w9861-toast-info { background: var(--w9861-bg-card); color: var(--w9861-accent); border: 1px solid var(--w9861-accent); }
.w9861-toast-success { background: #1a472a; color: #7ee787; border: 1px solid #7ee787; }

/* ===== Lazy Image States ===== */
.w9861-lazy-img {
    opacity: 0;
    transition: opacity 0.4s ease;
    background: var(--w9861-bg-card);
}
.w9861-img-loaded { opacity: 1; }

/* ===== FAQ Accordion ===== */
.w9861-faq-item {
    background: var(--w9861-bg-card);
    border: 1px solid var(--w9861-border);
    border-radius: var(--w9861-radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}
.w9861-faq-q {
    padding: 12px 14px;
    font-weight: 600;
    color: var(--w9861-text);
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.w9861-faq-q .w9861-faq-toggle {
    color: var(--w9861-accent);
    font-size: 1rem;
    transition: transform 0.3s ease;
}
.w9861-faq-a {
    padding: 0 14px 12px;
    color: var(--w9861-text-muted);
    font-size: 0.83rem;
    line-height: 1.7;
    display: none;
}
.w9861-faq-open .w9861-faq-a { display: block; }
.w9861-faq-open .w9861-faq-toggle { transform: rotate(45deg); }

/* ===== Testimonials ===== */
.w9861-testimonials {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.w9861-testimonial-card {
    flex-shrink: 0;
    width: 260px;
    background: var(--w9861-bg-card);
    border: 1px solid var(--w9861-border);
    border-radius: var(--w9861-radius);
    padding: 14px;
}
.w9861-testimonial-card .w9861-t-name {
    font-size: 0.85rem;
    color: var(--w9861-accent);
    font-weight: 600;
    margin-bottom: 4px;
}
.w9861-testimonial-card .w9861-t-text {
    font-size: 0.8rem;
    color: var(--w9861-text-muted);
    line-height: 1.6;
}
.w9861-testimonial-card .w9861-t-stars {
    color: #FFD700;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

/* ===== Desktop Responsive ===== */
@media (min-width: 769px) {
    .w9861-bottom-nav { display: none; }
    .w9861-main { padding-bottom: 20px; }
    .w9861-container { padding: 0 16px; }
}
@media (max-width: 768px) {
    .w9861-main { padding-bottom: calc(var(--w9861-bottom-h) + 20px); }
}
