:root {
    --plyr-color-main: #7dd3fc;
    /* Sky blue matching AniVibe accent */
    --vidoza-bg: #0d0d0f;
    --vidoza-card-bg: rgba(255, 255, 255, 0.03);
    --vidoza-border: rgba(255, 255, 255, 0.08);
}

.vidoza-modal {
    max-width: 1200px !important;
    width: 95% !important;
    height: 85vh !important;
    max-height: 700px !important;
    flex-direction: row !important;
    display: flex !important;
    background: #000;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    /* Desktop default side-by-side */
}

.vidoza-modal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--vidoza-bg);
}

.vidoza-modal-sidebar {
    width: 320px;
    background: #09090b;
    border-left: 1px solid var(--vidoza-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.vidoza-sidebar-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--vidoza-border);
    background: var(--vidoza-card-bg);
}

.vidoza-sidebar-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.vidoza-sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--vidoza-border);
    background: var(--vidoza-card-bg);
}

.vidoza-nav-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vidoza-player-notices {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 11px;
    color: #888;
    background: rgba(0, 0, 0, 0.2);
}

.premium-badge {
    color: var(--plyr-color-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vidoza-video-wrap {
    background: #000;
    position: relative;
    width: 100%;
    /* Use padding hack for guaranteed 16:9 */
    padding-bottom: 56.25% !important;
    height: 0 !important;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Loading indicator */
.vidoza-player-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    z-index: 5;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--plyr-color-main);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.vidoza-video-wrap .plyr__video-wrapper,
.vidoza-video-wrap .plyr video,
.vidoza-video-wrap>video {
    position: absolute !important;
    top: 0;
    left: 0;
    height: 100% !important;
    width: 100% !important;
    object-fit: contain;
}

.vidoza-video-wrap .plyr {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.vidoza-episode-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
    overflow-y: auto;
    flex: 0 0 auto;
    align-content: flex-start;
    max-height: 50vh;
}

.vidoza-ep-btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s !important;
    color: #fff !important;
    cursor: pointer;
}

.vidoza-ep-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.vidoza-ep-btn.active {
    background: var(--plyr-color-main) !important;
    color: #000 !important;
    border-color: var(--plyr-color-main) !important;
    box-shadow: 0 0 15px rgba(125, 211, 252, 0.3);
}

/* Modal header customization */
.vidoza-modal-header {
    background: var(--vidoza-bg) !important;
}

/* Navigation buttons premium look */
.vidoza-nav-btn {
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transition: all 0.2s !important;
    cursor: pointer;
}

.vidoza-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--plyr-color-main) !important;
}

.vidoza-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Resume prompt styling */
.player-resume-toast {
    position: absolute;
    bottom: 80px;
    left: 20px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--plyr-color-main);
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.player-resume-toast button {
    background: var(--plyr-color-main);
    border: none;
    color: #000;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.vidoza-controls-mobile {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .vidoza-modal {
        flex-direction: column !important;
        max-height: 98vh !important;
        width: 100% !important;
        border-radius: 0 !important;
        height: 100vh !important;
    }

    .vidoza-modal-sidebar {
        width: 100% !important;
        border-left: none;
        border-top: 1px solid var(--vidoza-border);
        flex: 1;
        overflow: hidden;
    }

    .vidoza-episode-grid {
        flex: 1 !important;
        max-height: none !important;
        padding: 15px !important;
    }

    .vidoza-modal-main {
        flex: none !important;
    }

    .vidoza-controls-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        background: rgba(0, 0, 0, 0.3);
        border-top: 1px solid var(--vidoza-border);
    }

    .vidoza-sidebar-footer {
        display: none;
    }
}