/* Custom Video.js Skin - DramaBoss Style */
.video-js .vjs-big-play-button {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: transparent;
    border: none;
    line-height: 80px;
    font-size: 5em;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.2s, color 0.2s;
    z-index: 10;
    margin-top: 0;
    margin-left: 0;
}

.video-js .vjs-big-play-button:hover {
    background: transparent;
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-js:hover .vjs-big-play-button {
    background: transparent;
    border-color: transparent;
}

.video-js .vjs-control-bar {
    background: transparent;
    /* No background for control bar */
    height: 60px;
    padding: 0 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
    /* Let clicks pass through empty areas */
}

.video-js .vjs-control-bar>* {
    pointer-events: auto;
    /* Re-enable clicks on children */
}

/* Progress bar AT BOTTOM OF PLAYER */
.video-js .vjs-progress-control {
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    width: 100%;
    height: 4px;
    transition: height 0.2s;
    z-index: 5;
}

.video-js .vjs-progress-control:hover {
    height: 8px;
    bottom: 0px;
}

.video-js .vjs-progress-holder {
    height: 100%;
    margin: 0;
}

.video-js .vjs-play-progress {
    background-color: #00f0ff;
}

.video-js .vjs-play-progress:before {
    display: none;
}

.video-js .vjs-progress-control:hover .vjs-play-progress:before {
    display: block;
    top: -3px;
    right: -5px;
}

/* Floating Controls Container */
.floating-controls {
    display: none !important; /* Disembunyikan karena sudah pakai bawaan Video.js */
    position: absolute;
    bottom: 40px;
    right: 24px;
    z-index: 101;
    gap: 12px;
}

/* Hide Theater Toggle (Sidebar) by default */
#customTheaterBtn {
    display: none;
}

/* Show Theater Toggle in Full Window Mode */
body.full-window-mode #customTheaterBtn {
    display: flex;
}

/* Floating Buttons */
.floating-btn {
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    color: white;
}

.floating-btn:hover {
    background: rgba(0, 240, 255, 0.9);
    border-color: #00f0ff;
    transform: scale(1.05);
    color: white;
}

/* Hide elements we don't want */
.video-js .vjs-play-control,
.video-js .vjs-current-time,
.video-js .vjs-time-control,
.video-js .vjs-duration,
.video-js .vjs-volume-panel,
.video-js .vjs-remaining-time {
    display: none !important;
}

/* =========================================
   LAYOUT (Detail Wrapper / Player)
   ========================================= */
.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    height: calc(100vh - 100px);
    margin: 0px auto 20px;
    max-width: 1600px;
    padding: 0 20px;
    position: relative;
}

.detail-player {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

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

/* Message Boxes (Errors / Locked) */
.msg-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 2.5rem 3rem;
    z-index: 10;
    background: rgba(17, 19, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 193, 7, 0.25);
    max-width: 400px;
    width: 90%;
}

.msg-box h3 {
    font-weight: 700;
    margin-bottom: 10px;
}

.msg-box p {
    color: #aaa;
    margin-bottom: 20px;
}

.msg-box .btn {
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
}

/* Speed indicator hidden by default (only shown on mobile via media query) */
.speed-indicator {
    display: none !important;
}

/* =========================================
   FULL WINDOW THEATER MODE
   ========================================= */
body.full-window-mode {
    overflow: hidden;
}

body.full-window-mode header {
    display: none !important;
}

/* Sidebar by default in Full Window Mode */
body.full-window-mode .detail-info {
    position: fixed;
    right: -450px;
    top: 0;
    height: 100vh;
    width: 450px;
    z-index: 99999;
    background: #161b22;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    display: flex !important;
    overflow-y: auto;
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Show Sidebar when toggled active */
body.full-window-mode .detail-info.active {
    right: 0;
}

body.full-window-mode .detail-wrapper {
    padding: 0;
    margin: 0;
    max-width: 100%;
    height: 100vh;
    display: block;
}

body.full-window-mode .detail-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    padding: 0;
    border-radius: 0;
    border: none;
}

