/* ============================================
   VIDEO PLAYER COM PUBLICIDADE PRÉ-ROLL
   Estilo: YouTube-like
   ============================================ */

/* Container Principal do Player */
.video-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Wrapper para manter aspect ratio 16:9 */
.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

/* Player Content */
.video-player-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Vídeo Principal */
.video-player-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================
   PUBLICIDADE PRÉ-ROLL
   ============================================ */

.preroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.preroll-container.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

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

/* Overlay de Publicidade */
.preroll-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;
    z-index: 101;
}

/* Contador de Tempo para Pular */
.preroll-skip-timer {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    z-index: 102;
    min-width: 100px;
    text-align: center;
}

/* Botao de Pular Publicidade (X) */
.preroll-skip-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fff;
    padding: 8px 12px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    z-index: 102;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.preroll-skip-button.visible {
    opacity: 1;
    pointer-events: auto;
}

.preroll-skip-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.preroll-skip-button:active {
    transform: scale(0.95);
}

/* ============================================
   CONTROLES DO PLAYER
   ============================================ */

.video-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 40px 10px 10px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-player-container:hover .video-player-controls,
.video-player-controls.active {
    opacity: 1;
}

/* Barra de Progresso */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

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

.progress-bar {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    width: 0%;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar-container:hover .progress-bar::after {
    opacity: 1;
}

/* Controles Inferiores */
.controls-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Botões de Controle */
.control-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-button:active {
    transform: scale(0.95);
}

/* Controle de Volume */
.volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.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;
}

/* Tempo Atual e Duração */
.time-display {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
    margin-right: 10px;
    font-family: 'Arial', sans-serif;
}

/* Botão Fullscreen */
.fullscreen-button {
    margin-left: auto;
}

/* ============================================
   PLACEHOLDER QUANDO NÃO HÁ VÍDEO
   ============================================ */

.video-player-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
}

.video-player-placeholder svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .preroll-skip-timer {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 10px;
    }

    .preroll-skip-button {
        bottom: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .video-player-controls {
        padding: 30px 8px 8px;
        gap: 6px;
    }

    .control-button {
        padding: 6px;
        font-size: 16px;
    }

    .volume-slider {
        width: 60px;
    }

    .time-display {
        font-size: 11px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .preroll-skip-timer {
        top: 8px;
        right: 8px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .preroll-skip-button {
        bottom: 8px;
        right: 8px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .video-player-controls {
        padding: 25px 6px 6px;
        gap: 4px;
    }

    .control-button {
        padding: 4px;
        font-size: 14px;
    }

    .volume-control {
        display: none;
    }

    .time-display {
        font-size: 10px;
        margin-right: 6px;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.fade-out {
    animation: fadeOut 0.3s ease;
}

/* ============================================
   ESTADO FULLSCREEN
   ============================================ */

.video-player-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    z-index: 9999;
}

.video-player-container.fullscreen .video-player-wrapper {
    padding-bottom: 0;
    height: 100%;
}

.video-player-container.fullscreen .video-player-controls {
    opacity: 1;
}

