/* Base Video Player Styles - Reusable across game modes */

/* ===== VIDEO CONTAINER ===== */
.video-container {
    position: relative;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
}

.video-container video,
.video-container .main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* ===== VIDEO OVERLAY ===== */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-overlay.hidden {
    opacity: 0;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.play-button-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.play-button-large:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
}

/* ===== VIDEO CONTROLS ===== */
.video-controls {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Auto-hide controls when playing and no interaction */
.video-container.auto-hide .video-controls {
    transform: translateY(100%);
    opacity: 0;
}

.video-container:hover .video-controls,
.video-controls:hover,
.video-controls.visible {
    transform: translateY(0);
    opacity: 1;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-bottom: 10px;
}

.progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 6px;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #c471ed);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress-thumb {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.progress-bar:hover .progress-thumb {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #ccc;
}

/* ===== CONTROL BUTTONS ===== */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

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

.control-btn,
.play-pause-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.control-btn:hover,
.play-pause-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== VOLUME CONTROL ===== */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.volume-percentage {
    color: #ccc;
    font-size: 0.8rem;
    min-width: 30px;
}

/* ===== QUALITY AND SPEED CONTROLS ===== */
.quality-dropdown,
.speed-dropdown {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* ===== MINIMAL MODE OVERRIDES ===== */
.video-container.minimal .video-controls {
    padding: 8px;
    background: rgba(0, 0, 0, 0.6);
}

.video-container.minimal .progress-bar {
    height: 3px;
}

.video-container.minimal .control-btn {
    padding: 4px 6px;
    font-size: 0.8rem;
}

.video-container.minimal .play-button-large {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

/* ===== FULLSCREEN STYLES ===== */
.video-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

.video-container:-moz-full-screen {
    width: 100vw;
    height: 100vh;
}

.video-container:fullscreen {
    width: 100vw;
    height: 100vh;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .controls-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .volume-control {
        order: -1;
    }
    
    .video-controls {
        padding: 10px;
    }
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.video-container.no-controls .video-controls {
    display: none !important;
}

.video-container.always-show-controls .video-controls {
    transform: translateY(0) !important;
    opacity: 1 !important;
}