/* =====================================================================
   Eu e Você, Carla — Folha de estilo principal
   Paleta: Azul (Ricardo #2563eb) | Rosa (Carla #ec4899)
   ===================================================================== */

:root {
    --azul: #2563eb;
    --azul-claro: #dbeafe;
    --azul-escuro: #1e40af;
    --rosa: #ec4899;
    --rosa-claro: #fce7f3;
    --rosa-escuro: #be123c;
    --creme: #fff7fb;
    --texto: #3f3f46;
    --suave: #fafafa;
    --sombra: 0 8px 30px rgba(190, 18, 60, .08);
    --sombra-hover: 0 14px 40px rgba(190, 18, 60, .16);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 100%);
    background-attachment: fixed;
    color: var(--texto);
    min-height: 100vh;
}

h1, h2, h3, h4, .navbar-brand span {
    font-family: 'Playfair Display', Georgia, serif;
}

/* -------------------- Navbar -------------------- */
.navbar-romantica {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(236, 72, 153, .12);
    box-shadow: 0 2px 18px rgba(190, 18, 60, .05);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--rosa-escuro) !important;
}
.navbar-brand .fa-heart { color: var(--rosa); margin-right: 6px; }
.navbar-brand:hover { opacity: .85; }
.nav-link {
    color: var(--texto) !important;
    font-weight: 500;
    border-radius: 50px;
    padding: .5rem 1rem !important;
    transition: all .2s;
}
.nav-link:hover, .nav-link.active {
    background: var(--rosa-claro);
    color: var(--rosa-escuro) !important;
}
.nav-link.nav-admin:hover, .nav-link.nav-admin.active {
    background: var(--azul-claro);
    color: var(--azul-escuro) !important;
}
.nav-link i { margin-right: 4px; }

/* -------------------- Avatars -------------------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-weight: 600;
    color: #fff;
    font-size: .9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.avatar-azul { background: linear-gradient(135deg, var(--azul), var(--azul-escuro)); }
.avatar-rosa { background: linear-gradient(135deg, var(--rosa), var(--rosa-escuro)); }
.avatar-link { cursor: pointer; }
.avatar-sm { width: 28px; height: 28px; font-size: .75rem; }

/* -------------------- Animação heartbeat -------------------- */
.heartbeat {
    animation: heartbeat 1.4s ease-in-out infinite;
    display: inline-block;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.18); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* -------------------- Botões -------------------- */