body.full-window-mode .floating-controls {
    z-index: 100000;
    bottom: 50px;
    right: 30px;
}

/* Sidebar Close Button */
.di-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.di-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.detail-info-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    display: none;
}

.detail-info-close:hover {
    color: #00f0ff;
}

body.full-window-mode .detail-info-close {
    display: block;
}

/* =========================================
   SIDEBAR / INFO PANEL
   ========================================= */
.detail-info {
    background: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.detail-info::-webkit-scrollbar {
    width: 6px;
}

.detail-info::-webkit-scrollbar-track {
    background: transparent;
}

.detail-info::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.di-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 20px;
}

/* Plot */
.di-section {
    margin-bottom: 24px;
}

.di-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.di-plot {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.di-plot.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.di-plot-toggle {
    background: none;
    border: none;
    color: #00f0ff;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
}

/* Tags */
.di-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.di-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
}

/* Episode Grid in Sidebar */
.di-ep-ranges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.di-ep-ranges::-webkit-scrollbar {
    height: 4px;
}

.di-ep-ranges::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.di-ep-range {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.di-ep-range.active {
    background: #00f0ff;
    color: #000;
    border-color: #00f0ff;
    font-weight: 700;
}

.di-ep-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.di-ep-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #d0d7de;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.di-ep-btn:hover:not(.locked) {
    border-color: #00f0ff;
    color: #fff;
    background: rgba(0, 240, 255, 0.15);
    transform: translateY(-2px);
}

.di-ep-btn.active {
    background: linear-gradient(135deg, #00f0ff 0%, #00c0cc 100%);
    color: #000;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.di-ep-btn.locked {
    border-color: rgba(255, 255, 255, 0.05);
    color: #484f58;
    background: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
}

.di-ep-btn.locked .bi {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.6rem;
}

/* SEEK OVERLAY */
.seek-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.seek-overlay.left {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
}

.seek-overlay.right {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent);
}

.seek-overlay.active {
    opacity: 1;
}

.seek-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.seek-icon {
    font-size: 2rem;
    margin-bottom: 5px;
    display: block;
    text-align: center;
}

