/* ============================================================
   Jornada do Dia dos Namorados — Lucas & Jordana
   Mobile-first (375px), tema escuro quente
   ============================================================ */

:root {
    --bg:         #0F0A14;
    --surface:    #1E1225;
    --border:     rgba(232, 160, 180, 0.15);
    --accent:     #E8829A;
    --accent-dim: #9B4F63;
    --text:       #FAF0F5;
    --muted:      #9B7E8A;
    --points:     #E8829A;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Corações caindo (fundo) ---------- */

#hearts-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* As spans dos corações são animadas via Web Animations API (app.js) */

/* ---------- Topbar ---------- */

#topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(15,10,20,0.97), rgba(15,10,20,0.85));
    backdrop-filter: blur(8px);
    transition: opacity .3s ease;
}

#points-bar {
    height: 3px;
    background: rgba(232, 160, 180, 0.12);
}

#points-fill {
    height: 100%;
    width: 0%;
    background: var(--points);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px rgba(232, 130, 154, 0.6);
    transition: width 1.2s cubic-bezier(.22,1,.36,1);
}

.topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--muted);
}

#points-label {
    color: var(--points);
    font-size: 13px;
    letter-spacing: .02em;
    transition: transform .3s ease;
}

#points-label.bump { transform: scale(1.12); }

.presence { display: flex; align-items: center; gap: 6px; }

.presence-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #5a4a55;
    transition: background .3s ease, box-shadow .3s ease;
}

.presence.online .presence-dot {
    background: #7BD8A0;
    box-shadow: 0 0 6px rgba(123, 216, 160, 0.7);
}

.vault-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 4px;
    filter: grayscale(.3);
    transition: transform .2s ease, filter .2s ease;
}

.vault-btn:active { transform: scale(.9); }
.vault-btn.has-news { filter: none; animation: pulse 2s ease infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ---------- Telas ---------- */

.screen {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 72px 24px 48px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
    transition: opacity .3s ease;
}

.screen.fade-out { opacity: 0; }
.screen.no-topbar { padding-top: 24px; }

.title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 16px;
}

.chapter-label {
    color: var(--accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-bottom: 12px;
}

.emotional {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 22px;
    line-height: 1.6;
    color: var(--text);
}

.muted { color: var(--muted); font-size: 14px; }

.question-spaced { margin-top: 28px; font-size: 19px; }

.center { text-align: center; }

/* ---------- Botões ---------- */

.btn {
    display: block;
    width: 100%;
    background: var(--accent);
    color: #2A1019;
    border: none;
    border-radius: 50px;
    padding: 16px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 24px;
    min-height: 48px;
    transition: transform .15s ease, opacity .2s ease, background .2s ease;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-ghost {
    display: block;
    width: 100%;
    background: none;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 300;
    cursor: pointer;
    margin-top: 12px;
    min-height: 48px;
    transition: color .2s ease, border-color .2s ease;
}

.btn-ghost:active { color: var(--text); }

.btn-row { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Cards / campos ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin: 12px 0;
}

textarea, input[type="text"], input[type="password"] {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    padding: 16px;
    margin-top: 16px;
    resize: vertical;
    outline: none;
    transition: border-color .2s ease;
}

textarea:focus, input:focus { border-color: var(--accent-dim); }

textarea::placeholder, input::placeholder { color: var(--muted); }

/* ---------- Revelação de respostas ---------- */

.reveal-answer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    margin: 10px 0;
    animation: rise .6s ease both;
}

.reveal-answer + .reveal-answer { animation-delay: .35s; }

.reveal-answer .who {
    color: var(--accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 8px;
}

.reveal-answer .what {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Espera ---------- */

.waiting {
    text-align: center;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: .75; }
    50% { opacity: 1; }
}

.heart-float {
    font-size: 44px;
    display: block;
    margin-bottom: 20px;
    animation: floaty 2.6s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Fotos (cap. 2) ---------- */

.memory-photo {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 16px;
    background: var(--surface);
}

.memory-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 4px;
}

.memory-desc {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* ---------- Overlay (cofre) ---------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 10, 20, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    transition: opacity .3s ease;
}

.overlay.hidden { display: none; }

.overlay-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
}

.vault-status { color: var(--accent); font-size: 13px; min-height: 20px; margin-top: 8px; }
.vault-feedback { color: var(--accent); font-size: 13px; text-align: center; min-height: 20px; margin-top: 10px; }

/* ---------- Mensagens do cofre (revelação final) ---------- */

.vault-message {
    animation: rise .8s ease both;
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 14px;
    padding: 12px 24px;
    z-index: 200;
    opacity: 1;
    transition: opacity .3s ease;
    max-width: 85vw;
    text-align: center;
}

.toast.hidden { opacity: 0; pointer-events: none; }

/* ---------- Utilidades ---------- */

.hidden { display: none !important; }

.spacer { height: 24px; }

.progress-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.progress-dots span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(232, 160, 180, 0.2);
    transition: background .3s ease;
}

.progress-dots span.done { background: var(--accent); }
.progress-dots span.now {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(232, 130, 154, 0.8);
}
