/* ==========================================================================
   VARIÁVEIS ROMÂNTICAS
   ========================================================================== */
   :root {
    --bg-color: #FAF7F2; /* Creme quente */
    --bg-soft: #FDFBF7;
    --pure-white: #FFFFFF;
    
    --text-primary: #4A3B3C; /* Marrom acinzentado profundo */
    --text-secondary: #7A6365;
    
    --accent: #B76E79; /* Rose Gold / Bordô suave */
    --accent-light: #E8D5D6;

    --font-heading: 'Lora', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-script: 'Great Vibes', cursive;

    --ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 4rem; }
.mt-2 { margin-top: 2rem; }

.bg-soft { background-color: var(--bg-soft); }
.bg-pure-white { background-color: var(--pure-white); }

/* ==========================================================================
   TIPOGRAFIA
   ========================================================================== */
.title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-style: italic;
    color: var(--text-primary);
    text-align: center;
}

.script-font {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--accent);
}

/* ==========================================================================
   BOTÕES
   ========================================================================== */
.btn-romantic {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 1rem 3rem;
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s var(--ease-soft);
}

.btn-romantic:hover {
    background-color: var(--accent);
    color: var(--pure-white);
    box-shadow: 0 10px 20px rgba(183, 110, 121, 0.2);
    transform: translateY(-3px);
}

.floating-btn {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 55px; height: 55px;
    background-color: var(--pure-white);
    border: none;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    color: var(--accent);
    cursor: pointer;
    z-index: 100;
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.3s ease;
}
.floating-btn:hover { transform: scale(1.1); }

/* ==========================================================================
   LAYOUTS & ANIMAÇÕES
   ========================================================================== */
.fullscreen-flex {
    min-height: 100vh;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 2rem; position: relative;
}

.py-large { padding: 6rem 2rem; }

.fade-in { opacity: 0; animation: fadeIn 2s forwards; }
.fade-in-delayed { opacity: 0; animation: fadeIn 2s 1s forwards; }
.fade-in-delayed-2 { opacity: 0; animation: fadeIn 2s 2.5s forwards; }

@keyframes fadeIn { to { opacity: 1; } }

.reveal { opacity: 0; transform: translateY(40px); transition: all 1s var(--ease-soft); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   CONTADOR
   ========================================================================== */
.counter-grid {
    display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
    max-width: 800px; margin: 0 auto;
}
.counter-box {
    background: var(--pure-white);
    padding: 1.5rem;
    border-radius: 12px;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--accent-light);
}
.counter-number {
    display: block; font-family: var(--font-heading);
    font-size: 2.5rem; color: var(--accent); line-height: 1;
}
.counter-label {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-top: 0.5rem; display: block;
}

/* ==========================================================================
   LINHA DO TEMPO (ROMÂNTICA)
   ========================================================================== */
.timeline-container {
    max-width: 800px; margin: 0 auto; position: relative;
    padding-top: 2rem;
}
.timeline-container::before {
    content: ''; position: absolute; top: 0; left: 50%;
    width: 2px; height: 100%; background: var(--accent-light);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem; position: relative; width: 50%; padding: 0 2rem;
    opacity: 0; transform: translateY(30px); transition: all 0.8s ease;
}
.timeline-item.active { opacity: 1; transform: translateY(0); }

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }

/* Bolinha da timeline */
.timeline-item::after {
    content: ''; position: absolute; top: 20px;
    width: 14px; height: 14px; background: var(--accent);
    border-radius: 50%; border: 4px solid var(--bg-color);
}
.timeline-item:nth-child(odd)::after { right: -9px; }
.timeline-item:nth-child(even)::after { left: -9px; }

.timeline-card {
    background: var(--pure-white);
    padding: 1.5rem; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid var(--accent-light);
    display: inline-block; width: 100%;
}

