/* ═══════════════════════════════════════════════
   Content Pages — CapPlayer Android TV Design
   Live TV, Movies, Series, Replay
   ═══════════════════════════════════════════════ */

/* ─── Shared variables (inherit from home_dashboard) ─── */
.cp-page {
    --gold: #E2B84B;
    --gold-soft: #D4A843;
    --gold-glow: rgba(226,184,75,0.25);
    --bg-deep: #06060E;
    --bg-primary: #0F0F1A;
    --surface: rgba(255,255,255,0.03);
    --surface-hover: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.06);
    --divider: rgba(255,255,255,0.08);
    --text-primary: #F0EDE6;
    --text-secondary: rgba(240,237,230,0.5);
    --text-tertiary: rgba(240,237,230,0.28);
    --focus-color: #E2B84B;
    --cat-panel-bg: rgba(4,2,10,0.10);
    --right-panel-bg: #0A0A1A;

    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
    color: var(--text-primary);
    display: flex;
    flex-direction: row;
}

/* Background */
.cp-bg-image {
    position: absolute;
    inset: 0;
    background: url('../images/background_violet.png') center/cover no-repeat;
    z-index: 0;
}
.cp-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4,2,10,0.82);
    z-index: 1;
}

/* ─── 3-column TV layout ─── */
/* Left: Categories | Middle: Items list/grid | Right: Preview (live only) */

.cp-col-left {
    position: relative;
    z-index: 2;
    flex: 0 0 220px;
    background: var(--cat-panel-bg);
    border-right: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    padding-top: 10px;
    overflow: hidden;
}

.cp-col-middle {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cp-col-right {
    position: relative;
    z-index: 2;
    flex: 0 0 38%;
    background: var(--right-panel-bg);
    border-left: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    padding: 8px;
    overflow: hidden;
}

/* ─── Category Search ─── */
.cp-cat-search {
    height: 36px;
    margin: 0 8px 8px;
    padding: 0 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    flex-shrink: 0;
}
.cp-cat-search::placeholder {
    color: rgba(255,255,255,0.3);
}
.cp-cat-search:focus {
    border-color: var(--gold);
}

/* ─── Category List ─── */
.cp-cat-list {
    flex: 1;
    overflow-y: auto;
    padding: 3px 4px 24px;
}
.cp-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 12px;
    margin: 2px 4px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    overflow: hidden;
}
.cp-cat-item .cp-cat-name {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 6px;
}
.cp-cat-item .cp-cat-count {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.cp-cat-item.active {
    border-color: var(--focus-color);
    background: rgba(226,184,75,0.08);
}
.cp-cat-item.active .cp-cat-name {
    color: #fff;
    font-weight: 700;
}
.cp-cat-item.current {
    background: rgba(226,184,75,0.06);
}
.cp-cat-item.current .cp-cat-name {
    color: var(--gold);
}

/* ─── Top Pills Row (All / Favorites / Recent) ─── */
.cp-pills-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 6px;
    flex-shrink: 0;
}
.cp-pill {
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cp-pill.active {
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    border-color: var(--gold);
}
.cp-pill.focused {
    border-color: var(--gold);
    background: rgba(226,184,75,0.12);
    color: var(--gold);
}
.cp-pill i {
    font-size: 12px;
}

/* ─── Action Buttons Row (Search, Sort) ─── */
.cp-actions-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 8px;
    flex-shrink: 0;
}
.cp-action-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.cp-action-btn.active {
    border-color: var(--focus-color);
    background: rgba(226,184,75,0.08);
    color: #fff;
}
.cp-action-btn i {
    font-size: 11px;
    color: var(--gold);
}

/* Inline search field */
.cp-search-field {
    flex: 0 0 34px;
    max-width: 100%;
    height: 34px;
    padding: 0 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.cp-search-field::placeholder {
    color: rgba(255,255,255,0.3);
}
.cp-search-field:focus,
.cp-search-field.active {
    border-color: var(--gold);
}

/* ─── Content count ─── */
.cp-content-count {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    padding: 2px 16px 6px;
    flex-shrink: 0;
}

/* ─── Page Title (top of middle col) ─── */
.cp-page-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    padding: 10px 16px 0;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   LIVE TV PAGE — 3-column layout
   ═══════════════════════════════════════════════ */

/* Channel list area (middle column for live) */
.cp-channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 6px 16px;
}
.cp-channel-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    padding: 8px 12px 6px;
    flex-shrink: 0;
}

/* Channel row item */
.cp-channel-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    margin: 1px 4px;
    border-radius: 6px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    gap: 10px;
}
.cp-channel-item.active {
    background: rgba(226,184,75,0.06);
    border-color: var(--focus-color);
}
.cp-channel-num {
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}
.cp-channel-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    object-fit: contain;
    padding: 4px;
    flex-shrink: 0;
}
.cp-channel-name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.cp-channel-item.active .cp-channel-name {
    color: #fff;
    font-weight: 600;
}
.cp-channel-fav {
    font-size: 12px;
    color: #FFD700;
    flex-shrink: 0;
}
.cp-channel-adult {
    font-size: 10px;
    font-weight: 700;
    color: #FF4444;
    flex-shrink: 0;
}

/* ─── Right Column: Preview + EPG ─── */

/* Pills row in right col (for live) */
.cp-right-pills {
    display: flex;
    gap: 4px;
    padding: 4px 0 6px;
    flex-shrink: 0;
}
.cp-right-pill {
    flex: 1;
    height: 30px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.cp-right-pill.active {
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    border-color: var(--gold);
}
.cp-right-pill.focused {
    border: 2px solid var(--gold);
    box-shadow: 0 0 8px rgba(226,184,75,0.3);
    color: var(--gold);
    font-weight: 700;
    transform: scale(1.05);
}

/* Search button in right col */
.cp-right-search-btn {
    height: 34px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
}

/* Preview player */
.cp-preview-container {
    flex: 1;
    background: #000;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}
.cp-preview-container object,
.cp-preview-container video {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}
.cp-preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cp-preview-placeholder img {
    width: 48px;
    opacity: 0.3;
}
.cp-preview-placeholder span {
    font-size: 12px;
    color: var(--text-tertiary);
}
.cp-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cp-preview-channel-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* EPG section */
.cp-epg-section {
    flex-shrink: 0;
    max-height: 140px;
    overflow-y: auto;
    margin-top: 6px;
}
.cp-epg-header {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    padding: 4px 4px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cp-epg-header span {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 11px;
}
.cp-epg-item {
    display: flex;
    gap: 8px;
    padding: 3px 4px;
    font-size: 11px;
    color: var(--text-secondary);
}
.cp-epg-item.current {
    color: var(--gold);
    font-weight: 600;
}
.cp-epg-time {
    flex-shrink: 0;
    white-space: nowrap;
    font-family: 'Inter', monospace;
    font-size: 10px;
}
.cp-epg-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Bottom hints bar ─── */
.cp-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px 0;
    background: linear-gradient(transparent, rgba(6,6,14,0.9));
}
.cp-hint-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}
.cp-hint-color {
    width: 22px;
    height: 14px;
    border-radius: 3px;
}
.cp-hint-color.red { background: #FF0000; }
.cp-hint-color.yellow { background: #FFD700; }
.cp-hint-color.green { background: #4CAF50; }
.cp-hint-color.blue { background: #2196F3; }

/* ═══════════════════════════════════════════════
   MOVIES / SERIES / REPLAY GRID PAGES
   ═══════════════════════════════════════════════ */

/* Grid layout: 2-column (left cats, right grid) */
.cp-page.cp-grid-page .cp-col-middle {
    flex: 1;
}

/* Grid container */
.cp-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

/* Movie grid item */
.cp-grid-item {
    width: 20%;
    padding: 5px;
    cursor: pointer;
    position: relative;
}
.cp-grid-card {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 2.5px solid transparent;
    overflow: hidden;
    transition: all 0.15s;
    position: relative;
}
.cp-grid-item.active .cp-grid-card {
    border-color: var(--focus-color);
    transform: scale(1.04);
    z-index: 5;
    box-shadow: 0 6px 25px rgba(0,0,0,0.5), 0 0 12px rgba(226,184,75,0.15);
}

/* Poster image */
.cp-grid-poster {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}
.cp-grid-poster-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(30,30,60,0.6), rgba(20,20,45,0.6));
    border-radius: 8px 8px 0 0;
}
.cp-grid-poster-placeholder i {
    font-size: 28px;
    color: rgba(255,255,255,0.08);
}

/* Series/Replay variants */
.cp-grid-item.series-item .cp-grid-poster,
.cp-grid-item.series-item .cp-grid-poster-placeholder {
    height: 220px;
}
.cp-grid-item.replay-item .cp-grid-poster {
    height: 140px;
    object-fit: contain;
    padding: 10px;
    background: rgba(255,255,255,0.03);
}
.cp-grid-item.replay-item .cp-grid-poster-placeholder {
    height: 140px;
}

/* Title bar */
.cp-grid-title {
    font-size: 12px;
    color: #ddd;
    padding: 6px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.cp-grid-item.active .cp-grid-title {
    color: #fff;
    font-weight: 600;
}

/* Favourite badge */
.cp-grid-fav-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-grid-fav-badge i {
    font-size: 12px;
    color: #FF4444;
}

/* Rating chip */
.cp-grid-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.67);
    color: #FFD700;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.cp-grid-rating i {
    font-size: 8px;
}

/* Progress bar */
.cp-grid-progress {
    position: absolute;
    bottom: 32px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.10);
}
.cp-grid-progress-fill {
    height: 100%;
    background: var(--gold);
}

/* Adult overlay */
.cp-grid-adult-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    gap: 4px;
}
.cp-grid-adult-overlay i {
    font-size: 24px;
    color: #FF4444;
}
.cp-grid-adult-overlay span {
    font-size: 12px;
    font-weight: 700;
    color: #FF4444;
}

