/* ==========================================================================
   FOCAPLAY MULTI-PERFIS & PERFIL KIDS (ESTILO NETFLIX / DISNEY+)
   Tecnologia nativa FocaPlay v4.9.4
   ========================================================================== */

/* -------------------------------------------------------------
 * 1. BOTÃO E DROPDOWN DE PERFIL NO HEADER
 * ------------------------------------------------------------- */
.fpc-profile-nav-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 14px;
}

.fpc-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 10px 4px 6px;
    border-radius: 40px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fpc-profile-btn:hover {
    background: rgba(107, 33, 255, 0.18);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 16px rgba(107, 33, 255, 0.35);
}

.fpc-profile-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #6b21ff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.fpc-profile-nav-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fpc-profile-nav-name {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpc-profile-nav-chevron {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.fpc-profile-nav-wrap.is-open .fpc-profile-nav-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu de Perfis */
.fpc-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: rgba(13, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(107, 33, 255, 0.2);
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.fpc-profile-nav-wrap.is-open .fpc-profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fpc-profile-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.fpc-profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #cbd5e1;
}

.fpc-profile-dropdown-item:hover {
    background: rgba(107, 33, 255, 0.15);
    color: #ffffff;
}

.fpc-profile-dropdown-item.is-active {
    background: rgba(107, 33, 255, 0.25);
    color: #ffffff;
}

.fpc-dropdown-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.fpc-dropdown-avatar svg {
    width: 100%;
    height: 100%;
}

.fpc-dropdown-info {
    flex: 1;
    min-width: 0;
}

.fpc-dropdown-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpc-dropdown-kids-pill {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    margin-left: 4px;
}

.fpc-profile-dropdown-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 6px;
    padding-top: 6px;
}

.fpc-btn-manage-profiles {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #a78bfa;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.fpc-btn-manage-profiles:hover {
    background: rgba(167, 139, 250, 0.1);
    color: #c4b5fd;
}

.fpc-btn-manage-profiles svg {
    width: 16px;
    height: 16px;
}

/* -------------------------------------------------------------
 * 2. MODAL "QUEM ESTÁ ASSISTINDO?" (FULLSCREEN ESTILO NETFLIX)
 * ------------------------------------------------------------- */
.fpc-profiles-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fpc-profiles-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.fpc-profiles-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 20, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.fpc-profiles-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 860px;
    text-align: center;
    padding: 30px 20px;
}

.fpc-profiles-header {
    margin-bottom: 36px;
    position: relative;
}

.fpc-profiles-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.fpc-profiles-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpc-profiles-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.08);
}

.fpc-profiles-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Grid de Perfis */
.fpc-profiles-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 44px;
}

.fpc-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    width: 130px;
    transition: transform 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative;
}

.fpc-profile-card:hover {
    transform: translateY(-8px) scale(1.06);
}

.fpc-profile-avatar-box {
    width: 120px;
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    transition: all 0.25s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    background: #15182e;
}

.fpc-profile-card:hover .fpc-profile-avatar-box {
    border-color: #ffffff;
    box-shadow: 0 0 28px rgba(107, 33, 255, 0.8);
}

.fpc-profile-card.is-active .fpc-profile-avatar-box {
    border-color: #a855f7;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.6);
}

.fpc-profile-avatar-box svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fpc-profile-name {
    margin-top: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
    transition: color 0.2s ease;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpc-profile-card:hover .fpc-profile-name {
    color: #ffffff;
}

.fpc-profile-card.is-active .fpc-profile-name {
    color: #c084fc;
}

.fpc-profile-card-kids-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    letter-spacing: 0.04em;
    z-index: 3;
}