.timeline-title { font-family: var(--font-heading); font-size: 1.25rem; color: var(--accent); margin-bottom: 0.5rem; }
.timeline-desc { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

.timeline-item .title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.highlight-item .title { 
    color: var(--accent-red); 
    font-size: 1.3rem;
}

.story-continues {
    text-align: center; margin-top: 5rem; padding: 2rem;
}
.story-continues h3 { font-family: var(--font-script); font-size: 3rem; color: var(--accent); margin-top: 1rem; }
.heart-icon { font-size: 2rem; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

@media (max-width: 768px) {
    .timeline-container::before { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; text-align: left !important; left: 0 !important; }
    .timeline-item::after { left: 13px !important; }
}

/* ==========================================================================
   IMAGENS DA TIMELINE (Embaixo de cada evento, padronizadas e maiores)
   ========================================================================== */
.timeline-img {
    display: block;
    width: 100%;
    max-width: 340px;  /* Tamanho maior e elegante */
    height: 240px;     /* Altura fixa para manter todas perfeitamente simétricas */
    object-fit: cover; /* Preenche o espaço sem distorcer as fotos e os rostos */
    image-rendering: high-quality;
    border-radius: 16px;
    margin-top: 1.2rem;
    box-shadow: 0 10px 30px rgba(178, 58, 72, 0.12);
    transition: transform 0.4s var(--ease-smooth);
}

.timeline-img:hover {
    transform: scale(1.03);
}

/* Alinhamento da foto acompanhando a direção do texto */
.timeline-item:nth-child(odd) .timeline-img {
    margin-left: auto; /* Alinha a foto à direita junto com o texto */
}

.timeline-item:nth-child(even) .timeline-img {
    margin-right: auto; /* Alinha a foto à esquerda junto com o texto */
}

/* ==========================================================================
   AJUSTE PARA CELULARES
   ========================================================================== */
@media (max-width: 768px) {
    .timeline-item {
        padding-right: 0; /* Limpa o ajuste do layout anterior */
    }
    
    .timeline-img {
        max-width: 100%;   /* Ocupa a largura total disponível do bloco no celular */
        height: 210px;     /* Altura proporcional para telas menores */
        margin-left: 0 !important;
        margin-right: auto !important; /* Fica sempre alinhada à esquerda no mobile */
    }
}

/* ==========================================================================
   CARROSSEL INFINITO (Ponta a ponta, Alta Fidelidade e Automático)
   ========================================================================== */
#carousel-section {
    padding: 6rem 0; 
    overflow-x: hidden;
}

.carousel-container {
    width: 100vw; /* Ocupa 100% da largura da tela */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: max-content;
    /* A animação desliza continuamente */
    animation: scrollCarousel 100s linear infinite;
}

/* Pausa a animação se você colocar o mouse por cima (opcional) */
.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    width: 320px;
    height: 420px;
    flex-shrink: 0;
    margin-right: 1.5rem; /* Espaço entre uma foto e outra */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Regra rígida de renderização para garantir 100% de fidelidade fotográfica */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: high-quality;
    transition: transform 0.6s var(--ease-smooth);
}

.carousel-item:hover img {
    transform: scale(1.05);
}

/* Como o JS vai duplicar as fotos, transladar exatamente -50% cria um loop invisível e perfeito */
@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .carousel-item {
        width: 260px;
        height: 350px;
    }
}

/* ==========================================================================
   CARTA FINAL
   ========================================================================== */
.letter-paper {
    background: var(--pure-white);
    max-width: 700px; width: 90%;
    padding: 4rem; border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid var(--accent-light);
    position: relative;
}
.letter-greeting {
    font-family: var(--font-heading); font-style: italic; font-size: 1.5rem; margin-bottom: 2rem; color: var(--accent);
}
.letter-content {
    font-size: 1.1rem; line-height: 2.2; color: var(--text-primary); text-align: justify;
}
.letter-signature {
    margin-top: 3rem; text-align: right;
}
@media (max-width: 768px) { .letter-paper { padding: 2rem; } }

/* ==========================================================================
   CÓDIGO FONTE (Estilo Pôster VS Code da Imagem)
   ========================================================================== */
.code-poster {
    width: 100%;
    max-width: 650px;
    background-color: #0b0b0e; /* Fundo super escuro igual à imagem */
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    font-family: 'JetBrains Mono', Consolas, monospace;
    margin: 2rem auto;
    position: relative;
    color: #fff;
    text-align: left;
}

