/**
 * FocaPlay Cinematic Native Player - CSS Styles v4.1.0
 * Tecnologia própria FocaPlay Streaming (Identidade Visual Roxo & Branco)
 * Esconde 100% da interface do YouTube na reprodução e na pausa.
 */

:root {
    --fpc-accent: #6b21ff;
    --fpc-accent-hover: #7e3bff;
    --fpc-accent-glow: rgba(107, 33, 255, 0.5);
}

.fpc-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    user-select: none;
    -webkit-user-select: none;
    color: #fff;
    contain: layout paint;
}

.fpc-player-wrapper.ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.fpc-player-stage {
    position: relative;
    width: 100%;
    height: 100%;
    background: #050608;
    overflow: hidden;
    cursor: default;
}

/* Superfície de Vídeo */
.fpc-video-surface {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.fpc-video-surface iframe,
.fpc-video-surface video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

/* Ocultação total da interface do YouTube durante reprodução e unpause */
.fpc-player-wrapper.provider-youtube .fpc-video-surface {
    overflow: hidden !important;
}

.fpc-player-wrapper.provider-youtube .fpc-video-surface iframe {
    position: absolute !important;
    top: -12% !important;
    left: -5% !important;
    width: 110% !important;
    height: 124% !important;
    border: 0 !important;
    pointer-events: none !important; /* Bloqueia qualquer hover ou clique nativo do YouTube */
    transform: none !important;
}

/* Escudo protetor invisível que captura todos os cliques no vídeo */
.fpc-shield {
    position: absolute;
    inset: 0;
    z-index: 5;
    cursor: pointer;
    background: transparent;
}

/* Cortina de Pausa FocaPlay — Esconde 100% da tela de pausa do YouTube */
.fpc-pause-curtain {
    position: absolute;
    inset: 0;
    z-index: 9;
    background: radial-gradient(circle at center, rgba(16, 18, 38, 0.78) 0%, rgba(7, 8, 20, 0.96) 80%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.3s;
    cursor: pointer;
}

.fpc-player-wrapper.is-paused .fpc-pause-curtain {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fpc-pause-curtain-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    max-width: 540px;
    padding: 24px;
    pointer-events: auto;
}

.fpc-pause-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.fpc-pause-title {
    font-family: var(--fp-font-display, "Montserrat", sans-serif);
    font-size: clamp(20px, 3.5vw, 30px);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.fpc-pause-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--fpc-accent, #6b21ff);
    background: linear-gradient(135deg, #7e3bff 0%, #5c15eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--fpc-accent-glow, rgba(107, 33, 255, 0.5));
    transition: transform 0.2s, box-shadow 0.2s;
}

.fpc-pause-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--fpc-accent-glow, rgba(107, 33, 255, 0.7));
}

.fpc-pause-play-btn svg {
    width: 20px;
    height: 20px;
}

/* Poster Inicial / Thumbnail de Alta Definição */
.fpc-poster-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fpc-poster-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 8, 20, 0.3) 0%, rgba(7, 8, 20, 0.6) 60%, rgba(7, 8, 20, 0.94) 100%);
}

.fpc-poster-overlay.fpc-poster-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fpc-poster-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 650px;
}

.fpc-big-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #6b21ff;
    background: linear-gradient(135deg, #7e3bff 0%, #5c15eb 100%);
    border: none;
    outline: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(107, 33, 255, 0.6), 0 0 0 6px rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    margin-bottom: 20px;
}

.fpc-poster-overlay:hover .fpc-big-play-btn {
    transform: scale(1.12);
    box-shadow: 0 12px 40px rgba(107, 33, 255, 0.8), 0 0 0 8px rgba(255, 255, 255, 0.25);
}

