/* ===========================
   ESTILOS GENERALES Y TEMAS
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background: radial-gradient(circle at 15% 20%, #2e1065 0%, #1e1b4b 50%, #0f172a 100%);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    color: #e2e8f0;
}

/* ===========================
   ELEMENTOS FLOTANTES
=========================== */

#hearts {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    font-size: 24px;
    animation: fall linear forwards;
    opacity: 0.85;
    filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.4));
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===========================
   PANTALLA INICIAL
=========================== */

#inicio {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* ===========================
   SOBRE
=========================== */

.sobre {
    width: 340px;
    height: 220px;
    position: relative;
    perspective: 1000px;
}

.cuerpo {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 160px;
    background: linear-gradient(145deg, #a855f7, #ec4899);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.35), 0 0 30px rgba(236, 72, 153, 0.2);
}

.tapa {
    position: absolute;
    width: 100%;
    height: 160px;
    background: linear-gradient(145deg, #c084fc, #f472b6);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.sobre.abierto .tapa {
    transform: rotateX(180deg);
}

button#abrir {
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    border: none;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
    white-space: nowrap;
}

button#abrir:hover {
    transform: translateX(-50%) scale(1.06);
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.6);
    background: linear-gradient(135deg, #f472b6, #a855f7);
}

/* ===========================
   CARTA
=========================== */

#carta {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
    z-index: 10;
    padding: 20px;
}

#carta.mostrar {
    opacity: 1;
    visibility: visible;
}

.papel {
    width: 90%;
    max-width: 780px;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(30, 27, 75, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: subir 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes subir {
    from {
        transform: translateY(60px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(236, 72, 153, 0.4);
    color: #f472b6;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

.papel h1 {
    font-family: 'Outfit', sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #f472b6, #c084fc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    font-size: 40px;
    font-weight: 700;
}

.papel h2 {
    font-family: 'Outfit', sans-serif;
    text-align: center;
    color: #cbd5e1;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 500;
}

#contador {
    text-align: center;
    font-size: 17px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(192, 132, 252, 0.3);
    padding: 14px 20px;
    border-radius: 16px;
    color: #f472b6;
    margin-bottom: 30px;
    line-height: 1.6;
}

.contenido-carta {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.papel p {
    font-size: 17px;
    color: #e2e8f0;
    line-height: 1.85;
    text-align: left;
}

.papel p b {
    color: #f472b6;
}

.papel p i {
    color: #c084fc;
}

.papel h3 {
    text-align: center;
    margin-top: 35px;
    color: #cbd5e1;
    font-size: 22px;
    font-weight: 500;
}

.firma {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===========================
   SCROLLBAR CUSTOM
=========================== */

.papel::-webkit-scrollbar {
    width: 8px;
}

.papel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ec4899, #8b5cf6);
    border-radius: 10px;
}

.papel::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

/* ===========================
   RESPONSIVE
=========================== */

@media(max-width: 768px) {
    .papel {
        width: 95%;
        max-height: 90vh;
        padding: 24px 20px;
    }

    .contenido-carta {
        padding: 18px;
    }

    .papel h1 {
        font-size: 30px;
    }

    .papel h2 {
        font-size: 17px;
    }

    .papel p {
        font-size: 15px;
        line-height: 1.75;
    }

    #contador {
        font-size: 15px;
        padding: 10px 14px;
    }

    .sobre {
        transform: scale(0.85);
    }

    button#abrir {
        font-size: 15px;
        padding: 14px 28px;
    }
}