/* ====== PLAYER DE VÍDEO PERSONALIZADO TV CURUÇA ====== */

/* Container principal do player */
.video-container {
    position: relative;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(113, 74, 41, 0.15) !important;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #714a29, #8b5a35);
}

.video-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(113, 74, 41, 0.25) !important;
}

/* Customização do Video.js */
.video-js {
    background: transparent !important;
    border-radius: 16px;
}

/* Barra de controles personalizada */
.video-js .vjs-control-bar {
    background: linear-gradient(90deg, rgba(113, 74, 41, 0.95) 0%, rgba(139, 90, 53, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    border-radius: 0 0 16px 16px;
    height: 3rem !important;
    padding: 0 1rem;
    border-top: 2px solid rgba(230, 162, 60, 0.3);
}

/* Botões de controle */
.video-js .vjs-button {
    color: #ffffff !important;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

.video-js .vjs-button:hover,
.video-js .vjs-button:focus {
    background: rgba(230, 162, 60, 0.2) !important;
    color: #e6a23c !important;
    transform: scale(1.1);
}

/* Botão de play personalizado */
.video-js .vjs-play-control {
    font-size: 1.8rem !important;
    min-width: 3rem !important;
    width: 3rem !important;
}

.video-js .vjs-play-control .vjs-icon-placeholder::before {
    font-size: 1.8rem !important;
    line-height: 2rem !important;
}

.video-js .vjs-play-control:hover {
    background: linear-gradient(45deg, #e6a23c, #f7c873) !important;
    box-shadow: 0 4px 15px rgba(230, 162, 60, 0.4);
}

/* Barra de progresso */
.video-js .vjs-progress-control {
    position: relative;
}

.video-js .vjs-progress-holder {
    background: rgba(255, 255, 255, 0.2) !important;
    height: 6px !important;
    border-radius: 3px;
    margin: 0 10px;
}

.video-js .vjs-play-progress {
    background: linear-gradient(90deg, #e6a23c 0%, #f7c873 100%) !important;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(230, 162, 60, 0.5);
}

.video-js .vjs-load-progress {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px;
}

/* Volume */
.video-js .vjs-volume-level {
    background: linear-gradient(90deg, #e6a23c 0%, #f7c873 100%) !important;
}

.video-js .vjs-volume-panel {
    transition: all 0.3s ease;
}

.video-js .vjs-volume-panel:hover {
    transform: translateY(-2px);
}

/* Indicador de tempo */
.video-js .vjs-time-control {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
}

/* Botão de tela cheia */
.video-js .vjs-fullscreen-control {
    background: rgba(230, 162, 60, 0.1) !important;
    border: 1px solid rgba(230, 162, 60, 0.3);
}

.video-js .vjs-fullscreen-control:hover {
    background: linear-gradient(45deg, #e6a23c, #f7c873) !important;
    border-color: #e6a23c;
}

/* Esconder menu de playback rates (velocidade) */
.video-js .vjs-playback-rate {
    display: none !important;
}

/* ====== INDICADOR AO VIVO ====== */
.video-live-indicator {
    position: absolute;
    top: 15px;
    right: 15px; /* Mudado de left para right */
    background: linear-gradient(45deg, #ff4444, #ff6666);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
    animation: pulse-live 2s infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    display: none; /* Escondido por padrão, controlado pelo VideoLiveController */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(-5px);
}

.video-live-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse-live {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
        transform: scale(1) translateY(0);
    }
    50% {
        box-shadow: 0 6px 25px rgba(255, 68, 68, 0.8);
        transform: scale(1.05) translateY(0);
    }
}

/* ====== CONTROLES INTERATIVOS ADICIONAIS ====== */
.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    pointer-events: none;
}

.video-container:hover .player-overlay {
    opacity: 1;
}

/* Botão de play central */
.center-play-button {
    background: linear-gradient(45deg, #714a29, #8b5a35);
    border: 3px solid #e6a23c;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e6a23c;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 8px 25px rgba(113, 74, 41, 0.4);
}

.center-play-button:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #e6a23c, #f7c873);
    color: white;
    box-shadow: 0 12px 35px rgba(230, 162, 60, 0.6);
}

/* ====== LOADING PERSONALIZADO ====== */
.video-js .vjs-loading-spinner {
    border-color: rgba(230, 162, 60, 0.3) rgba(230, 162, 60, 0.3) #e6a23c transparent !important;
    border-width: 4px !important;
}

/* ====== POSTER PERSONALIZADO ====== */
.video-js .vjs-poster {
    background-size: cover;
    background-position: center;
    border-radius: 16px;
}

/* ====== RESPONSIVIDADE ====== */
@media (max-width: 768px) {
    .video-js .vjs-control-bar {
        height: 3.5rem;
        padding: 0 0.5rem;
    }

    .video-js .vjs-button {
        font-size: 0.9rem;
    }

    .video-js .vjs-play-control {
        font-size: 1.5rem !important;
        min-width: 2.5rem !important;
        width: 2.5rem !important;
    }

    .center-play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .video-live-indicator {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* ====== ANIMAÇÕES DE INTERAÇÃO ====== */
.video-container.playing {
    box-shadow: 0 8px 32px rgba(230, 162, 60, 0.3) !important;
}

.video-container.paused {
    box-shadow: 0 8px 32px rgba(113, 74, 41, 0.15) !important;
}

/* Efeito de onda ao clicar */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(230, 162, 60, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ====== MENU DE CONTEXTO PERSONALIZADO ====== */
.custom-context-menu {
    position: absolute;
    background: linear-gradient(135deg, #714a29, #8b5a35);
    border: 1px solid rgba(230, 162, 60, 0.3);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    z-index: 2000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.custom-context-menu-item {
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-context-menu-item:hover {
    background: rgba(230, 162, 60, 0.2);
    color: #e6a23c;
}

.custom-context-menu-item:last-child {
    border-bottom: none;
}

/* Video.js Player Button Icon Vertical Centering */
.video-js .vjs-control {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-js .vjs-control .vjs-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.video-js .vjs-control .vjs-icon-placeholder:before {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Specific button types */
.video-js .vjs-play-control,
.video-js .vjs-mute-control,
.video-js .vjs-volume-control,
.video-js .vjs-fullscreen-control,
.video-js .vjs-picture-in-picture-control {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Control bar alignment */
.video-js .vjs-control-bar {
    display: flex;
    align-items: center;
}

/* Button content alignment */
.video-js .vjs-control .vjs-control-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Icon font alignment */
.video-js .vjs-icon-play,
.video-js .vjs-icon-pause,
.video-js .vjs-icon-volume-high,
.video-js .vjs-icon-volume-low,
.video-js .vjs-icon-volume-mute,
.video-js .vjs-icon-fullscreen-enter,
.video-js .vjs-icon-fullscreen-exit {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
