/* ═══ GDZIE OGLĄDAĆ — 3 MOTYWY (DARK / LIGHT / FOREST) + STRICT CSP ═══ */
:root, [data-theme="dark"] {
    --bg: #0b1120;
    --bg-elev: #111c32;
    --bg-card: rgba(17, 28, 50, 0.84);
    --bg-input: rgba(10, 17, 32, 0.78);
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.3);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --brand: #f59e0b;
    --brand-rgb: 245, 158, 11;
    --on-brand: #111827;
    --accent: #38bdf8;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: rgba(0, 0, 0, 0.45);
    --scrollbar-thumb: rgba(148, 163, 184, 0.36);
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f1f5f9;
    --bg-elev: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.94);
    --bg-input: #ffffff;
    --border: rgba(15, 23, 42, 0.11);
    --border-strong: rgba(15, 23, 42, 0.22);
    --text: #0f172a;
    --text-muted: #475569;
    --brand: #d97706;
    --brand-rgb: 217, 119, 6;
    --on-brand: #ffffff;
    --accent: #0284c7;
    --success: #047857;
    --danger: #dc2626;
    --shadow: rgba(15, 23, 42, 0.12);
    --scrollbar-thumb: rgba(100, 116, 139, 0.4);
    color-scheme: light;
}

[data-theme="forest"] {
    --bg: #07130d;
    --bg-elev: #0e2217;
    --bg-card: rgba(14, 34, 23, 0.88);
    --bg-input: rgba(6, 16, 11, 0.8);
    --border: rgba(74, 222, 128, 0.16);
    --border-strong: rgba(74, 222, 128, 0.32);
    --text: #ecfdf5;
    --text-muted: #8fa896;
    --brand: #4ade80;
    --brand-rgb: 74, 222, 128;
    --on-brand: #052e16;
    --accent: #fbbf24;
    --success: #34d399;
    --danger: #f87171;
    --shadow: rgba(0, 0, 0, 0.52);
    --scrollbar-thumb: rgba(74, 222, 128, 0.35);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100dvh;
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 75% 40% at 50% -10%, rgba(var(--brand-rgb), 0.14), transparent 70%),
        radial-gradient(ellipse 40% 30% at 92% 18%, rgba(56, 189, 248, 0.08), transparent 65%),
        var(--bg);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.5;
}

html::-webkit-scrollbar, .modal-sheet::-webkit-scrollbar { width: 7px; height: 7px; }
html::-webkit-scrollbar-track, .modal-sheet::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-button, .modal-sheet::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
html::-webkit-scrollbar-thumb, .modal-sheet::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 999px; }
html::-webkit-scrollbar-thumb:hover, .modal-sheet::-webkit-scrollbar-thumb:hover { background: var(--brand); }
@supports not selector(::-webkit-scrollbar) {
    html, .modal-sheet { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
}

.hidden { display: none !important; }
.skip-link {
    position: absolute; top: -48px; left: 12px; z-index: 9999;
    padding: 8px 14px; border-radius: 0 0 10px 10px;
    background: var(--brand); color: var(--on-brand); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button { font-family: inherit; cursor: pointer; }

/* ═══ TOPBAR ═══ */
.topbar {
    position: sticky; top: 0; z-index: 200;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1220px; margin: 0 auto; padding: 0.65rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
    display: inline-flex; align-items: center; gap: 0.6rem;
    text-decoration: none; color: var(--text);
    font-family: 'Russo One', 'Outfit', sans-serif; font-size: 1.05rem; letter-spacing: 0.04em;
    flex-shrink: 0;
}
.brand-icon { width: 32px; height: 32px; border-radius: 8px; }

.nav-desktop { display: flex; align-items: center; gap: 0.3rem; }
.nav-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.48rem 0.9rem; border-radius: 999px;
    border: 1px solid transparent; background: transparent;
    color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
    transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.nav-btn:hover { color: var(--text); background: rgba(var(--brand-rgb), 0.1); }
.nav-btn.active {
    color: var(--text);
    background: rgba(var(--brand-rgb), 0.16);
    border-color: rgba(var(--brand-rgb), 0.42);
}
.nav-badge {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--brand); color: var(--on-brand);
    font-size: 0.72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
    font-variant-numeric: tabular-nums;
}

.pill-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.46rem 0.88rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
    font-size: 0.84rem; font-weight: 600; transition: border-color 0.16s, transform 0.16s;
}
.pill-btn:hover { border-color: var(--brand); transform: translateY(-1px); }

