/* ==========================================================================
   FOCAPLAY CORTES (SHORTS / STORIES VERTICAIS 9:16 AUTOMÁTICOS)
   Paleta Oficial: Midnight #09090F, Electric Purple #7628F5, Neon Violet #C34AFF,
   Cloud White #F5F2FF, Fresh Mint #21E6B5, Dark Surface #242331
   ========================================================================== */

/* Alinha o botão Flash de forma organizada dentro do menu principal */
.fp-nav-menu-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botão Flash no Menu Principal */
.fp-nav-shorts-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid rgba(195, 74, 255, 0.45);
    background: linear-gradient(135deg, rgba(118, 40, 245, 0.28) 0%, rgba(195, 74, 255, 0.18) 100%);
    color: #f5f2ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    touch-action: manipulation;
}

.fp-nav-shorts-btn:hover {
    background: linear-gradient(135deg, #7628f5 0%, #c34aff 100%);
    border-color: #c34aff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(118, 40, 245, 0.42);
}

.fps-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #21e6b5;
    box-shadow: 0 0 8px #21e6b5;
    display: inline-block;
    animation: fpsPulse 1.6s ease-in-out infinite;
}

@keyframes fpsPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.65; }
}

/* ==========================================================================
   TRILHO DE CORTES 9:16 NA HOME
   ========================================================================== */
.fps-home-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #21e6b5;
    margin-bottom: 4px;
}

.fps-open-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(195, 74, 255, 0.45);
    background: linear-gradient(135deg, #7628f5, #c34aff);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fps-open-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(195, 74, 255, 0.45);
}

.fps-home-rail {
    gap: 16px !important;
}

.fps-home-card {
    position: relative;
    flex: 0 0 185px;
    width: 185px;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(195, 74, 255, 0.25);
    background: #141320;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.fps-home-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #c34aff;
    box-shadow: 0 16px 36px rgba(118, 40, 245, 0.35);
}

.fps-home-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.fps-home-card:hover .fps-home-card-bg {
    transform: scale(1.07);
}

.fps-home-card-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 9, 15, 0.35) 0%, transparent 38%, rgba(9, 9, 15, 0.94) 100%);
}

.fps-home-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(9, 9, 15, 0.78);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(195, 74, 255, 0.45);
    color: #f5f2ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    border-radius: 8px;
}

.fps-home-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(118, 40, 245, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    transition: transform 0.22s ease, background 0.22s ease;
}

.fps-home-card:hover .fps-home-card-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #c34aff;
}

.fps-home-card-info {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fps-home-card-cat {
    font-size: 9.5px;
    font-weight: 800;
    color: #21e6b5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fps-home-card-title {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #f5f2ff;
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fps-home-card-meta {
    font-size: 11px;
    color: rgba(245, 242, 255, 0.65);
}

/* ==========================================================================
   MODAL FULLSCREEN DE CORTES (9:16 VERTICAL STORIES / REELS)
   ========================================================================== */
.fps-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #06060b;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.fps-shorts-open {
    overflow: hidden !important;
}

.fps-modal-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(118, 40, 245, 0.22), rgba(6, 6, 11, 0.96) 65%);
}

/* Chrome Desktop (Topo) */
.fps-desktop-chrome {
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    pointer-events: none;
}

.fps-brand-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(20, 19, 32, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(195, 74, 255, 0.3);
    color: #f5f2ff;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.fps-brand-pill strong {
    color: #c34aff;
}

.fps-close-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.fps-close-btn:hover {
    background: #7628f5;
    border-color: #c34aff;
}

/* Container Central + Setas Desktop */
.fps-viewport-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    height: 100%;
    padding: 18px;
}

/* Palco 9:16 Estilo Smartphone / Stories */
.fps-phone-stage {
    position: relative;
    height: min(92vh, 860px);
    aspect-ratio: 9 / 16;
    max-width: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #09090f;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(195, 74, 255, 0.28);
    touch-action: none;
    will-change: transform, opacity;
}

.fps-phone-stage.fps-anim-snap {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

/* Barra de Progresso Stories no Topo */
.fps-story-bar {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 30;
}

.fps-story-progress-track {
    width: 100%;
    height: 3.5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.fps-story-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #21e6b5 0%, #c34aff 100%);
    border-radius: 4px;
    transition: width 0.15s linear;
}

/* Barra Superior Interna */
.fps-inner-top {
    position: absolute;
    top: 22px;
    left: 12px;
    right: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fps-inner-top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fps-icon-pill {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(9, 9, 15, 0.62);
    backdrop-filter: blur(10px);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.fps-icon-pill:hover {
    background: rgba(118, 40, 245, 0.85);
}

.fps-mobile-close {
    display: none;
}

.fps-clip-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(9, 9, 15, 0.62);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f5f2ff;
    font-size: 11.5px;
    font-weight: 700;
}

/* Camada de Vídeo 9:16 (Corte Vertical Centralizado — ZERO UI YouTube) */
.fps-video-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
}

.fps-poster-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(16px) brightness(0.45);
    transform: scale(1.1);
}