.btn-rosa {
    background: linear-gradient(135deg, var(--rosa), var(--rosa-escuro));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    padding: .65rem 1.8rem;
    box-shadow: 0 6px 18px rgba(236, 72, 153, .35);
    transition: all .2s;
}
.btn-rosa:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(236, 72, 153, .45); color:#fff; }
.btn-azul {
    background: linear-gradient(135deg, var(--azul), var(--azul-escuro));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    padding: .65rem 1.8rem;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
    transition: all .2s;
}
.btn-azul:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, .45); color:#fff; }
.btn-outline-rosa {
    background: transparent;
    color: var(--rosa-escuro);
    border: 2px solid var(--rosa);
    border-radius: 50px;
    font-weight: 600;
    padding: .55rem 1.6rem;
    transition: all .2s;
}
.btn-outline-rosa:hover { background: var(--rosa); color: #fff; }

/* -------------------- Botão Excluir -------------------- */
.btn-excluir {
    background: linear-gradient(135deg, var(--rosa), var(--rosa-escuro));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    padding: .65rem 1.8rem;
    box-shadow: 0 6px 18px rgba(236, 72, 153, .35);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.btn-excluir:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(236, 72, 153, .45);
    color: #fff;
}

/* -------------------- Página inicial / Carta-surpresa -------------------- */
.pagina-carta {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #fce7f3, #eff6ff);
    padding: 20px;
}
.carta-wrapper {
    text-align: center;
    max-width: 640px;
}
.carta-titulo {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--rosa-escuro);
    margin-bottom: 1rem;
    line-height: 1.2;
}
.carta-subtitulo {
    font-size: 1.15rem;
    color: #71717a;
    margin-bottom: 2.5rem;
    font-style: italic;
}
/* O envelope / caixa de presente clicável */
/* Área reservada: deixa espaço para o cartão abrir sem cobrir o botão */
.envelope-area {
    position: relative;
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 1rem;
}
.envelope {
    position: relative;
    width: 220px;
    height: 220px;
    cursor: pointer;
    perspective: 800px;
}
.cta-entrada {
    opacity: 0;
    transition: opacity .6s;
    margin-top: -17px;
}
.envelope-corpo {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    border-radius: 18px;
    box-shadow: var(--sombra-hover);
    border: 2px solid rgba(236, 72, 153, .2);
}
.envelope-tampa {
    position: absolute; top: 0; left: 0; right: 0;
    height: 110px;
    background: linear-gradient(135deg, var(--rosa), var(--rosa-escuro));
    border-radius: 18px 18px 0 0;
    transform-origin: top;
    transition: transform .6s cubic-bezier(.4,2,.6,1);
    z-index: 3;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 3rem;
}
.envelope.aberto .envelope-tampa {
    transform: rotateX(180deg) translateY(-2px);
}
.envelope-cartao {
    position: absolute;
    bottom: 100%;
    left: 20px; right: 20px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 14px;
    padding: 13px 20px 28px;
    box-shadow: 0 14px 36px rgba(190, 18, 60, .18);
    z-index: 2;
    opacity: 0;
    transform: translateY(20px) scale(.95);
    transition: all .5s .3s;
    pointer-events: none;
}
.envelope.aberto .envelope-cartao {
    opacity: 1;
    transform: translateY(-30px) scale(1);
}
.envelope-cartao p {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--rosa-escuro);
    margin: 0 0 15px;
}
.envelope-cartao .fa-heart { color: var(--rosa); }

/* -------------------- Cards padrão -------------------- */
.card-romantico {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    transition: transform .25s, box-shadow .25s;
    overflow: hidden;
}
.card-romantico:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }

/* -------------------- Timeline -------------------- */
.cabecalho-timeline {
    background: linear-gradient(135deg, var(--azul), var(--rosa));
    color: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--sombra);
}
.cabecalho-timeline h1 { color: #fff; font-size: 1.8rem; margin: 0 0 .5rem; }
.contador-ao-vivo {
    display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap;
}
.contador-item {
    background: rgba(255,255,255,.18);
    border-radius: 14px;
    padding: .5rem 1rem;
    min-width: 78px;
    backdrop-filter: blur(4px);
}
.contador-numero { font-size: 1.8rem; font-weight: 700; line-height: 1; font-family: 'Poppins', sans-serif; }
.contador-rotulo { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; opacity: .9; }

/* ==================================================
   TIMELINE
================================================== */

.dia-grupo{
    margin-bottom:60px;
}

.dia-cabecalho{
    display:flex;
    align-items:center;
    gap:15px;
    margin-bottom:30px;
}

.dia-data{
    font-family:'Playfair Display', serif;
    font-size:2rem;
    font-weight:700;
    color:var(--rosa-escuro);
    white-space:nowrap;
}

.dia-linha{
    flex:1;
    height:2px;
    background:linear-gradient(
        90deg,
        var(--rosa),
        rgba(236,72,153,0)
    );
}

/* GRID DOS RECADOS */

.timeline-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
}

.timeline-item{
    display:flex;
}

@media(max-width:991px){

    .timeline-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:767px){

    .timeline-grid{
        grid-template-columns:1fr;
    }

    .dia-data{
        font-size:1.4rem;
    }
}