/* LOADING OVERLAY */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.loading-content,
.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #00f0ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ERROR SCREEN */
.error-icon {
    width: 60px;
    height: 60px;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.error-desc {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.btn-retry {
    background: #00f0ff;
    color: #000;
    font-weight: 600;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
}

/* =========================================
   CUSTOM SHARE MODAL
   ========================================= */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.share-modal {
    background: #161b22;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.share-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.share-close {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.share-preview {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.share-poster {
    width: 70px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.share-info h3 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.share-meta {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 5px;
}

.share-plot {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    color: white;
}

.share-btn.fb {
    background: #1877F2;
}

.share-btn.wa {
    background: #25D366;
}

.share-btn.x {
    background: #000;
    border: 1px solid #333;
}

.share-btn.copy {
    background: white;
    color: black;
}

/* Hide mobile elements on desktop */
.mobile-header, .mobile-kuota, .mobile-actions,
.mobile-play-btn, .mobile-progress, .episode-sheet-overlay {
    display: none;
}

/* =========================================
   MOBILE PLAYER MODE (≤ 768px)
   ========================================= */
@media (max-width: 768px) {

    /* Hide desktop elements */
    .header,
    .footer,
    .detail-info,
    .floating-controls,
    .scroll-top,
    .ticker-bar,
    .platform-bar,
    .mobile-platform-bar,
    .platform-modal-overlay,
    .mobile-nav-container,
    .floating-socials,
    .admin-bar,
    .action-bar,
    .bb-site-action,
    #admin_bar {
        display: none !important;
    }

    body.show-admin-bar, html.show-admin-bar {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    html, body {
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #000 !important;
        height: 100% !important;
        position: fixed;
        width: 100%;
    }

    .detail-wrapper {
        padding: 0;
        margin: 0;
        max-width: 100%;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        display: block;
    }

    .detail-player {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        padding: 0;
        margin: 0;
        border-radius: 0;
        border: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .player-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        overflow: hidden;
        position: relative;
    }

    .video-js {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0;
    }

    .video-js video {
        object-fit: cover;
        -webkit-touch-callout: none;
        pointer-events: none;
    }

    /* Hide default Video.js controls on mobile */
    .video-js .vjs-big-play-button {
        display: none !important;
    }

    .video-js .vjs-control-bar {
        display: none !important;
    }

    /* === LOCKED EPISODE MSG-BOX === */
    .msg-box {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 50;
        text-align: center;
        padding: 1.5rem 2rem;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 16px;
        border: 1px solid rgba(255, 193, 7, 0.3);
        max-width: 280px;
        width: 80%;
    }

    .msg-box h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .msg-box p {
        font-size: 0.85rem;
        margin-bottom: 14px;
    }

    .msg-box .btn {
        font-size: 0.85rem;
        padding: 8px 20px;
    }

    /* === MOBILE HEADER === */
    .mobile-header {
        display: flex !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
        transition: opacity 0.3s ease;
    }

    .mobile-header .mob-back {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 8px;
        line-height: 1;
    }

    .mobile-header .mob-title {
        flex: 1;
        color: white;
        font-size: 1rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 12px;
    }

    .mobile-header .mob-ep {
        color: white;
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
    }

    /* === MOBILE KUOTA CARD (Cyber Teal Redesign) === */
    .mobile-kuota {
        display: block !important;
        position: absolute;
        top: calc(max(12px, env(safe-area-inset-top)) + 52px);
        left: 20px;
        right: 20px;
        z-index: 100;
        background: rgba(10, 15, 25, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 16px 20px;
        transition: opacity 0.3s ease;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

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

    .mk-label {
        color: #fff;
        font-weight: 700;
        font-size: 1.05rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mk-label i {
        color: var(--cyan, #00f0ff);
        font-size: 1.2rem;
    }

    .mk-count {
        background: rgba(0, 240, 255, 0.1);
        color: var(--cyan, #00f0ff);
        font-weight: 800;
        font-size: 0.85rem;
        padding: 4px 12px;
        border-radius: 50px;
        letter-spacing: 0.5px;
    }

    .mk-bar {
        width: 100%;
        height: 5px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 16px;
    }

    .mk-bar-fill {
        height: 100%;
        background: var(--cyan, #00f0ff);
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
        transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    }

    .mk-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mk-reset {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.82rem;
        font-weight: 500;
    }

    .mk-vip-btn {
        background: var(--cyan, #00f0ff);
        color: #060a13;
        border: none;
        border-radius: 8px;
        padding: 8px 18px;
        font-size: 0.85rem;
        font-weight: 800;
        cursor: pointer;
        text-decoration: none;
        transition: transform 0.2s;
    }

    .mk-vip-btn:active {
        transform: scale(0.95);
    }

    /* === MOBILE RIGHT ACTIONS === */
    .mobile-actions {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        right: 12px;
        bottom: 120px;
        z-index: 100;
        gap: 24px;
        align-items: center;
        transition: opacity 0.3s ease;
    }

    .mob-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    }

    .mob-action i {
        font-size: 1.8rem;
    }

    .mob-action-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    /* === MOBILE CENTER PLAY BUTTON === */
    .mobile-play-btn {
        display: flex !important;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 99;
        width: 70px;
        height: 70px;
        background: rgba(0, 0, 0, 0.35);
        border: 3px solid rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: opacity 0.3s ease, transform 0.2s ease;
    }

    .mobile-play-btn:active {
        transform: translate(-50%, -50%) scale(0.9);
    }

    .mobile-play-btn i {
        font-size: 2rem;
        color: white;
        margin-left: 5px;
    }

    .mobile-play-btn.is-playing {
        display: none !important;
    }

    /* === SPEED INDICATOR (Long Press) === */
    .speed-indicator {
        display: none;
        position: absolute;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 150;
        background: rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 6px 18px;
        align-items: center;
        gap: 6px;
        pointer-events: none;
        opacity: 0.7;
    }

    .speed-indicator.active {
        display: flex !important;
    }

    .speed-icon {
        font-size: 1.2rem;
    }

    .speed-text {
        color: white;
        font-size: 0.9rem;
        font-weight: 700;
        white-space: nowrap;
    }

    @keyframes speedPulse {
        0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
        50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    }

    /* === MOBILE PROGRESS BAR === */
    .mobile-progress {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2147483646;
        height: 3px;
        background: rgba(255, 255, 255, 0.2);
    }

    .mobile-progress-fill {
        height: 3px;
        background: linear-gradient(90deg, var(--cyan, #00e5ff), #00b8d4);
        width: 0%;
        transition: width 0.3s linear;
    }

    /* === MOBILE CONTROLS HIDDEN STATE === */
    .mobile-header,
    .mobile-kuota,
    .mobile-actions {
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-controls-hidden .mobile-header,
    .mobile-controls-hidden .mobile-kuota,
    .mobile-controls-hidden .mobile-actions {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* === EPISODE BOTTOM SHEET === */
    .episode-sheet-overlay {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 200;
    }

    .episode-sheet-overlay.active {
        display: block;
        touch-action: auto;
        -webkit-user-select: auto;
        user-select: auto;
    }

    .episode-sheet {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 55vh;
        background: #111318;
        border-radius: 20px 20px 0 0;
        z-index: 201;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex;
        flex-direction: column;
        padding-bottom: env(safe-area-inset-bottom);
        overflow: hidden;
        touch-action: none;
    }

    .episode-sheet-overlay.active .episode-sheet {
        transform: translateY(0);
    }

    .es-handle {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        margin: 12px auto 4px;
        flex-shrink: 0;
    }

    .es-header {
        padding: 12px 20px 10px;
    }

    .es-header h3 {
        color: white;
        font-size: 1.2rem;
        font-weight: 800;
        margin: 0;
    }

    .es-close {
        display: none;
    }

    .es-ranges {
        display: flex;
        gap: 10px;
        padding: 10px 20px 8px;
        overflow-x: auto;
        flex-shrink: 0;
    }

    .es-range-btn {
        background: transparent;
        border: 1.5px solid var(--cyan, #00e5ff);
        color: var(--cyan, #00e5ff);
        padding: 5px 16px;
        border-radius: 6px;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .es-range-btn.active {
        background: var(--cyan, #00e5ff);
        color: #000;
        border-color: var(--cyan, #00e5ff);
    }

    .es-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
        padding: 10px 20px 24px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        flex: 1;
        overscroll-behavior: contain;
    }

    .es-ep-btn {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 229, 255, 0.05);
        border: 1.5px solid rgba(0, 229, 255, 0.35);
        color: var(--cyan, #00e5ff);
        border-radius: 10px;
        font-size: 0.95rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.15s ease;
        text-decoration: none;
    }

    .es-ep-btn:active {
        transform: scale(0.95);
    }

    .es-ep-btn.active {
        background: var(--cyan, #00e5ff);
        color: #000;
        border-color: var(--cyan, #00e5ff);
        font-weight: 800;
    }

    .es-ep-btn.locked {
        opacity: 0.4;
    }
}

/* Hide mobile elements on desktop */
.mobile-header,
.mobile-kuota,
.mobile-actions,
.mobile-play-btn,
.mobile-progress,
.episode-sheet-overlay {
    display: none;
}

/* Video Ad Custom Classes */
.ad-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 200;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-video-overlay.active {
    display: flex;
}

.ad-badge-label {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 60;
}

.skip-ad-container {
    position: absolute;
    bottom: 40px;
    right: 20px;
    z-index: 100;
}

.skip-ad-btn {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.skip-ad-btn:hover:not(:disabled) {
    background: #fff;
    color: #000;
}
