/* game bai (gamebai.click) - Core base stylesheet
   All classes use the vad8- prefix for namespace isolation.
   Mobile-first design, max-width 430px primary target.
   Comments in English per project conventions. */

:root {
        --vad8-primary: #FF6347;
        --vad8-coral: #FF7F50;
        --vad8-dark: #1E1E1E;
        --vad8-cream: #FFFACD;
        --vad8-burgundy: #B03060;
        --vad8-bg: #14141c;
        --vad8-bg-alt: #1c1c28;
        --vad8-text: #FFFACD;
        --vad8-text-muted: #c9c4b8;
        --vad8-card-bg: #22223080;
        --vad8-border: #3a3a4e;
        --vad8-gold: #FFD27A;
        --vad8-radius: 12px;
}

* { box-sizing: border-box; }

html {
        font-size: 62.5%;
        -webkit-text-size-adjust: 100%;
}

body {
        margin: 0;
        padding: 0;
        font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
        background: radial-gradient(circle at 15% 0%, #2a1820 0%, var(--vad8-bg) 55%);
        color: var(--vad8-text);
        font-size: 1.5rem;
        line-height: 1.6;
        min-height: 100vh;
        overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--vad8-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =================== Top Header =================== */
.vad8-header {
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 1000;
        background: linear-gradient(90deg, rgba(30,30,30,.96), rgba(176,48,96,.92));
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255,250,205,.15);
        box-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.vad8-header-inner {
        max-width: 430px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 14px;
        gap: 8px;
}

.vad8-brand {
        display: flex; align-items: center; gap: 8px;
        min-width: 0;
}

.vad8-logo {
        width: 32px; height: 32px; border-radius: 8px;
        background: linear-gradient(135deg, var(--vad8-primary), var(--vad8-gold));
        display: flex; align-items: center; justify-content: center;
        color: #1E1E1E; font-weight: 800; font-size: 1.7rem;
        box-shadow: 0 2px 8px rgba(255,99,71,.6);
}

.vad8-brand-name {
        color: var(--vad8-cream);
        font-weight: 700;
        font-size: 1.7rem;
        white-space: nowrap;
        overflow: hidden; text-overflow: ellipsis;
}

.vad8-brand-name b { color: var(--vad8-gold); }

.vad8-header-actions {
        display: flex; gap: 6px; align-items: center;
}

.vad8-btn {
        display: inline-flex; align-items: center; justify-content: center;
        gap: 4px;
        border: none;
        border-radius: 999px;
        padding: 8px 14px;
        font-size: 1.3rem;
        font-weight: 700;
        cursor: pointer;
        transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
        min-height: 34px;
        text-decoration: none;
}

.vad8-btn-primary {
        background: linear-gradient(135deg, var(--vad8-primary), var(--vad8-coral));
        color: #fff;
        box-shadow: 0 2px 8px rgba(255,99,71,.45);
}

.vad8-btn-primary:hover { transform: translateY(-1px); text-decoration: none; }

.vad8-btn-ghost {
        background: transparent;
        color: var(--vad8-cream);
        border: 1px solid rgba(255,250,205,.4);
}

.vad8-btn-ghost:hover { background: rgba(255,250,205,.1); text-decoration: none; }

.vad8-menu-btn {
        background: transparent;
        border: 1px solid rgba(255,250,205,.3);
        color: var(--vad8-cream);
        width: 34px; height: 34px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.6rem;
        display: flex; align-items: center; justify-content: center;
}

/* =================== Mobile Menu (slide-down) =================== */
.vad8-mobile-menu {
        position: fixed;
        top: 52px; left: 0; right: 0;
        z-index: 9999;
        background: rgba(20,20,28,.98);
        border-bottom: 1px solid var(--vad8-border);
        display: none;
        padding: 12px 16px;
}

.vad8-mobile-menu.vad8-menu-open {
        display: block;
        animation: vad8-slide .25s ease;
}

@keyframes vad8-slide {
        from { transform: translateY(-12px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
}

.vad8-mobile-menu a {
        display: block;
        padding: 12px 10px;
        color: var(--vad8-cream);
        border-bottom: 1px dashed rgba(255,250,205,.12);
        font-size: 1.45rem;
}
.vad8-mobile-menu a:hover { color: var(--vad8-gold); text-decoration: none; }

/* =================== Main / Layout =================== */
.vad8-wrapper {
        max-width: 430px;
        margin: 0 auto;
        padding: 0 12px;
}

main.vad8-main {
        padding-top: 60px;
        padding-bottom: 24px;
}

@media (max-width: 768px) {
        main.vad8-main { padding-bottom: 84px; }
}

.vad8-section {
        margin: 18px 0;
        scroll-margin-top: 60px;
}

.vad8-section-title {
        font-size: 1.9rem;
        font-weight: 700;
        color: var(--vad8-gold);
        margin: 0 0 10px;
        padding-left: 10px;
        border-left: 4px solid var(--vad8-primary);
}

.vad8-section-sub {
        font-size: 1.45rem;
        color: var(--vad8-text-muted);
        margin: 0 0 12px;
}

/* =================== Carousel =================== */
.vad8-carousel {
        position: relative;
        border-radius: var(--vad8-radius);
        overflow: hidden;
        box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

.vad8-carousel-track {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9;
        background: #111;
}

.vad8-carousel-slide {
        position: absolute; inset: 0;
        opacity: 0;
        transition: opacity .6s ease;
        cursor: pointer;
}
.vad8-carousel-slide img {
        width: 100%; height: 100%; object-fit: cover;
}
.vad8-carousel-slide.vad8-slide-active { opacity: 1; }

.vad8-carousel-cap {
        position: absolute; left: 12px; bottom: 12px; right: 12px;
        background: linear-gradient(90deg, rgba(30,30,30,.85), rgba(176,48,96,.5));
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 1.35rem;
        color: var(--vad8-cream);
        font-weight: 600;
}

.vad8-carousel-dots {
        position: absolute; right: 10px; bottom: 10px;
        display: flex; gap: 6px;
}
.vad8-carousel-dot {
        width: 8px; height: 8px; border-radius: 50%;
        background: rgba(255,250,205,.4);
        cursor: pointer;
}
.vad8-carousel-dot.vad8-dot-active { background: var(--vad8-gold); }

/* =================== CTA Banner =================== */
.vad8-cta {
        background: linear-gradient(135deg, var(--vad8-primary), var(--vad8-burgundy));
        border-radius: var(--vad8-radius);
        padding: 14px;
        margin: 18px 0;
        display: flex; gap: 12px; align-items: center;
        box-shadow: 0 4px 14px rgba(176,48,96,.35);
}
.vad8-cta-body { flex: 1; }
.vad8-cta-title {
        font-size: 1.6rem; font-weight: 700; color: #fff; margin: 0 0 4px;
}
.vad8-cta-text { font-size: 1.3rem; color: rgba(255,250,205,.95); margin: 0; }
.vad8-cta .vad8-btn { white-space: nowrap; }

/* =================== Filter Bar =================== */
.vad8-filter {
        display: flex; gap: 8px; flex-wrap: wrap;
        margin: 12px 0;
}
.vad8-filter-btn {
        background: rgba(255,250,205,.08);
        color: var(--vad8-cream);
        border: 1px solid rgba(255,250,205,.2);
        border-radius: 999px;
        padding: 6px 12px;
        font-size: 1.25rem;
        cursor: pointer;
        transition: background .15s ease, color .15s ease;
}
.vad8-filter-btn:hover { text-decoration: none; }
.vad8-filter-btn.vad8-filter-active {
        background: var(--vad8-primary);
        color: #fff;
        border-color: var(--vad8-primary);
}

/* =================== Games Grid =================== */
.vad8-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 9px;
}
@media (min-width: 380px) { .vad8-grid { gap: 11px; } }

.vad8-card {
        background: var(--vad8-card-bg);
        border: 1px solid rgba(255,250,205,.08);
        border-radius: 10px;
        overflow: hidden;
        cursor: pointer;
        position: relative;
        transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.vad8-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(255,99,71,.35);
        border-color: var(--vad8-primary);
        text-decoration: none;
}
.vad8-card-img {
        width: 100%; aspect-ratio: 1; object-fit: cover;
        background: linear-gradient(135deg, #2a2a36, #1a1a26);
}
.vad8-card-name {
        font-size: 1.15rem;
        color: var(--vad8-cream);
        padding: 5px 6px 7px;
        text-align: center;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        font-weight: 600;
}
.vad8-card-hot {
        position: absolute; top: 4px; right: 4px;
        background: linear-gradient(135deg, var(--vad8-burgundy), var(--vad8-primary));
        color: #fff; font-size: 1rem; font-weight: 700;
        padding: 2px 6px; border-radius: 6px;
}

/* =================== Info Blocks =================== */
.vad8-card-info {
        background: rgba(255,255,255,.04);
        border: 1px solid var(--vad8-border);
        border-radius: var(--vad8-radius);
        padding: 14px;
        margin: 10px 0;
}
.vad8-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
}
.vad8-feature {
        background: linear-gradient(135deg, rgba(255,99,71,.12), rgba(176,48,96,.1));
        border: 1px solid rgba(255,99,71,.25);
        border-radius: 10px;
        padding: 12px;
        text-align: center;
}
.vad8-feature i { font-size: 2.4rem; color: var(--vad8-gold); margin-bottom: 6px; }
.vad8-feature h3 { margin: 0 0 4px; font-size: 1.35rem; color: var(--vad8-cream); }
.vad8-feature p { margin: 0; font-size: 1.15rem; color: var(--vad8-text-muted); line-height: 1.45; }

.vad8-faq-item {
        background: rgba(255,255,255,.04);
        border-left: 3px solid var(--vad8-primary);
        padding: 10px 12px;
        margin-bottom: 8px;
        border-radius: 0 8px 8px 0;
}
.vad8-faq-q { font-weight: 700; color: var(--vad8-gold); font-size: 1.35rem; margin: 0 0 4px; }
.vad8-faq-a { color: var(--vad8-text-muted); font-size: 1.25rem; margin: 0; line-height: 1.5; }

.vad8-testi {
        background: rgba(255,255,255,.04);
        border-radius: 10px; padding: 12px;
        margin-bottom: 8px;
        border: 1px dashed rgba(255,210,122,.3);
}
.vad8-testi b { color: var(--vad8-gold); }
.vad8-testi p { margin: 4px 0 0; font-size: 1.2rem; color: var(--vad8-text-muted); }

.vad8-pay {
        display: flex; flex-wrap: wrap; gap: 8px;
}
.vad8-pay-item {
        background: rgba(255,255,255,.05);
        border: 1px solid var(--vad8-border);
        border-radius: 8px;
        padding: 8px 12px;
        display: flex; align-items: center; gap: 6px;
        font-size: 1.2rem; color: var(--vad8-cream);
}

.vad8-winners {
        display: grid; grid-template-columns: repeat(2,1fr); gap: 8px;
}
.vad8-winner {
        background: rgba(255,99,71,.08);
        border: 1px solid rgba(255,99,71,.25);
        border-radius: 8px; padding: 8px;
        font-size: 1.15rem;
}
.vad8-winner b { color: var(--vad8-gold); }

/* =================== Footer =================== */
.vad8-footer { margin-top: 20px; padding: 18px 14px 24px; border-top: 1px solid var(--vad8-border); background: rgba(20,20,28,.7); }
.vad8-footer-inner { max-width: 430px; margin: 0 auto; }
.vad8-footer-brand { color: var(--vad8-gold); font-weight: 700; font-size: 1.5rem; margin: 0 0 6px; }
.vad8-footer p { color: var(--vad8-text-muted); font-size: 1.2rem; line-height: 1.5; margin: 0 0 10px; }
.vad8-footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.vad8-footer-links a { color: var(--vad8-cream); font-size: 1.2rem; }
.vad8-footer-promo { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.vad8-footer-promo .vad8-btn { font-size: 1.2rem; padding: 7px 12px; }
.vad8-copyright { color: var(--vad8-text-muted); font-size: 1.1rem; margin-top: 8px; }

/* =================== Bottom Nav =================== */
.vad8-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: linear-gradient(180deg, rgba(30,30,30,.97), rgba(15,15,22,.98)); border-top: 1px solid rgba(255,250,205,.18); display: flex; justify-content: space-around; align-items: stretch; height: 62px; box-shadow: 0 -3px 14px rgba(0,0,0,.45); }
.vad8-nav-item { flex: 1; min-width: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--vad8-text-muted); text-decoration: none; background: transparent; border: none; font-size: 1.05rem; cursor: pointer; transition: color .15s ease, transform .15s ease; padding: 4px; }
.vad8-nav-item i, .vad8-nav-item .material-symbols-outlined { font-size: 24px; line-height: 1; }
.vad8-nav-item .vad8-label { font-size: 1.05rem; font-weight: 600; }
.vad8-nav-item:hover { color: var(--vad8-gold); text-decoration: none; transform: translateY(-1px); }
.vad8-nav-item:active { transform: scale(.92); }
.vad8-nav-item.vad8-nav-active { color: var(--vad8-primary); }
.vad8-nav-item.vad8-nav-active i { color: var(--vad8-gold); }
.vad8-desktop-nav { display: none; }

@media (min-width: 769px) {
        .vad8-bottom-nav { display: none; }
        .vad8-menu-btn { display: none; }
        .vad8-header-inner, .vad8-wrapper, .vad8-footer-inner { max-width: 960px; }
        .vad8-desktop-nav { display: flex; gap: 14px; align-items: center; }
        .vad8-desktop-nav a { color: var(--vad8-cream); font-size: 1.3rem; font-weight: 600; }
        .vad8-desktop-nav a:hover { color: var(--vad8-gold); text-decoration: none; }
        .vad8-grid { grid-template-columns: repeat(6, 1fr); }
        .vad8-features, .vad8-winners { grid-template-columns: repeat(4, 1fr); }
}