/* ==========================================================================
   ANIMEXSTREAM - DARK OLED MINIMAL CINEMA DESIGN SYSTEM V3
   Theme: mpv & PotPlayer Soul, Content-First, OLED Dark (#090B0F), Dana Pro
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. WEBFONTS (Dana Pro)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Dana';
    src: url('../webfonts/dana/Dana-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../webfonts/dana/Dana-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../webfonts/dana/Dana-DemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../webfonts/dana/Dana-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../webfonts/dana/Dana-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../webfonts/dana/Dana-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Surfaces */
    --cinema-bg: #090B0F;
    --cinema-panel: #12151C;
    --cinema-elevated: #181D26;
    --cinema-hover: #202634;
    --cinema-input-bg: #0C0E14;
    
    /* Borders */
    --cinema-border: #1E2330;
    --cinema-border-subtle: #161A24;
    
    /* Text Hierarchy */
    --cinema-text-primary: #F3F4F6;
    --cinema-text-secondary: #9CA3AF;
    --cinema-text-muted: #6B7280;
    
    /* Brand Accent */
    --cinema-brand: #E11D48;
    --cinema-brand-coral: #FF5C68;
    --cinema-brand-hover: #F43F5E;
    
    /* Functional Accents */
    --cinema-gold: #FBBF24;
    --cinema-green: #10B981;
    --cinema-blue: #38BDF8;
    
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-pill: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   3. GLOBAL RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    background-color: var(--cinema-bg);
    color: var(--cinema-text-primary);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Dana', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--cinema-bg);
    color: var(--cinema-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

a {
    color: var(--cinema-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #7DD3FC;
}

button, input, select, textarea {
    font-family: 'Dana', sans-serif;
}

/* --------------------------------------------------------------------------
   4. COMPACT TOP NAVBAR
   -------------------------------------------------------------------------- */
.cinema-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 24px;
    background-color: var(--cinema-panel);
    border-bottom: 1px solid var(--cinema-border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #fff;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
}

.brand-logo-img {
    display: block;
    width: 88px;
    height: 27px;
    object-fit: contain;
}

.brand-badge:hover {
    color: #fff;
    filter: brightness(1.08);
}

.navbar-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--cinema-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-item.active {
    color: var(--cinema-text-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--cinema-text-muted);
    font-size: 0.75rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-nav-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-primary);
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-nav-action:hover {
    background: var(--cinema-hover);
    border-color: #2F3748;
}

.btn-nav-primary {
    background: linear-gradient(135deg, var(--cinema-brand) 0%, #BE123C 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

.btn-nav-primary:hover {
    background: linear-gradient(135deg, var(--cinema-brand-hover) 0%, #E11D48 100%);
}

.btn-nav-primary.party-offline {
    opacity: 0.6;
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-secondary);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   5. COLLAPSIBLE EXPLORER DRAWER
   -------------------------------------------------------------------------- */
.explore-drawer-panel {
    display: none;
    background-color: var(--cinema-panel);
    border-bottom: 1px solid var(--cinema-border);
    padding: 20px 24px;
    animation: drawerSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 90;
}

.explore-drawer-panel.open {
    display: block;
}

@keyframes drawerSlideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.drawer-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.drawer-header-row h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cinema-text-primary);
}

.btn-close-drawer {
    background: none;
    border: none;
    color: var(--cinema-text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.btn-close-drawer:hover {
    color: #fff;
}

.browse-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-field-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cinema-text-secondary);
}

.cinema-select, .cinema-input {
    background: var(--cinema-input-bg);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.cinema-select:focus, .cinema-input:focus {
    border-color: var(--cinema-brand);
}

.drawer-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.drawer-btns-group {
    display: flex;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   6. MAIN CINEMA STAGE (2-COLUMN GRID)
   -------------------------------------------------------------------------- */
.cinema-stage {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    flex: 1;
}

.stage-player-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stage-rail-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Theater Mode */
.cinema-stage.theater-mode {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.cinema-stage.theater-mode .stage-rail-column {
    display: none;
}

.cinema-stage.theater-mode .stage-player-column {
    width: min(100%, 1920px);
    margin: 0 auto;
}

.cinema-stage.theater-mode .video-frame-container {
    border-radius: 0;
}

.cinema-stage.theater-mode .vjs-theater-btn {
    color: var(--cinema-brand-coral, #ff5c68) !important;
    background: rgba(255, 92, 104, 0.14) !important;
}

/* --------------------------------------------------------------------------
   7. ANIME HERO SHOWCASE (PRE-PLAYBACK)
   -------------------------------------------------------------------------- */
.hero-stage-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--cinema-panel);
    border: 1px solid var(--cinema-border-subtle);
    margin-bottom: 20px;
    min-height: 360px;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(32px) saturate(1.4);
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.6s ease;
    z-index: 1;
}

.hero-backdrop.loaded {
    opacity: 0.38;
}

.hero-backdrop-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #090B0F 5%, rgba(18, 21, 28, 0.75) 55%, rgba(18, 21, 28, 0.4) 100%);
    z-index: 2;
}

.hero-content-card {
    position: relative;
    z-index: 3;
    padding: 30px;
}

.hero-showcase-container {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}

.hero-poster-wrapper {
    width: 165px;
    height: 240px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #151822;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
    position: relative;
}

.hero-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster-skeleton {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3B4354;
    font-size: 2.4rem;
}

.hero-details-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.hero-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-brand {
    background: rgba(225, 29, 72, 0.15);
    color: var(--cinema-brand-coral);
    border: 1px solid rgba(225, 29, 72, 0.3);
}

.tag-rating {
    background: rgba(245, 158, 11, 0.15);
    color: var(--cinema-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-subtle {
    background: var(--cinema-elevated);
    color: var(--cinema-text-secondary);
    border: 1px solid var(--cinema-border);
}

.meta-pill {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--cinema-elevated);
    color: var(--cinema-text-secondary);
    border: 1px solid var(--cinema-border-subtle);
}

.pill-quality {
    background: rgba(56, 189, 248, 0.1);
    color: var(--cinema-blue);
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-weight: 700;
}

.hero-main-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-top: 2px;
}

.hero-sub-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--cinema-text-secondary);
    margin-bottom: 2px;
}

.hero-genres-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 6px;
}

.hero-genre-pill {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #D1D5DB;
}

.hero-description {
    font-size: 0.88rem;
    color: var(--cinema-text-secondary);
    line-height: 1.6;
    max-width: 650px;
    margin-bottom: 8px;
}

.hero-action-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

/* Primary Action Buttons */
.btn-play-primary {
    background: linear-gradient(135deg, var(--cinema-brand) 0%, #BE123C 100%);
    border: none;
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
    transition: all var(--transition-fast);
}

.btn-play-primary:hover {
    background: linear-gradient(135deg, var(--cinema-brand-hover) 0%, var(--cinema-brand) 100%);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.55);
    transform: translateY(-1px);
}

.btn-secondary-cinema {
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-secondary-cinema:hover {
    background: var(--cinema-hover);
    border-color: #2F3748;
}

.btn-ghost-cinema {
    background: transparent;
    border: 1px solid transparent;
    color: var(--cinema-text-secondary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-ghost-cinema:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   8. MPV & POTPLAYER UNIFIED VIDEO SURFACE & HUD
   -------------------------------------------------------------------------- */
.video-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    position: relative;
}

/* Outer header (visible in normal stage mode) */
.cinema-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cinema-panel);
    border: 1px solid var(--cinema-border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 12px;
}

.player-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.btn-back-hero {
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-back-hero:hover {
    color: #fff;
    background: var(--cinema-hover);
}

.player-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-current-ep {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-series-title {
    font-size: 0.78rem;
    color: var(--cinema-text-secondary);
}

.player-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.episode-quick-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-quick-nav {
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-quick-nav:hover {
    color: #fff;
    border-color: #374151;
}

.btn-theater-mode {
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-theater-mode:hover {
    color: #fff;
    border-color: #374151;
}

/* 16:9 Video Canvas Surface */
.video-frame-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.video-frame-container video {
    width: 100% !important;
    height: 100% !important;
}

/* --------------------------------------------------------------------------
   9. VIDEO.JS CONTROLS - RE-ARCHITECTED FOR MPV/POTPLAYER EXPERIENCE
   -------------------------------------------------------------------------- */

/* Hide default clutter */
.video-js .vjs-remaining-time,
.video-js .vjs-time-control {
    display: none !important;
}

/* Big Play Button: Clean, semi-transparent circular glass, NO pink glow */
.video-js .vjs-big-play-button {
    width: 68px !important;
    height: 68px !important;
    line-height: 66px !important;
    border-radius: 50% !important;
    background: rgba(18, 21, 28, 0.72) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-size: 2.2em !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

.video-js:hover .vjs-big-play-button {
    background: rgba(225, 29, 72, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: translate(-50%, -50%) scale(1.08) !important;
    box-shadow: 0 10px 32px rgba(225, 29, 72, 0.45) !important;
}

/* In-Player Top HUD (Visible in Fullscreen!) */
.vjs-top-hud {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 56px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: linear-gradient(to bottom, rgba(9, 11, 15, 0.92) 0%, rgba(9, 11, 15, 0.4) 75%, transparent 100%) !important;
    z-index: 25 !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    pointer-events: auto !important;
    direction: rtl !important;
    font-family: 'Dana', Tahoma, sans-serif !important;
}

.video-js.vjs-user-inactive.vjs-playing .vjs-top-hud {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.vjs-top-hud-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vjs-hud-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 28px;
    user-select: none;
    pointer-events: none;
}

.vjs-hud-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vjs-top-hud-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: 'Dana', Tahoma, sans-serif !important;
    text-align: right;
}

.vjs-hud-ep,
.vjs-hud-series {
    font-family: 'Dana', Tahoma, sans-serif !important;
    font-variant-numeric: normal;
}

.vjs-hud-ep {
    font-size: .92rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.vjs-hud-series {
    font-size: .72rem !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

.vjs-hud-ep {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.vjs-hud-series {
    font-size: 0.78rem;
    color: var(--cinema-text-secondary);
    line-height: 1.2;
}

.vjs-top-hud-left {
    display: flex;
    align-items: center;
}

.vjs-top-hud-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.vjs-top-hud-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Fullscreen: size only the element promoted by Video.js. Fixing both the
   player and its parent creates a nested 100vw/100vh box on mobile browsers. */
.video-js.vjs-fullscreen,
.video-js:fullscreen,
.video-js:-webkit-full-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: unset !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 999999 !important;
    background: #000 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    transform: none !important;
}

.video-js.vjs-fullscreen video,
.video-js.vjs-fullscreen .vjs-tech,
.video-js:fullscreen video,
.video-js:fullscreen .vjs-tech,
.video-js:-webkit-full-screen video,
.video-js:-webkit-full-screen .vjs-tech {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

.vjs-top-hud-titles {
    display: flex;
    flex-direction: column;
}

.vjs-hud-ep {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.vjs-hud-series {
    font-size: 0.78rem;
    color: var(--cinema-text-secondary);
}

/* In-Player On-Screen Display (OSD) Overlay Pill */
.player-osd-pill {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(12, 15, 22, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 9px 24px;
    border-radius: var(--radius-pill);
    font-size: 0.94rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    pointer-events: none;
    z-index: 150;
    opacity: 0;
    transition: all var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
}

.player-osd-pill.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Control Bar: Full-Width Timeline on Top, Control Buttons Below */
.video-js .vjs-control-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 56px !important;
    padding: 0 16px 8px !important;
    background: linear-gradient(to top, rgba(9, 11, 15, 0.95) 0%, rgba(9, 11, 15, 0.5) 75%, transparent 100%) !important;
    z-index: 20 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    align-items: center !important;
}

/* 1. Full-Width Independent Timeline on Top */
.video-js .vjs-progress-control {
    order: 1 !important;
    width: 100% !important;
    height: 16px !important;
    margin-bottom: 4px !important;
    position: static !important;
    display: flex !important;
    align-items: center !important;
}

.video-js .vjs-progress-control .vjs-progress-holder {
    height: 5px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    transition: height 0.15s ease !important;
}

.video-js .vjs-progress-control:hover .vjs-progress-holder {
    height: 8px !important;
}

.video-js .vjs-play-progress {
    background: var(--cinema-brand-coral, #FF5C68) !important;
    border-radius: 4px !important;
}

.video-js .vjs-play-progress:before {
    font-size: 14px !important;
    color: #fff !important;
    top: 50% !important;
    right: -7px !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8) !important;
}

/* 2. Controls Row: Clean Spacing & Touch Surface */
.video-js .vjs-play-control {
    order: 10 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: var(--radius-sm) !important;
    transition: background var(--transition-fast) !important;
}

.video-js .vjs-prev-ep-btn {
    order: 11 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--cinema-text-primary) !important;
    font-size: 1.05rem !important;
    transition: all var(--transition-fast) !important;
}

.video-js .vjs-next-ep-btn {
    order: 12 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--cinema-text-primary) !important;
    font-size: 1.05rem !important;
    transition: all var(--transition-fast) !important;
}

.video-js .vjs-prev-ep-btn:hover,
.video-js .vjs-next-ep-btn:hover,
.video-js .vjs-play-control:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.video-js .vjs-volume-panel {
    order: 13 !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Custom Tabular Time Display: 00:10 / 23:42 */
.vjs-time-display-custom {
    order: 14 !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 38px !important;
    line-height: 38px !important;
    gap: 4px !important;
    font-family: 'Dana', monospace !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
    color: #E5E7EB !important;
    padding: 0 10px !important;
    direction: ltr !important;
    white-space: nowrap !important;
}

.vjs-time-display-custom .vjs-time-sep {
    color: #6B7280;
    margin: 0 3px;
}

/* Custom Spacer to push right and left controls */
.vjs-custom-spacer {
    order: 20 !important;
    flex: 1 !important;
}

/* Explicitly hide all Video.js hidden and redundant built-in controls so they don't consume space */
.video-js .vjs-hidden,
.video-js .vjs-control-bar .vjs-hidden,
.video-js .vjs-control-bar .vjs-current-time,
.video-js .vjs-control-bar .vjs-duration,
.video-js .vjs-control-bar .vjs-remaining-time,
.video-js .vjs-control-bar .vjs-time-divider,
.video-js .vjs-control-bar .vjs-seek-to-live-control,
.video-js .vjs-control-bar .vjs-live-control,
.video-js .vjs-control-bar .vjs-custom-control-spacer,
.video-js .vjs-control-bar .vjs-playback-rate,
.video-js .vjs-control-bar .vjs-chapters-button,
.video-js .vjs-control-bar .vjs-descriptions-button,
.video-js .vjs-control-bar .vjs-subs-caps-button,
.video-js .vjs-control-bar .vjs-audio-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
}

@media (min-width: 641px) {
    /* Universal button normalization for control bar - perfect horizontal baseline */
    .video-js .vjs-control-bar .vjs-control:not(.vjs-hidden):not(.vjs-progress-control):not(.vjs-custom-spacer):not(.vjs-time-display-custom):not(.vjs-time-control):not(.vjs-seek-to-live-control):not(.vjs-volume-panel):not(.vjs-volume-control),
    .video-js .vjs-control-bar .vjs-button:not(.vjs-hidden):not(.vjs-time-control) {
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        padding: 0 !important;
        margin: 0 2px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        vertical-align: middle !important;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: var(--radius-sm, 6px) !important;
        color: var(--cinema-text-primary, #E5E7EB) !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
        transition: background 0.15s ease, color 0.15s ease !important;
    }

    .video-js .vjs-control-bar .vjs-control:hover,
    .video-js .vjs-control-bar .vjs-button:hover {
        background: rgba(255, 255, 255, 0.14) !important;
        color: #fff !important;
    }

    .video-js .vjs-control-bar .vjs-volume-panel:hover,
    .video-js .vjs-control-bar .vjs-volume-panel:focus-within,
    .video-js .vjs-control-bar .vjs-volume-control:hover,
    .video-js .vjs-control-bar .vjs-volume-control:focus,
    .video-js .vjs-control-bar .vjs-volume-control:focus-visible {
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .video-js .vjs-volume-panel .vjs-mute-control:hover,
    .video-js .vjs-volume-panel .vjs-mute-control:focus-visible {
        background: rgba(255, 255, 255, 0.14) !important;
    }

    .video-js .vjs-control-bar .vjs-control:focus,
    .video-js .vjs-control-bar .vjs-control:focus-visible,
    .video-js .vjs-control-bar .vjs-button:focus,
    .video-js .vjs-control-bar .vjs-button:focus-visible {
        outline: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    .video-js .vjs-control-bar .vjs-icon-placeholder:before {
        font-size: 1.25rem !important;
        line-height: 38px !important;
        height: 38px !important;
        width: 38px !important;
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .video-js .vjs-control-bar i {
        font-size: 1.05rem !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .video-js .vjs-control-bar .vjs-volume-panel {
        width: 112px !important;
        min-width: 112px !important;
        max-width: 112px !important;
        height: 38px !important;
        margin: 0 4px !important;
        display: inline-flex !important;
        align-items: center !important;
        overflow: visible !important;
    }

    .video-js .vjs-volume-panel .vjs-mute-control {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        flex: 0 0 38px !important;
    }

    .video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {
        position: relative !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 68px !important;
        min-width: 68px !important;
        height: 38px !important;
        margin: 0 !important;
        align-items: center !important;
    }

    .video-js .vjs-volume-panel .vjs-volume-bar.vjs-slider-horizontal {
        width: 58px !important;
        height: 4px !important;
        margin: 0 5px !important;
        top: auto !important;
    }

    .video-js .vjs-volume-level:before {
        top: 50% !important;
        right: -6px !important;
        transform: translateY(-50%) !important;
        font-size: 12px !important;
        line-height: 1 !important;
    }
}

/* Specific orders for right side controls */
.video-js .vjs-subs-pill-btn {
    order: 30 !important;
}

.video-js .vjs-settings-btn {
    order: 31 !important;
}

.video-js .vjs-picture-in-picture-control {
    order: 32 !important;
}

.video-js .vjs-theater-btn {
    order: 33 !important;
}

.theater-mode-glyph {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 2px;
    box-sizing: border-box;
}

.theater-mode-glyph::after {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .8;
}

.video-js .vjs-fullscreen-control {
    order: 34 !important;
}

/* In-Video Popovers (Visible in Fullscreen, anchored bottom-right above buttons) */
.vjs-player-popover {
    position: absolute;
    bottom: 64px;
    right: 18px;
    left: auto;
    width: 250px;
    background: rgba(18, 21, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8);
    z-index: 100;
    animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
    direction: rtl;
    text-align: right;
    font-family: 'Dana', sans-serif;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.vjs-player-popover .popover-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
}

.vjs-player-popover .popover-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.popover-back-btn {
    background: none;
    border: none;
    color: var(--cinema-text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.popover-back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.popover-close-btn {
    background: none;
    border: none;
    color: var(--cinema-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
}

.popover-close-btn:hover {
    color: #fff;
}

/* YouTube-Style Settings Menu */
.settings-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #E5E7EB;
    transition: background var(--transition-fast);
}

.settings-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.settings-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-item-info i {
    width: 16px;
    color: var(--cinema-text-secondary);
}

.settings-item-val {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cinema-text-secondary);
    font-size: 0.85rem;
}

.settings-speed-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
}

.settings-speed-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: #D1D5DB;
    transition: all var(--transition-fast);
}

.settings-speed-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.settings-speed-item.active {
    color: var(--cinema-brand-coral, #FF5C68);
    font-weight: 700;
}

.speed-check-slot {
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cinema-brand-coral, #FF5C68);
    font-size: 0.85rem;
}

.badge-quality-tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
}

/* Subtitles Popover */
.vjs-subs-popover {
    min-width: 260px;
}

.subs-popover-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subs-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
}

.btn-sub-toggle-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sub-toggle-pill.off {
    background: rgba(225, 29, 72, 0.15);
    border-color: rgba(225, 29, 72, 0.3);
    color: var(--cinema-brand-coral);
}

.subs-offset-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
}

.offset-chips-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.offset-chips-mini button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.76rem;
    cursor: pointer;
}

.offset-chips-mini button:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* In-Player Loading Error Overlay */
.player-error-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 13, 19, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    padding: 24px;
    direction: rtl;
    text-align: center;
    animation: popoverFadeIn 0.2s ease;
}

.player-error-card {
    max-width: 440px;
    width: 100%;
    background: rgba(22, 26, 36, 0.95);
    border: 1px solid rgba(255, 92, 104, 0.35);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.player-error-icon {
    font-size: 2.5rem;
    color: var(--cinema-brand-coral, #FF5C68);
    margin-bottom: 4px;
}

.player-error-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.player-error-msg {
    font-size: 0.92rem;
    color: var(--cinema-text-secondary);
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.player-error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

/* --------------------------------------------------------------------------
   10. SLEEK EPISODE RAIL SIDEBAR (DARK SCROLLBAR)
   -------------------------------------------------------------------------- */
.rail-panel-card {
    background-color: var(--cinema-panel);
    border: 1px solid var(--cinema-border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 100px);
    overflow: hidden;
}

.rail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cinema-border-subtle);
    margin-bottom: 8px;
}

.rail-card-header h3 {
    font-size: 0.98rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.ep-count-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--cinema-elevated);
    color: var(--cinema-text-secondary);
    font-weight: 600;
}

/* Episode List & Dark Scrollbar */
.video-list-minimal {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #252B3A transparent;
}

.video-list-minimal::-webkit-scrollbar {
    width: 6px;
}

.video-list-minimal::-webkit-scrollbar-track {
    background: transparent;
}

.video-list-minimal::-webkit-scrollbar-thumb {
    background: #252B3A;
    border-radius: var(--radius-pill);
}

.video-list-minimal::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Episode Row */
.ep-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    outline: none;
}

.ep-row-item:hover {
    background: var(--cinema-elevated);
}

.ep-row-item.active-ep {
    background: rgba(225, 29, 72, 0.09);
    border-right: 3px solid var(--cinema-brand-coral);
    border-radius: 2px var(--radius-md) var(--radius-md) 2px;
}

.ep-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ep-row-num {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--cinema-elevated);
    color: var(--cinema-text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    font-family: 'Dana', Tahoma, sans-serif !important;
    font-variant-numeric: normal;
}

.ep-row-title,
.ep-row-meta,
.ep-playing-tag,
.ep-count-badge {
    font-family: 'Dana', Tahoma, sans-serif !important;
    font-variant-numeric: normal;
}

.ep-row-item:hover .ep-row-num {
    color: #fff;
    background: #252B3A;
}

.active-ep .ep-row-num {
    background: var(--cinema-brand);
    color: #fff;
}

.ep-row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ep-row-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--cinema-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-row-meta {
    font-size: 0.74rem;
    color: var(--cinema-text-muted);
}

.ep-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ep-play-icon {
    color: var(--cinema-text-muted);
    font-size: 0.82rem;
    transition: color var(--transition-fast);
}

.ep-row-item:hover .ep-play-icon {
    color: var(--cinema-brand-coral);
}

.ep-playing-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--cinema-brand-coral);
    background: rgba(225, 29, 72, 0.12);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cinema-brand-coral);
    animation: pulseGlow 1.5s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Loading & Empty States */
.loading, .no-videos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--cinema-text-secondary);
    gap: 10px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   11. SUBTITLE & PARTY COLLAPSIBLE SHELVES
   -------------------------------------------------------------------------- */
.player-action-shelf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cinema-panel);
    border: 1px solid var(--cinema-border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-top: 10px;
}

.action-shelf-left, .action-shelf-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-shelf-pill {
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-shelf-pill:hover {
    background: var(--cinema-hover);
    border-color: #374151;
}

.btn-shelf-pill.pill-subtle {
    color: var(--cinema-text-secondary);
}

.cinema-collapsible-shelf {
    background: var(--cinema-panel);
    border: 1px solid var(--cinema-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
    animation: drawerSlideDown 0.2s ease;
}

.shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shelf-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cinema-text-primary);
}

.btn-close-shelf {
    background: none;
    border: none;
    color: var(--cinema-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
}

.btn-close-shelf:hover {
    color: #fff;
}

.subtitles-clean-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-sub-toggle, .btn-sub-upload {
    background: var(--cinema-elevated);
    border: 1px solid var(--cinema-border);
    color: var(--cinema-text-primary);
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-sub-toggle:hover, .btn-sub-upload:hover {
    background: var(--cinema-hover);
}

/* Subtitle Track Items & Custom Buttons */
.track-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--cinema-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--cinema-border);
    margin-bottom: 6px;
}

.track-btn {
    background: var(--cinema-input-bg) !important;
    border: 1px solid var(--cinema-border) !important;
    color: var(--cinema-text-primary) !important;
    font-family: 'Dana', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
}

.track-btn:hover {
    background: var(--cinema-hover) !important;
    border-color: var(--cinema-brand) !important;
}

.track-btn.ass-btn {
    border-color: rgba(225, 29, 72, 0.4) !important;
}

/* Fix "بارگذاری به صورت ASS ASS" double text bug */
.track-btn .btn-text-short {
    display: none !important;
}

@media (max-width: 480px) {
    .track-btn .btn-text-full {
        display: none !important;
    }
    .track-btn .btn-text-short {
        display: inline !important;
    }
}

/* Watch Party State Card (Mobile Friendly) */
.party-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 16px;
    gap: 8px;
    background: var(--cinema-elevated);
    border-radius: var(--radius-md);
    border: 1px dashed var(--cinema-border);
}

.party-state-icon {
    font-size: 2rem;
    color: var(--cinema-brand-coral);
    margin-bottom: 4px;
}

.party-state-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.party-state-desc {
    font-size: 0.82rem;
    color: var(--cinema-text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

.party-state-card button {
    white-space: nowrap !important;
    width: auto !important;
    min-width: 190px !important;
    padding: 8px 18px !important;
    font-size: 0.88rem !important;
}

/* Watch-party chat workspace */
.watch-party-panels { direction: rtl; }

.party-active-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--cinema-border-subtle);
    border-radius: var(--radius-md);
}

.party-status-tag, .party-member-summary {
    display: flex;
    align-items: center;
    gap: 7px;
}

.room-tag {
    direction: ltr;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #fff;
    letter-spacing: .04em;
}

.party-members-block {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--cinema-border-subtle);
    border-radius: var(--radius-md);
}

.party-member-summary {
    color: var(--cinema-text-secondary);
    font-size: .8rem;
    margin-bottom: 8px;
}

.party-participants-list { display: flex; flex-wrap: wrap; gap: 7px; }

.participant-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 9px;
    background: #171b24;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    color: #e9edf5;
    font-size: .78rem;
}

.participant-badge { padding: 2px 5px; border-radius: 4px; font-size: .62rem; font-weight: 800; }
.participant-badge.host { background: rgba(245,158,11,.16); color: #fbbf24; }
.participant-badge.you { background: rgba(255,92,104,.15); color: #ff8790; }

.party-chat-shell {
    margin-top: 12px;
    overflow: hidden;
    background: #0c0f15;
    border: 1px solid var(--cinema-border-subtle);
    border-radius: var(--radius-lg);
}

.party-chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #f4f6fa;
    font-size: .84rem;
    font-weight: 700;
    border-bottom: 1px solid var(--cinema-border-subtle);
}

.party-chat-messages {
    height: 240px;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #303746 transparent;
}

.chat-message {
    align-self: flex-start;
    max-width: min(78%, 520px);
    padding: 8px 11px;
    background: #1a1f2a;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px 12px 12px 3px;
}

.chat-message.own-message {
    align-self: flex-end;
    background: rgba(225,29,72,.18);
    border-color: rgba(255,92,104,.25);
    border-radius: 12px 12px 3px 12px;
}

.chat-message-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 3px; font-size: .68rem; }
.chat-message-user { color: #ff8790; font-weight: 700; }
.chat-message-time { color: #737b8c; direction: ltr; }
.chat-message-content { color: #f2f4f8; font-size: .84rem; line-height: 1.6; overflow-wrap: anywhere; }

.chat-message.system.action-log {
    align-self: center;
    max-width: 92%;
    padding: 5px 10px;
    background: transparent;
    border: 0;
    color: #7f8797;
    font-size: .72rem;
    text-align: center;
}

.party-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--cinema-border-subtle);
    background: #11151d;
}

.party-chat-input { min-width: 0; height: 42px !important; }
.party-chat-send { width: 42px !important; height: 42px !important; padding: 0 !important; border-radius: 10px !important; }

/* --------------------------------------------------------------------------
   12. NOTIFICATIONS & MODALS
   -------------------------------------------------------------------------- */
.notification-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    max-width: 360px;
}

.notification {
    background: var(--cinema-panel);
    border: 1px solid var(--cinema-border);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: drawerSlideDown 0.2s ease;
}

.notification-message {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--cinema-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}

.notification-close:hover {
    color: #fff;
}

.cinema-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.cinema-modal-card {
    background: var(--cinema-panel);
    border: 1px solid var(--cinema-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.8);
    animation: drawerSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header-simple h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--cinema-text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #fff;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--cinema-text-secondary);
}

.tips-list li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
    padding: 11px 12px;
    line-height: 1.6;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
}