/* Cartão de nota */
.nota-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    height: 100%;
    display: flex; flex-direction: column;
    border-left: 5px solid var(--azul);
}
.nota-card.autor-rosa { border-left-color: var(--rosa); }
.nota-card.autor-azul { border-left-color: var(--azul); }
.nota-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }
.nota-card-img {
    width:100%;
    height:220px; object-fit: cover; background: var(--suave);
}
.nota-card-corpo { padding: 1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.nota-card-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; margin: 0 0 .3rem;
    color: var(--texto);
}
.nota-card-resumo { color: #71717a; font-size: .92rem; flex: 1; }
.nota-card-rodape {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: .8rem; font-size: .82rem; color: #a1a1aa;
}

/* Badges (etiquetas) por autor */
.badge-romantica {
    font-weight: 500; border-radius: 50px; padding: .3em .8em; font-size: .72rem;
}
.badge-ricardo { background: var(--azul-claro); color: var(--azul-escuro); }
.badge-carla { background: var(--rosa-claro); color: var(--rosa-escuro); }

/* -------------------- Página da nota completa -------------------- */
.nota-hero {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    margin-bottom: 2rem;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
}
.nota-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.nota-conteudo {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--sombra);
    line-height: 1.8;
}
.nota-conteudo img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }
.nota-meta {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
    color: #71717a; font-size: .9rem; margin-bottom: 1.5rem;
}
.nota-meta i { color: var(--rosa); margin-right: 4px; }

/* -------------------- Editor Quill -------------------- */
#editor-quill {
    min-height: 220px;
    font-size: 1rem;
}
.ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; border-color: #e4e4e7 !important; }
.ql-container.ql-snow { border-radius: 0 0 12px 12px; border-color: #e4e4e7 !important; }

/* Vídeos YouTube dentro do editor Quill — wrapper responsivo 16:9 */
.ql-editor .ql-video,
.nota-conteudo iframe[src*="youtube"] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    border: none;
    margin: 1rem 0;
    box-shadow: 0 6px 22px rgba(190, 18, 60, .12);
}

/* -------------------- Player de áudio estilizado -------------------- */
.player-audio {
    border: 1px solid rgba(236, 72, 153, .18);
    border-radius: 18px;
    padding: 1.4rem 1.6rem;
    margin: 1.5rem 0;
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
/* Tema claro */
.player-audio.player-light {
    background: #fff;
}
/* Tema rosa (padrão, caso queira usar) */
.player-audio:not(.player-light) {
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
}
.player-audio .player-icone {
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rosa), var(--rosa-escuro));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(236, 72, 153, .35);
}
.player-audio .player-info { flex: 1; min-width: 0; }
.player-audio .player-titulo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--rosa-escuro);
    margin: 0 0 .15rem;
    font-size: 1.05rem;
}
.player-audio .player-sub { color: #a1a1aa; font-size: .8rem; margin: 0; }
.player-audio audio {
    width: 100%;
    margin-top: .6rem;
    height: 40px;
}
.player-audio audio::-webkit-media-controls-panel {
    background: #ffffff;
}

/* Botao de download do anexo na pagina da nota */
.arquivo-anexo {
    text-align: center;
    margin-top: 20px;
}
.btn-baixar-anexo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .7rem 1.5rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(220, 38, 38, .22);
    transition: transform .2s, box-shadow .2s;
}
.btn-baixar-anexo:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(220, 38, 38, .28);
}

