/* Container principale del video */
.video-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 16/9;
    margin: 20px auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
/* Video element - NASCONDE i controlli nativi */
.video-player {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}
/* Overlay per i controlli personalizzati */
.controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 0 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
}
.video-container:hover .controls-overlay,
.video-container.show-controls .controls-overlay {
    transform: translateY(0);
}
/* Progress bar */
.progress-container {
    padding: 15px 0 15px;
    margin-bottom: 0;
    cursor: pointer;
}
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
}
.progress-filled {
    height: 100%;
    background: #ff6b6b;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}
.progress-buffered {
    position: absolute;
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 3px;
    width: 0%;
}
/* Controlli principali */
.controls-main {
    display: flex;
    align-items: center;
    gap: 15px;
}
.play-pause-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}
.play-pause-btn:hover {
    background: rgba(255,255,255,0.2);
}
/* Controllo volume */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.volume-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
}
.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
/* Time display */
.time-display {
    color: white;
    font-size: 14px;
    font-family: monospace;
    margin-left: auto;
}
/* Pulsante fullscreen */
.fullscreen-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
}
/* Play button centrale (quando video è in pausa) */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    border: none;
    color: white;
    font-size: 48px;
    cursor: pointer;
    padding: 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 5;
}
.center-play-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}
.center-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}
.center-play-btn.playing {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Loading indicator */
.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.8);
    padding: 20px;
    border-radius: 8px;
    display: none;
    z-index: 15;
}
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b6b;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Responsive design */
@media (max-width: 768px) {
    .video-container {
        margin: 10px auto;
    }
    
    .controls-main {
        gap: 10px;
    }
    
    .volume-container {
        display: none; /* Nascondi controlli volume su mobile */
    }
    
    .time-display {
        font-size: 12px;
    }
}
/* Stile per il cursore personalizzato del volume */
.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
}
.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b6b;
    border: none;
    cursor: pointer;
}