:root {
    color-scheme: light;
    --ink: #111214;
    --muted: #8b919c;
    --line: #eceef2;
    --green: #3ddc84;
    --shadow: 0 14px 34px rgba(17, 19, 24, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    background: #fff;
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.canvas { width: 100%; min-width: 0; }
.canvas-hero { display: none; }
.float { display: none; }
.canvas-stage { width: 100%; min-width: 0; }
.device { width: 100%; min-width: 0; }
.phone {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: #fff;
    padding: 16px 18px 6px;
    overflow: hidden;
}

.nav, .brand, .nav-download, .scoreline, .team, .stat-row, .trust, .store, .card-top {
    display: flex;
    align-items: center;
}
.nav { justify-content: space-between; gap: 12px; min-width: 0; }
.brand { gap: 10px; min-width: 0; text-decoration: none; font-weight: 750; font-size: 18px; letter-spacing: -0.03em; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; }
.nav-download {
    gap: 6px;
    flex: 0 0 auto;
    border: 0;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
}
.nav-download:active, .store:active, .watch:active, .movie-side button:active { transform: scale(0.98); }

.hero { text-align: center; padding: 28px 4px 2px; }
.hero h1 {
    margin: 0;
    font-size: clamp(36px, 10.4vw, 52px);
    line-height: 0.94;
    letter-spacing: -0.05em;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.hero h1 span { display: block; }
.hero p {
    margin: 14px auto 0;
    max-width: 280px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}

.kicker {
    display: flex;
    justify-content: space-between;
    margin: 22px 2px 10px;
    color: #a0a6b0;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

.scroller-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    min-width: 0;
}
.scroller {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 0 6px;
}
.scroller::-webkit-scrollbar { display: none; }
.preview-card {
    flex: 1.48 0 206px;
    scroll-snap-align: start;
    min-height: 228px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 12px 28px rgba(17, 19, 24, 0.12);
    transition: transform 0.2s ease;
    overflow: hidden;
}
.preview-card.poster { flex: 0.68 0 108px; }
.scroll-btn {
    width: 32px;
    height: 32px;
    margin-top: 6px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    color: #222;
}
.scroll-btn.prev { grid-column: 1; grid-row: 2; justify-self: start; }
.scroll-btn.next { grid-column: 3; grid-row: 2; justify-self: end; }

.live-card {
    color: #fff;
    padding: 0;
    background: #101614;
    display: flex;
    flex-direction: column;
}
.live-card .scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 32%;
}
.live-card .veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 10, 8, 0.72) 0%, rgba(6, 14, 10, 0.48) 42%, rgba(4, 12, 8, 0.88) 100%);
}
.live-card .card-body {
    position: relative;
    z-index: 1;
    min-height: 228px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 11px 8px 9px;
}
.card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    line-height: 1;
    z-index: 2;
}
.live-card .card-close { background: transparent; font-size: 18px; }
.card-top { gap: 8px; padding-right: 18px; min-width: 0; }
.live-pill, .now-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.live-pill {
    background: rgba(0, 0, 0, 0.28);
    color: var(--green);
    padding: 4px 7px;
}
.live-pill i, .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7);
    animation: pulse 1.5s infinite;
}
.league {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scoreline { justify-content: space-between; gap: 4px; margin-top: 14px; min-width: 0; }
.team { flex-direction: column; gap: 6px; width: auto; flex: 1 1 0; min-width: 0; text-align: center; }
.team strong {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.03em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team.away { align-items: center; }
.score { text-align: center; flex: 0 0 auto; }
.score b { display: block; font-size: 22px; letter-spacing: -0.04em; line-height: 1; }
.score small { color: rgba(255, 255, 255, 0.78); font-size: 10px; }
.mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}
.stat-row {
    margin-top: auto;
    padding-top: 12px;
    justify-content: space-between;
    text-align: center;
    gap: 4px;
}
.stat-row div { min-width: 0; }
.stat-row b { display: block; font-size: 15px; }
.stat-row span { color: rgba(255, 255, 255, 0.72); font-size: 10px; }

.poster { color: #fff; background: #141414; }
.poster img, .mini-poster img, .side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    max-width: none;
}
.poster-copy {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 10%, rgba(0, 0, 0, 0.2) 42%, rgba(0, 0, 0, 0.82) 100%);
}
.now-pill { color: rgba(255, 255, 255, 0.88); letter-spacing: 0.12em; font-size: 10px; }
.poster-copy h2 {
    margin: 12px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 15px;
    line-height: 1.05;
    max-width: 100%;
}
.poster-copy p { margin: 8px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 11px; line-height: 1.35; }
.watch {
    margin-top: auto;
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: #fff;
    padding: 0;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.theme-dune { background: radial-gradient(80% 60% at 70% 100%, #f0d7a4 0%, transparent 50%), linear-gradient(#243044, #6a4a32 70%, #e6c48a); }
.theme-ember { background: radial-gradient(50% 40% at 50% 60%, #ffb25e, transparent 60%), linear-gradient(#2a140c, #8a3b16 80%); }
.theme-orbit { background: radial-gradient(40% 18% at 50% 58%, transparent 42%, #d7e4ff 43% 48%, transparent 49%), radial-gradient(circle at 50% 40%, #fff 0 2px, transparent 3px), linear-gradient(#070b16, #1d3d78); }
.theme-night { background: linear-gradient(#0c1018, #202838 40%, #0c1018); }
.theme-ocean { background: linear-gradient(#083044, #1aa6b8 70%, #d8fff4); }
.theme-gold { background: linear-gradient(#3a2a12, #d4a017 80%, #fff1c2); }

.panel {
    margin-top: 16px;
    border: 1px solid #f2f3f6;
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    background: #fff;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; }
.tabs button {
    border: 0;
    background: #fff;
    padding: 14px 8px 12px;
    color: #9aa1ab;
    font-weight: 650;
}
.tabs button[aria-selected="true"] {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 #111;
}
.match {
    width: 100%;
    border: 0;
    border-top: 1px solid #f3f4f6;
    background: #fff;
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 10px;
    align-items: center;
    text-align: left;
    padding: 12px;
}
.thumb { position: relative; height: 52px; }
.thumb.photo {
    width: 84px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #15181c;
}
.thumb.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
    max-width: none;
}
.thumb em {
    position: absolute;
    left: 4px;
    top: 4px;
    background: rgba(8, 10, 12, 0.72);
    color: var(--green);
    font-style: normal;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    border-radius: 999px;
    padding: 2px 5px;
}
.match-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.match-copy strong { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.match-copy span, .match-copy small { color: var(--muted); font-size: 12px; }
.match-copy strong, .match-copy span, .trend-card strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron, .rating { color: #c5c8d0; font-size: 22px; }
.rating { font-size: 13px; font-weight: 800; color: #111; background: #f4f5f7; border-radius: 999px; padding: 4px 8px; }
.match-more { padding: 0 14px 14px 106px; color: #444; }
.match-more p { margin: 0 0 8px; }
.more-score { font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.text-link { border: 0; background: transparent; padding: 0; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.empty { color: var(--muted); padding: 18px; margin: 0; }
.trend-title { margin: 8px 14px; font-size: 16px; letter-spacing: -0.02em; }
.trend {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 14px 16px;
    scrollbar-width: none;
}
.trend::-webkit-scrollbar { display: none; }
.trend-card {
    flex: 0 0 102px;
    scroll-snap-align: start;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
}
.trend-card strong, .trend-card small { display: block; }
.trend-card strong { margin-top: 8px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.trend-card small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.mini-poster {
    display: block;
    position: relative;
    height: 148px;
    border-radius: 12px;
    overflow: hidden;
    background: #161616;
}
.row-poster { width: 64px; height: 86px; border-radius: 10px; }

.stars { color: #f5b301; letter-spacing: 0.5px; font-size: 12px; line-height: 1; }
.stars span { color: #e3e5ea; }
.canvas-foot { padding: 6px 18px calc(28px + env(safe-area-inset-bottom)); }
.trust { gap: 12px; margin: 16px 2px 14px; }
.shield {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f3f4f6;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.shield svg { width: 22px; height: 22px; }
.trust strong, .trust small { display: block; }
.trust strong { font-size: 15px; }
.trust small { color: var(--muted); margin-top: 2px; font-size: 13px; }

.store-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.store-row[data-stores="1"] { grid-template-columns: 1fr; }
.store-row form { min-width: 0; }
.store {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 16px;
    background: #111;
    color: #fff;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
    text-align: left;
}
.store svg { width: 22px; height: 22px; flex: 0 0 auto; }
.store span { min-width: 0; font-size: 13px; font-weight: 750; line-height: 1.15; }

.float-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(20, 24, 33, 0.1);
    padding: 16px 16px 8px;
}
.float-card h2 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 650;
    color: #6d7380;
}
.score-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #f1f2f5;
}
.pairs { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pair {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}
.score-row .mark { width: 26px; height: 26px; font-size: 8px; box-shadow: none; }
.pair b {
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pair strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.score-row em {
    font-style: normal;
    font-size: 11px;
    font-weight: 750;
    color: #17924c;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.score-row em::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--green);
    vertical-align: 1px;
}
.movie-side { padding-bottom: 14px; }
.movie-side button {
    width: 100%;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 0;
    background: transparent;
    padding: 8px 0 2px;
    text-align: left;
}
.side-poster {
    position: relative;
    display: block;
    width: 54px;
    height: 78px;
    border-radius: 8px;
    overflow: hidden;
}
.side-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.side-copy b {
    font-size: 15px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.side-copy small { color: var(--muted); font-size: 12px; }
.rate-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.rate-line small { color: #6d7380; font-weight: 700; }

dialog {
    position: relative;
    width: min(420px, calc(100% - 24px));
    border: 0;
    border-radius: 22px;
    padding: 22px 18px 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}
dialog::backdrop { background: rgba(17, 18, 22, 0.45); }
dialog h2 { margin: 8px 0 4px; font-size: 24px; letter-spacing: -0.04em; }
dialog p { margin: 0 0 8px; color: #444; }
.sheet-copy { color: var(--muted); margin-bottom: 14px; }
dialog .card-close { background: #f2f3f5; color: #111; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 12px 16px;
    max-width: min(420px, calc(100% - 24px));
    z-index: 5;
}

.gate-body { display: grid; place-items: center; padding: 24px; background: #f4f5f7; }
.gate-card { width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
.gate-card h1 { margin: 12px 0 8px; font-size: 28px; letter-spacing: -0.04em; }
.gate-card p { color: var(--muted); }
.gate-link { color: #111; font-weight: 750; }
.gate-spinner {
    width: 28px; height: 28px; margin: 0 auto;
    border-radius: 50%;
    border: 3px solid #eceef2;
    border-top-color: #111;
    animation: spin 0.8s linear infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 6px rgba(61, 220, 132, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (hover: hover) {
    .preview-card:hover { transform: translateY(-3px); }
}
@media (min-width: 980px) {
    .canvas-hero {
        display: block;
        text-align: center;
        padding: 64px 24px 4px;
    }
    .canvas-hero h1 {
        margin: 0;
        font-size: clamp(52px, 5.4vw, 76px);
        line-height: 0.98;
        letter-spacing: -0.05em;
        font-weight: 800;
    }
    .canvas-hero p {
        margin: 14px auto 0;
        max-width: 640px;
        color: #8d939e;
        font-size: 20px;
    }
    .canvas-hero .rule {
        display: block;
        width: 48px;
        height: 2px;
        margin: 18px auto 0;
        background: #d5d8df;
    }
    .canvas-stage {
        position: relative;
        display: flex;
        justify-content: center;
        padding: 36px 24px 10px;
    }
    .device {
        position: relative;
        width: 416px;
        flex: 0 0 416px;
        background: #111214;
        border-radius: 48px;
        padding: 12px;
        box-shadow:
            0 30px 70px rgba(16, 18, 24, 0.18),
            inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }
    .device::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 12px;
        height: 42px;
        border-radius: 0 0 36px 36px;
        background: linear-gradient(transparent, #fff 78%);
        pointer-events: none;
    }
    .phone {
        width: 100%;
        max-height: 680px;
        overflow: auto;
        border-radius: 36px;
        padding: 16px 16px 20px;
        scrollbar-width: none;
    }
    .phone::-webkit-scrollbar { display: none; }
    .phone .hero { display: none; }
    .canvas-foot {
        max-width: 520px;
        margin: 8px auto 0;
        padding: 12px 24px 72px;
        display: flex;
        flex-direction: column;
    }
    .canvas-foot .store-row { order: 1; }
    .canvas-foot .trust { order: 2; justify-content: center; margin-top: 18px; }
    .canvas-foot .store { border-radius: 14px; min-height: 54px; justify-content: center; }
}
@media (min-width: 1180px) {
    .float {
        display: flex;
        flex-direction: column;
        gap: 18px;
        position: absolute;
        top: 50%;
        width: 268px;
        transform: translateY(-46%);
    }
    .float-left { left: max(20px, calc(50% - 500px)); }
    .float-right { right: max(20px, calc(50% - 500px)); }
}
@media (prefers-reduced-motion: reduce) {
    .live-pill i, .dot, .gate-spinner { animation: none; }
    .preview-card { transition: none; }
}
:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
