:root {
    --bg: #0a0d14;
    --surface: #131722;
    --surface-2: #1b2130;
    --surface-hover: #22293b;
    --border: #262e42;
    --border-bright: #3c4866;
    --text: #eef2fa;
    --muted: #8e9bb2;
    --brand: #5880ff;
    --brand-glow: rgba(88, 128, 255, 0.25);
    --live: #ff2a44;
    --live-glow: rgba(255, 42, 68, 0.4);
    --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
main { flex: 1; width: 100%; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: .875rem; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 14px; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10, 13, 20, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.brand b { color: var(--brand); font-weight: 700; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.nav-link.is-active {
    color: var(--brand);
    background: rgba(88, 128, 255, 0.12);
}
.site-footer { padding: 22px 0; color: var(--muted); font-size: .82rem; text-align: center; border-top: 1px solid var(--border); margin-top: 36px; }
.footer-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
}
.footer-link {
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.footer-link:hover {
    color: var(--brand);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
    background: var(--brand); color: #0b0d12; font: 700 .85rem/1 inherit; letter-spacing: .05em;
    border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-danger { background: var(--live); color: #fff; }

.center-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 72px 10px; }
.state-title { font-size: 1.15rem; font-weight: 600; }
.state-sub { color: var(--muted); }

.now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 6px; }
.now-text { flex: 1 1 200px; min-width: 0; }
.now-title { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.now-meta { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; margin-top: 2px; }
.empty { padding: 16px; margin-top: 8px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; line-height: 1; }
.badge-live { background: var(--live); color: #fff; box-shadow: 0 0 8px var(--live-glow); }
.badge-live::before {
    content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 6px #fff; animation: vx-pulse 1.3s infinite ease-in-out;
}
@keyframes vx-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.65); }
}
.badge-off { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.now-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-viewers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3.5px 10px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    letter-spacing: .02em;
    user-select: none;
    transition: border-color .2s, background .2s, transform .15s;
}

.badge-viewers:hover {
    border-color: rgba(88, 128, 255, 0.4);
    background: rgba(88, 128, 255, 0.1);
}

.viewers-icon {
    display: inline-flex;
    align-items: center;
    color: var(--live);
    animation: vx-pulse 1.8s infinite ease-in-out;
}

.viewers-icon svg {
    display: block;
}

.viewers-num {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #fff;
    transition: color .25s ease;
}

.viewers-num.bump-up {
    color: #4ade80;
}

.viewers-num.bump-down {
    color: #f87171;
}

.viewers-label {
    color: var(--muted);
    font-weight: 600;
    font-size: .72rem;
}

.card-viewers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--muted);
    margin-left: auto;
}
.card-viewers svg {
    display: block;
    color: var(--live);
}

.list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.list-head h2 { font-size: 1.05rem; font-weight: 700; }

/* Google Suggest Style Search & Filter */
.search-bar-wrap {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.search-icon {
    position: absolute;
    left: 14px;
    color: var(--muted);
    pointer-events: none;
}
#stream-search {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 38px 10px 40px;
    color: var(--text);
    font-size: .9rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
#stream-search:focus {
    border-color: var(--brand);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(88, 128, 255, 0.18);
}
#stream-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: .88rem;
}
.search-clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: color .15s;
}
.search-clear-btn:hover { color: var(--text); }

.suggest-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0 4px;
}
.suggest-pills::-webkit-scrollbar { display: none; }