/* Card "+ Adicionar Perfil" */
.fpc-profile-card.fpc-add-profile .fpc-profile-avatar-box {
    border: 2px dashed rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fpc-profile-card.fpc-add-profile:hover .fpc-profile-avatar-box {
    border-color: #a855f7;
    background: rgba(107, 33, 255, 0.15);
}

.fpc-profile-card.fpc-add-profile svg {
    width: 44px;
    height: 44px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.fpc-profile-card.fpc-add-profile:hover svg {
    color: #ffffff;
    transform: scale(1.15);
}

/* Modo Edição (Ícone de lápis sobre os avatares) */
.fpc-profile-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.fpc-profiles-container.is-edit-mode .fpc-profile-edit-overlay {
    opacity: 1;
}

.fpc-profile-edit-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(107, 33, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.fpc-profile-edit-icon svg {
    width: 18px;
    height: 18px;
}

/* Ações do Modal */
.fpc-profiles-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.fpc-btn-action-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.fpc-btn-action-outline:hover {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.fpc-btn-action-done {
    background: #ffffff;
    border: 1.5px solid #ffffff;
    color: #070814;
    font-size: 15px;
    font-weight: 800;
    padding: 10px 28px;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.fpc-btn-action-done:hover {
    background: #e2e8f0;
    transform: scale(1.03);
}

/* -------------------------------------------------------------
 * 3. MODAL DE ADICIONAR / EDITAR PERFIL
 * ------------------------------------------------------------- */
.fpc-edit-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fpc-edit-profile-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.fpc-edit-profile-box {
    position: relative;
    z-index: 2;
    background: #0f1123;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.fpc-edit-profile-box h3 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 22px;
    letter-spacing: -0.01em;
}

.fpc-form-row {
    margin-bottom: 20px;
    text-align: left;
}

.fpc-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fpc-form-row input[type="text"] {
    width: 100%;
    background: #171a33;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.fpc-form-row input[type="text"]:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.3);
}

/* Toggle Switch Kids */
.fpc-form-kids-row {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
}

.fpc-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.fpc-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fpc-checkbox-custom {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #f59e0b;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.fpc-checkbox-label input[type="checkbox"]:checked + .fpc-checkbox-custom {
    background: #f59e0b;
}

.fpc-checkbox-label input[type="checkbox"]:checked + .fpc-checkbox-custom::after {
    content: "✓";
    color: #070814;
    font-size: 16px;
    font-weight: 900;
}

.fpc-checkbox-text strong {
    display: block;
    font-size: 14px;
    color: #fef08a;
    font-weight: 800;
}

.fpc-checkbox-text small {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.4;
}

/* Avatar Picker */
.fpc-avatar-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.fpc-avatar-opt {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    border: 3px solid transparent;
    overflow: hidden;
    cursor: pointer;
    background: #171a33;
    transition: all 0.2s ease;
    justify-self: center;
}

.fpc-avatar-opt:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.fpc-avatar-opt.is-selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.7);
    transform: scale(1.08);
}

.fpc-avatar-opt svg {
    width: 100%;
    height: 100%;
}

.fpc-modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.fpc-btn-primary {
    flex: 1;
    background: #6b21ff;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fpc-btn-primary:hover {
    background: #7c3aed;
}

.fpc-btn-delete {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpc-btn-delete:hover {
    background: #ef4444;
    color: #ffffff;
}

.fpc-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpc-btn-cancel:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* -------------------------------------------------------------
 * 4. MODO KIDS VISUALS & PROTEÇÃO DE CONTEÚDO
 * ------------------------------------------------------------- */
body.fpc-kids-mode {
    --fp-brand-accent: #f59e0b;
}

/* Badge no Logo do Header quando em Kids Mode */
body.fpc-kids-mode .fp-logo::after {
    content: "KIDS";
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.6);
}

/* Oculta produções não permitidas (data-fp-kids="0") no catálogo e trilhos */
body.fpc-kids-mode .fp-card[data-fp-kids="0"],
body.fpc-kids-mode .fp-hero-item[data-fp-kids="0"],
body.fpc-kids-mode .fp-hero[data-fp-kids="0"] {
    display: none !important;
}

/* Barreira de Proteção Kids em Single Post Não Permitido */
.fpc-kids-barrier-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #090a18;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.fpc-kids-barrier-box {
    max-width: 500px;
    background: #111326;
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 24px;
    padding: 36px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.fpc-kids-barrier-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
}

.fpc-kids-barrier-icon svg {
    width: 36px;
    height: 36px;
}

.fpc-kids-barrier-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
}

.fpc-kids-barrier-text {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 28px;
}

.fpc-kids-barrier-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fpc-btn-kids-switch {
    background: linear-gradient(135deg, #6b21ff, #8b5cf6);
    color: #ffffff;
    border: none;
    font-size: 15px;
    font-weight: 800;
    padding: 13px 24px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(107, 33, 255, 0.4);
    transition: transform 0.2s ease;
}

.fpc-btn-kids-switch:hover {
    transform: translateY(-2px);
}

.fpc-btn-kids-home {
    background: transparent;
    color: #94a3b8;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.fpc-btn-kids-home:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* -------------------------------------------------------------
 * 5. BOTÃO E MODAL PWA (INSTALAR NO CELULAR E PC)
 * ------------------------------------------------------------- */
.fpc-pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(107, 33, 255, 0.25), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.25s ease;
}

.fpc-pwa-install-btn:hover {
    background: linear-gradient(135deg, #6b21ff, #9333ea);
    color: #ffffff;
    border-color: #c084fc;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
    transform: translateY(-1px);
}

.fpc-pwa-install-btn svg {
    width: 15px;
    height: 15px;
    color: #c084fc;
    transition: color 0.2s ease;
}

.fpc-pwa-install-btn:hover svg {
    color: #ffffff;
}

/* Modal de Ajuda para Instalação no iOS */
.fpc-ios-install-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fpc-ios-install-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.fpc-ios-install-box {
    position: relative;
    z-index: 2;
    background: #111326;
    border-top: 1.5px solid rgba(168, 85, 247, 0.4);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px 34px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    text-align: center;
    color: #ffffff;
}

.fpc-ios-install-box h4 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 12px;
}

.fpc-ios-steps {
    list-style: none;
    padding: 0;
    margin: 18px 0 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fpc-ios-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    border-radius: 10px;
}

.fpc-ios-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6b21ff;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .fpc-profile-nav-name {
        display: none;
    }
    .fpc-profile-btn {
        padding: 4px;
    }
    .fpc-profile-card {
        width: 100px;
    }
    .fpc-profile-avatar-box {
        width: 90px;
        height: 90px;
    }
    .fpc-profile-name {
        font-size: 14px;
    }
    .fpc-pwa-install-btn span {
        display: none;
    }
    .fpc-pwa-install-btn {
        padding: 7px;
    }
}