.demo-banner {
    max-width: 1180px; margin: 0.85rem auto 0; padding: 0.7rem 1rem;
    border-radius: 12px; display: flex; align-items: center; gap: 0.65rem;
    background: rgba(var(--brand-rgb), 0.12); border: 1px solid rgba(var(--brand-rgb), 0.35);
    color: var(--text); font-size: 0.86rem;
}
.demo-banner i { color: var(--brand); flex-shrink: 0; }
.demo-banner code { padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.25); font-size: 0.82rem; }

/* ═══ CONTAINER & VIEWS ═══ */
.container { max-width: 1220px; margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem; }
.view { display: none; }
.view.active { display: block; }

/* ═══ HERO & SEARCH ═══ */
.hero { text-align: center; padding: 1.4rem 0 2rem; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.28rem 0.8rem; border-radius: 999px;
    background: rgba(var(--brand-rgb), 0.13); border: 1px solid rgba(var(--brand-rgb), 0.32);
    color: var(--brand); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.hero h1 {
    font-family: 'Russo One', 'Outfit', sans-serif; font-weight: 400;
    font-size: clamp(1.75rem, 4.2vw, 2.85rem); line-height: 1.15;
    margin: 0.75rem auto 0.55rem; max-width: 780px; letter-spacing: 0.015em;
}
.hero-sub { color: var(--text-muted); max-width: 660px; margin: 0 auto 1.4rem; font-size: 0.98rem; }

.search-box {
    position: relative; max-width: 680px; margin: 0 auto 1rem;
}
.search-box input {
    width: 100%; height: 54px; padding: 0 3rem 0 3.1rem;
    border-radius: 999px; border: 1.5px solid var(--border-strong);
    background: var(--bg-input); color: var(--text);
    font-family: inherit; font-size: 1.02rem; font-weight: 500;
    box-shadow: 0 10px 30px var(--shadow);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.search-box input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.18), 0 12px 32px var(--shadow);
}
.search-ico {
    position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1rem; pointer-events: none;
}
.search-clear {
    position: absolute; right: 0.65rem; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: transparent; color: var(--text-muted); font-size: 1rem;
}
.search-clear:hover { color: var(--text); background: rgba(148, 163, 184, 0.14); }

.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 0.85rem 1.25rem; margin-bottom: 1.05rem;
}
.seg-group {
    display: inline-flex; padding: 3px; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--border);
}
.seg-btn {
    padding: 0.42rem 0.95rem; border-radius: 999px; border: none;
    background: transparent; color: var(--text-muted); font-size: 0.84rem; font-weight: 600;
    transition: background 0.16s, color 0.16s;
}
.seg-btn.active { background: var(--brand); color: var(--on-brand); }

.own-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.88rem; font-weight: 600; color: var(--text); cursor: pointer; user-select: none;
}
.ud-check {
    appearance: none; -webkit-appearance: none;
    width: 19px; height: 19px; border-radius: 6px; margin: 0;
    border: 2px solid var(--border-strong); background: var(--bg-input);
    cursor: pointer; position: relative; transition: background 0.15s, border-color 0.15s;
}
.ud-check:checked { background: var(--brand); border-color: var(--brand); }
.ud-check:checked::after {
    content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
    border: solid var(--on-brand); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

.owned-strip {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 0.55rem; max-width: 980px; margin: 0 auto;
}
.owned-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.provider-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
.prov-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.34rem 0.72rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
    font-size: 0.8rem; font-weight: 600; transition: all 0.15s;
}
.prov-chip:hover { border-color: var(--border-strong); color: var(--text); }
.prov-chip.selected {
    color: var(--text); border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.16);
    box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.35);
}
.prov-dot {
    width: 18px; height: 18px; border-radius: 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.58rem; font-weight: 800; letter-spacing: -0.02em; flex-shrink: 0;
}