.suggest-pill {
    white-space: nowrap;
    font-size: .74rem;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    user-select: none;
}
.suggest-pill:hover, .suggest-pill.active {
    background: rgba(88, 128, 255, 0.15);
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

/* Grid & Match Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.card {
    display: flex; flex-direction: column; text-align: left; padding: 0; min-width: 0; color: inherit; font: inherit;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer;
    contain: content; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: border-color .18s cubic-bezier(0.4, 0, 0.2, 1), transform .18s cubic-bezier(0.4, 0, 0.2, 1), background .18s ease;
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); background: var(--surface-hover); }
.card:active { transform: scale(0.985); }
.card.is-active { border-color: var(--brand); background: rgba(88, 128, 255, 0.08); box-shadow: 0 0 0 1px var(--brand), 0 4px 16px var(--brand-glow); }

.card-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--surface-2), #0e1118); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .badge { position: absolute; top: 6px; left: 6px; }
.card-thumb.no-thumb { display: flex; align-items: center; justify-content: center; }
.card-thumb.no-thumb::after {
    content: "▶"; font-size: 1rem; color: rgba(255, 255, 255, 0.25);
    transition: color .15s, transform .15s;
}
.card:hover .card-thumb.no-thumb::after, .card.is-active .card-thumb.no-thumb::after {
    color: var(--brand); transform: scale(1.15);
}

.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-title { font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.card-meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-cat { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.card-now-playing {
    display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .05em;
    padding: 2px 6px; background: var(--brand); color: #0b0d12; border-radius: 4px; line-height: 1;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .wrap { padding: 0 24px; }
    .now-title { font-size: 1.4rem; }
    .now { padding: 16px 0 8px; }
}

/* Compact Mobile Match Card Layout */
@media (max-width: 640px) {
    .wrap { padding: 0 12px; }
    .player { margin: 0 -12px; }
    .player .vx-stage { border-radius: 0; }
    
    .list-head { margin: 16px 0 10px; }
    .grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .card {
        flex-direction: row;
        align-items: center;
        padding: 6px 10px 6px 6px;
        gap: 12px;
        min-height: 64px;
        border-radius: 10px;
    }
    .card-thumb {
        width: 100px;
        min-width: 100px;
        height: 56px;
        aspect-ratio: 16 / 9;
        border-radius: 6px;
    }
    .card-thumb .badge {
        top: 4px;
        left: 4px;
        padding: 2px 5px;
        font-size: .6rem;
        border-radius: 4px;
    }
    .card-body {
        padding: 0;
        justify-content: center;
        gap: 3px;
        flex: 1;
    }
    .card-title {
        font-size: .88rem;
        font-weight: 600;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .card-cat {
        font-size: .7rem;
    }
    .card-now-playing {
        font-size: .58rem;
        padding: 1.5px 5px;
    }
}

/* World-Class SEO Guide & FAQs */
.seo-section { margin-top: 36px; margin-bottom: 20px; }
.seo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.seo-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.seo-desc {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.6;
    margin-bottom: 18px;
}
.seo-desc strong { color: var(--text); }
.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.seo-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}
.seo-box h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 6px;
}
.seo-box p {
    font-size: .84rem;
    color: var(--muted);
    line-height: 1.5;
}
.seo-clusters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.seo-cluster {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cluster-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.seo-tag {
    font-size: .75rem;
    font-weight: 600;
    background: rgba(88, 128, 255, 0.08);
    color: var(--brand);
    border: 1px solid rgba(88, 128, 255, 0.2);
    padding: 4px 10px;
    border-radius: 999px;
    transition: background .15s, border-color .15s, transform .1s;
    user-select: none;
}
.seo-tag:hover {
    background: rgba(88, 128, 255, 0.16);
    border-color: var(--brand);
    cursor: default;
}
.seo-faqs { display: flex; flex-direction: column; gap: 8px; }
.faq-head { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.faq-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}
.faq-item summary {
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    outline: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "＋";
    font-size: .9rem;
    color: var(--brand);
    transition: transform .2s ease;
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-item p {
    margin-top: 8px;
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .seo-card { padding: 16px; }
    .seo-title { font-size: 1.05rem; }
    .seo-desc { font-size: .85rem; }
    .seo-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* About Page Specific Styles */
.about-hero {
    padding: 44px 0 28px;
    text-align: center;
}
.about-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(88, 128, 255, 0.1);
    color: var(--brand);
    border: 1px solid rgba(88, 128, 255, 0.25);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.about-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
    margin-bottom: 14px;
}
.about-sub {
    font-size: 1.02rem;
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.about-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 48px;
}
.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.about-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.about-card-desc {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.65;
    margin-bottom: 20px;
}
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.tech-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
}
.tech-box h4 {
    font-size: .92rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tech-box p {
    font-size: .84rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}
.cta-banner {
    background: linear-gradient(135deg, rgba(88, 128, 255, 0.12), rgba(0, 229, 255, 0.08));
    border: 1px solid rgba(88, 128, 255, 0.3);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.cta-title {
    font-size: 1.35rem;
    font-weight: 700;
}
.cta-sub {
    font-size: .92rem;
    color: var(--muted);
    max-width: 520px;
}

@media (max-width: 640px) {
    .about-card { padding: 18px; }
    .about-hero { padding: 28px 0 16px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