.fpc-svg-play {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.fpc-poster-brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

.fpc-poster-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #c9a9ff;
    background: rgba(107, 33, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.fpc-poster-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    line-height: 1.25;
}

.fpc-poster-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Spinner / Buffering */
.fpc-spinner-wrap {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.fpc-player-wrapper.is-buffering .fpc-spinner-wrap {
    opacity: 1;
    visibility: visible;
}

.fpc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #6b21ff;
    border-radius: 50%;
    animation: fpcSpin 0.8s linear infinite;
}

@keyframes fpcSpin {
    to { transform: rotate(360deg); }
}

/* Top Bar */
.fpc-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.fpc-top-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.fpc-brand-logo {
    display: flex;
    align-items: center;
}

.fpc-brand-logo img {
    height: 28px;
    width: auto;
}

/* Barra de Controles Inferior */
.fpc-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 12;
    padding: 24px 18px 14px;
    background: linear-gradient(0deg, rgba(7, 8, 20, 0.96) 0%, rgba(7, 8, 20, 0.6) 60%, transparent 100%);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Exibição dos controles */
.fpc-player-wrapper.is-started .fpc-top-bar,
.fpc-player-wrapper.is-started .fpc-controls-bar {
    opacity: 1;
    transform: translateY(0);
}

.fpc-player-wrapper.is-started.controls-hidden:not(:hover) .fpc-top-bar,
.fpc-player-wrapper.is-started.controls-hidden:not(:hover) .fpc-controls-bar {
    opacity: 0;
    pointer-events: none;
}

/* Scrubber (Linha de Progresso) */
.fpc-scrubber {
    position: relative;
    width: 100%;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 8px;
}

.fpc-scrubber-rail {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    transition: height 0.15s ease;
    overflow: visible;
}

.fpc-scrubber:hover .fpc-scrubber-rail {
    height: 7px;
}

.fpc-scrubber-loaded {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    pointer-events: none;
    transition: width 0.2s ease;
}

.fpc-scrubber-progress {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, #7e3bff 0%, #6b21ff 100%);
    border-radius: 4px;
    pointer-events: none;
}

.fpc-scrubber-handle {
    position: absolute;
    top: 50%;
    right: -7px;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(107, 33, 255, 0.8);
    transition: transform 0.15s ease;
    pointer-events: none;
}

.fpc-scrubber:hover .fpc-scrubber-handle,
.fpc-player-wrapper.is-scrubbing .fpc-scrubber-handle {
    transform: translateY(-50%) scale(1);
}

.fpc-scrubber-tooltip {
    position: absolute;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(15, 17, 36, 0.95);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.fpc-scrubber:hover .fpc-scrubber-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Linha de Botões e Controles */
.fpc-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.fpc-ctrl-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.15s ease;
    outline: none;
}

.fpc-ctrl-btn:hover {
    color: #c9a9ff;
    transform: scale(1.08);
}

.fpc-icon {
    width: 22px;
    height: 22px;
}

/* Play / Pause Toggle */
.fpc-icon-pause {
    display: none;
}

.fpc-player-wrapper.is-playing .fpc-icon-play {
    display: none;
}

.fpc-player-wrapper.is-playing .fpc-icon-pause {
    display: block;
}

/* Volume Slider */
.fpc-vol-group {
    display: flex;
    align-items: center;
}

.fpc-vol-slider {
    width: 0;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: width 0.2s ease, margin-left 0.2s ease;
    overflow: hidden;
}

.fpc-vol-group:hover .fpc-vol-slider {
    width: 65px;
    margin-left: 4px;
}

.fpc-vol-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.fpc-vol-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: #6b21ff;
    border-radius: 2px;
}

/* Tempo Decorrido / Duração */
.fpc-time-wrap {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    margin-left: 6px;
    display: flex;
    gap: 4px;
}

.fpc-time-sep {
    color: rgba(255, 255, 255, 0.4);
}

/* Dropdown de Velocidade */
.fpc-speed-dropdown {
    position: relative;
}

.fpc-btn-speed {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
}

.fpc-speed-menu {
    position: absolute;
    bottom: 38px;
    right: 0;
    background: rgba(18, 20, 38, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
    min-width: 90px;
}

.fpc-speed-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fpc-speed-menu button {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.fpc-speed-menu button:hover,
.fpc-speed-menu button.active {
    background: rgba(107, 33, 255, 0.25);
    color: #c9a9ff;
}

/* Fullscreen Toggle */
.fpc-icon-exit-fs {
    display: none;
}

.fpc-player-wrapper.is-fullscreen .fpc-icon-enter-fs {
    display: none;
}

.fpc-player-wrapper.is-fullscreen .fpc-icon-exit-fs {
    display: block;
}