/* ─── Hide right column for grid pages ─── */
.cp-page.cp-grid-page .cp-col-right {
    display: none;
}

/* ─── Scrollbar hiding ─── */
.cp-cat-list::-webkit-scrollbar,
.cp-channel-list::-webkit-scrollbar,
.cp-grid-container::-webkit-scrollbar,
.cp-epg-section::-webkit-scrollbar {
    display: none;
}

/* ─── Override parent page-container-1 styles when beta ─── */
#channel-page.cp-beta-mode,
#vod-series-page.cp-beta-mode {
    padding-top: 0 !important;
    background: none !important;
    font-size: initial;
    height: 100vh;
    width: 100vw;
    position: absolute;
    inset: 0;
}
.cp-beta-mode .page-top-container,
.cp-beta-mode .page-content-container-1 {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   PARENT CONFIRM MODAL — Android style
   ═══════════════════════════════════════════════ */
body.cp-beta-active #parent-confirm-modal .modal-dialog {
    max-width: 420px;
    min-width: 420px;
}
body.cp-beta-active #parent-confirm-modal .modal-content {
    background: rgba(15,15,26,0.97) !important;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}
body.cp-beta-active #parent-confirm-modal .modal-header {
    background: rgba(226,184,75,0.06) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    padding: 16px 24px;
}
body.cp-beta-active #parent-confirm-modal .modal-title-text-2 {
    color: #E2B84B !important;
    font-size: 20px !important;
    font-weight: 700;
}
body.cp-beta-active #parent-confirm-modal .modal-body-1 {
    padding: 24px !important;
    background: transparent !important;
}
body.cp-beta-active #parent-confirm-modal .parent-modal-label-wrapper {
    color: rgba(240,237,230,0.7) !important;
}
body.cp-beta-active #parent-confirm-modal .parent-modal-label-wrapper label {
    font-size: 14px;
    color: rgba(240,237,230,0.7);
}
body.cp-beta-active #parent-confirm-modal .parent-modal-input-wrapper input {
    background: rgba(255,255,255,0.06) !important;
    border: 2px solid rgba(255,255,255,0.10) !important;
    border-radius: 10px !important;
    color: #F0EDE6 !important;
    font-size: 22px !important;
    padding: 12px 16px !important;
    letter-spacing: 8px;
    text-align: center;
}
body.cp-beta-active #parent-confirm-modal .parent-confirm-item.active input,
body.cp-beta-active #parent-confirm-modal .parent-modal-input-wrapper input:focus {
    border-color: #E2B84B !important;
    box-shadow: 0 0 8px rgba(226,184,75,0.2) !important;
}
body.cp-beta-active #parent-confirm-modal .modal-btn-1 {
    background: rgba(255,255,255,0.06) !important;
    border: 2.5px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    color: rgba(240,237,230,0.6) !important;
    font-size: 16px !important;
    padding: 10px 24px !important;
    min-width: 130px;
    transition: all 0.15s;
    box-shadow: none !important;
}
body.cp-beta-active #parent-confirm-modal .modal-btn-1.active,
body.cp-beta-active #parent-confirm-modal .parent-confirm-item.active .modal-btn-1,
body.cp-beta-active #parent-confirm-modal .parent-confirm-item.active button {
    border-color: #E2B84B !important;
    background: rgba(226,184,75,0.15) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(226,184,75,0.25) !important;
}
body.cp-beta-active #parent-confirm-modal .parent-confirm-item {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
body.cp-beta-active #parent-confirm-modal .parent-confirm-item.active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
body.cp-beta-active #parent-confirm-modal #parent-confirm-password-error {
    color: #FF4444;
    font-size: 14px;
}
body.cp-beta-active .modal-backdrop {
    background: rgba(4,2,10,0.85) !important;
}

/* ─── EPG Progress bar ─── */
.cp-epg-progress {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}
.cp-epg-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.cp-epg-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    font-style: italic;
}

/* ─── Active pill state ─── */
.cp-right-pill.active-pill {
    background: rgba(226,184,75,0.18);
    border-color: var(--gold);
    color: var(--gold);
}

/* ─── Category search focus ─── */
.cp-cat-search.active {
    border-color: var(--focus-color);
    box-shadow: 0 0 0 2px rgba(226,184,75,0.25);
    outline: none;
}

/* ─── Empty state ─── */
.cp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    text-align: center;
}
.cp-empty-state i {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}
.cp-empty-text {
    font-size: 13px;
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   Settings Dashboard — Beta Mode
   ═══════════════════════════════════════════════ */

.sd-page {
    display: flex;
    flex-direction: row;
}
.sd-left {
    position: relative;
    z-index: 2;
    width: 55%;
    height: 100vh;
    padding: 30px 24px 20px 32px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
.sd-right {
    position: relative;
    z-index: 2;
    width: 45%;
    height: 100vh;
    padding: 30px 32px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    box-sizing: border-box;
}
.sd-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.sd-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.sd-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}
.sd-scroll::-webkit-scrollbar { display: none; }

/* Section headers */
.sd-section-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gold);
    padding: 14px 8px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sd-section-header i {
    font-size: 11px;
}

/* Setting items */
.sd-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.15s ease;
    background: var(--surface);
}
.sd-item.focused {
    border-color: var(--focus-color);
    background: rgba(226,184,75,0.08);
    box-shadow: 0 0 0 2px rgba(226,184,75,0.18);
}
.sd-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(226,184,75,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}
.sd-item-icon i {
    color: var(--gold);
    font-size: 13px;
}
.sd-item-text {
    flex: 1;
    min-width: 0;
}
.sd-item-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.sd-item-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}
.sd-item-arrow {
    color: var(--text-tertiary);
    font-size: 10px;
    margin-left: 8px;
}
.sd-item.focused .sd-item-arrow {
    color: var(--focus-color);
}

/* Right panel cards */
.sd-device-card,
.sd-playlist-card,
.sd-about-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 16px;
}
.sd-device-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sd-device-title i {
    font-size: 11px;
}
.sd-device-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--divider);
}
.sd-device-row:last-child {
    border-bottom: none;
}
.sd-device-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.sd-device-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 60%;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sd-status-badge {
    font-weight: 600 !important;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}
.sd-status-badge.sd-status-active {
    color: #4CAF50 !important;
    background: rgba(76,175,80,0.15);
}
.sd-status-badge.sd-status-trial {
    color: #FF9800 !important;
    background: rgba(255,152,0,0.15);
}
.sd-status-badge.sd-status-expired {
    color: #F44336 !important;
    background: rgba(244,67,54,0.15);
}

/* About panel (right side) */
.sd-about-panel {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}
.sd-about-logo img {
    width: 80px;
    height: auto;
    border-radius: 12px;
    opacity: 0.95;
}
.sd-about-version {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.sd-about-disclaimer {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 280px;
}
.sd-about-platform {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--divider);
    margin-top: 4px;
}
.sd-about-platform .sd-device-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.sd-about-platform .sd-device-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    text-transform: capitalize;
}

/* Modal overlay */
.sd-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(4,2,10,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-modal-overlay.hide { display: none; }
.sd-modal-box {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px 24px;
    min-width: 320px;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
}
.sd-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 14px;
}
.sd-modal-body {
    max-height: 50vh;
    overflow-y: auto;
}
.sd-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

/* ═══════════════════════════════════════════════
   Player Overlays — Beta Mode (Phase 6)
   Channel Player + VOD/Series Player
   ═══════════════════════════════════════════════ */

