/**
 * PVR Movie Plugin - Custom HTML5 Video Player CSS
 */

.pvr-player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    overflow: hidden;
    user-select: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pvr-player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Controls Bar Overlay */
.pvr-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    padding: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pvr-player-wrap:hover .pvr-player-controls,
.pvr-player-wrap.controls-active .pvr-player-controls {
    opacity: 1;
    transform: translateY(0);
}

/* Control Elements Row */
.pvr-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.pvr-controls-left,
.pvr-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.pvr-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
    outline: none;
    min-width: 32px;
    min-height: 32px;
}

.pvr-btn:hover {
    color: #f5c518; /* IMDb Accent */
    background-color: rgba(255, 255, 255, 0.1);
}

.pvr-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Seek Bar / Progress Bar */
.pvr-progress-container {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: height 0.1s ease;
}

.pvr-progress-container:hover {
    height: 10px;
}

.pvr-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #f5c518;
    border-radius: 4px;
    width: 0;
    pointer-events: none;
}

.pvr-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    width: 0;
    pointer-events: none;
}

.pvr-progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 14px;
    height: 14px;
    background-color: #f5c518;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    pointer-events: none;
    transition: transform 0.1s ease;
}

.pvr-progress-container:hover .pvr-progress-handle {
    transform: translate(-50%, -50%) scale(1);
}

/* Time Display */
.pvr-time-display {
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    font-weight: 500;
    min-width: 120px;
}

/* Volume Panel */
.pvr-volume-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pvr-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
    transition: width 0.2s ease;
}

.pvr-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pvr-volume-slider::-webkit-slider-thumb:hover {
    background: #f5c518;
}

/* Speed Dropdown Menu */
.pvr-speed-wrap {
    position: relative;
}

.pvr-speed-menu {
    position: absolute;
    bottom: 120%;
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 0;
    list-style: none;
    margin: 0;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: none;
    z-index: 15;
}

.pvr-speed-menu.active {
    display: block;
    animation: slideUp 0.15s ease-out;
}

.pvr-speed-option {
    padding: 6px 12px;
    font-size: 12px;
    color: #bbb;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.pvr-speed-option:hover,
.pvr-speed-option.active {
    background-color: #f5c518;
    color: #000;
}

.pvr-quality-label {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #eee;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Buffering / Loading Spinner */
.pvr-player-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.15);
    border-top: 5px solid #f5c518;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 8;
    display: none;
}

.pvr-player-wrap.buffering .pvr-player-loader {
    display: block;
}

/* Play Screen Overlay (Initial / Replay) */
.pvr-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
    cursor: pointer;
    transition: opacity 0.3s;
}

.pvr-player-overlay svg {
    width: 70px;
    height: 70px;
    fill: #f5c518;
    filter: drop-shadow(0 0 15px rgba(245, 197, 24, 0.6));
    transition: transform 0.2s ease-in-out;
}

.pvr-player-overlay:hover svg {
    transform: scale(1.1);
}

.pvr-player-wrap.playing .pvr-player-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Fullscreen Mode overrides */
.pvr-player-wrap:-webkit-full-screen { width: 100%; height: 100%; }
.pvr-player-wrap:fullscreen { width: 100%; height: 100%; }

/* Mobile view adjustments (Min touch area target 44px) */
@media screen and (max-width: 768px) {
    .pvr-btn {
        min-width: 44px;
        min-height: 44px;
    }
    .pvr-progress-container {
        height: 10px;
    }
    .pvr-time-display {
        font-size: 11px;
        min-width: 90px;
    }
    .pvr-volume-slider {
        display: none;
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
