/* Player Enhancements 2.0 CSS */

/* ═══ Double Tap Indicator ═══ */
.zn-doubletap-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 60;
    animation: zn-dtap-fade 0.7s ease-out forwards;
}
.zn-doubletap-left { left: 15%; }
.zn-doubletap-right { right: 15%; }
.zn-doubletap-indicator span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}
@keyframes zn-dtap-fade {
    0% { opacity: 1; transform: translateY(-50%) scale(1); }
    100% { opacity: 0; transform: translateY(-50%) scale(1.4); }
}

/* ═══ Resume Prompt ═══ */
.zn-resume-prompt {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 70;
    animation: zn-resume-in 0.3s ease;
}
.zn-resume-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
}
.zn-resume-inner .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
}
@keyframes zn-resume-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══ Theater Mode ═══ */
body.zn-theater-mode {
    position: relative;
}
body.zn-theater-mode .watch-page {
    padding-top: 0 !important;
}
body.zn-theater-mode .site-header,
body.zn-theater-mode .bottom-nav {
    display: none !important;
}
body.zn-theater-mode .watch-player-block {
    position: relative;
    z-index: 100;
}
body.zn-theater-mode #player-shell {
    position: relative;
    z-index: 100;
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    border-radius: 0 !important;
    background: #000 !important;
}
body.zn-theater-mode #player-shell video {
    max-height: 80vh;
    background: #000;
}
body.zn-theater-mode #player-shell .zn-player-stage {
    background: #000;
}
body.zn-theater-mode #player-shell .zn-player-controls {
    position: relative;
    z-index: 101;
}
body.zn-theater-mode .watch-panel {
    position: relative;
    z-index: 2;
    opacity: 0.4;
    transition: opacity 0.3s;
}
body.zn-theater-mode .watch-panel:hover {
    opacity: 1;
}
body.zn-theater-mode .watch-stack,
body.zn-theater-mode .watch-main-col {
    position: relative;
    z-index: 2;
}
@media (max-width: 767px) {
    body.zn-theater-mode #player-shell {
        margin-left: calc(-1 * var(--gutter, 1rem)) !important;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
    }
    body.zn-theater-mode .watch-panel {
        opacity: 1;
    }
}

/* ═══ Settings Sheet PIP/Theater buttons ═══ */
.settings-pip-btn,
.settings-theater-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: var(--text, #fff);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}
.settings-pip-btn:hover,
.settings-theater-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* ═══ PWA Install Banner ═══ */
.zn-pwa-banner {
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    left: 0.5rem;
    right: 0.5rem;
    z-index: 9999;
    animation: zn-pwa-slide 0.3s ease;
}
.zn-pwa-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border, #2d2d44);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    color: var(--text, #fff);
    font-size: 0.85rem;
}
.zn-pwa-inner .btn { flex-shrink: 0; }
.zn-pwa-close { font-size: 1.2rem; padding: 0.2rem 0.4rem !important; }
@keyframes zn-pwa-slide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 768px) {
    .zn-pwa-banner { display: none; }
}

/* ═══ Similar Carousel (Netflix-style horizontal scroll) ═══ */
.similar-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0;
}
.similar-carousel::-webkit-scrollbar {
    display: none;
}
.similar-carousel .jcard {
    flex: 0 0 130px;
    scroll-snap-align: start;
    min-width: 130px;
    max-width: 130px;
}
.similar-carousel .jcard .jcard-poster {
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
}
.similar-carousel .jcard .jcard-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.similar-carousel .jcard .jcard-title {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-top: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 768px) {
    .similar-carousel .jcard {
        flex: 0 0 155px;
        min-width: 155px;
        max-width: 155px;
    }
}

/* Similar section wrap */
.detail-similar-section {
    position: relative;
}
.similar-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}
.similar-nav-btn:hover { background: rgba(0,0,0,0.8); }
.similar-nav-prev { left: -8px; }
.similar-nav-next { right: -8px; }
@media (max-width: 767px) {
    .similar-nav-btn { display: none; }
}

/* ═══ Mobile Settings BottomSheet (inline — player controls uchun) ═══ */
.player-settings-sheet {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    z-index: 10015;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 12px 12px 0 0;
    padding: 0.75rem;
    max-height: 50vh;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}
.player-settings-sheet.hidden {
    display: none !important;
}
.player-settings-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.settings-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.settings-row .zn-volume {
    flex: 1;
    max-width: 120px;
}
.settings-sheet-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text, #fff);
    font-size: 0.82rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}
.settings-sheet-btn:hover {
    background: rgba(255,255,255,0.08);
}
/* Mobile da inline settings yashirish — overlay dan foydalaniladi */
@media (max-width: 767px) {
    .player-settings-sheet {
        display: none !important;
    }
}

/* ═══ Continue Watching Carousel ═══ */
.continue-carousel {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.25rem 0;
}
.continue-carousel::-webkit-scrollbar { display: none; }
.continue-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text, #fff);
    background: var(--bg-card, #1a1a2e);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}
.continue-card:hover { transform: scale(1.02); }
.continue-poster {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
}
.continue-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.continue-info {
    padding: 0.4rem 0.5rem;
}
.continue-name {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.continue-ep {
    font-size: 0.65rem;
    color: var(--text-muted, #888);
    margin-top: 0.1rem;
}
.continue-bar {
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}
.continue-fill {
    height: 100%;
    background: var(--primary, #6c5ce7);
    border-radius: 2px;
}
@media (max-width: 767px) {
    .continue-card { flex: 0 0 120px; }
}

/* ═══ (Next Episode Button olib tashlandi) ═══ */