/* ─── Channel Player (fullscreen) ─── */
body.cp-beta-active #channel-player-controls-container {
    padding: 0;
}
body.cp-beta-active #channel-player-progress-controls-container {
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.92), rgba(0,0,0,0.7) 60%, transparent);
    padding: 24px 32px 18px 32px;
    border-radius: 0;
}
body.cp-beta-active #channel-player-icon-container {
    width: 60px;
    left: 32px;
    padding: 0;
}
body.cp-beta-active #channel-player-icon {
    border-radius: 8px;
}
body.cp-beta-active #channel-page-player-channel-name-wrapper {
    font-size: 22px;
    margin: 6px 0 4px 0;
    color: #F0EDE6;
}
body.cp-beta-active #channel-player-channel-number {
    color: var(--gold, #E2B84B);
    font-weight: 700;
    font-size: 20px;
    margin-right: 8px;
}
body.cp-beta-active #channel-page-player-channel-name {
    font-size: 20px;
    font-weight: 500;
    color: #F0EDE6;
}
body.cp-beta-active .video-skin-programme-container {
    font-size: 14px;
    color: rgba(240,237,230,0.6);
}
body.cp-beta-active .video-skin-programme-container.current {
    color: var(--gold, #E2B84B);
}
body.cp-beta-active .video-skin-programme-time {
    font-size: 12px;
    opacity: 0.7;
    margin-right: 6px;
}
body.cp-beta-active #channel-player-title {
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
    font-size: 18px;
    font-weight: 600;
    padding: 14px 24px;
    text-align: left;
    color: #F0EDE6;
}
body.cp-beta-active #channel-page-video-progress-amount2 {
    background: var(--gold, #E2B84B) !important;
}

/* Recent channels modal */
body.cp-beta-active #recent-channels-modal {
    background: rgba(10,10,26,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    right: 32px;
    top: 80px;
    max-height: 60vh;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
body.cp-beta-active .recent-channel-item {
    font-size: 15px;
    color: rgba(240,237,230,0.6);
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 10px 18px;
    width: 280px;
    transition: all 0.12s;
}
body.cp-beta-active .recent-channel-item:last-child {
    border-bottom: none;
}
body.cp-beta-active .recent-channel-item.active {
    background: rgba(226,184,75,0.12);
    color: var(--gold, #E2B84B);
    border-left: 3px solid var(--gold, #E2B84B);
}

/* Resolution dialog */
body.cp-beta-active #resolution-dialog {
    background: rgba(10,10,26,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    max-width: 360px;
    margin: auto;
}
body.cp-beta-active #resolution-dialog .modal-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold, #E2B84B);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 14px 18px;
}
body.cp-beta-active .resolution-option {
    font-size: 14px;
    color: rgba(240,237,230,0.6);
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all 0.12s;
}
body.cp-beta-active .resolution-option.active {
    background: rgba(226,184,75,0.12);
    color: var(--gold, #E2B84B);
}

/* Typed channel number */
body.cp-beta-active #typed-channel-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--gold, #E2B84B);
    background: rgba(0,0,0,0.6);
    padding: 8px 20px;
    border-radius: 10px;
    left: 40px;
    top: 40px;
    transform: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ─── VOD/Series Player ─── */
body.cp-beta-active #vod-series-video-controls-container {
    background: linear-gradient(to top, rgba(0,0,0,0.92), rgba(0,0,0,0.6) 70%, transparent) !important;
}
body.cp-beta-active #vod-series-progress-controls-container {
    background: transparent !important;
}
body.cp-beta-active #video-player-name-time-container {
    padding: 14px 32px;
}
body.cp-beta-active #vod-series-video-title {
    font-size: 20px;
    color: var(--gold, #E2B84B);
    font-weight: 600;
    margin-bottom: 4px;
}
body.cp-beta-active #video-name {
    font-size: 22px;
    font-weight: 600;
    color: #F0EDE6;
}
body.cp-beta-active #vod-series-video-controls-wrapper {
    margin-top: 16px;
    padding: 0 32px;
}
body.cp-beta-active .video-control-icon-img-wrapper.active {
    transform: scale(1.3);
}
body.cp-beta-active .video-control-icon i {
    background: rgba(255,255,255,0.08);
    color: #F0EDE6;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.15s;
}
body.cp-beta-active .video-control-icon i.active,
body.cp-beta-active .video-control-icon-img-wrapper.active i {
    background: var(--gold, #E2B84B);
    color: #06060E;
}
body.cp-beta-active #vod-series-video-time-container * {
    font-size: 14px;
    color: rgba(240,237,230,0.7);
}

