/* StreamHub On Demand — cinema browse UI */

.tool-widget:has(.sod-app) {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
    margin-bottom: 1.25rem;
}
.tool-layout:has(.sod-app) {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}
@media (min-width: 1100px) {
    .tool-layout:has(.sod-app) {
        grid-template-columns: minmax(0, 1fr) 260px;
    }
}
.tool-page:has(.sod-app) .container.tool-layout {
    max-width: min(1280px, 100%);
}

.sod-app {
    --sod-bg: #0a0d14;
    --sod-panel: #121826;
    --sod-elev: #182033;
    --sod-text: #f4f1ea;
    --sod-muted: #9aa3b5;
    --sod-accent: #e8b84a;
    --sod-accent-2: #2bb8a8;
    --sod-danger: #d94848;
    --sod-pad: clamp(0.8rem, 2.2vw, 1.4rem);
    --sod-poster: clamp(118px, 15vw, 168px);
    --sod-radius: clamp(14px, 1.6vw, 20px);
    position: relative;
    margin: 0;
    border-radius: var(--sod-radius);
    overflow: clip;
    background:
        radial-gradient(1200px 480px at 10% -10%, rgba(232, 184, 74, 0.12), transparent 55%),
        radial-gradient(900px 420px at 90% 0%, rgba(43, 184, 168, 0.1), transparent 50%),
        linear-gradient(180deg, #0d121c 0%, var(--sod-bg) 40%, #080a10 100%);
    color: var(--sod-text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    min-height: min(78vh, 940px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    -webkit-tap-highlight-color: transparent;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sod-app .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Nav */
.sod-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    padding: 0.8rem var(--sod-pad);
    background: rgba(10, 13, 20, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sod-nav-brand {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex: 0 0 auto;
}
.sod-logo {
    font-weight: 900;
    letter-spacing: 0.01em;
    color: var(--sod-accent);
    font-size: clamp(1.08rem, 2.4vw, 1.3rem);
}
.sod-logo-sub {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sod-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.sod-nav-tabs {
    display: flex;
    gap: 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
}
.sod-nav-tab {
    border: 0;
    background: transparent;
    color: var(--sod-muted);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}
.sod-nav-tab.is-active,
.sod-nav-tab:hover {
    color: #0a0d14;
    background: var(--sod-accent);
}
.sod-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    min-width: 0;
}
.sod-search-wrap { display: block; min-width: 0; }
.sod-search {
    width: min(260px, 36vw);
    max-width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
}
.sod-source {
    appearance: none;
    border: 1px solid rgba(43, 184, 168, 0.4);
    background: rgba(43, 184, 168, 0.12);
    color: #fff;
    border-radius: 999px;
    padding: 0.5rem 1.7rem 0.5rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    max-width: 11rem;
    background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 7px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.sod-source option {
    color: #111;
    background: #fff;
}
.sod-search:focus {
    outline: 2px solid rgba(232, 184, 74, 0.55);
    outline-offset: 1px;
}
.sod-live-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(43, 184, 168, 0.45);
    background: rgba(43, 184, 168, 0.12);
    white-space: nowrap;
}

/* Hero */
.sod-hero {
    position: relative;
    min-height: clamp(280px, 42vw, 480px);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.55fr);
    align-items: end;
    gap: 1rem;
    padding: clamp(1.1rem, 3vw, 2.2rem) var(--sod-pad) clamp(1.4rem, 3vw, 2.4rem);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sod-hero-art {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.sod-hero-blur {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.15);
    opacity: 0.45;
    transform: scale(1.08);
}
.sod-hero-poster {
    position: absolute;
    top: 8%;
    right: max(var(--sod-pad), 4%);
    bottom: 10%;
    width: min(280px, 34vw);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #111827;
}
.sod-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 13, 20, 0.96) 0%, rgba(10, 13, 20, 0.78) 48%, rgba(10, 13, 20, 0.35) 100%),
        linear-gradient(0deg, rgba(10, 13, 20, 0.95) 0%, transparent 55%);
}
.sod-hero-copy {
    position: relative;
    z-index: 2;
    max-width: min(40rem, 100%);
    grid-column: 1;
}
.sod-hero-kicker,
.sod-detail-kicker {
    margin: 0 0 0.35rem;
    color: var(--sod-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.sod-hero-title,
.sod-detail-title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.45rem, 3.8vw, 2.7rem);
    line-height: 1.1;
    font-weight: 900;
    word-break: break-word;
}
.sod-hero-desc,
.sod-detail-desc {
    margin: 0 0 1rem;
    color: #d5d9e3;
    font-size: clamp(0.88rem, 1.6vw, 1rem);
    line-height: 1.5;
    max-width: 42rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sod-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
}
.sod-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8ecf4;
}
.sod-pill-accent {
    background: rgba(232, 184, 74, 0.16);
    border-color: rgba(232, 184, 74, 0.4);
    color: #f6df9f;
}
.sod-pill-teal {
    background: rgba(43, 184, 168, 0.14);
    border-color: rgba(43, 184, 168, 0.35);
    color: #9ee8df;
}
.sod-hero-actions,
.sod-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.sod-btn {
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 0.72rem 1.15rem;
    cursor: pointer;
    min-height: 2.65rem;
}
.sod-btn-play {
    background: linear-gradient(180deg, #f2c761, var(--sod-accent));
    color: #1a1406;
    box-shadow: 0 10px 24px rgba(232, 184, 74, 0.25);
}
.sod-btn-play:hover { filter: brightness(1.05); }
.sod-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.sod-btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.sod-btn-ghost.is-active {
    background: rgba(232, 184, 74, 0.18);
    border-color: rgba(232, 184, 74, 0.5);
}

.sod-status,
.sod-error {
    padding: clamp(1.5rem, 4vw, 2.5rem) var(--sod-pad);
    text-align: center;
    color: var(--sod-muted);
}
.sod-error h3 { margin: 0 0 0.4rem; color: #fff; }

/* Filters / rails */
.sod-filters {
    padding: 0.6rem var(--sod-pad) 0.2rem;
    background: rgba(10, 13, 20, 0.72);
}
.sod-filter-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.sod-filter-label {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sod-muted);
}
.sod-chips {
    display: flex;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
}
.sod-chips::-webkit-scrollbar { display: none; }
.sod-chip {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    min-height: 2.15rem;
}
.sod-chip.is-active,
.sod-chip:hover {
    background: var(--sod-accent);
    border-color: var(--sod-accent);
    color: #1a1406;
}
.sod-filter-sort {
    margin-top: 0.45rem;
}
.sod-sort {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 999px;
    padding: 0.4rem 1.7rem 0.4rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 7px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.sod-sort option {
    color: #111;
    background: #fff;
}
.sod-scope {
    margin: 0.45rem 0 0;
    color: var(--sod-muted);
    font-size: 0.78rem;
}
.sod-main { padding: 0.7rem 0 clamp(1.75rem, 4vw, 2.75rem); }
.sod-rail {
    margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
    padding: 0 var(--sod-pad);
}
.sod-rail-head {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}
.sod-rail-title {
    margin: 0;
    font-size: clamp(1.02rem, 2.2vw, 1.22rem);
    font-weight: 800;
}
.sod-rail-count { color: var(--sod-muted); font-size: 0.82rem; }
.sod-row-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--sod-poster);
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.2rem 0 0.55rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}
.sod-poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--sod-poster), 1fr));
    gap: clamp(0.55rem, 1.5vw, 0.95rem);
}