/* Cabeçalho do Pôster */
.poster-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}
.pink-text { color: #ff4d94; }
.purple-text { color: #c68cff; }

/* Logo e Subtítulo */
.poster-logo {
    text-align: center;
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #fff;
    letter-spacing: 5px;
}
.poster-subtitle {
    text-align: center;
    color: #7a9a7a;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Divisores (Linhas rosas bem finas) */
.poster-divider {
    border: 0;
    height: 1px;
    background: #4a2b37;
    margin: 1rem 0 2rem 0;
}
.poster-divider.bottom {
    margin: 2rem 0 1rem 0;
}

/* Corpo do Código (Linhas e Texto) */
.poster-body {
    display: flex;
    font-size: 0.9rem;
    line-height: 1.5;
}

.line-numbers {
    color: #555;
    text-align: right;
    padding-right: 1.5rem;
    margin-right: 1.5rem;
    border-right: 1px solid #333; /* A linhazinha cinza dividindo */
    user-select: none;
}

.code-content pre {
    margin: 0;
}

.code-content code {
    font-family: inherit;
    color: #d4d4d4;
    white-space: pre-wrap;
}

/* Cores de Sintaxe (Igual à imagem!) */
.kw { color: #ff4d94; }     /* Palavras-chave: const, function, return, while */
.var { color: #66d9ff; }    /* Variáveis/Chaves: nossoAmor, inicio, cuidar */
.str { color: #ffcc66; }    /* Strings: "3.0", "Nós dois" */
.num { color: #c68cff; }    /* Números/Booleanos: 0, Infinity, true */
.cmt { color: #7a9a7a; }    /* Comentários: // Funções que fazem... */

.floating-heart {
    position: absolute;
    right: 30px;
    font-size: 1.5rem;
    transform: rotate(15deg);
    opacity: 0.8;
}

/* Rodapé */
.poster-footer {
    text-align: center;
    line-height: 1.8;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.green-text { color: #a6e22e; }

.bottom-heart {
    color: #ff4d94;
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Versículo abaixo do código */
.verse {
    max-width: 650px;
    text-align: center;
    color: var(--text-dark);
    margin: 0 auto;
}

/* Ajustes para Celular */
@media (max-width: 600px) {
    .code-poster { padding: 1.5rem 1rem; }
    .line-numbers { padding-right: 0.8rem; margin-right: 0.8rem; font-size: 0.75rem; }
    .code-content { font-size: 0.75rem; }
    .poster-header { font-size: 0.7rem; flex-direction: column; align-items: center; gap: 10px; }
    .floating-heart { right: 10px; font-size: 1.2rem; }
}

/* ==========================================================================
   TELA FINAL (Paleta Romântica)
   ========================================================================== */
#final-screen {
    padding: 6rem 2rem 2rem 2rem;
}

.system-status {
    font-family: 'JetBrains Mono', Consolas, monospace;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

.system-status.blink {
    color: var(--accent-gold);
    animation: blink 1.5s step-end infinite;
}

@keyframes blink { 
    50% { opacity: 0; } 
}

.final-code {
    margin: 3rem 0;
    text-align: left;
    background: #2B2B2B; /* Fundo escuro apenas na caixinha para o código brilhar */
    padding: 2.5rem;
    border-radius: 12px;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 1.1rem;
    color: #A9B7C6;
    border: 1px solid rgba(178, 58, 72, 0.2);
    box-shadow: 0 15px 35px rgba(178, 58, 72, 0.15);
}

.final-message {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-top: 2rem;
    color: var(--accent-red);
}

/* ==========================================================================
   RODAPÉ E BOTÃO DISCRETO
   ========================================================================== */
.minimal-footer {
    background-color: var(--bg-soft-pink);
    text-align: center;
    padding: 1rem 0 3rem 0;
}

.ghost-btn {
    background: none;
    border: none;
    color: rgba(178, 58, 72, 0.4); /* Vermelho muito suave, quase invisível */
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 1rem;
    transition: color 0.4s var(--ease-smooth);
}

.ghost-btn:hover {
    color: var(--accent-red); /* Acende para vermelho quando passa o mouse */
}

/* ==========================================================================
   MODAL ESPECIAL (Claro e Romântico)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 240, 240, 0.85); /* Fundo rosa bem translúcido */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-main); /* Branco pastel do projeto */
    border: 1px solid rgba(178, 58, 72, 0.15);
    padding: 3rem;
    border-radius: 16px;
    position: relative;
    max-width: 550px;
    width: 90%;
    color: var(--text-dark);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.5s var(--ease-smooth);
    box-shadow: 0 20px 50px rgba(178, 58, 72, 0.2);
}

.modal-overlay:not(.hidden) .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1rem; right: 1.5rem;
    background: none; border: none;
    color: var(--accent-red);
    font-size: 2.5rem;
    cursor: pointer; transition: transform 0.3s;
    line-height: 1;
    opacity: 0.6;
}

.close-btn:hover { 
    opacity: 1;
    transform: scale(1.1);
}

.modal-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.modal-code {
    background: #2B2B2B; /* Fundo do código mantém estilo IDE */
    padding: 2rem;
    border-radius: 8px;
    text-align: left;
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1rem;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.final-text-block {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.spiritual-message {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.9;
}

.spiritual-sub {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-top: 1rem;
    opacity: 0.8;
}

/* ==========================================================================
   TELA DE ABERTURA INICIAL
   ========================================================================== */
.fade-in-text {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 2rem;
    padding: 0 1rem;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

/* ==========================================================================
   AJUSTES DO CONTADOR PARA MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .counter-grid {
        gap: 0.8rem; /* Reduz o espaço entre os blocos */
        margin-bottom: 2rem;
    }
    
    .counter-box {
        padding: 1rem 0.5rem; /* Caixas mais compactas */
        min-width: 80px; 
        border-radius: 8px;
    }
    
    .counter-number {
        font-size: 1.8rem; /* Fonte dos números reduzida */
        margin-bottom: 0.2rem;
    }
    
    .counter-label {
        font-size: 0.65rem; /* Fonte dos textos (anos, meses) reduzida */
        letter-spacing: 0.5px;
    }
}

#boot-screen .btn-romantic {
    margin-top: 2rem; 
}