/* Seekbar / rangeslider */
body.cp-beta-active .rangeslider--horizontal {
    background: rgba(255,255,255,0.15) !important;
    height: 5px !important;
}
body.cp-beta-active .rangeslider__fill {
    background: var(--gold, #E2B84B) !important;
}
body.cp-beta-active .rangeslider .rangeslider__handle {
    background: var(--gold, #E2B84B) !important;
    width: 18px;
    height: 18px;
    top: -6px !important;
}
body.cp-beta-active .rangeslider.active .rangeslider__handle {
    background: #E2B84B !important;
    box-shadow: 0 0 8px rgba(226,184,75,0.4);
}

/* Episode sidebar */
body.cp-beta-active #vod-series-player-episodes-wrapper {
    background: rgba(10,10,26,0.92);
    border-left: 1px solid rgba(255,255,255,0.06);
}
body.cp-beta-active .playlist-episode-item-title {
    background: rgba(255,255,255,0.04);
    font-size: 13px;
    color: rgba(240,237,230,0.7);
    padding: 6px 10px;
}
body.cp-beta-active .playlist-episode-item-wrapper.active .playlist-episode-item-title {
    background: rgba(226,184,75,0.18);
    color: var(--gold, #E2B84B);
}
body.cp-beta-active .playlist-episode-item-wrapper.current .playlist-episode-playing {
    color: var(--gold, #E2B84B);
}
body.cp-beta-active .playlist-episode-item-img {
    height: 140px;
    object-fit: cover;
}

/* Resume modal */
body.cp-beta-active #video-resume-modal {
    background: rgba(4,2,10,0.90);
}
body.cp-beta-active #video-resume-content {
    text-align: center;
}
body.cp-beta-active #vod-resume-title-1 {
    font-size: 24px;
    font-weight: 700;
    color: #F0EDE6;
}
body.cp-beta-active #vod-resume-title-2 {
    font-size: 16px;
    color: rgba(240,237,230,0.6);
}
body.cp-beta-active #vod-resume-time {
    font-size: 20px;
    color: var(--gold, #E2B84B);
    font-weight: 700;
}
body.cp-beta-active .resume-action-btn {
    font-size: 16px;
    border-radius: 10px;
    width: 260px !important;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.08);
    padding: 10px;
    transition: all 0.15s;
}
body.cp-beta-active .resume-action-btn.active {
    border-color: var(--gold, #E2B84B) !important;
    background: rgba(226,184,75,0.12);
    color: var(--gold, #E2B84B);
    box-shadow: 0 0 12px rgba(226,184,75,0.2);
}

/* Subtitle/Audio modal */
body.cp-beta-active #subtitle-selection-modal .modal-content {
    background: rgba(10,10,26,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}
body.cp-beta-active #subtitle-selection-modal .modal-header,
body.cp-beta-active #subtitle-modal-title {
    color: var(--gold, #E2B84B);
    font-weight: 600;
}
body.cp-beta-active .subtitle-item {
    color: rgba(240,237,230,0.7);
    transition: all 0.12s;
}
body.cp-beta-active .subtitle-item.active {
    background: rgba(226,184,75,0.12);
    color: var(--gold, #E2B84B);
}

/* ═══════════════════════════════════════════════
   Phase 7 — Animations & Transitions
   ═══════════════════════════════════════════════ */

/* Page entrance animations */
body.cp-beta-active .cp-page {
    animation: cpFadeIn 0.25s ease-out;
}
@keyframes cpFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Category/item hover transitions */
body.cp-beta-active .cp-cat-item,
body.cp-beta-active .cp-channel-item,
body.cp-beta-active .cp-grid-item,
body.cp-beta-active .sd-item {
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
}
body.cp-beta-active .cp-cat-item.active,
body.cp-beta-active .cp-channel-item.active {
    transform: translateX(3px);
}
body.cp-beta-active .cp-grid-item.active {
    transform: scale(1.03);
}
body.cp-beta-active .sd-item.focused {
    transform: translateX(4px);
}

/* Pill transitions */
body.cp-beta-active .cp-right-pill,
body.cp-beta-active .cp-pill {
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

/* Search field focus animation */
body.cp-beta-active .cp-search-field:focus,
body.cp-beta-active .cp-cat-search:focus {
    box-shadow: 0 0 0 2px rgba(226,184,75,0.25);
    transition: box-shadow 0.2s ease;
}

/* Player control bar slide */
body.cp-beta-active #channel-player-controls-container,
body.cp-beta-active #vod-series-video-controls-container {
    transition: opacity 0.25s ease;
}

/* EPG items stagger (subtle) */
body.cp-beta-active .cp-epg-item {
    animation: cpSlideIn 0.15s ease-out;
}
@keyframes cpSlideIn {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════
   SORT MODAL — Beta Mode
   ═══════════════════════════════════════════════ */
body.cp-beta-active #sort-modal-container {
    background: rgba(4,2,10,0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
}
body.cp-beta-active #sort-modal-content-wrapper {
    width: 420px;
    background: rgba(15,15,26,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}
body.cp-beta-active .cp-sort-header {
    padding: 16px 20px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #E2B84B;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}
body.cp-beta-active .cp-sort-header i {
    font-size: 13px;
}
body.cp-beta-active .sort-modal-item {
    font-size: 14px;
    background: transparent;
    color: rgba(240,237,230,0.7);
    text-align: left;
    padding: 12px 20px;
    margin: 0;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
body.cp-beta-active .sort-modal-item:last-child {
    border-bottom: none;
}
body.cp-beta-active .sort-modal-item i.cp-sort-check {
    font-size: 11px;
    color: transparent;
    margin-left: auto;
}
body.cp-beta-active .sort-modal-item.active {
    background: rgba(226,184,75,0.10);
    color: #fff;
    border-left-color: #E2B84B;
    font-weight: 600;
}
body.cp-beta-active .sort-modal-item.active i.cp-sort-check {
    color: #E2B84B;
}
body.cp-beta-active .sort-modal-item.selected {
    color: #E2B84B;
}
body.cp-beta-active .sort-modal-item.selected i.cp-sort-check {
    color: #E2B84B;
}

/* ═══════════════════════════════════════════════
   SEARCH PAGE — Beta Mode
   ═══════════════════════════════════════════════ */
body.cp-beta-active .search-modal-container {
    background: rgba(4,2,10,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
body.cp-beta-active .search-modal-wrapper {
    width: 75vw;
    max-width: 1100px;
    height: 88vh;
    background: rgba(15,15,26,0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}
/* Search header area */
body.cp-beta-active .cp-search-header {
    padding: 16px 20px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
body.cp-beta-active .cp-search-title {
    font-size: 15px;
    font-weight: 700;
    color: #E2B84B;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
body.cp-beta-active .cp-search-title i {
    font-size: 13px;
}
body.cp-beta-active .search-input-container {
    padding: 0;
}
body.cp-beta-active #search-value {
    font-size: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.10) !important;
    border-radius: 10px;
    color: #F0EDE6;
    padding: 10px 16px 10px 40px;
    width: 100%;
    font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
body.cp-beta-active #search-value::placeholder {
    color: rgba(255,255,255,0.3);
    font-weight: 400;
}
body.cp-beta-active #search-value.active,
body.cp-beta-active #search-value:focus {
    border-color: #E2B84B !important;
    box-shadow: 0 0 0 3px rgba(226,184,75,0.18);
}
body.cp-beta-active .cp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    pointer-events: none;
}
/* Filter tabs row */
body.cp-beta-active .cp-search-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px 6px;
    flex-shrink: 0;
}
body.cp-beta-active .cp-search-filter-tab {
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
body.cp-beta-active .cp-search-filter-tab.active {
    background: #E2B84B;
    color: #fff;
    font-weight: 700;
    border-color: #E2B84B;
}
body.cp-beta-active .cp-search-filter-tab.focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.12);
    color: #E2B84B;
}
/* Result count */
body.cp-beta-active .cp-search-result-count {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    padding: 4px 20px 6px;
    flex-shrink: 0;
}
/* Results grid */
body.cp-beta-active .search-content-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    margin-top: 0;
    height: auto;
    scrollbar-width: none;
}
body.cp-beta-active .search-content-container::-webkit-scrollbar {
    display: none;
}
/* Grid item in search (reuse cp-grid-item design) */
body.cp-beta-active .cp-search-grid-item {
    width: 20%;
    padding: 5px;
    cursor: pointer;
    position: relative;
}
body.cp-beta-active .cp-search-grid-card {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 2.5px solid transparent;
    overflow: hidden;
    transition: all 0.15s;
    position: relative;
}
body.cp-beta-active .cp-search-grid-item.active .cp-search-grid-card {
    border-color: #E2B84B;
    transform: scale(1.04);
    z-index: 5;
    box-shadow: 0 6px 25px rgba(0,0,0,0.5), 0 0 12px rgba(226,184,75,0.15);
}
body.cp-beta-active .cp-search-grid-poster {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}
body.cp-beta-active .cp-search-grid-poster-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(30,30,60,0.6), rgba(20,20,45,0.6));
    border-radius: 8px 8px 0 0;
}
body.cp-beta-active .cp-search-grid-poster-placeholder i {
    font-size: 28px;
    color: rgba(255,255,255,0.08);
}
body.cp-beta-active .cp-search-grid-title {
    font-size: 12px;
    color: #ddd;
    padding: 6px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
body.cp-beta-active .cp-search-grid-item.active .cp-search-grid-title {
    color: #fff;
    font-weight: 600;
}
body.cp-beta-active .cp-search-grid-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.67);
    color: #FFD700;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
}
body.cp-beta-active .cp-search-grid-rating i {
    font-size: 8px;
}
body.cp-beta-active .cp-search-grid-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(226,184,75,0.85);
    color: #06060E;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
body.cp-beta-active .cp-search-grid-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 0.5px;
}
body.cp-beta-active .cp-search-grid-type-badge i { margin-right: 3px; }
body.cp-beta-active .cp-search-type-vod { background: rgba(226,184,75,0.85); color: #06060E; }
body.cp-beta-active .cp-search-type-series { background: rgba(75,140,226,0.85); color: #fff; }
body.cp-beta-active .cp-search-type-live { background: rgba(226,75,75,0.85); color: #fff; }

/* Empty state for search */
body.cp-beta-active .cp-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(240,237,230,0.28);
    text-align: center;
    width: 100%;
}
body.cp-beta-active .cp-search-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.5;
}
body.cp-beta-active .cp-search-empty .cp-search-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(240,237,230,0.5);
    margin-bottom: 4px;
}
body.cp-beta-active .cp-search-empty .cp-search-empty-sub {
    font-size: 13px;
    color: rgba(240,237,230,0.28);
}
/* List fallback (non-grid, e.g. live channels in search) */
body.cp-beta-active .search-item-wrapper {
    font-size: 14px;
    color: rgba(240,237,230,0.7);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid transparent;
    transition: all 0.12s;
    background: transparent;
}
body.cp-beta-active .search-item-wrapper.active {
    background: rgba(226,184,75,0.10);
    color: #fff;
    border-left-color: #E2B84B;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   CATCHUP / REPLAY DETAIL — Beta Mode
   Matches Android ReplayDetailFragment layout
   ═══════════════════════════════════════════════ */

/* Override parent epg-page styles when beta */
#epg-page.cp-catchup-beta {
    font-size: initial;
    background: none !important;
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
    color: #F0EDE6;
}

/* Header */
.cp-catchup-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    flex-shrink: 0;
}
.cp-catchup-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255,255,255,0.06);
    padding: 4px;
    flex-shrink: 0;
}
.cp-catchup-header-text {
    flex: 1;
    min-width: 0;
}
.cp-catchup-channel-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-catchup-programme-count {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 1px;
}
.cp-catchup-search-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.12s;
}
.cp-catchup-search-btn i {
    font-size: 11px;
    color: #E2B84B;
}

.cp-catchup-search-bar {
    position: relative;
    z-index: 2;
    padding: 8px 24px;
    background: rgba(255,255,255,0.03);
}
.cp-catchup-search-input {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #F0EDE6 !important;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
}
.cp-catchup-search-input:focus {
    border-color: #E2B84B !important;
    box-shadow: 0 0 0 2px rgba(226,184,75,0.2) !important;
}

/* Divider */
.cp-catchup-divider {
    position: relative;
    z-index: 2;
    height: 1px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

/* Body: 2-column layout */
.cp-catchup-body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    padding: 8px 12px 4px;
    gap: 12px;
}

/* Left panel: dates */
.cp-catchup-dates-panel {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cp-catchup-dates-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    padding: 0 4px 10px;
    flex-shrink: 0;
}
.cp-catchup-dates-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}
.cp-catchup-dates-list::-webkit-scrollbar {
    display: none;
}

