* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #141414;
    --bg-light: #1a1a1a;
    --surface: #222;
    --surface-hover: #333;
    --accent: #e50914;
    --accent-hover: #f40612;
    --text: #fff;
    --text-muted: #999;
    --text-dim: #666;
    --radius: 6px;
    --shadow: 0 8px 32px rgba(0,0,0,0.6);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    height: 60px;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 10%, transparent);
    transition: background 0.3s;
}

.header.scrolled {
    background: rgba(20,20,20,0.97);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
}

.header-center {
    flex: 1;
    max-width: 420px;
    margin: 0 24px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.6);
    border: 1px solid #444;
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--text);
}

.search-icon {
    width: 18px;
    height: 18px;
    margin-left: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    padding: 10px 12px;
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 12px;
    line-height: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}

.nav-btn:hover, .nav-btn.active {
    color: var(--text);
}

/* ── Hero ── */
.hero {
    position: relative;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 0 4% 60px;
    background-size: cover;
    background-position: center top;
}

.hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--bg) 0%,
        rgba(20,20,20,0.7) 40%,
        rgba(20,20,20,0.2) 70%,
        transparent 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-play:hover {
    background: var(--accent-hover);
    transform: scale(1.03);
}

.btn-play svg {
    width: 20px;
    height: 20px;
}

/* ── Genres ── */
.genres {
    padding: 0 4%;
    margin-bottom: 24px;
}

.genre-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}

.genre-buttons::-webkit-scrollbar { display: none; }

.genre-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.genre-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: #555;
}

.genre-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Movies Grid ── */
.movies-section {
    padding: 0 4%;
    padding-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* ── Pinoy Horizontal Row ── */
.pinoy-section {
    padding-top: 10px;
}

.movies-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.movies-row::-webkit-scrollbar {
    height: 6px;
}

.movies-row::-webkit-scrollbar-track {
    background: transparent;
}

.movies-row::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.pinoy-card {
    position: relative;
    flex-shrink: 0;
    width: 150px;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    transition: transform 0.25s, box-shadow 0.25s;
}

.pinoy-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    z-index: 5;
}

.pinoy-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.pinoy-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    background: #1e90ff;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
}

.movie-card {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    transition: transform 0.25s, box-shadow 0.25s;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    z-index: 5;
}

.movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.movie-card .card-info {
    padding: 10px;
}

.movie-card .card-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.movie-card .card-rating {
    color: #f5c518;
    font-weight: 600;
}

.movie-card .card-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 40px;
}

/* ── Loading ── */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading.hidden { display: none; }

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #333;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.page-btn {
    padding: 10px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid #444;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--text-muted);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden { display: none; }