/* Cards + artwork */
.sod-card {
    position: relative;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    width: 100%;
}
.sod-card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(160deg, #1c2436, #0d121c);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sod-art {
    position: absolute;
    inset: 0;
}
.sod-art-blur {
    position: absolute;
    inset: -12%;
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.2);
    opacity: 0.55;
    transform: scale(1.15);
}
.sod-art-img,
.sod-art-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
.sod-art-img img {
    width: 86%;
    height: 86%;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}
.sod-art-img.is-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
}
.sod-art-fallback {
    font-size: clamp(1.5rem, 3.2vw, 2rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.78);
    background:
        radial-gradient(circle at 30% 20%, rgba(232, 184, 74, 0.28), transparent 55%),
        linear-gradient(160deg, #243049, #101522);
}
.sod-card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.6rem 0.55rem 0.55rem;
    background: linear-gradient(0deg, rgba(8, 10, 16, 0.92), transparent);
    z-index: 2;
}
.sod-card-year {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    z-index: 3;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: rgba(10, 13, 20, 0.82);
    border: 1px solid rgba(232, 184, 74, 0.35);
    color: #f6df9f;
}
.sod-card-fav {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 3;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 999px;
    border: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
}
.sod-card-fav.is-on { background: var(--sod-accent); color: #1a1406; }
.sod-card-badge {
    position: absolute;
    left: 0.4rem;
    bottom: 0.4rem;
    z-index: 3;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.18rem 0.4rem;
    border-radius: 4px;
    background: rgba(217, 72, 72, 0.92);
    color: #fff;
}
.sod-card-title {
    margin: 0.45rem 0 0.15rem;
    font-size: clamp(0.74rem, 1.5vw, 0.84rem);
    font-weight: 800;
    line-height: 1.25;
    color: #f0f2f7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sod-card-sub {
    margin: 0;
    font-size: 0.7rem;
    color: var(--sod-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
    .sod-card:hover .sod-card-poster,
    .sod-card:focus-visible .sod-card-poster {
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
        border-color: rgba(232, 184, 74, 0.35);
    }
}

.sod-empty { color: var(--sod-muted); margin: 0.5rem 0 0; }
.sod-load-more {
    display: block;
    width: 100%;
    margin-top: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 2.75rem;
}

/* Detail sheet */
.sod-detail {
    position: fixed;
    inset: 0;
    z-index: 11500;
    display: none;
    place-items: center;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
}
.sod-detail.is-open { display: grid; }
.sod-detail[hidden] { display: none !important; }
.sod-detail-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}
.sod-detail-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(92dvh, 860px);
    overflow: auto;
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 0;
    background: var(--sod-panel);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.sod-detail-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
}
.sod-detail-art {
    position: relative;
    min-height: 320px;
    background: #0b0f18;
}
.sod-detail-blur {
    position: absolute;
    inset: -10%;
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.15);
    opacity: 0.5;
}
.sod-detail-poster {
    position: absolute;
    inset: 1rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111827;
}
.sod-detail-body {
    padding: 1.25rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sod-detail-desc {
    -webkit-line-clamp: 8;
    max-width: none;
}
.sod-detail-facts {
    margin: 0 0 1.1rem;
    display: grid;
    gap: 0.45rem;
}
.sod-detail-facts div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.5rem;
    font-size: 0.86rem;
}
.sod-detail-facts dt {
    margin: 0;
    color: var(--sod-muted);
    font-weight: 700;
}
.sod-detail-facts dd {
    margin: 0;
    color: #eef1f7;
    word-break: break-word;
}