.tips-list li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--cinema-green);
    background: rgba(16,185,129,.1);
    border-radius: 9px;
    margin: 0;
}

.tips-list li div { min-width: 0; }
.tips-list li strong { display: block; color: #f5f7fb; margin-bottom: 2px; font-size: .86rem; }
.tips-list li span { display: block; color: var(--cinema-text-secondary); font-size: .8rem; }

.tips-list kbd {
    display: inline-flex;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    margin: 2px 1px;
    align-items: center;
    justify-content: center;
    direction: ltr;
    font: 600 .7rem ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #eef1f7;
    background: #202632;
    border: 1px solid #394150;
    border-bottom-width: 2px;
    border-radius: 5px;
}

.help-modal-card {
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.help-modal-card .tips-list { min-height: 0; overflow-y: auto; padding-left: 3px; }
.help-modal-footer { display: flex; justify-content: flex-start; flex: 0 0 auto; margin-top: 14px; }
.help-modal-confirm { height: 40px; min-width: 120px; padding: 0 20px; }

@media (max-width: 520px) {
    .help-modal-card { padding: 18px 16px; max-height: calc(100dvh - 24px); }
    .tips-list li { grid-template-columns: 32px minmax(0, 1fr); padding: 10px; gap: 10px; }
    .tips-list li i { width: 32px; height: 32px; }
    .help-modal-confirm { width: 100%; }
}

/* --------------------------------------------------------------------------
   13. MOBILE RESPONSIVE (390PX & BELOW)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .cinema-stage {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .rail-panel-card {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .cinema-navbar {
        padding: 0 14px;
        height: 52px;
    }

    .brand-badge {
        padding: 0;
        font-size: 0.85rem;
    }

    .brand-logo-img {
        width: 76px;
        height: 23px;
    }

    .navbar-breadcrumbs {
        font-size: 0.78rem;
    }

    .btn-nav-action span {
        display: none;
    }

    .btn-nav-action {
        padding: 6px 10px;
    }

    .browse-grid {
        grid-template-columns: 1fr;
    }

    .cinema-stage {
        padding: 12px;
        gap: 14px;
    }

    .hero-content-card {
        padding: 16px;
    }

    .hero-showcase-container {
        gap: 14px;
    }

    .hero-poster-wrapper {
        width: 105px;
        height: 155px;
    }

    .hero-main-title {
        font-size: 1.25rem;
    }

    .hero-sub-title {
        font-size: 0.82rem;
    }

    .hero-description {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.8rem;
    }

    .hero-action-buttons {
        gap: 8px;
    }

    .hero-action-buttons button {
        flex: 1;
        min-width: 130px;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .desktop-only-inline {
        display: none !important;
    }

    .player-action-shelf {
        padding: 8px 10px;
    }

    .btn-shelf-pill {
        padding: 5px 10px;
        font-size: 0.78rem;
    }

    .vjs-time-display-custom {
        order: 11 !important;
        font-size: 0.8rem !important;
        padding: 0 4px !important;
        letter-spacing: -0.5px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .video-js .vjs-control-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 0 8px 6px !important;
        height: auto !important;
        min-height: 64px !important;
        align-items: center !important;
    }

    /* 1. Independent full-width timeline row */
    .video-js .vjs-progress-control {
        order: 1 !important;
        width: 100% !important;
        flex-basis: 100% !important;
        height: 20px !important;
        margin: 0 0 4px 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .video-js .vjs-progress-control .vjs-progress-holder {
        height: 5px !important;
    }

    /* Hide redundant controls on mobile to prevent overlapping */
    .video-js .vjs-volume-panel,
    .video-js .vjs-volume-control,
    .video-js .vjs-picture-in-picture-control,
    .video-js .vjs-prev-ep-btn,
    .video-js .vjs-next-ep-btn {
        display: none !important;
    }

    /* 2. Row 2: Play (44x44), Time, Spacer, CC (44x44), Speed (44x44), Fullscreen (44x44) */
    .video-js .vjs-control-bar .vjs-control.vjs-play-control,
    .video-js .vjs-control-bar .vjs-button.vjs-play-control {
        order: 10 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 4px !important;
    }

    .vjs-custom-spacer {
        order: 12 !important;
        flex: 1 !important;
    }

    .video-js .vjs-control-bar .vjs-control.vjs-subs-pill-btn,
    .video-js .vjs-control-bar .vjs-button.vjs-subs-pill-btn {
        order: 13 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 4px !important;
    }

    .video-js .vjs-control-bar .vjs-control.vjs-settings-btn,
    .video-js .vjs-control-bar .vjs-button.vjs-settings-btn {
        order: 14 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--cinema-text-primary) !important;
        font-size: 1.15rem !important;
        margin: 0 4px !important;
    }

    .video-js .vjs-control-bar .vjs-control.vjs-fullscreen-control,
    .video-js .vjs-control-bar .vjs-button.vjs-fullscreen-control {
        order: 15 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 4px !important;
    }

    .video-js .vjs-control-bar .vjs-control.vjs-prev-ep-btn,
    .video-js .vjs-control-bar .vjs-control.vjs-next-ep-btn,
    .video-js .vjs-control-bar .vjs-control.vjs-theater-btn,
    .video-js .vjs-control-bar .vjs-control.vjs-picture-in-picture-control,
    .video-js .vjs-control-bar .vjs-button.vjs-prev-ep-btn,
    .video-js .vjs-control-bar .vjs-button.vjs-next-ep-btn,
    .video-js .vjs-control-bar .vjs-button.vjs-theater-btn,
    .video-js .vjs-control-bar .vjs-button.vjs-picture-in-picture-control {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    }

    /* Mobile Bottom Sheet for Popovers (Fixed to bottom, max-height: 65vh, scrollable) */
    .vjs-player-popover {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 65vh !important;
        overflow-y: auto !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9) !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        z-index: 100 !important;
        animation: bottomSheetSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    @keyframes bottomSheetSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .vjs-player-popover .popover-close-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 1.5rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .vjs-hud-brand {
        width: 68px !important;
        height: 24px !important;
    }

    .vjs-top-hud {
        padding: 0 12px !important;
    }

    .btn-sub-toggle-pill {
        min-height: 44px !important;
        padding: 0 16px !important;
        font-size: 0.92rem !important;
    }

    /* Clean mobile control bar: hide crowded secondary controls, keep essential 44px controls */
    .video-js .vjs-prev-ep-btn,
    .video-js .vjs-next-ep-btn,
    .video-js .vjs-theater-btn,
    .video-js .vjs-picture-in-picture-control {
        display: none !important;
    }

    .mobile-only-setting {
        display: flex !important;
    }

    /* Move notification toast to top of screen on mobile so it doesn't cover episode cards */
    .notification-container {
        top: 16px !important;
        bottom: auto !important;
        left: 16px !important;
        right: 16px !important;
        max-width: calc(100% - 32px) !important;
        z-index: 99999 !important;
    }

    .offset-chips-mini button {
        min-height: 40px !important;
        min-width: 50px !important;
        font-size: 0.88rem !important;
    }
}

/* Hidden by default on desktop */
.mobile-only-setting {
    display: none;
}

/* Cinema Non-Blocking Confirmation Modal */
.cinema-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    animation: popoverFadeIn 0.18s ease;
}