.modal {
    position: relative;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.modal-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Player Sources ── */
.player-sources {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    gap: 6px;
    padding: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.source-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.source-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.source-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.source-btn.status-online { border-color: #2ecc40; }
.source-btn.status-online.active { border-color: var(--accent); }
.source-btn.status-offline { opacity: 0.5; border-color: #555; }
.source-btn.status-checking { border-color: #ffdc00; }

.status-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.source-btn.status-online .status-badge { background: #2ecc40; color: #000; }
.source-btn.status-offline .status-badge { background: #555; color: #999; }
.source-btn.status-checking .status-badge { background: #ffdc00; color: #000; }
.source-btn:not(.status-online):not(.status-offline):not(.status-checking) .status-badge { background: #333; color: #666; }

/* ── Player Error ── */
.player-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #000;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 5;
}

.btn-retry {
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-retry:hover { background: var(--accent-hover); }

.source-btn.failed {
    border-color: #e50914;
    opacity: 0.6;
}

/* ── Player Loading ── */
.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #000;
    color: var(--text-muted);
    font-size: 13px;
    z-index: 5;
}

.modal-player {
    position: relative;
}

.player-overlay-block {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.player-overlay-block:hover {
    background: rgba(0,0,0,0.2);
}

.overlay-content {
    text-align: center;
    color: var(--text);
    pointer-events: none;
}

.overlay-content p {
    font-size: 18px;
    font-weight: 600;
    background: var(--accent);
    padding: 12px 32px;
    border-radius: var(--radius);
}

.modal-info {
    padding: 24px;
    overflow-y: auto;
}

.modal-info h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.meta-tag {
    padding: 4px 10px;
    background: #333;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.meta-tag.rating {
    color: #f5c518;
    font-weight: 600;
}

.modal-overview {
    font-size: 14px;
    line-height: 1.7;
    color: #bbb;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-play-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-play-modal:hover {
    background: var(--accent-hover);
    transform: scale(1.03);
}

.btn-play-modal svg {
    width: 18px;
    height: 18px;
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-dim);
    font-size: 13px;
    border-top: 1px solid #222;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }

    .header-center {
        margin: 0 12px;
    }

    .logo {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .hero {
        height: 55vh;
        min-height: 300px;
        padding: 0 16px 40px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .section-title {
        font-size: 17px;
    }

    .modal {
        max-height: 95vh;
        border-radius: 8px;
    }

    .modal-info {
        padding: 16px;
    }

    .modal-info h2 {
        font-size: 18px;
    }

    .source-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .movie-card .card-info {
        padding: 6px;
    }

    .movie-card .card-title {
        font-size: 11px;
    }

    .movie-card .card-meta {
        font-size: 10px;
    }

    .pinoy-card {
        width: 120px;
    }

    .pinoy-badge {
        font-size: 8px;
        padding: 2px 6px;
    }

    .header-right .nav-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .episode-item img,
    .episode-still-placeholder {
        width: 120px;
    }
}

/* ── KethFlix v2 additions ── */
.hidden { display: none !important; }

.count-badge {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    text-align: center;
}

/* Bookmark star on cards */
.movie-card, .pinoy-card { position: relative; }

.card-bookmark {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.card-bookmark:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.card-bookmark.active {
    color: #f5c518;
    border-color: #f5c518;
}

/* Media-type badges */
.tv-badge {
    background: #e50914 !important;
}

.resume-badge {
    background: #2ecc40 !important;
    color: #000 !important;
    max-width: calc(100% - 48px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resume-label {
    color: #2ecc40;
    font-weight: 600;
}

/* Remove button on Continue Watching cards */
.continue-remove {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.7);
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.continue-remove:hover {
    color: #fff;
    background: var(--accent);
}

/* Modal backdrop banner */
.modal-backdrop {
    height: 200px;
    margin: -24px -24px 16px;
    background-size: cover;
    background-position: center top;
    position: relative;
}

.modal-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #1a1a1a 0%, transparent 60%);
}

/* Secondary modal buttons */
.btn-secondary-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid #444;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary-modal:hover {
    background: #444;
    border-color: #666;
}

.btn-secondary-modal.active {
    border-color: #f5c518;
    color: #f5c518;
}

.btn-secondary-modal svg {
    width: 18px;
    height: 18px;
}

.modal-actions {
    flex-wrap: wrap;
}

/* Detail rows (cast / similar) */
.detail-row {
    margin-top: 24px;
}

.detail-row h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cast-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.cast-card {
    flex-shrink: 0;
    width: 90px;
    text-align: center;
}

.cast-card img {
    width: 90px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 6px;
    background: var(--surface);
}

.cast-placeholder {
    width: 90px;
    aspect-ratio: 3/4;
    border-radius: 8px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.cast-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-char {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* TV season / episode picker */
.tv-picker {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.tv-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tv-picker-head label {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-picker-head select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid #444;
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.tv-note {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.episode-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.episode-item:hover {
    background: var(--surface-hover);
}

.episode-item.selected {
    border-color: var(--accent);
}

.episode-item img,
.episode-still-placeholder {
    width: 160px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #111;
}

.episode-still-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-weight: 700;
}

.episode-info {
    min-width: 0;
}

.episode-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.episode-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.episode-overview {
    font-size: 13px;
    line-height: 1.5;
    color: #bbb;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Public Domain Classics ── */
.classic-badge {
    background: #b8860b !important;
}

.pinoy-card .card-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 40px;
}

.pinoy-card .card-info {
    padding: 10px;
}

.pinoy-card .card-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pinoy-card .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Player controls + subtitles ── */
.source-label {
    font-size: 12px;
    color: #ccc;
    align-self: center;
    margin-right: 2px;
    white-space: nowrap;
}

.player-sources {
    align-items: center;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.ctl-btn {
    height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.14);
    color: #eee;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.ctl-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.28);
    color: #fff;
}

.ctl-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ctl-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.ctl-status {
    font-size: 12px;
    color: var(--text-muted);
}

#subsOverlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 52px;
    z-index: 11;
    display: flex;
    justify-content: center;
    padding: 0 24px;
    pointer-events: none;
    text-align: center;
}

#subsText {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    text-shadow: 2px 2px 4px #000, -1px -1px 2px #000;
    max-width: 90%;
}

.subs-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 48px;
    z-index: 13;
    background: rgba(10,10,10,0.95);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.subs-label {
    font-size: 13px;
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
}

.subs-row select {
    flex: 1;
    min-width: 140px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid #444;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 13px;
}

.subs-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 480px) {
    #subsText {
        font-size: 15px;
    }

    .player-controls {
        gap: 6px;
        padding: 6px 8px;
    }

    .ctl-btn {
        height: 28px;
        padding: 0 9px;
        font-size: 12px;
    }
}

/* ── Netflix-feel finale ── */

/* Billboard hero */
.hero {
    height: 82vh;
    min-height: 480px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: rgba(229,9,20,0.9);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 14px;
    color: #ddd;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-match {
    color: #46d369;
    font-weight: 700;
}

.hero-hd {
    padding: 1px 7px;
    border: 1px solid #aaa;
    border-radius: 3px;
    font-size: 11px;
    color: #ccc;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-secondary-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: rgba(109,109,110,0.7);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary-hero:hover {
    background: rgba(109,109,110,0.4);
}

.btn-secondary-hero svg {
    width: 22px;
    height: 22px;
}

.hero-content.fade-in {
    animation: heroIn 0.6s ease;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(14px); }
}

/* Top 10 row */
.top10-row {
    align-items: flex-end;
    padding-bottom: 8px;
}

.top10-card {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: transform 0.25s;
}

.top10-card:hover {
    transform: scale(1.04);
    z-index: 5;
}

.top10-num {
    font-size: clamp(110px, 11vw, 190px);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -12px;
    margin-right: -18px;
    color: #141414;
    -webkit-text-stroke: 4px #6d6d6d;
    user-select: none;
}

.top10-card img {
    width: 130px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
    background: var(--surface);
}

.top10-card .card-placeholder {
    width: 130px;
    aspect-ratio: 2/3;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-dim);
}

/* Hover quick actions on cards */
.card-hover {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.movie-card:hover .card-hover,
.pinoy-card:hover .card-hover {
    opacity: 1;
}

.card-hover button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: rgba(20,20,20,0.7);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, transform 0.15s;
}

.card-hover button:hover {
    border-color: #fff;
    transform: scale(1.1);
}

@media (hover: none) {
    .card-hover { display: none; }
}

/* Row scroll chevrons */
.row-wrap {
    position: relative;
}

.row-chev {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 46px;
    z-index: 6;
    border: none;
    background: rgba(10,10,10,0.55);
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.row-wrap:hover .row-chev {
    opacity: 1;
}

.row-chev:hover {
    background: rgba(10,10,10,0.8);
}

.row-chev.prev { left: 0; border-radius: 0 6px 6px 0; }
.row-chev.next { right: 0; border-radius: 6px 0 0 6px; }

@media (hover: none) {
    .row-chev { display: none; }
}

/* Skeleton shimmer loading */
.skel {
    pointer-events: none;
}

.skel-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    background: linear-gradient(100deg, #1e1e1e 40%, #2e2e2e 50%, #1e1e1e 60%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
}

.skel-line {
    height: 10px;
    margin: 8px 10px 10px;
    border-radius: 4px;
    background: linear-gradient(100deg, #1e1e1e 40%, #2e2e2e 50%, #1e1e1e 60%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
}

.movies-row .skel {
    flex-shrink: 0;
    width: 150px;
}

@keyframes shimmer {
    to { background-position: -200% 0; }
}

/* Modal match score */
.meta-tag.match {
    color: #46d369;
    font-weight: 700;
    background: rgba(70,211,105,0.1);
}

.meta-tag:empty {
    display: none;
}

/* Nav active underline */
.nav-btn {
    position: relative;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -3px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* Footer links */
.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 12px;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 68vh;
    }

    .top10-num {
        letter-spacing: -7px;
        margin-right: -12px;
    }

    .top10-card img,
    .top10-card .card-placeholder {
        width: 100px;
    }
}
