/* Importação de fontes Google */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-color: #e57373; /* Rosa avermelhado suave */
    --secondary-color: #ffccbc; /* Rosa pêssego claro */
    --text-dark: #333;
    --text-light: #f4f4f4;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-light: 0 8px 25px rgba(0, 0, 0, 0.15);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Para garantir que o slideshow de fundo funcione bem */
    background-color: #fce4ec; /* Um fallback rosa claro */
}

/* Slideshow de fundo */
.background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.background-slideshow img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    filter: brightness(0.7) grayscale(0.2); /* Suaviza as imagens */
}

.background-slideshow img.active {
    opacity: 1;
}

/* Wrapper do conteúdo principal */
.content-wrapper {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    padding: 40px;
    max-width: 650px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: scaleIn 1s ease-out forwards; /* Animação de entrada */
    opacity: 0; /* Começa invisível para a animação */
    transition: opacity 0.5s ease; /* Adicionado para sumir suavemente */
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.main-header h1 {
    font-family: 'Dancing Script', cursive;
    color: var(--primary-color);
    font-size: 3.8em;
    margin-bottom: 25px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.08);
}

.intro-message p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* NOVO: Container para os botões de carta */
.letter-buttons-container {
    display: flex;
    flex-wrap: wrap; /* Faz os botões quebrarem a linha em telas pequenas */
    justify-content: center;
    gap: 15px; /* Espaço entre os botões */
    margin-top: 30px;
}

/* Botão CTA (Call To Action) - AJUSTADO */
.cta-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 12px 22px; /* Diminuído para caber mais botões */
    font-size: 1em; /* Diminuído */
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-grow: 1; /* Faz os botões crescerem se houver espaço */
    flex-basis: 180px; /* Tamanho base de cada botão */
}

.cta-button:hover {
    background-color: #f06292; /* Um tom ligeiramente mais escuro */
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Carta de Amor */
.love-letter {
    position: absolute; /* Para sobrepor o conteúdo */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centraliza */
    background: linear-gradient(135deg, #fffafa, #ffebee); /* Fundo sutil */
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    max-width: 90%;
    width: 600px;
    box-sizing: border-box;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    z-index: 10; /* Acima de todo o resto */
    border: 1px solid #f8bbd0;
}

.love-letter.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    animation: letterOpen 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; /* Animação de "abrir" */
}

@keyframes letterOpen {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.love-letter h2 {
    font-family: 'Dancing Script', cursive;
    color: var(--primary-color);
    font-size: 2.8em;
    margin-bottom: 20px;
    text-align: center;
}

.love-letter p {
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 20px;
}

.love-letter .signature {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    text-align: right;
    margin-top: 30px;
    color: var(--primary-color);
}

.close-button {
    background-color: #9c27b0; /* Roxo para contraste */
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block; /* Para centralizar com margin auto */
    margin: 30px auto 0;
}

.close-button:hover {
    background-color: #ab47bc;
}

/* Classe para esconder elementos */
.hidden {
    display: none;
}

/* Música (opcional) */
.music-player {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.music-button {
    background-color: #66bb6a; /* Verde para música */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.music-button:hover {
    background-color: #81c784;
}

/* Responsividade */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 25px;
        margin: 20px;
    }

    .main-header h1 {
        font-size: 2.8em;
    }

    .intro-message p {
        font-size: 1em;
    }

    .cta-button {
        padding: 15px 25px;
        font-size: 1em; /* Ajustado */
        flex-basis: 100%; /* Faz botões ocuparem 100% da largura em telas menores */
    }

    .love-letter {
        padding: 25px;
        width: 95%;
    }

    .love-letter h2 {
        font-size: 2.2em;
    }

    .love-letter p {
        font-size: 0.95em;
    }

    .love-letter .signature {
        font-size: 1.5em;
    }
}