/* ============================================================
   PREMIUM VIDEO PLAYER UI  —  video-player-ui.css
   ============================================================ */

.vp-wrap {
    position: relative;
    background: #000;
    overflow: hidden;
    display: block;
    line-height: 0;
    user-select: none;
    -webkit-user-select: none;
    transition: cursor 0.3s ease;
}

.vp-wrap video {
    display: block;
    width: 100%;
    height: auto;
}

/* ── LOADER OVERLAY ── */
.vp-loader {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #080a12;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.vp-loader.vp-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.vp-bars { display: flex; gap: 5px; align-items: flex-end; height: 30px; }
.vp-bar {
    width: 4px;
    border-radius: 2px;
    background: #6366f1;
    animation: vp-bounce 1s ease-in-out infinite;
}
.vp-bar:nth-child(1) { height: 12px; animation-delay: 0.0s; }
.vp-bar:nth-child(2) { height: 22px; animation-delay: 0.1s; }
.vp-bar:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.vp-bar:nth-child(4) { height: 22px; animation-delay: 0.3s; }
.vp-bar:nth-child(5) { height: 12px; animation-delay: 0.4s; }
@keyframes vp-bounce { 0%, 100% { transform: scaleY(1); opacity: 0.5; } 50% { transform: scaleY(0.4); opacity: 1; } }

.vp-loader-text {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}

/* ── INTERACTION LAYERS ── */
.vp-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: transparent;
    cursor: pointer;
}

/* ── CENTER PLAY BUTTON ── */
.vp-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 30;
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.vp-btn.vp-btn-show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.vp-btn svg { fill: #fff; filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.8)); }

.vp-btn.vp-ripple::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #6366f1;
    animation: vp-ripple 0.8s ease-out forwards;
}
@keyframes vp-ripple { from { transform: scale(1); opacity: 1; } to { transform: scale(2); opacity: 0; } }

/* ── CUSTOM CONTROLS ── */
.vp-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 40;
    padding: 20px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.vp-controls.vp-active { transform: translateY(0); opacity: 1; visibility: visible; }

/* Progress Bar */
.vp-progress-wrap {
    height: 6px;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    group: hover;
}
.vp-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: height 0.2s;
}
.vp-progress-wrap:hover .vp-progress-bar { height: 6px; }

.vp-progress-curr { height: 100%; background: #6366f1; width: 0; position: relative; z-index: 2; }
.vp-progress-load { height: 100%; background: rgba(255,255,255,0.2); width: 0; position: absolute; top: 0; left: 0; z-index: 1; }

.vp-ctrl-row { display: flex; align-items: center; justify-content: space-between; }
.vp-ctrl-left, .vp-ctrl-right { display: flex; align-items: center; gap: 15px; }

.vp-ctrl-btn {
    background: none; border: none; padding: 5px; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.85;
}
.vp-ctrl-btn:hover { transform: scale(1.15); opacity: 1; }
.vp-ctrl-btn svg { fill: currentColor; }

.vp-time { color: #fff; font-size: 0.85rem; font-weight: 500; font-family: ui-sans-serif, system-ui, sans-serif; min-width: 90px; }

/* Volume Slider */
.vp-volume-wrap { display: flex; align-items: center; gap: 0; }
.vp-vol-slider {
    width: 0; overflow: hidden; height: 30px; display: flex; align-items: center;
    transition: width 0.3s ease, margin 0.3s ease;
    cursor: pointer;
}
.vp-volume-wrap:hover .vp-vol-slider { width: 80px; margin-left: 8px; }
.vp-vol-track { width: 100%; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; }
.vp-vol-fill { height: 100%; background: #fff; border-radius: 2px; width: 100%; }

.vp-speed-btn { font-size: 0.8rem; font-weight: 700; width: 40px; text-align: center; }

/* Fullscreen icon tweak */
.vp-full-btn svg { width: 22px; height: 22px; }

/* ── MOBILE OPTIMIZATIONS ── */
@media (max-width: 768px) {
    .vp-btn {
        width: 60px;
        height: 60px;
    }
    .vp-btn svg {
        width: 24px;
        height: 24px;
    }
    .vp-controls {
        padding: 10px 15px;
    }
    .vp-progress-wrap {
        margin-bottom: 10px;
    }
    .vp-ctrl-row {
        gap: 10px;
    }
    .vp-time {
        font-size: 0.75rem;
        min-width: 70px;
    }
    .vp-vol-slider {
        display: none !important; /* Hide volume slider on mobile, use system volume */
    }
    .vp-ctrl-left, .vp-ctrl-right {
        gap: 10px;
    }
}