/* Date item */
.cp-catchup-date-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    min-height: 70px;
    flex-shrink: 0;
}
.cp-catchup-date-dow {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
}
.cp-catchup-date-num {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.cp-catchup-date-month {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
}

/* Date active (focused/selected) */
.cp-catchup-date-item.active {
    background: #E2B84B;
    border-color: #E2B84B;
}
.cp-catchup-date-item.active .cp-catchup-date-dow,
.cp-catchup-date-item.active .cp-catchup-date-num,
.cp-catchup-date-item.active .cp-catchup-date-month {
    color: #fff;
}

/* Date current (selected but focus is on programmes) */
.cp-catchup-date-item.current {
    background: rgba(226,184,75,0.12);
    border-color: rgba(226,184,75,0.4);
}
.cp-catchup-date-item.current .cp-catchup-date-dow,
.cp-catchup-date-item.current .cp-catchup-date-month {
    color: #E2B84B;
}
.cp-catchup-date-item.current .cp-catchup-date-num {
    color: #E2B84B;
}

/* Today badge */
.cp-catchup-date-item.today:not(.active):not(.current) {
    background: rgba(255,255,255,0.08);
}

/* Right panel: programmes */
.cp-catchup-programmes-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cp-catchup-programmes-header {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    padding: 0 4px 10px;
    flex-shrink: 0;
}
.cp-catchup-programmes-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
    padding-bottom: 8px;
}
.cp-catchup-programmes-list::-webkit-scrollbar {
    display: none;
}

/* Programme item */
.cp-catchup-prog-item {
    padding: 12px 16px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    flex-shrink: 0;
}
.cp-catchup-prog-item.active {
    background: rgba(226,184,75,0.08);
    border-color: #E2B84B;
}
.cp-catchup-prog-item.active .cp-catchup-prog-title {
    color: #E2B84B;
}
.cp-catchup-prog-item.future {
    opacity: 0.5;
}
.cp-catchup-prog-item.now-playing {
    border-left: 3px solid #4CAF50;
}

/* Programme time row */
.cp-catchup-prog-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.cp-catchup-prog-time {
    font-size: 13px;
    font-weight: 700;
    color: #E2B84B;
    font-family: 'Inter', monospace;
}
.cp-catchup-prog-duration {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}
.cp-catchup-prog-live {
    font-size: 10px;
    font-weight: 700;
    color: #4CAF50;
    text-transform: uppercase;
}

/* Programme title & description */
.cp-catchup-prog-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cp-catchup-prog-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* Empty state */
.cp-catchup-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 14px;
    color: rgba(255,255,255,0.3);
    font-style: italic;
}

/* Animations */
body.cp-beta-active #epg-page.cp-catchup-beta {
    animation: cpFadeIn 0.25s ease-out;
}
body.cp-beta-active .cp-catchup-date-item {
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
body.cp-beta-active .cp-catchup-date-item.active {
    transform: scale(1.05);
}
body.cp-beta-active .cp-catchup-prog-item {
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
body.cp-beta-active .cp-catchup-prog-item.active {
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════
   Expiration Display — Playlist Dashboard (Beta)
   ═══════════════════════════════════════════════ */

body.cp-beta-active #pld-active-expire.pld-expire-ok {
    color: rgba(240,237,230,0.5);
    font-size: 12px;
}
body.cp-beta-active #pld-active-expire.pld-expire-warning {
    color: #E2B84B;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(226,184,75,0.10);
    border: 1px solid rgba(226,184,75,0.25);
    border-radius: 6px;
    display: inline-block;
}
body.cp-beta-active #pld-active-expire.pld-expire-warning i {
    margin-right: 4px;
}
body.cp-beta-active #pld-active-expire.pld-expire-critical {
    color: #FF4444;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 12px;
    background: rgba(255,68,68,0.12);
    border: 1px solid rgba(255,68,68,0.30);
    border-radius: 6px;
    display: inline-block;
    animation: sdExpirePulse 2s ease-in-out infinite;
}
body.cp-beta-active #pld-active-expire.pld-expire-critical i {
    margin-right: 4px;
}
@keyframes sdExpirePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Settings dashboard expiry colors */
.sd-expiry-warning {
    color: #E2B84B !important;
    font-weight: 600 !important;
}
.sd-expiry-warning i {
    margin-right: 3px;
}
.sd-expiry-critical {
    color: #FF4444 !important;
    font-weight: 700 !important;
}
.sd-expiry-critical i {
    margin-right: 3px;
}

/* ═══════════════════════════════════════════════
   Beta Theme & Language Modals
   ═══════════════════════════════════════════════ */

.sd-beta-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4,2,10,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cpFadeIn 0.2s ease-out;
}

.sd-beta-modal {
    background: rgba(15,15,26,0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 24px 28px;
    min-width: 380px;
    max-width: 500px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.sd-beta-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #E2B84B;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sd-beta-modal-title i {
    font-size: 16px;
}

/* Theme grid */
.sd-beta-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 55vh;
    scrollbar-width: none;
}
.sd-beta-modal-grid::-webkit-scrollbar { display: none; }

.sd-beta-theme-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255,255,255,0.03);
    position: relative;
}
.sd-beta-theme-item.focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.08);
    box-shadow: 0 0 0 2px rgba(226,184,75,0.18);
    transform: translateX(4px);
}
.sd-beta-theme-item.selected {
    background: rgba(226,184,75,0.06);
}

.sd-beta-theme-thumb {
    width: 80px;
    height: 50px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
}
.sd-beta-theme-item.focused .sd-beta-theme-thumb {
    border-color: #E2B84B;
}

.sd-beta-theme-name {
    font-size: 14px;
    font-weight: 500;
    color: #F0EDE6;
    flex: 1;
}

.sd-beta-theme-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #E2B84B;
    color: #06060E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* Language list */
.sd-beta-modal-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 50vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(226,184,75,0.3) transparent;
    padding-right: 4px;
    scroll-behavior: smooth;
}
.sd-beta-modal-list::-webkit-scrollbar { width: 4px; }
.sd-beta-modal-list::-webkit-scrollbar-track { background: transparent; }
.sd-beta-modal-list::-webkit-scrollbar-thumb {
    background: rgba(226,184,75,0.3);
    border-radius: 4px;
}
.sd-beta-modal-list::-webkit-scrollbar-thumb:hover {
    background: rgba(226,184,75,0.5);
}

.sd-beta-lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255,255,255,0.03);
    flex-shrink: 0;
}
.sd-beta-lang-item.focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.08);
    box-shadow: 0 0 0 2px rgba(226,184,75,0.18);
    transform: translateX(4px);
}
.sd-beta-lang-item.selected {
    background: rgba(226,184,75,0.10);
    border-color: #E2B84B;
}
.sd-beta-lang-item.selected.focused {
    border-color: #E2B84B;
    box-shadow: 0 0 0 2px rgba(226,184,75,0.25);
}
.sd-beta-lang-flag {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.sd-beta-lang-name {
    font-size: 14px;
    font-weight: 500;
    color: #F0EDE6;
    flex: 1;
}
.sd-beta-lang-item.focused .sd-beta-lang-name {
    color: #fff;
}
.sd-beta-lang-item.selected .sd-beta-lang-name {
    color: #E2B84B;
    font-weight: 600;
}
.sd-beta-lang-check {
    color: #E2B84B;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(226,184,75,0.15);
    border-radius: 50%;
}

/* Hint bar */
.sd-beta-modal-hint {
    margin-top: 14px;
    font-size: 11px;
    color: rgba(240,237,230,0.28);
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Hide Category list */
.sd-beta-hidecat-modal {
    max-width: 480px;
    width: 90%;
}
.sd-beta-modal-subtitle {
    font-size: 12px;
    color: rgba(240,237,230,0.45);
    margin-bottom: 12px;
}
.sd-beta-hidecat-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    max-height: 55vh;
    scrollbar-width: none;
}
.sd-beta-hidecat-list::-webkit-scrollbar { display: none; }

.sd-beta-hidecat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    background: transparent;
}
.sd-beta-hidecat-item.focused {
    background: rgba(226,184,75,0.12);
    box-shadow: inset 0 0 0 1.5px rgba(226,184,75,0.45);
}
.sd-beta-hidecat-item:hover {
    background: rgba(226,184,75,0.08);
}

.sd-beta-hidecat-name {
    flex: 1;
    font-size: 13px;
    color: rgba(240,237,230,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sd-beta-hidecat-item.checked .sd-beta-hidecat-name {
    color: rgba(240,237,230,0.92);
}

/* Toggle switch */
.sd-beta-hidecat-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 20px;
}
.sd-beta-hidecat-switch {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s;
}
.sd-beta-hidecat-item.checked .sd-beta-hidecat-switch {
    background: rgba(226,184,75,0.65);
}
.sd-beta-hidecat-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(240,237,230,0.5);
    transition: transform 0.2s, background 0.2s;
}
.sd-beta-hidecat-item.checked .sd-beta-hidecat-knob {
    transform: translateX(16px);
    background: #fff;
}

