/* ==========================================================================
   Moderner Video Player - Ströher Lokschuppen
   ========================================================================== */

.video-container {
    position: relative;
    max-width: 500px;
    margin: 15px auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-standard);
    background: #000;
}

.video-container video {
    width: 100%;
    display: block;
    cursor: pointer;
}

/* Custom Controls Overlay */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 40px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls,
.video-container.show-controls .video-controls {
    opacity: 1;
}

/* Progress Bar */
.video-progress {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.video-progress-filled {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.video-progress-filled::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.video-progress:hover .video-progress-filled::after {
    opacity: 1;
}

/* Control Buttons Row */
.video-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.video-controls-left,
.video-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Control Buttons */
.video-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.video-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-btn:active {
    transform: scale(0.95);
}

.video-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Play Button (Large Overlay) */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(139, 90, 43, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.video-play-overlay:hover {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay svg {
    width: 30px;
    height: 30px;
    fill: #fff;
    margin-left: 4px;
}

.video-container.playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Volume Slider */
.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.volume-slider {
    width: 0;
    opacity: 0;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.volume-control:hover .volume-slider {
    width: 60px;
    opacity: 1;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Time Display */
.video-time {
    color: #fff;
    font-size: 0.85rem;
    font-family: 'Roboto', sans-serif;
    min-width: 90px;
}

/* Muted Indicator Badge */
.muted-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.muted-badge:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.muted-badge svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.video-container:not(.muted) .muted-badge {
    display: none;
}

/* Fullscreen Styles */
.video-container:fullscreen {
    max-width: none;
    border-radius: 0;
}

.video-container:fullscreen video {
    height: 100vh;
    object-fit: contain;
}

/* Loading Spinner */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: video-spin 1s linear infinite;
    display: none;
}

.video-container.loading .video-loading {
    display: block;
}

.video-container.loading .video-play-overlay {
    display: none;
}

@keyframes video-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .video-container {
        max-width: 100%;
        margin: 10px;
        border-radius: 8px;
    }
    
    .video-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .video-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .video-play-overlay {
        width: 60px;
        height: 60px;
    }
    
    .video-play-overlay svg {
        width: 24px;
        height: 24px;
    }
    
    .video-time {
        font-size: 0.75rem;
        min-width: 75px;
    }
    
    .muted-badge {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .volume-control:hover .volume-slider {
        width: 50px;
    }
}

@media screen and (max-width: 480px) {
    .video-controls {
        padding: 30px 10px 10px;
    }
    
    .video-controls-row {
        gap: 5px;
    }
    
    .video-btn {
        width: 32px;
        height: 32px;
    }
    
    .video-time {
        font-size: 0.7rem;
        min-width: 65px;
    }
}