/* ── Navbar ── */
#navbar {
    background: linear-gradient(to bottom, rgba(13,13,13,.9) 0%, transparent 100%);
}
#navbar.scrolled {
    background: rgba(13,13,13,.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,.07);
}

/* ── Scroll rows ── */
.scroll-row {
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a transparent;
}
.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-track { background: transparent; }
.scroll-row::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }

/* ── Scroll arrow buttons ── */
.scroll-btn {
    position: absolute;
    top: 40%;
    z-index: 10;
    width: 36px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,13,13,.85);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity .2s;
}
.scroll-container:hover .scroll-btn { opacity: 1; }
.scroll-btn.left  { left: -18px;  border-radius: 0 6px 6px 0; }
.scroll-btn.right { right: -18px; border-radius: 6px 0 0 6px; }

/* ── Cards ── */
.card-poster { transition: transform .35s ease; }
.card-link:hover .card-poster { transform: scale(1.06); }
.card-overlay {
    opacity: 0;
    transition: opacity .3s ease;
}
.card-link:hover .card-overlay { opacity: 1; }

/* ── Skeleton shimmer ── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: calc(400px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 400px 100%;
    animation: shimmer 1.4s infinite;
}

/* ── Hero fade-in ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease forwards; }

/* ── Hero background transition ── */
.hero-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    transition: opacity .6s ease;
}

/* ── Trailer modal ── */
#trailer-modal { transition: opacity .2s ease; }

/* ── Line clamp ── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Detail page backdrop blur ── */
.detail-poster-shadow {
    box-shadow: 0 25px 60px rgba(0,0,0,.7);
}

/* ── Genre pill ── */
.genre-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: .7rem;
    color: #ccc;
    border: 1px solid rgba(255,255,255,.1);
}

/* ── Hide native video CC button (managed by custom picker) ── */
video::-webkit-media-controls-toggle-closed-captions-button,
video::-webkit-media-controls-closed-captions-container { display: none !important; }

/* ── WebTorrent player loader ── */
@keyframes spin { to { transform: rotate(360deg); } }

.wt-loader {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: #e5b94e;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

/* ── Episode list scrollbar (webkit) ── */
#episodes-panel .overflow-y-auto::-webkit-scrollbar,
#ep-streams-list::-webkit-scrollbar { width: 4px; }
#episodes-panel .overflow-y-auto::-webkit-scrollbar-track,
#ep-streams-list::-webkit-scrollbar-track { background: transparent; }
#episodes-panel .overflow-y-auto::-webkit-scrollbar-thumb,
#ep-streams-list::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }

/* ── Subtitle stepper buttons ── */
.sub-adj-btn {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: #fff; font-size: 1.1rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .15s;
}
.sub-adj-btn:hover { background: rgba(255,255,255,.2); }
.sub-adj-val { flex: 1; text-align: center; font-size: .8rem; font-weight: 500; color: #fff; }

/* ── Stream item ── */
.stream-item { cursor: pointer; }

/* ── Catalog grid — cards fill their cell instead of fixed width ── */
.catalog-grid .card-link {
    width: 100%;
    flex: none;
}

/* ── Catalog filter selects ── */
.filter-select-wrap { position: relative; display: inline-flex; align-items: center; }
.filter-select-wrap::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,.5);
    pointer-events: none;
}
.filter-select {
    appearance: none;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    font-size: .8rem;
    padding: 7px 36px 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color .15s, background .15s;
    min-width: 130px;
}
.filter-select:hover  { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.11); }
.filter-select:focus  { border-color: #e5b94e; }
.filter-select option { background: #181818; color: #fff; }

/* ── IMDb badge ── */
.imdb-badge {
    background: #f5c518;
    color: #000;
    font-weight: 700;
    font-size: .75rem;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: .04em;
}