/* ─── Parental Control PIN Modal ─── */
.sd-parental-modal {
    min-width: 320px;
    max-width: 360px;
    text-align: center;
}
.sd-parental-subtitle {
    font-size: 13px;
    color: rgba(240,237,230,0.55);
    margin-bottom: 16px;
}
.sd-parental-dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 10px;
}
.sd-pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(226,184,75,0.4);
    background: transparent;
    transition: background 0.15s, border-color 0.15s;
}
.sd-pin-dot.filled {
    background: #E2B84B;
    border-color: #E2B84B;
}
.sd-parental-error {
    font-size: 12px;
    color: #EF5350;
    margin-bottom: 8px;
    min-height: 18px;
}
.sd-parental-error.hide {
    visibility: hidden;
}
.sd-parental-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 240px;
    margin: 0 auto 8px;
}
.sd-numpad-key {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #F0EDE6;
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.12s ease;
    user-select: none;
}
.sd-numpad-key.focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.12);
    box-shadow: 0 0 0 2px rgba(226,184,75,0.2);
    transform: scale(1.06);
}
.sd-numpad-key:active,
.sd-numpad-key:hover {
    background: rgba(226,184,75,0.10);
}
.sd-numpad-fn {
    font-size: 15px;
    color: rgba(240,237,230,0.6);
}
.sd-numpad-fn.focused {
    color: #E2B84B;
}
.sd-numpad-ok {
    color: #4CAF50;
}
.sd-numpad-ok.focused {
    color: #66BB6A;
    border-color: #4CAF50;
    background: rgba(76,175,80,0.12);
    box-shadow: 0 0 0 2px rgba(76,175,80,0.2);
}
.sd-parental-default-hint {
    font-size: 11px;
    color: rgba(226,184,75,0.35);
    margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════
   VOD Detail + Series Detail — Beta Mode
   Android-style MovieDetailFragment / SeriesDetailFragment
   ═══════════════════════════════════════════════ */

/* ─── Page container ─── */
.cpd-page {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
    color: var(--text-primary, #F0EDE6);
    z-index: 10;
}
.cpd-bg-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-deep, #06060E);
    z-index: 0;
}

/* ─── Backdrop ─── */
.cpd-backdrop-wrap {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45vh;
    z-index: 1;
    overflow: hidden;
}
.cpd-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}
.cpd-backdrop-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(6,6,14,0.7) 65%,
        var(--bg-deep, #06060E) 100%
    );
}

/* ─── Scrollable content ─── */
.cpd-scroll {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}
.cpd-scroll::-webkit-scrollbar { display: none; }