/* -------------------- Motivos -------------------- */
.motivo-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--sombra);
    border-left: 5px solid var(--rosa);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
}
.motivo-card.tipo-amo { border-left-color: var(--rosa); }
.motivo-card.tipo-odeio { border-left-color: #6b7280; }
.motivo-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
.motivo-titulo { font-family: 'Playfair Display', serif; font-size: 1.25rem; margin-bottom: .5rem; }
.motivo-tipo {
    font-size: .72rem; text-transform: uppercase; letter-spacing: 1px;
    padding: .25em .7em; border-radius: 50px; font-weight: 600;
}
.motivo-tipo.amo { background: var(--rosa-claro); color: var(--rosa-escuro); }
.motivo-tipo.odeio { background: #f3f4f6; color: #4b5563; }

/* -------------------- Comentários -------------------- */
.comentario {
    background: var(--suave);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}
.comentario-cabecalho { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.comentario-nome { font-weight: 600; font-size: .9rem; }
.comentario-data { font-size: .75rem; color: #a1a1aa; }
.comentario-texto { color: var(--texto); font-size: .95rem; }

/* -------------------- Login / Auth -------------------- */
.pagina-auth {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, #fce7f3, #eff6ff);
    padding: 20px;
}
.auth-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--sombra-hover);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
}
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo .fa-heart { font-size: 2.5rem; color: var(--rosa); }
.auth-logo h1 { font-size: 1.6rem; color: var(--rosa-escuro); margin: .5rem 0 0; }
.form-control, .form-select {
    border-radius: 12px; padding: .7rem 1rem; border-color: #e4e4e7;
}
.form-control:focus, .form-select:focus {
    border-color: var(--rosa); box-shadow: 0 0 0 .2rem rgba(236, 72, 153, .15);
}
.form-label { font-weight: 500; font-size: .9rem; }

/* -------------------- Footer -------------------- */
.site-footer {
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(236, 72, 153, .12);
    color: #71717a;
    font-size: .9rem;
}

/* -------------------- Utilidades -------------------- */
.texto-azul { color: var(--azul-escuro) !important; }
.texto-rosa { color: var(--rosa-escuro) !important; }
.texto-verde { color: #16a34a !important; }
.fundo-rosa-claro { background: var(--rosa-claro); }
.fundo-azul-claro { background: var(--azul-claro); }
.fundo-verde-claro { background: #dcfce7; }
.divisor-coracoes {
    text-align: center; margin: 2rem 0; color: var(--rosa); font-size: 1.2rem; opacity: .6;
}
.vazio {
    text-align: center; padding: 3rem 1rem; color: #a1a1aa;
}
.vazio i { font-size: 3rem; margin-bottom: 1rem; opacity: .5; }

/* -------------------- Botões de Voto (Like/Dislike) -------------------- */
.btn-voto {
    background: #fff;
    border: 2px solid #e4e4e7;
    border-radius: 50px;
    padding: .5rem 1.2rem;
    font-weight: 600;
    color: var(--texto);
    transition: all .2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.btn-voto:hover {
    border-color: var(--rosa);
    color: var(--rosa-escuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, .2);
}
.btn-voto-ativo-like {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, .35);
}
.btn-voto-ativo-like:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    border-color: #15803d;
    color: #fff;
    box-shadow: 0 6px 18px rgba(22, 163, 74, .45);
}
.btn-voto-ativo-dislike {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border-color: #6b7280;
    color: #fff;
    box-shadow: 0 4px 14px rgba(107, 114, 128, .35);
}
.btn-voto-ativo-dislike:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    border-color: #4b5563;
    color: #fff;
    box-shadow: 0 6px 18px rgba(107, 114, 128, .45);
}

/* -------------------- Responsividade -------------------- */
@media (max-width: 575.98px) {
    .contador-item { min-width: 64px; padding: .4rem .6rem; }
    .contador-numero { font-size: 1.3rem; }
    .auth-card { padding: 1.8rem; }
}

/* -------------------- Álbuns de Fotos -------------------- */
.object-fit-cover {
    object-fit: cover;
}

/* Grid de fotos do álbum */
#grid-fotos .card-romantico {
    transition: transform .2s, box-shadow .2s;
}

#grid-fotos .card-romantico:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-hover);
}

/* Lightbox */
.lightbox {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-fechar {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.lightbox-fechar:hover {
    color: var(--rosa);
}

.lightbox-anterior,
.lightbox-proximo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: 0.3s;
    z-index: 10000;
}

.lightbox-anterior {
    left: 20px;
}

.lightbox-proximo {
    right: 20px;
}

.lightbox-anterior:hover,
.lightbox-proximo:hover {
    color: var(--rosa);
}

.lightbox-conteudo {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.lightbox-conteudo img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
}

.lightbox-legenda {
    color: #fff;
    margin-top: 15px;
    font-size: 1.1rem;
}

.lightbox-contador {
    color: #ccc;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Botões de ação sobre as fotos */
#grid-fotos .btn-group-sm .btn {
    padding: .25rem .5rem;
    font-size: .875rem;
}
