:root {
    --rosa: #ff6ec7;
    --amarelo: #ffd93d;
    --azul: #4fc3f7;
    --verde: #7ee787;
    --roxo: #9b7bff;
    --texto: #2d2540;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    color: var(--texto);
    background: linear-gradient(135deg, #fff6d5 0%, #ffe0f0 45%, #d9f2ff 100%);
    min-height: 100vh;
}

h1, h2, .titulo-site { font-family: 'Baloo 2', cursive; }

.tela { min-height: 100vh; display: flex; flex-direction: column; }

/* --- Tela de entrada --- */
.tela-entrada {
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.balao-flutuante {
    position: absolute;
    font-size: 48px;
    opacity: 0.6;
    animation: flutuar 6s ease-in-out infinite;
}
.b1 { top: 8%; left: 8%; animation-delay: 0s; }
.b2 { top: 15%; right: 10%; animation-delay: 1.5s; }
.b3 { bottom: 12%; left: 12%; animation-delay: 3s; }
.b4 { bottom: 18%; right: 8%; animation-delay: 4.5s; }

@keyframes flutuar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(8deg); }
}

.cartao-entrada {
    background: white;
    border-radius: 32px;
    padding: 36px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(155, 123, 255, 0.25);
    z-index: 1;
}

.titulo-site { font-size: 32px; margin: 0 0 4px; color: var(--roxo); }
.subtitulo { margin: 0 0 24px; font-weight: 700; color: #7a7290; }

.form-entrada { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.form-entrada label { font-weight: 800; font-size: 14px; margin-top: 8px; }
.form-entrada input {
    padding: 14px 16px;
    border-radius: 16px;
    border: 3px solid #f0e6ff;
    font-size: 18px;
    font-family: inherit;
    outline: none;
}
.form-entrada input:focus { border-color: var(--roxo); }

.btn {
    border: none;
    border-radius: 999px;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.btn:active { transform: scale(0.96); }

.btn-grande {
    background: linear-gradient(135deg, var(--rosa), var(--roxo));
    color: white;
    font-size: 20px;
    padding: 16px 20px;
    margin-top: 18px;
    box-shadow: 0 10px 20px rgba(255, 110, 199, 0.4);
}

.btn-secundario {
    background: #f0e6ff;
    color: var(--roxo);
    font-size: 18px;
    padding: 14px 18px;
}

.aviso-legal { font-size: 12px; color: #9990ad; margin-top: 16px; }

/* --- Cabine de fotos --- */
.tela-cabine { padding: 16px; max-width: 640px; margin: 0 auto; width: 100%; }

.topo-cabine {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.saudacao { font-weight: 800; font-size: 18px; }
.link-sair { color: var(--roxo); font-weight: 700; text-decoration: none; font-size: 14px; }

.area-camera {
    position: relative;
    background: #1c1730;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(45, 37, 64, 0.25);
}
#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* efeito espelho, mais natural para selfie */
}
.overlay-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.aviso-camera {
    position: absolute;
    color: white;
    font-weight: 700;
    text-align: center;
    padding: 0 24px;
}

.carrossel-filtros {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 16px 4px;
    scrollbar-width: none;
}
.carrossel-filtros::-webkit-scrollbar { display: none; }

.chip-filtro {
    flex: 0 0 auto;
    background: white;
    border: 3px solid #f0e6ff;
    border-radius: 999px;
    padding: 10px 18px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--texto);
    cursor: pointer;
}
.chip-filtro.selecionado {
    border-color: var(--roxo);
    background: linear-gradient(135deg, #f0e6ff, #ffe0f0);
    color: var(--roxo);
}

.controles-cabine { display: flex; justify-content: center; padding-bottom: 24px; }
.btn-capturar {
    background: linear-gradient(135deg, var(--amarelo), var(--rosa));
    color: white;
    font-size: 22px;
    padding: 18px 36px;
    box-shadow: 0 10px 24px rgba(255, 217, 61, 0.4);
}

.tela-confirmar, .tela-sucesso {
    position: fixed;
    inset: 0;
    background: rgba(45, 37, 64, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    z-index: 20;
}
.tela-confirmar img {
    max-width: 90vw;
    max-height: 60vh;
    border-radius: 24px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.4);
}
.botoes-confirmar { display: flex; gap: 12px; }
.tela-sucesso { color: white; text-align: center; }
.emoji-grande { font-size: 64px; }
.tela-sucesso h2 { font-size: 28px; margin: 0; }
.tela-sucesso p { max-width: 320px; }