/* ═══ SECTION HEAD ═══ */
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
    margin: 0.5rem 0 1.1rem; flex-wrap: wrap;
}
.section-head--page { margin-top: 0.4rem; margin-bottom: 1.4rem; }
.section-head h2 {
    margin: 0.35rem 0 0; font-family: 'Russo One', 'Outfit', sans-serif;
    font-weight: 400; font-size: clamp(1.3rem, 2.5vw, 1.85rem); letter-spacing: 0.02em;
}
.section-sub { margin: 0.3rem 0 0; color: var(--text-muted); font-size: 0.92rem; max-width: 680px; }
.section-meta, .updated-pill {
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.updated-pill {
    padding: 0.34rem 0.78rem; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--border);
}

/* ═══ TITLES GRID ═══ */
.titles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 1.05rem;
}
.title-card {
    position: relative; display: flex; flex-direction: column;
    border-radius: 16px; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border);
    box-shadow: 0 8px 22px var(--shadow);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.title-card:hover { transform: translateY(-4px); border-color: rgba(var(--brand-rgb), 0.55); }
.title-poster-btn {
    position: relative; display: block; width: 100%; aspect-ratio: 2 / 3;
    padding: 0; border: none; background: var(--bg-elev); overflow: hidden; text-align: left;
}
.title-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.title-poster-ph {
    width: 100%; height: 100%; padding: 1.1rem;
    display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(155deg, rgba(var(--brand-rgb), 0.24), var(--bg-elev) 68%);
    color: var(--text);
}
.title-poster-ph i { font-size: 1.9rem; color: var(--brand); opacity: 0.85; }
.title-poster-ph strong {
    font-family: 'Russo One', 'Outfit', sans-serif; font-weight: 400; font-size: 1.02rem; line-height: 1.25;
}
.card-rating {
    position: absolute; top: 8px; left: 8px;
    padding: 3px 8px; border-radius: 999px;
    background: rgba(10, 15, 28, 0.84); color: #fbbf24;
    font-size: 0.76rem; font-weight: 800; font-variant-numeric: tabular-nums;
    backdrop-filter: blur(8px);
}
.card-type-pill {
    position: absolute; bottom: 8px; left: 8px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(10, 15, 28, 0.82); color: #e2e8f0;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.card-bookmark {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(10, 15, 28, 0.76); color: #e2e8f0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.86rem;
    transition: transform 0.15s, background 0.15s, color 0.15s;
}
.card-bookmark:hover { transform: scale(1.08); }
.card-bookmark.saved { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.title-body { padding: 0.75rem 0.85rem 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.title-name-btn {
    border: none; background: transparent; padding: 0; text-align: left;
    color: var(--text); font-weight: 700; font-size: 0.94rem; line-height: 1.28;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.title-meta { font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.card-offers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 0.35rem; }
.mini-offer {
    padding: 2px 7px; border-radius: 6px; font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.02em;
}
.mini-offer--owned { box-shadow: 0 0 0 1.5px var(--success); }

.load-more-wrap { text-align: center; margin-top: 1.6rem; }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.62rem 1.25rem; border-radius: 999px;
    border: 1px solid transparent; font-size: 0.88rem; font-weight: 700;
    text-decoration: none; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(var(--brand-rgb), 0.35); }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--brand); }
.btn-sm { padding: 0.42rem 0.85rem; font-size: 0.8rem; }

/* ═══ SPORTS TV ═══ */
.sports-controls {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem;
}
.sports-search-wrap { position: relative; flex: 1 1 240px; max-width: 360px; }
.sports-search-wrap i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.84rem; pointer-events: none; }
.sports-search-wrap input {
    width: 100%; height: 40px; padding: 0 0.9rem 0 2.3rem; border-radius: 999px;
    border: 1px solid var(--border-strong); background: var(--bg-input); color: var(--text);
    font-family: inherit; font-size: 0.88rem;
}
.sport-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.15rem; }
.sports-notice {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.95rem;
    border-radius: 12px; margin-bottom: 1rem; font-size: 0.84rem;
    background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); color: var(--text);
}
.sports-day-title {
    margin: 1.25rem 0 0.65rem; font-size: 0.82rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand);
}
.sports-list { display: flex; flex-direction: column; gap: 0.55rem; }
.match-row {
    display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 0.9rem;
    padding: 0.85rem 1rem; border-radius: 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    transition: border-color 0.16s;
}
.match-row:hover { border-color: rgba(var(--brand-rgb), 0.45); }
.match-row--live { border-color: rgba(239, 68, 68, 0.5); }
.match-time-box { text-align: center; }
.match-time {
    font-family: 'Russo One', 'Outfit', sans-serif; font-size: 1.12rem;
    font-variant-numeric: tabular-nums; line-height: 1.1;
}
.live-tag {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
    padding: 2px 7px; border-radius: 999px; background: rgba(239, 68, 68, 0.16);
    color: var(--danger); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em;
}
.live-tag::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--danger);
    animation: livePulse 1.4s infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.match-sport { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); }
