body{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    background-color: #fae1dd;
}

.contendor{
    position: relative;
}

.superior{
    position: absolute;
    border-left: 280px solid transparent ;
    border-right: 280px solid transparent;
    border-top: 220px solid #f08080 ;
    border-bottom: 220px solid transparent ;

    transition: transform .75s;
    transform-origin: top;
}

.mensaje{
    position: absolute;
    padding: 2em;
    line-height: 1.5rem;
    box-sizing: border-box;
    text-align: center;
    font-family: satisfy, cursive;
    font-size: 18px;
    background: #eae2b7;
    width: 560px;
    min-height: 440px; 
    height: auto;
    z-index: -1 ;
    transition: transform 0.75s ease-in-out;
}


.mensaje:before{
    content: "";
    border-style: dotted;
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 40px;
}

.firma{
    position: relative;
    top: -10px;
    font-size: 1.2rem;
}

.carta{
    border-left: 280px solid #f8ad9d ;
    border-right: 280px solid #f4978e ;
    border-top: 220px solid transparent ;
    border-bottom: 220px solid #f8ad9d ;
}

.bx{
    position: absolute;
    color: #f6406a;
    top: 185px;
    right: 254px;
    font-size: 60px;
    animation: palpitar 0.6s linear infinite;
}

.psorpresa{
    margin-top: -10px;
}

.botones{
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.boton{
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff66b2, #ff4081);
    background-size: 200% 200%;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.13s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.boton:hover{
    background-position: 100%, 100%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/*javaScript*/
.abrir-superior{
    transform: rotateX(180deg);
}

.abrir-mensaje{
    transform: translateY(-225px);
}

.bx-rotada{
    color:#f6406a;
    animation: none;
}

@keyframes palpitar{
    0%{
        transform: scale(1.07);
    }

    80%{
        transform: scale(1);
    }

    100%{
        transform: scale(1.08);
    }
}


/* ===== Ajuste solo para celulares ===== */
@media (max-width: 600px){
    .contendor{
        transform: scale(0.75);
        transform-origin: center center;
    }
}

@media (max-width: 430px){
    .contendor{
        transform: scale(0.62);
    }
}

@media (max-width: 360px){
    .contendor{
        transform: scale(0.52);
    }
}