.cinema-confirm-card {
    background: rgba(18, 21, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg, 16px);
    padding: 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
    text-align: center;
    direction: rtl;
    color: #fff;
}

.cinema-confirm-icon {
    font-size: 2.2rem;
    color: var(--cinema-brand-coral, #FF5C68);
    margin-bottom: 12px;
}

.cinema-confirm-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.cinema-confirm-desc {
    font-size: 0.9rem;
    color: var(--cinema-text-secondary, #9CA3AF);
    margin-bottom: 22px;
    line-height: 1.6;
}

.cinema-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cinema-confirm-actions button {
    flex: 1;
    min-height: 42px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Active Episode Live Status Dots */
.pulse-dot.is-playing {
    background: #22C55E !important;
    box-shadow: 0 0 10px #22C55E !important;
}

.pulse-dot.is-paused {
    background: #EAB308 !important;
    box-shadow: 0 0 10px #EAB308 !important;
    animation: none !important;
}

.pulse-dot.is-ready {
    background: #FF5C68 !important;
    box-shadow: 0 0 10px #FF5C68 !important;
}


/* ---- User Subtitle Upload (In-Player Popover & Shelf) ---- */
.subs-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 8px;
    flex-wrap: wrap;
}

.btn-sub-upload-player {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    color: var(--cinema-text-primary, #E5E7EB);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-family: inherit;
}

.btn-sub-upload-player:hover {
    background: rgba(255, 92, 104, 0.18);
    border-color: var(--cinema-brand-coral, #FF5C68);
    color: #fff;
}

.btn-sub-upload-player i {
    font-size: 0.9rem;
    color: var(--cinema-brand-coral, #FF5C68);
}

.sub-upload-hint {
    font-size: 0.75rem;
    color: var(--cinema-text-secondary, #6B7280);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ---- Drag and Drop Subtitle Overlay ---- */
.vjs-sub-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483640;
    background: rgba(10, 12, 16, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.vjs-sub-drop-overlay.active {
    display: flex !important;
}

.sub-drop-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 48px;
    border: 2px dashed var(--cinema-brand-coral, #FF5C68);
    border-radius: 16px;
    background: rgba(255, 92, 104, 0.08);
    box-shadow: 0 0 35px rgba(255, 92, 104, 0.25);
    text-align: center;
    animation: subDropPulse 1.6s infinite ease-in-out;
}

.sub-drop-box i {
    font-size: 3.2rem;
    color: var(--cinema-brand-coral, #FF5C68);
    margin-bottom: 14px;
    filter: drop-shadow(0 0 10px rgba(255, 92, 104, 0.4));
}

.sub-drop-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.sub-drop-sub {
    font-size: 0.88rem;
    color: #9CA3AF;
}

@keyframes subDropPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(255, 92, 104, 0.2); }
    50% { transform: scale(1.03); box-shadow: 0 0 45px rgba(255, 92, 104, 0.45); }
}

/* Subtitle track picker inside the player (2026-10-20) */
.subs-tracks-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.subs-tracks-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    gap: 6px;
}

.subs-track-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 190px;
    overflow-y: auto;
}

.subs-track-list.loading {
    opacity: 0.55;
    pointer-events: none;
}

.subs-track-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: inherit;
    font-size: 0.8rem;
    text-align: right;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.subs-track-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.subs-track-item.active {
    border-color: var(--cinema-brand-coral, #e11d48);
    background: rgba(225, 29, 72, 0.16);
}

.subs-track-check {
    width: 14px;
    flex: none;
    color: var(--cinema-brand-coral, #e11d48);
    font-size: 0.74rem;
}

.subs-track-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.subs-track-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subs-track-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
}

.subs-track-empty {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 2px;
}