.match-title { font-weight: 700; font-size: 0.96rem; margin: 2px 0; }
.match-channel { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; align-items: center; }
.match-ch-pill {
    padding: 2px 8px; border-radius: 6px; background: rgba(148, 163, 184, 0.14);
    color: var(--text); font-weight: 700; font-size: 0.74rem;
}

/* ═══ PRICES GRID ═══ */
.spend-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; border-radius: 16px; margin-bottom: 1.25rem;
    background: var(--bg-card); border: 1px solid rgba(var(--brand-rgb), 0.32);
}
.spend-amount {
    font-family: 'Russo One', 'Outfit', sans-serif; font-size: 1.55rem; color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.prices-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1rem; }
.price-card {
    display: flex; flex-direction: column; gap: 0.75rem; padding: 1.15rem;
    border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border);
    transition: border-color 0.18s;
}
.price-card--owned { border-color: var(--success); box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25); }
.price-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.price-brand { display: flex; align-items: center; gap: 0.65rem; }
.price-badge {
    width: 40px; height: 40px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Russo One', 'Outfit', sans-serif; font-size: 0.78rem; flex-shrink: 0;
}
.price-card-head h3 { margin: 0; font-size: 1.04rem; }
.price-from { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.plan-list { display: flex; flex-direction: column; gap: 0.4rem; }
.plan-row {
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
    padding: 0.5rem 0.65rem; border-radius: 10px;
    background: rgba(148, 163, 184, 0.08); border: 1px solid var(--border);
}
.plan-name { font-weight: 600; font-size: 0.86rem; }
.plan-tags { font-size: 0.72rem; color: var(--text-muted); }
.plan-price {
    font-family: 'Russo One', 'Outfit', sans-serif; font-size: 0.96rem;
    color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.price-notes { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.price-foot {
    margin-top: auto; padding-top: 0.55rem; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap;
    font-size: 0.74rem; color: var(--text-muted);
}
.price-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.price-foot a:hover { text-decoration: underline; }

/* ═══ WATCHLIST & CALCULATOR ═══ */
.calc-card {
    padding: 1.2rem 1.35rem; border-radius: 18px; margin-bottom: 1.35rem;
    background: var(--bg-card); border: 1px solid var(--border);
}
.calc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.calc-kpi { padding: 0.75rem 0.9rem; border-radius: 12px; background: rgba(148, 163, 184, 0.08); border: 1px solid var(--border); }
.calc-kpi-lbl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; }
.calc-kpi-val { font-family: 'Russo One', 'Outfit', sans-serif; font-size: 1.3rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.rec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.rec-item {
    padding: 0.85rem 1rem; border-radius: 14px;
    background: rgba(var(--brand-rgb), 0.08); border: 1px solid rgba(var(--brand-rgb), 0.3);
    display: flex; flex-direction: column; gap: 0.35rem;
}
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.rec-titles { font-size: 0.78rem; color: var(--text-muted); }
.watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0.9rem; }
.wl-card {
    display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 0.85rem; padding: 0.75rem;
    border-radius: 15px; background: var(--bg-card); border: 1px solid var(--border);
}
.wl-poster { width: 70px; height: 105px; border-radius: 10px; object-fit: cover; background: var(--bg-elev); }
.wl-info { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.wl-status {
    display: inline-flex; align-items: center; gap: 4px; width: fit-content;
    padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
}
.wl-status--ok { background: rgba(16, 185, 129, 0.16); color: var(--success); }
.wl-status--need { background: rgba(var(--brand-rgb), 0.16); color: var(--brand); }
.wl-actions { display: flex; gap: 0.4rem; margin-top: auto; flex-wrap: wrap; }

/* ═══ MODAL SZCZEGÓŁÓW TYTUŁU ═══ */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(4, 8, 18, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-sheet {
    position: relative; width: 100%; max-width: 860px; max-height: 92dvh;
    overflow-y: auto; border-radius: 22px;
    background: var(--bg-elev); border: 1px solid var(--border-strong);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
}
.modal-close {
    position: sticky; top: 12px; float: right; margin: 12px 12px -48px 0; z-index: 5;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(10, 15, 28, 0.78); color: #fff;
    font-size: 1rem; display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--danger); border-color: var(--danger); }
.modal-hero {
    position: relative; padding: 1.6rem; display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 1.4rem;
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.14), transparent);
    border-bottom: 1px solid var(--border);
}
.modal-poster { width: 175px; aspect-ratio: 2 / 3; border-radius: 14px; object-fit: cover; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); background: var(--bg); }
.modal-title {
    margin: 0 2.5rem 0.25rem 0; font-family: 'Russo One', 'Outfit', sans-serif;
    font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.15;
}
.modal-orig { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 0.65rem; }
.modal-facts { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.75rem; }
.fact-pill {
    padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700;
    background: rgba(148, 163, 184, 0.14); border: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}
