/* ============ Fullscreen player overlay ============ */
.vinfo-player-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vinfo-player-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.vinfo-player-overlay .video-js {
    width: 100vw;
    height: 100vh;
}
.vinfo-player-overlay .video-js video {
    object-fit: contain;
}

/* ============ Big X close button (revealed on pause) ============ */
.vinfo-player-close {
    position: absolute;
    top: 28px;
    right: 28px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    z-index: 10;
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease, border-color 0.15s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.vinfo-player-overlay.paused .vinfo-player-close {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.vinfo-player-close:hover,
.vinfo-player-close:focus-visible {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.75);
    transform: scale(1.06);
    outline: none;
}
/* X drawn with two crossed bars, no SVG needed */
.vinfo-player-close::before,
.vinfo-player-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}
.vinfo-player-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.vinfo-player-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ============ Title overlay (top-left, shown on pause) ============ */
.vinfo-player-title {
    position: absolute;
    top: 32px;
    left: 40px;
    max-width: min(70%, 720px);
    z-index: 10;
    color: #fff;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.vinfo-player-overlay.paused .vinfo-player-title {
    opacity: 1;
    transform: translateY(0);
}
.vinfo-player-eyebrow {
    display: inline-block;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #cbd5f1;
    opacity: 0.9;
}
.vinfo-player-title h2 {
    margin: 0 0 6px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}
.vinfo-player-sub {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.02em;
}
.vinfo-player-sub > span + span::before {
    content: '·';
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.45);
}

/* Watch trailer / Next Episode secondary button, sits next to vinfo-play-btn.
   text-decoration: none makes the class safe on either <button> or <a>. */
.vinfo-trailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.vinfo-trailer-btn:hover,
.vinfo-trailer-btn:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

/* Prevent background scroll while a player overlay is open */
body.player-open {
    overflow: hidden;
}


/* =========================================================================
   Series-info page (series-info-v2.html) additions
   ========================================================================= */

html { scroll-behavior: smooth; }

/* ============ "Up next" button (bottom-right of the film player, on pause) ============ */
.vinfo-next-episode {
    position: absolute;
    bottom: 100px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px 12px 22px;
    max-width: 340px;
    background: rgba(255, 255, 255, 0.94);
    border: none;
    border-radius: 12px;
    color: #0a0a12;
    font: inherit;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.vinfo-player-overlay.paused .vinfo-next-episode {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.vinfo-next-episode:hover,
.vinfo-next-episode:focus-visible {
    background: #ffffff;
    outline: none;
}
.vinfo-next-episode.hidden {
    display: none;
}
.next-ep-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
}
.next-ep-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(10, 10, 18, 0.6);
    margin-bottom: 3px;
}
.next-ep-title {
    font-size: 14px;
    font-weight: 700;
    color: #0a0a12;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.next-ep-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0a0a12;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.vinfo-next-episode:hover .next-ep-arrow {
    transform: translateX(2px);
}

/* ============ "Episode List" jump button (below description) ============ */
.vinfo-episode-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 999px;
    color: #cbd5f1;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.vinfo-episode-list-btn:hover,
.vinfo-episode-list-btn:focus-visible {
    background: rgba(99, 102, 241, 0.28);
    border-color: rgba(129, 140, 248, 0.75);
    color: #fff;
    outline: none;
}
.vinfo-episode-list-btn .arrow {
    display: inline-block;
    transition: transform 0.15s ease;
}
.vinfo-episode-list-btn:hover .arrow {
    transform: translateY(2px);
}

/* ============ Season / episode picker (full-width variant) ============ */
.series-picker {
    max-width: 1400px;
    margin: 60px auto 40px;
    padding: 0 32px;
    scroll-margin-top: 24px;
}
.series-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.series-picker-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.series-select-wrap {
    position: relative;
    display: inline-block;
}
.series-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 11px 44px 11px 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-width: 220px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.series-select:hover,
.series-select:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    outline: none;
}
.series-select-wrap::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid rgba(255, 255, 255, 0.85);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.episode-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    margin: 0 0 14px;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.episode-card {
    display: grid;
    grid-template-columns: 300px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.episode-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}
/* Currently-viewed episode: indigo accent bar, tinted bg, "Now playing" badge */
.episode-card.is-current {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(129, 140, 248, 0.35);
    box-shadow: inset 3px 0 0 0 #818cf8;
}
.episode-card.is-current:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(129, 140, 248, 0.55);
}
.episode-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.episode-now-playing {
    display: none;
    padding: 3px 10px;
    background: rgba(129, 140, 248, 0.22);
    color: #a5b4fc;
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}
.episode-card.is-current .episode-now-playing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.episode-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1633, #0d0d1c);
    border-radius: 8px;
    overflow: hidden;
}
.episode-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.episode-thumb-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    z-index: 1;
}
/* Kept for backwards compat if a thumb ever renders without an image */
.episode-thumb-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.18);
    line-height: 1;
}
.episode-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.episode-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}
.episode-meta {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}
.episode-meta > span + span::before {
    content: '·';
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.3);
}
.episode-desc {
    margin: 4px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
}
.episode-play {
    align-self: center;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.episode-play:hover,
.episode-play:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.42);
    outline: none;
}

@media (max-width: 720px) {
    .episode-card {
        grid-template-columns: 1fr;
    }
    .episode-thumb {
        max-width: 320px;
    }
    .episode-play {
        justify-self: start;
    }
}