/* Player */
.sod-player {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    place-items: center;
    padding: clamp(0.5rem, 2vw, 1.25rem);
}
.sod-player.is-open { display: grid; }
.sod-player[hidden] { display: none !important; }
.sod-player-shell {
    position: relative;
    width: min(1100px, 100%);
    background: #000;
    border-radius: 14px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.sod-video-wrap {
    position: relative;
    background: #000;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    z-index: 1;
}
.sod-video {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(78vh, 820px);
    min-height: 220px;
    background: #000;
    display: block;
    object-fit: contain;
    pointer-events: auto;
}
.sod-player-close {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    z-index: 12050;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}
.sod-player-close:hover,
.sod-player-close:focus-visible {
    background: var(--sod-accent);
    color: #1a1406;
    border-color: var(--sod-accent);
}
.sod-player-meta {
    position: relative;
    z-index: 5;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    background: #0b0b0f;
    border-radius: 0 0 14px 14px;
    pointer-events: auto;
}
.sod-player-meta-text {
    flex: 1 1 10rem;
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}
.sod-player-meta strong {
    font-size: clamp(0.9rem, 2vw, 1rem);
}
.sod-player-meta span {
    color: var(--sod-muted);
    font-size: 0.82rem;
}
.sod-quality-wrap {
    flex: 0 0 auto;
}
.sod-quality {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 999px;
    padding: 0.45rem 1.8rem 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    min-height: 2.3rem;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.sod-quality option {
    color: #111;
    background: #fff;
}
.sod-player-close-inline {
    margin-left: 0;
    min-height: 2.3rem;
    padding: 0.45rem 0.9rem;
}
.sod-player-error,
.sod-player-spinner {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
    pointer-events: auto;
}
.sod-player-error { background: rgba(0, 0, 0, 0.84); z-index: 4; }
.sod-player-spinner { background: rgba(0, 0, 0, 0.45); z-index: 3; color: #e4e4e7; }
.sod-player-error p { margin: 0; font-size: 1.02rem; font-weight: 700; }
.sod-player-error-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.sod-player-spinner[hidden],
.sod-player-error[hidden] {
    display: none !important;
    pointer-events: none !important;
}
.sod-spinner {
    width: 2.4rem;
    height: 2.4rem;
    margin: 0 auto;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--sod-accent);
    animation: sod-spin 0.8s linear infinite;
}
@keyframes sod-spin { to { transform: rotate(360deg); } }

.sod-toast {
    position: fixed;
    left: 50%;
    bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 13000;
    background: rgba(18, 24, 38, 0.96);
    color: #fff;
    border: 1px solid rgba(232, 184, 74, 0.35);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-size: 0.86rem;
    font-weight: 700;
    max-width: calc(100vw - 1.5rem);
    text-align: center;
}

/* Desktop */
@media (min-width: 981px) {
    .sod-app { --sod-poster: 152px; }
    .sod-nav { flex-wrap: nowrap; }
    .sod-search { width: 300px; }
}

/* Tablet */
@media (max-width: 980px) {
    .sod-app { --sod-poster: clamp(116px, 18vw, 146px); }
    .sod-hero {
        grid-template-columns: 1fr;
        min-height: clamp(300px, 48vw, 420px);
    }
    .sod-hero-poster {
        width: min(200px, 36vw);
        top: 10%;
        bottom: 14%;
    }
    .sod-nav-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .sod-nav-tabs::-webkit-scrollbar { display: none; }
    .sod-filters {
        position: sticky;
        top: 3.4rem;
        z-index: 35;
        backdrop-filter: blur(10px);
    }
    .sod-detail-panel {
        grid-template-columns: 1fr;
        max-height: 92dvh;
    }
    .sod-detail-art {
        min-height: 240px;
        aspect-ratio: 16 / 10;
    }
}

/* Mobile */
@media (max-width: 720px) {
    .tool-page:has(.sod-app) .container.tool-layout {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
    .sod-app {
        --sod-pad: 0.75rem;
        --sod-poster: clamp(104px, 29vw, 130px);
        border-radius: 12px;
        min-height: 72dvh;
    }
    .sod-nav { gap: 0.5rem; padding: 0.65rem var(--sod-pad); }
    .sod-nav-brand { width: 100%; }
    .sod-nav-actions {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.45rem;
    }
    .sod-search,
    .sod-search-wrap { width: 100%; }
    .sod-search { font-size: 16px; }
    .sod-nav-tabs { order: 3; width: 100%; }
    .sod-hero {
        min-height: min(58dvh, 380px);
        padding-bottom: 1.25rem;
    }
    .sod-hero-poster {
        width: min(148px, 40vw);
        right: 0.75rem;
        top: 12%;
        bottom: auto;
        aspect-ratio: 2 / 3;
        height: auto;
    }
    .sod-hero-desc { -webkit-line-clamp: 4; }
    .sod-hero-actions .sod-btn {
        flex: 1 1 calc(50% - 0.4rem);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2.8rem;
    }
    .sod-filters { top: 0; }
    .sod-row-scroll {
        margin-inline: calc(var(--sod-pad) * -1);
        padding-inline: var(--sod-pad);
    }
    .sod-poster-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sod-player { padding: 0; align-items: stretch; }
    .sod-player-shell {
        width: 100%;
        min-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .sod-video-wrap {
        flex: 1 1 auto;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .sod-video {
        flex: 1 1 auto;
        aspect-ratio: auto;
        width: 100%;
        height: min(62dvh, calc(100dvh - 8.5rem));
        max-height: none;
        min-height: 40dvh;
    }
    .sod-player-meta { border-radius: 0; }
    .sod-player-close-inline {
        width: auto;
        margin-left: 0;
        order: initial;
    }
    .sod-nav-actions {
        grid-template-columns: minmax(0, 1fr);
    }
    .sod-source {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .sod-app {
        --sod-poster: 46vw;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
    .tool-page:has(.sod-app) .container.tool-layout {
        padding-left: 0;
        padding-right: 0;
    }
    .sod-poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sod-hero-title { font-size: 1.3rem; }
    .sod-detail-facts div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .sod-hero {
        min-height: min(52dvh, 280px);
    }
    .sod-video {
        height: min(70dvh, calc(100dvh - 5rem));
    }
}

@media (min-width: 1400px) {
    .sod-app {
        --sod-poster: 172px;
        --sod-pad: 1.55rem;
    }
    .sod-hero { min-height: 500px; }
}

@media (prefers-reduced-motion: reduce) {
    .sod-card-poster,
    .sod-spinner {
        transition: none !important;
        animation: none !important;
    }
}