.fact-pill--gold { color: var(--brand); border-color: rgba(var(--brand-rgb), 0.4); background: rgba(var(--brand-rgb), 0.12); }
.modal-overview { margin: 0 0 0.9rem; font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.modal-cta-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.modal-section { padding: 1.25rem 1.6rem; border-bottom: 1px solid var(--border); }
.modal-section:last-child { border-bottom: none; }
.modal-section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.modal-section h3 { margin: 0; font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 0.45rem; }
.checked-badge { font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 0.45rem; }

.offer-group { margin-bottom: 1rem; }
.offer-group:last-child { margin-bottom: 0; }
.offer-group-title { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 0.5rem; }
.offer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 0.6rem; }
.offer-card {
    display: flex; align-items: center; justify-content: space-between; gap: 0.65rem;
    padding: 0.65rem 0.75rem; border-radius: 13px;
    background: var(--bg-card); border: 1px solid var(--border);
}
.offer-card--owned { border-color: var(--success); background: rgba(16, 185, 129, 0.08); }
.offer-left { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.offer-badge {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Russo One', 'Outfit', sans-serif; font-size: 0.68rem;
}
.offer-name { font-weight: 700; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-sub { font-size: 0.73rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.offer-disclaimer { margin: 0.85rem 0 0; font-size: 0.76rem; color: var(--text-muted); }

.cast-strip { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.cast-chip {
    padding: 0.35rem 0.72rem; border-radius: 999px; font-size: 0.78rem;
    background: var(--bg-card); border: 1px solid var(--border);
}
.cast-chip span { color: var(--text-muted); }

/* ═══ ABOUT / FOOTER / EMPTY ═══ */
.about-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1rem;
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);
}
.about-card {
    padding: 1.15rem 1.25rem; border-radius: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
}
.about-card h3 { margin: 0 0 0.45rem; font-size: 0.96rem; display: flex; align-items: center; gap: 0.5rem; }
.about-card h3 i { color: var(--brand); }
.about-card p { margin: 0; font-size: 0.86rem; color: var(--text-muted); line-height: 1.55; }
.footer { text-align: center; padding: 1.25rem 1rem 2rem; font-size: 0.8rem; color: var(--text-muted); }
.footer-links { margin: 0.4rem 0 0; }
.footer-links a, .footer-link-btn {
    border: none; background: transparent; padding: 0; color: var(--accent);
    font-size: 0.8rem; font-weight: 600; text-decoration: none;
}
.footer-links a:hover, .footer-link-btn:hover { text-decoration: underline; }

/* ═══ COOKIE BANNER & PRIVACY MODAL ═══ */
.cookie-banner {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 420;
    width: min(760px, calc(100vw - 24px));
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 0.9rem 1.1rem; border-radius: 16px;
    background: var(--bg-elev); border: 1px solid var(--border-strong);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.cookie-banner-text {
    display: flex; align-items: flex-start; gap: 0.7rem; flex: 1 1 320px;
    font-size: 0.84rem; line-height: 1.45; color: var(--text-muted);
}
.cookie-banner-text i { color: var(--brand); font-size: 1.15rem; margin-top: 2px; flex-shrink: 0; }
.cookie-banner-text strong { color: var(--text); }
.cookie-banner-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.privacy-body { padding: 1.8rem 1.65rem 1.6rem; text-align: left; }
.privacy-body .auth-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.privacy-body .auth-title i { color: var(--brand); }
.privacy-lead { margin: 0 0 1rem; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.privacy-body h3 { margin: 1rem 0 0.4rem; font-size: 0.94rem; color: var(--text); }
.privacy-body ul { margin: 0 0 0.5rem; padding-left: 1.15rem; color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }
.privacy-body li { margin-bottom: 0.35rem; }
.privacy-body code { padding: 1px 5px; border-radius: 5px; background: rgba(148, 163, 184, 0.16); color: var(--text); font-size: 0.8rem; }
.privacy-contact { margin: 1rem 0 0.9rem; font-size: 0.84rem; color: var(--text-muted); }
.privacy-contact a { color: var(--accent); font-weight: 600; text-decoration: none; }
.privacy-contact a:hover { text-decoration: underline; }

.empty-state {
    grid-column: 1 / -1; text-align: center; padding: 2.5rem 1rem;
    border-radius: 16px; border: 1px dashed var(--border-strong); color: var(--text-muted);
}
.empty-state i { font-size: 2rem; color: var(--brand); margin-bottom: 0.55rem; display: block; }

.skeleton-card {
    aspect-ratio: 2 / 3.4; border-radius: 16px; border: 1px solid var(--border);
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(148, 163, 184, 0.14) 50%, var(--bg-card) 75%);
    background-size: 200% 100%; animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
    position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 900;
    max-width: calc(100vw - 24px); text-align: center; pointer-events: none;
    padding: 0.6rem 1.15rem; border-radius: 999px;
    background: var(--bg-elev); border: 1px solid var(--brand); color: var(--text);
    font-size: 0.86rem; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* ═══ AUTH MODAL & ACCOUNT ═══ */
.topbar-actions { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.pill-btn--auth {
    border-color: rgba(var(--brand-rgb), 0.42);
    background: rgba(var(--brand-rgb), 0.12);
    max-width: 190px;
}
.pill-btn--auth span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-btn--auth.logged-in {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.12);
}
.pill-btn--auth.logged-in i { color: var(--success); }

.modal-sheet--narrow { max-width: 450px; }
.auth-sheet-body { padding: 2rem 1.7rem 1.8rem; text-align: center; }
.auth-icon-badge {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--brand-rgb), 0.15); border: 1px solid rgba(var(--brand-rgb), 0.38);
    color: var(--brand); font-size: 1.45rem;
}
.auth-icon-badge--ok {
    background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.42); color: var(--success);
}
.auth-title {
    margin: 0 0 0.45rem; font-family: 'Russo One', 'Outfit', sans-serif;
    font-weight: 400; font-size: 1.38rem;
}
.auth-sub { margin: 0 0 1.25rem; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.auth-alert {
    margin: 0 0 1rem; padding: 0.65rem 0.9rem; border-radius: 12px; text-align: left;
    background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.42);
    color: var(--text); font-size: 0.84rem; font-weight: 600;
}
.auth-form { display: flex; flex-direction: column; gap: 0.7rem; text-align: left; }
.auth-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.auth-input {
    width: 100%; padding: 0.82rem 1rem; border-radius: 13px;
    border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
    font-family: inherit; font-size: 1rem;
}
.auth-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.18); }
.auth-code-input {
    text-align: center; font-size: 1.75rem; font-weight: 800; letter-spacing: 0.35em;
    font-variant-numeric: tabular-nums; padding-left: 1.35rem;
}
.auth-submit { width: 100%; justify-content: center; padding: 0.82rem 1rem; font-size: 0.96rem; margin-top: 0.25rem; }
.auth-footnote { margin: 1rem 0 0; font-size: 0.76rem; color: var(--text-muted); }
.auth-links {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border);
}
.auth-link-btn {
    border: none; background: transparent; color: var(--accent);
    font-size: 0.82rem; font-weight: 700; padding: 0.2rem;
}
.auth-link-btn:hover { text-decoration: underline; }
.auth-account-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 1.15rem;
}
.auth-account-actions { display: flex; flex-direction: column; gap: 0.55rem; }
.wl-auth-cta { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.wl-auth-cta p { margin: 0; max-width: 460px; }

/* ═══ STATS DASHBOARD (/stats) ═══ */
.stats-container { max-width: 1120px; }
.stats-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 0.85rem; margin-bottom: 1.25rem;
}
.stats-kpi--live { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.08); }
.online-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); margin-right: 4px; box-shadow: 0 0 8px var(--success);
}
.stats-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.stats-card-head h3, .stats-panel h3 {
    margin: 0 0 0.8rem; font-size: 1rem; font-weight: 800;
    display: flex; align-items: center; gap: 0.45rem;
}
.stats-card-head h3 { margin-bottom: 0; }
.stats-card-head h3 i, .stats-panel h3 i { color: var(--brand); }
.stats-legend { display: flex; align-items: center; gap: 0.9rem; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-dot--u { background: var(--brand); }
.legend-dot--p { background: var(--accent); opacity: 0.65; }

.stats-chart {
    display: flex; align-items: flex-end; gap: 6px;
    height: 190px; padding: 0.5rem 0.25rem 0; overflow-x: auto;
}
.chart-col {
    flex: 1 0 26px; display: flex; flex-direction: column; align-items: center;
    height: 100%; justify-content: flex-end; gap: 4px;
}
.chart-bars {
    display: flex; align-items: flex-end; gap: 3px; width: 100%;
    justify-content: center; flex: 1; min-height: 0;
}
.chart-bar { width: 10px; border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.25s ease; }
.chart-bar--u { background: var(--brand); }
.chart-bar--p { background: var(--accent); opacity: 0.55; }
.chart-val { font-size: 0.68rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-lbl { font-size: 0.66rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.stats-panels-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1rem;
}
.stats-panel { margin-bottom: 0; }
.stats-rank-list { display: flex; flex-direction: column; gap: 0.55rem; }
.stats-rank-row { display: flex; flex-direction: column; gap: 3px; }
.stats-rank-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; }
.stats-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-rank-val { font-variant-numeric: tabular-nums; color: var(--brand); flex-shrink: 0; }
.stats-rank-track { height: 6px; border-radius: 999px; background: rgba(148, 163, 184, 0.14); overflow: hidden; }
.stats-rank-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* ═══ MOBILE BOTTOM NAV ═══ */
.bottom-nav { display: none; }
@media (max-width: 767px) {
    .nav-desktop { display: none; }
    .cookie-banner { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); padding: 0.8rem 0.95rem; }
    .cookie-banner-actions { width: 100%; justify-content: flex-end; }
    .brand span { font-size: 0.9rem; }
    .topbar-inner { padding: 0.55rem 0.85rem; gap: 0.5rem; }
    .pill-btn--auth { max-width: 132px; padding: 0.42rem 0.68rem; font-size: 0.8rem; }
    #themeLabel { display: none; }
    .container { padding: 1rem 0.9rem calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
    .footer { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)); }
    .titles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .match-row { grid-template-columns: 64px minmax(0, 1fr); }
    .match-row .btn { grid-column: 1 / -1; width: 100%; }
    .modal-backdrop { padding: 0; align-items: flex-end; }
    .modal-sheet { border-radius: 22px 22px 0 0; max-height: 92dvh; }
    .modal-hero { grid-template-columns: 1fr; padding: 1.2rem; }
    .modal-poster { width: 130px; margin: 0 auto; }
    .modal-section { padding: 1rem 1.2rem; }
    .bottom-nav {
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
        display: grid; grid-template-columns: repeat(4, 1fr);
        padding: 0.35rem 0.4rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
        background: color-mix(in srgb, var(--bg) 92%, transparent);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border);
    }
    .bnav-btn {
        position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 0.42rem 0.2rem; border: none; background: transparent;
        color: var(--text-muted); font-size: 0.7rem; font-weight: 700;
        touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    }
    .bnav-btn i { font-size: 1.08rem; }
    .bnav-btn.active { color: var(--brand); }
    .bnav-dot {
        position: absolute; top: 2px; right: 18%; min-width: 17px; height: 17px;
        padding: 0 4px; border-radius: 999px; background: var(--brand); color: var(--on-brand);
        font-size: 0.62rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
    }
}