/* ─── Header: poster + meta side by side ─── */
.cpd-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 0 40px 0;
    margin-top: 22vh;
}
.cpd-poster-wrap {
    flex-shrink: 0;
    width: 160px;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.cpd-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Meta wrap ─── */
.cpd-meta-wrap {
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
}
.cpd-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cpd-rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.cpd-star {
    color: #FFD700;
    font-size: 16px;
}
.cpd-rating-val {
    color: #FFD700;
    font-size: 14px;
    font-weight: 700;
}
.cpd-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.cpd-tag {
    font-size: 12px;
    color: rgba(240,237,230,0.55);
    background: rgba(255,255,255,0.06);
    padding: 3px 10px;
    border-radius: 12px;
}
.cpd-tag:empty { display: none; }

/* ─── Action buttons ─── */
.cpd-btn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.cpd-btn {
    height: 42px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary, #F0EDE6);
    background: rgba(255,255,255,0.06);
    font-family: inherit;
}
.cpd-btn i { font-size: 13px; }
.cpd-btn-play {
    background: var(--gold, #E2B84B);
    color: #06060E;
}
.cpd-btn-play i { color: #06060E; }
.cpd-btn-fav {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}
.cpd-btn-fav .fa-heart { color: #FF4444; }
.cpd-btn-trailer {
    background: rgba(255,255,255,0.06);
}

/* Focus state */
.cpd-btn.focused {
    border-color: var(--focus-color, #E2B84B);
    box-shadow: 0 0 12px rgba(226,184,75,0.3);
    transform: scale(1.05);
}
.cpd-btn-play.focused {
    background: #E2B84B;
    box-shadow: 0 0 16px rgba(226,184,75,0.4);
}
.cpd-btn-trailer.focused {
    color: var(--gold, #E2B84B);
    background: rgba(226,184,75,0.12);
}

/* ─── Watch progress bar ─── */
.cpd-progress-bar {
    margin-top: 10px;
}
.cpd-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.10);
    border-radius: 2px;
    overflow: hidden;
}
.cpd-progress-fill {
    height: 100%;
    background: var(--gold, #E2B84B);
    border-radius: 2px;
    transition: width 0.3s;
}
.cpd-progress-text {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 3px;
    display: block;
}

/* ─── Body ─── */
.cpd-body {
    padding: 24px 40px 40px;
}
.cpd-section {
    margin-bottom: 24px;
}
.cpd-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}
.cpd-plot {
    font-size: 14px;
    color: rgba(240,237,230,0.75);
    line-height: 1.6;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

/* ─── Info grid (director, cast) ─── */
.cpd-info-grid {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}
.cpd-info-item {
    flex: 1;
    min-width: 0;
    margin-bottom: 10px;
}
.cpd-info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold, #E2B84B);
    margin-bottom: 4px;
}
.cpd-info-value {
    display: block;
    font-size: 13px;
    color: rgba(240,237,230,0.75);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ─── Similar movies row ─── */
.cpd-similar-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    padding: 6px 4px;
}
.cpd-similar-row::-webkit-scrollbar { display: none; }
.cpd-similar-card {
    flex-shrink: 0;
    width: 130px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.cpd-similar-card.focused {
    border-color: var(--focus-color, #E2B84B);
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 8px rgba(226,184,75,0.2);
}
.cpd-similar-poster {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.cpd-similar-title {
    font-size: 11px;
    color: #ddd;
    padding: 6px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.cpd-similar-card.focused .cpd-similar-title {
    color: #fff;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   Series Detail (beta) — Seasons + Episodes
   ═══════════════════════════════════════════════ */

/* ─── Two-column layout (crew left, synopsis right) ─── */
.cpd-two-col {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}
.cpd-two-col .cpd-col-left { flex: 1; min-width: 0; }
.cpd-two-col .cpd-col-right { flex: 1.5; min-width: 0; }

/* ─── Season pills ─── */
.cpd-season-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 12px;
    margin-bottom: 4px;
}
.cpd-season-row::-webkit-scrollbar { display: none; }
.cpd-season-pill {
    flex-shrink: 0;
    height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.15s;
    white-space: nowrap;
}
.cpd-season-pill.current {
    background: rgba(226,184,75,0.15);
    color: var(--gold, #E2B84B);
    font-weight: 700;
}
.cpd-season-pill.focused {
    border-color: var(--focus-color, #E2B84B);
    background: rgba(226,184,75,0.12);
    color: var(--gold, #E2B84B);
    box-shadow: 0 0 8px rgba(226,184,75,0.25);
    transform: scale(1.05);
}

/* ─── Episode list ─── */
.cpd-episode-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: none;
}
.cpd-episode-list::-webkit-scrollbar { display: none; }
.cpd-episode-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 3px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: all 0.12s;
}
.cpd-episode-card.focused {
    border-color: var(--focus-color, #E2B84B);
    background: rgba(226,184,75,0.06);
}
.cpd-ep-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(226,184,75,0.12);
    color: var(--gold, #E2B84B);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cpd-ep-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255,255,255,0.03);
}
.cpd-ep-info {
    flex: 1;
    min-width: 0;
}
.cpd-ep-title {
    font-size: 13px;
    color: var(--text-primary, #F0EDE6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.cpd-episode-card.focused .cpd-ep-title {
    color: #fff;
    font-weight: 600;
}
.cpd-ep-duration {
    font-size: 11px;
    color: rgba(240,237,230,0.4);
    margin-top: 2px;
}
.cpd-ep-play {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.cpd-ep-play i {
    font-size: 10px;
    color: var(--gold, #E2B84B);
}
.cpd-episode-card.focused .cpd-ep-play {
    opacity: 1;
    background: rgba(226,184,75,0.15);
}

/* ─── Season pill sub-elements (episode count) ─── */
.cpd-season-pill {
    flex-direction: column;
    gap: 1px;
    padding: 4px 18px;
    height: auto;
    min-height: 38px;
}
.cpd-season-name {
    font-size: 13px;
    font-weight: inherit;
}
.cpd-season-ep-count {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}
.cpd-season-pill.current .cpd-season-ep-count {
    color: rgba(226,184,75,0.6);
}
.cpd-season-pill.focused .cpd-season-ep-count {
    color: rgba(226,184,75,0.6);
}

/* ─── Episode plot text ─── */
.cpd-ep-plot {
    font-size: 11px;
    color: rgba(240,237,230,0.4);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

/* ─── Episode progress bar ─── */
.cpd-ep-progress-wrap {
    margin-top: 4px;
    width: 100%;
    max-width: 200px;
}
.cpd-ep-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.10);
    border-radius: 2px;
    overflow: hidden;
}
.cpd-ep-progress-fill {
    height: 100%;
    background: var(--gold, #E2B84B);
    border-radius: 2px;
}

/* ─── Similar series rating badge ─── */
.cpd-similar-rating {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #FFD700;
    background: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
    line-height: 1;
}
.cpd-similar-rating i {
    font-size: 9px;
    margin-right: 2px;
}
.cpd-similar-card {
    position: relative;
}

/* ─── Empty state ─── */
.cpd-empty {
    padding: 24px;
    text-align: center;
    color: rgba(240,237,230,0.3);
    font-size: 13px;
    font-style: italic;
}

/* ─── Override summary page when beta ─── */
#vod-summary-page .cpd-page,
#series-summary-page .cpd-page {
    position: absolute;
    inset: 0;
}

/* ─── Responsive overrides for 720p TV ─── */
@media (max-height: 800px) {
    .cp-grid-poster,
    .cp-grid-poster-placeholder {
        height: 170px;
    }
    .cp-grid-item.replay-item .cp-grid-poster,
    .cp-grid-item.replay-item .cp-grid-poster-placeholder {
        height: 110px;
    }
    .cp-cat-item {
        height: 42px;
    }
    body.cp-beta-active .cp-search-grid-poster,
    body.cp-beta-active .cp-search-grid-poster-placeholder {
        height: 160px;
    }
    body.cp-beta-active .sort-modal-item {
        font-size: 13px;
        padding: 10px 16px;
    }
    /* Detail pages 720p adjustments */
    .cpd-header {
        margin-top: 18vh;
        gap: 18px;
        padding: 0 28px;
    }
    .cpd-poster-wrap {
        width: 120px;
        height: 180px;
    }
    .cpd-title {
        font-size: 22px;
    }
    .cpd-body {
        padding: 16px 28px 28px;
    }
    .cpd-backdrop-wrap {
        height: 40vh;
    }
    .cpd-similar-poster {
        height: 140px;
    }
    .cpd-similar-card {
        width: 110px;
    }
    .cpd-episode-list {
        max-height: 300px;
    }
}

/* ═══════════════════════════════════════════════
   Channel Player — Clock, Fav Indicator, Speed
   ═══════════════════════════════════════════════ */
.cp-channel-clock {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 22px;
    font-weight: 600;
    color: #F0EDE6;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    z-index: 100;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
}
.cp-channel-fav-indicator {
    position: absolute;
    top: 26px;
    right: 100px;
    font-size: 20px;
    color: #E2B84B;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    z-index: 100;
}
.cp-channel-fav-indicator .fa-heart-o {
    color: rgba(240,237,230,0.4);
}
.cp-channel-speed-indicator {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(226,184,75,0.5);
    color: #E2B84B;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    padding: 4px 14px;
    border-radius: 6px;
    z-index: 100;
}

/* ═══════════════════════════════════════════════
   VOD/Series Player — Speed Button
   ═══════════════════════════════════════════════ */
.cp-speed-btn-wrap .cp-speed-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #F0EDE6;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    line-height: 1;
}
.cp-speed-btn-wrap .video-control-icon-img-wrapper.active .cp-speed-label {
    color: #E2B84B;
}

/* ═══════════════════════════════════════════════
   Category Reorder Mode
   ═══════════════════════════════════════════════ */
.cp-reorder-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: rgba(226,184,75,0.15);
    border-bottom: 2px solid #E2B84B;
    color: #E2B84B;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 6px 0;
    animation: cpReorderBannerIn 0.2s ease-out;
}
@keyframes cpReorderBannerIn {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}
.cp-cat-item.cp-reorder-grabbed {
    background: rgba(226,184,75,0.12) !important;
    border: 1px solid #E2B84B !important;
    transform: scale(1.08);
    z-index: 10;
    position: relative;
    box-shadow: 0 4px 16px rgba(226,184,75,0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}

/* ═══════════════════════════════════════════════
   SEARCH SCOPE MODAL
   ═══════════════════════════════════════════════ */
.cp-search-scope-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4,2,10,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cpScopeIn 0.15s ease-out;
}
@keyframes cpScopeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.cp-search-scope-box {
    width: 380px;
    background: rgba(15,15,26,0.96);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    animation: cpScopeBoxIn 0.18s ease-out;
}
@keyframes cpScopeBoxIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.cp-search-scope-header {
    position: relative;
    padding: 16px 20px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #E2B84B;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-search-scope-header i {
    font-size: 13px;
}
.cp-search-scope-option {
    font-size: 14px;
    background: transparent;
    color: rgba(240,237,230,0.7);
    text-align: left;
    padding: 14px 20px;
    margin: 0;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cp-search-scope-option:last-child {
    border-bottom: none;
}
.cp-search-scope-option i {
    font-size: 12px;
    width: 18px;
    text-align: center;
    color: rgba(255,255,255,0.4);
}
.cp-search-scope-option.focused {
    background: rgba(226,184,75,0.12);
    color: #E2B84B;
    border-left-color: #E2B84B;
    font-weight: 600;
}
.cp-search-scope-option.focused i {
    color: #E2B84B;
}

/* ─── Turn-Off Beta Modal (Android StyledDialog) ─────────── */
.to-beta-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(0,0,0,0.60);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: toFadeIn 0.2s ease-out;
}
.to-beta-overlay--closing {
    animation: toFadeOut 0.2s ease-in forwards;
}
@keyframes toFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toFadeOut { from { opacity: 1; } to { opacity: 0; } }

.to-beta-modal {
    background: #0A0A16;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    min-width: 380px;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    animation: toSlideUp 0.2s ease-out;
}
@keyframes toSlideUp {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

/* Gold accent stripe at top */
.to-beta-stripe {
    height: 3px;
    background: #E2B84B;
}

/* Header with title + close button */
.to-beta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255,255,255,0.02);
}
.to-beta-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #F0EDE6;
}
.to-beta-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.to-beta-close i {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

/* Divider */
.to-beta-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/* Message */
.to-beta-message {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #BFBFB5;
    padding: 20px 20px 24px;
}

/* Buttons area */
.to-beta-buttons {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
    justify-content: flex-end;
}

.to-beta-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
    outline: none;
}

/* Secondary button (Non) */
.to-beta-btn-secondary {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: #BFBFB5;
}
.to-beta-btn-secondary.active {
    background: rgba(226,184,75,0.08);
    border-color: rgba(226,184,75,0.5);
    color: #E2B84B;
    box-shadow: 0 0 12px rgba(226,184,75,0.15);
    transform: scale(1.05);
}

/* Primary button (Oui) */
.to-beta-btn-primary {
    background: #E2B84B;
    border: 1px solid #E2B84B;
    color: #fff;
    font-weight: 700;
    opacity: 0.9;
}
.to-beta-btn-primary.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(226,184,75,0.3);
}

/* ─── Settings modal header with close button ─── */
.sd-beta-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.sd-beta-modal-header .sd-beta-modal-title {
    margin-bottom: 0;
}
.sd-beta-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.sd-beta-modal-close i {
    font-size: 13px;
    color: rgba(240,237,230,0.5);
}
.sd-beta-modal-close:hover {
    background: rgba(226,184,75,0.15);
    border-color: #E2B84B;
}
.sd-beta-modal-close:hover i {
    color: #E2B84B;
}

/* ─── Search scope modal close + hint ─── */
.cp-search-scope-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.cp-search-scope-close i {
    font-size: 11px;
    color: rgba(240,237,230,0.5);
}
.cp-search-scope-close:hover {
    background: rgba(226,184,75,0.15);
    border-color: #E2B84B;
}
.cp-search-scope-close:hover i {
    color: #E2B84B;
}
.cp-search-scope-hint {
    font-size: 10px;
    color: rgba(240,237,230,0.25);
    text-align: center;
    padding: 8px 0 2px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   VOD/Series Beta Player Overlay
   Android-style control bar for beta testers
   ═══════════════════════════════════════════════ */

.cp-vod-player-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: none;
    pointer-events: auto;
}

.cp-vod-player-overlay.cp-vod-player-visible {
    display: flex !important;
    flex-direction: column;
}

.cp-vod-player-overlay * {
    box-sizing: border-box;
}

/* ── Top bar ── */
.cp-vod-player-top {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    gap: 14px;
    flex-shrink: 0;
}

.cp-vod-player-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #F0EDE6;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}

.cp-vod-player-back:hover {
    background: rgba(226,184,75,0.2);
    color: #E2B84B;
}

.cp-vod-player-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #F0EDE6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-vod-player-clock {
    font-size: 16px;
    font-weight: 500;
    color: rgba(240,237,230,0.7);
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}

/* ── Spacer (transparent middle) ── */
.cp-vod-player-spacer {
    flex: 1;
}

/* ── Bottom area with gradient ── */
.cp-vod-player-bottom {
    flex-shrink: 0;
    padding: 20px 32px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
}

/* ── Seek bar row ── */
.cp-vod-player-seek-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.cp-vod-player-time {
    font-size: 13px;
    font-weight: 500;
    color: rgba(240,237,230,0.7);
    min-width: 48px;
    flex-shrink: 0;
}

.cp-vod-player-time-current {
    text-align: right;
}

.cp-vod-player-time-total {
    text-align: left;
}

.cp-vod-player-seek-wrap {
    flex: 1;
    position: relative;
}

#cp-vod-player-seek-container {
    width: 100%;
}

#cp-vod-player-seek-container .rangeslider {
    background: rgba(255,255,255,0.15);
    height: 6px;
    border-radius: 3px;
    margin: 8px 0;
    transition: box-shadow 0.2s;
}

#cp-vod-player-seek-container .rangeslider .rangeslider__fill {
    background: #E2B84B;
    border-radius: 3px;
    height: 100%;
}

#cp-vod-player-seek-container .rangeslider .rangeslider__handle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #E2B84B;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
    top: -4px;
}

#cp-vod-player-seek-container .rangeslider .rangeslider__handle:after {
    display: none;
}

.cp-vod-player-seek-focused {
    box-shadow: 0 0 0 2px rgba(226,184,75,0.5) !important;
    border-radius: 4px !important;
}

/* ── Controls row ── */
.cp-vod-player-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cp-vod-player-controls-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cp-vod-player-controls-center {
    margin: 0 16px;
    gap: 10px;
}

.cp-vod-player-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid transparent;
    color: #F0EDE6;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    flex-shrink: 0;
    padding: 0;
    outline: none;
}