/* Pool de 3 slots pré-carregados (vídeo atual visível + próximos 2 já na agulha) */
.fps-slot {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.22s ease;
    overflow: hidden;
}

.fps-slot.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* YouTube 16:9 ampliado e centralizado para preencher 9:16 em pé e esconder 100% da UI do YouTube */
.fps-yt-mount,
.fps-slot iframe {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 320% !important;
    height: 120% !important;
    transform: translate(-50%, -50%) !important;
    border: 0 !important;
    pointer-events: none !important;
}

.fps-html5-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Escudo de Toque */
.fps-touch-shield {
    position: absolute;
    inset: 0;
    z-index: 20;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fps-tap-feedback {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(9, 9, 15, 0.72);
    backdrop-filter: blur(8px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: fpsPop 0.35s ease;
}

@keyframes fpsPop {
    0% { transform: scale(0.7); opacity: 0; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.95; }
}

/* Loading */
.fps-loading {
    position: absolute;
    inset: 0;
    z-index: 24;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(9, 9, 15, 0.72);
    backdrop-filter: blur(8px);
    color: #f5f2ff;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}

.fps-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(195, 74, 255, 0.25);
    border-top-color: #c34aff;
    animation: fpsSpin 0.8s linear infinite;
}

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

/* Ações Laterais Direitas (Reels / TikTok FocaPlay) */
.fps-side-actions {
    position: absolute;
    right: 12px;
    bottom: 205px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.fps-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 0;
    touch-action: manipulation;
}

.fps-action-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(9, 9, 15, 0.62);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fps-action-btn:hover .fps-action-circle {
    background: rgba(118, 40, 245, 0.85);
    border-color: #c34aff;
    transform: scale(1.08);
}

.fps-action-btn.active .fps-action-circle {
    background: linear-gradient(135deg, #7628f5, #c34aff);
    border-color: #fff;
    color: #fff;
}

.fps-action-label {
    font-size: 10.5px;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* Card Inferior Inspirado na Referência + Identidade FocaPlay */
.fps-bottom-card {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 28px 16px 18px;
    background: linear-gradient(180deg, transparent 0%, rgba(9, 9, 15, 0.88) 28%, rgba(9, 9, 15, 0.98) 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fps-bottom-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fps-bottom-thumb {
    width: 112px;
    height: 66px;
    flex-shrink: 0;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #242331;
    border: 1.5px solid rgba(195, 74, 255, 0.45);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}

.fps-bottom-texts {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fps-bottom-cat {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.09em;
    color: #21e6b5;
    text-transform: uppercase;
}

.fps-bottom-title {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #f5f2ff;
    margin: 0;
    line-height: 1.15;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fps-bottom-meta {
    font-size: 11px;
    font-weight: 700;
    color: rgba(245, 242, 255, 0.72);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Botão ASSISTA AGORA (Estilo Referência + Glow FocaPlay) */
.fps-watch-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f5f2ff 0%, #ffffff 100%);
    color: #09090f;
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(118, 40, 245, 0.45), 0 0 0 2px rgba(195, 74, 255, 0.35);
    transition: all 0.22s ease;
}

.fps-watch-cta:hover {
    background: linear-gradient(135deg, #7628f5 0%, #c34aff 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(195, 74, 255, 0.55);
}

/* Setas Desktop */
.fps-desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fps-nav-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(36, 35, 49, 0.85);
    color: #f5f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fps-nav-circle:hover {
    background: linear-gradient(135deg, #7628f5, #c34aff);
    border-color: #c34aff;
    transform: scale(1.08);
}

/* ==========================================================================
   MOBILE FULL-BLEED 100dvh (EXPERIÊNCIA NATIVA DE STORIES / TIKTOK)
   ========================================================================== */
@media (max-width: 768px) {
    .fps-desktop-chrome,
    .fps-desktop-nav {
        display: none !important;
    }

    .fps-viewport-wrap {
        padding: 0;
    }

    .fps-phone-stage {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        aspect-ratio: auto;
        border-radius: 0;
        box-shadow: none;
    }

    .fps-mobile-close {
        display: inline-flex;
    }

    .fps-story-bar {
        top: max(10px, env(safe-area-inset-top));
    }

    .fps-inner-top {
        top: calc(max(10px, env(safe-area-inset-top)) + 14px);
    }

    .fps-bottom-card {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .fps-home-card {
        flex: 0 0 162px;
        width: 162px;
    }

    .fps-home-section .fp-row-head {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .fps-home-section .fp-rail-controls {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .fps-home-section .fp-rail-arrow {
        display: none !important;
    }

    .fps-open-all-btn {
        white-space: nowrap !important;
        padding: 9px 18px !important;
        font-size: 13px !important;
        margin-right: 0 !important;
    }

    .fps-home-rail {
        gap: 12px !important;
        padding-bottom: 6px;
    }
}
