@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@600&display=swap');
/* Estilo global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Waltograph';
    src: url('../fonts/SWEEHB__.TTF') format('truetype');
}

@font-face {
    font-family: 'LovelyFont';
    src: url('../cmfonts/Letras.otf') format('opentype');
}

.glow-text {
    font-family: 'LovelyFont', cursive;
    font-size: 6rem;
    color: #fff;
    text-align: center;
    margin-top: 30px;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #ff8af2,
            0 0 10px #ff7bd7,
            0 0 15px #ff5fc1,
            0 0 20px #ff3cab;
    }

    to {
        text-shadow: 0 0 10px #ffa8f0,
            0 0 20px #ff87dc,
            0 0 30px #ff5fc1,
            0 0 40px #ff3cab;
    }
}


.container {
    display: none;
}


body {
    font-family: "Quicksand", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background:  #ffc0dd;
    text-align: center;
    overflow: hidden;
    
    /* Para evitar desplazamientos cuando se abran los popups */
}

/* Efecto de animación para las letras */
.letters {
    font-size: 3rem;
    display: flex;
    justify-content: center;
    /* <--- esto centra horizontalmente */
    gap: 0.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out forwards;
    /* Animación para las letras al aparecer */
}

/* Animación de las letras */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo de las letras */
.letter {
    cursor: pointer;
    font-family: 'Waltograph', bold ;
    color: #ffffff;
    transition: transform 0.3s, color 0.3s;
    /* Efecto de transformación y color */
}

.letter:hover {
    transform: scale(1.2) rotate(10deg);
    /* Al hacer hover, las letras aumentan de tamaño y giran */
    color: #e74c3c;
    /* Cambia de color al hacer hover */
}

.card-container {
    width: 200px;
    height: 150px;
    perspective: 1000px;
    margin: 0 auto;
}

.card-inner {
    width: 100%;
    height: 100%;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.card-open {
    transform: rotateY(180deg);
}

.card-image {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}





/* Animación de la carta */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Estilo del popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    animation: fadeInPopup 0.5s ease-out forwards;
    /* Animación del popup */
}

@keyframes fadeInPopup {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
    position: relative;
}
/* Personalización del popup de bienvenida */
.popup-content.welcome {
    background: linear-gradient(145deg, #ffe3f4, #ffc0dd);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
    animation: popup-fade 0.6s ease-out;
    max-width: 400px;
}

.popup-scroll-text {
    max-height: 500px; /* Altura visible antes del scroll */
    overflow-y: auto;
    padding-right: 10px; /* espacio para la scrollbar */
    margin-bottom: 20px; /* espacio antes del botón */
    text-align: left;
    font-size: 1rem;
}

/* Opcional: personalizar scrollbar en navegadores Webkit */
.popup-scroll-text::-webkit-scrollbar {
    width: 8px;
}
.popup-scroll-text::-webkit-scrollbar-thumb {
    background-color: #ff8ac4;
    border-radius: 10px;
}


/* Animación de aparición más suave */
@keyframes popup-fade {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-text {
    font-family: 'Quicksand';
    font-size: 2rem;
    color: #d63384;
    margin-bottom: 20px;
    animation: fadeInText 1s ease-out;
}

/* Botón de empezar */
.start-button {
    background-color: #ff5fa2;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.start-button:hover {
    background-color: #e60073;
    transform: scale(1.05);
}


.close {
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
}

.close:hover {
    color: #e74c3c;
}

/* Popups con efectos */
.popup-content p {
    font-size: 1.2rem;
    animation: fadeInText 1s ease-out forwards;
    /* Animación para el texto del popup */
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#balloons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Para que no interfiera con los clics */
    overflow: hidden;
    z-index: 1;
}

.balloon {
    position: absolute;
    font-size: 1.2rem;
    color: white;
    border-radius: 50% 50% 45% 45%;
    width: 50px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatUp 6s linear forwards;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    z-index: 2;
}

.balloon::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: 50%;
    width: 2px;
    height: 30px;
    background-color: #999;
    transform: translateX(-50%);
}


@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-150px) scale(1.2);
        opacity: 0;
    }

    from {
        bottom: 0;
        opacity: 1;
    }

    to {
        bottom: 100vh;
        opacity: 0;
    }
}

.floating-image {
    position: absolute;
    width: 60px;
    animation: floatImage 6s ease-in forwards;
    z-index: 2;
    pointer-events: none;
    /* para no interferir con clics */
}

@keyframes floatImage {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: translateY(50vh) translateX(20px) rotate(10deg);
    }

    100% {
        transform: translateY(-150px) translateX(-20px) rotate(-10deg);
        opacity: 0;
    }
}


/*---CARTA--*/

@keyframes shakeSideways {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(10px);
    }

    75% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Aplica animación al pasar el mouse */
.shaky-card:hover {
    animation: shakeSideways 0.5s ease-in-out;
}

.collage-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
    animation: fadeInTop 1s ease forwards;
    margin-bottom: 10px;
}

.collage-button:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #ff1493, #ff69b4);
}

/* Animación de aparición */
@keyframes fadeInTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