.cp-vod-player-btn:hover {
    background: rgba(255,255,255,0.15);
}

.cp-vod-player-btn-focused {
    border-color: #E2B84B !important;
    transform: scale(1.1);
    background: rgba(226,184,75,0.15) !important;
    box-shadow: 0 0 12px rgba(226,184,75,0.3);
}

.cp-vod-player-btn-play {
    width: 50px;
    height: 50px;
    font-size: 18px;
    background: rgba(226,184,75,0.2);
}

.cp-vod-player-btn-speed {
    width: auto;
    border-radius: 21px;
    padding: 0 12px;
    gap: 5px;
    font-size: 13px;
}

.cp-vod-player-speed-label {
    font-size: 12px;
    font-weight: 600;
    color: #E2B84B;
}

.cp-vod-player-btn-fav i.fas {
    color: #E2B84B;
}

/* ── Toast ── */
.cp-vod-player-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: #F0EDE6;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    z-index: 10001;
    display: none;
    border: 1px solid rgba(226,184,75,0.3);
    backdrop-filter: blur(6px);
}

/* ── Hide original controls when beta overlay is present ── */
#vod-series-video-controls-container.cp-vod-player-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -1 !important;
}

/* ═══════════════════════════════════════════════
   Channel Player — Beta Overlay (Android-style)
   ═══════════════════════════════════════════════ */

/* Full overlay container */
.cp-player-overlay {
    position: absolute;
    inset: 0;
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}
.cp-player-overlay * {
    pointer-events: auto;
}

/* ─── Top bar ─── */
.cp-player-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}
.cp-player-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.cp-player-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}
.cp-player-back-btn i {
    font-size: 14px;
    color: #F0EDE6;
}
.cp-player-channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.cp-player-channel-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.cp-player-channel-num {
    font-size: 18px;
    font-weight: 700;
    color: #E2B84B;
    flex-shrink: 0;
}
.cp-player-channel-name {
    font-size: 18px;
    font-weight: 500;
    color: #F0EDE6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.cp-player-clock {
    font-size: 20px;
    font-weight: 600;
    color: #F0EDE6;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    flex-shrink: 0;
}

/* ─── EPG row ─── */
.cp-player-epg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 32px 4px;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    padding-top: 40px;
    min-height: 44px;
    transition: border-color 0.15s ease, background 0.15s ease;
    border: 2px solid transparent;
    border-radius: 6px;
    margin: 0 24px;
}
.cp-player-epg-row.cp-player-epg-focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.08);
}

.cp-player-live-badge {
    background: #c0392b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.cp-player-epg-current,
.cp-player-epg-next {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.cp-player-epg-current {
    color: #E2B84B;
}
.cp-player-epg-next {
    color: rgba(240,237,230,0.5);
}
.cp-player-epg-time {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
    flex-shrink: 0;
}
.cp-player-epg-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}
.cp-player-epg-separator {
    color: rgba(240,237,230,0.25);
    font-size: 10px;
    flex-shrink: 0;
}

/* ─── EPG progress bar ─── */
.cp-player-epg-progress {
    height: 3px;
    background: rgba(255,255,255,0.1);
    margin: 0 32px 8px;
    border-radius: 2px;
    overflow: hidden;
}
.cp-player-epg-progress-fill {
    height: 100%;
    background: #E2B84B;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ─── Control buttons row ─── */
.cp-player-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 32px 18px;
    background: rgba(0,0,0,0.88);
}

.cp-player-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 52px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.12s ease;
    position: relative;
}
.cp-player-btn i {
    font-size: 16px;
    color: #F0EDE6;
    transition: color 0.12s ease;
}
.cp-player-btn-label {
    font-size: 9px;
    color: rgba(240,237,230,0.5);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52px;
    text-align: center;
    transition: color 0.12s ease;
}

/* Focused state */
.cp-player-btn.cp-player-btn-focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.12);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(226,184,75,0.2);
}
.cp-player-btn.cp-player-btn-focused i {
    color: #E2B84B;
}
.cp-player-btn.cp-player-btn-focused .cp-player-btn-label {
    color: #E2B84B;
}

/* Favorite heart gold when active */
.cp-player-btn i.fas.fa-heart {
    color: #E2B84B;
}

/* Separator between button groups */
.cp-player-btn-sep {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    margin: 0 4px;
    flex-shrink: 0;
}

/* ─── Aspect ratio overlay ─── */
.cp-player-aspect-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    border: 1px solid rgba(226,184,75,0.5);
    color: #E2B84B;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    padding: 10px 28px;
    border-radius: 10px;
    z-index: 200;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ─── Beta Subtitle/Audio modal ─── */
.cp-player-sa-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10,10,26,0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    min-width: 280px;
    max-width: 380px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 300;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    animation: cpPlayerSAIn 0.15s ease-out;
}
@keyframes cpPlayerSAIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.cp-player-sa-header {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #E2B84B;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: 'Inter', sans-serif;
}
.cp-player-sa-item {
    padding: 12px 20px;
    font-size: 14px;
    color: rgba(240,237,230,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: 'Inter', sans-serif;
}
.cp-player-sa-item:last-child {
    border-bottom: none;
}
.cp-player-sa-item.cp-player-sa-focused {
    background: rgba(226,184,75,0.12);
    color: #E2B84B;
    border-left: 3px solid #E2B84B;
    font-weight: 600;
}
.cp-player-sa-modal::-webkit-scrollbar {
    width: 4px;
}
.cp-player-sa-modal::-webkit-scrollbar-thumb {
    background: rgba(226,184,75,0.3);
    border-radius: 2px;
}

/* ── Hide legacy channel player controls when beta overlay is active ── */
body.cp-beta-active #channel-player-controls-container,
body.cp-beta-active #channel-player-title {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   Auto-play Next Episode — Series Player
   ═══════════════════════════════════════════════ */

/* ── "Up Next" banner (top-right) ── */
.cp-autoplay-upnext {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    padding: 12px 20px;
    background: rgba(15,15,26,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226,184,75,0.3);
    border-left: 3px solid #E2B84B;
    border-radius: 8px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
.cp-autoplay-upnext.cp-autoplay-visible {
    opacity: 1;
    transform: translateX(0);
}
.cp-autoplay-upnext-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #E2B84B;
    margin-bottom: 4px;
}
.cp-autoplay-upnext-title {
    font-size: 14px;
    color: #F0EDE6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

/* ── Countdown overlay (centered) ── */
.cp-autoplay-countdown {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-autoplay-countdown-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,6,14,0.80);
}
.cp-autoplay-countdown-card {
    position: relative;
    z-index: 1;
    width: 420px;
    padding: 32px 36px;
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226,184,75,0.25);
    border-radius: 12px;
    text-align: center;
}
.cp-autoplay-countdown-heading {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #E2B84B;
    margin-bottom: 10px;
}
.cp-autoplay-countdown-ep {
    font-size: 18px;
    font-weight: 600;
    color: #F0EDE6;
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-autoplay-countdown-timer {
    font-size: 14px;
    color: rgba(240,237,230,0.5);
    margin-bottom: 24px;
}
.cp-autoplay-countdown-timer span {
    color: #E2B84B;
    font-weight: 700;
    font-size: 16px;
}
.cp-autoplay-countdown-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.cp-autoplay-btn {
    padding: 10px 28px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #F0EDE6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.cp-autoplay-btn-focused {
    border-color: #E2B84B;
    background: rgba(226,184,75,0.15);
    color: #E2B84B;
    box-shadow: 0 0 12px rgba(226,184,75,0.2);
}
