@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Poppins:wght@300;400;600&display=swap');

:root {
    --bg-1: #ff9a9e;
    --bg-2: #fecfef;
    --accent: #ff4d6d;
    --muted: #fff3f5;
}

* {
    box-sizing: border-box
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

#content {
    width: 100%;
}

.container {
    width: 92vw;
    max-width: 720px;
    padding: 18px 28px 28px 28px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    box-shadow: 0 10px 30px rgba(255, 77, 109, 0.12);
    text-align: center;
    min-height: 625px;
    /* reserve final box size to avoid layout jump */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* align content to top */
}

.hidden {
    display: none !important;
    opacity: 0;
    transition: opacity .45s ease, transform .45s ease
}

.show {
    visibility: visible;
    opacity: 1;
    transform: none
}

#password-form {
    display: flex;
    gap: 12px;
    flex-direction: column;
    align-items: center
}

#password-form .instructions {
    color: #6b213f;
    font-weight: 600
}

#password-form input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ffd7e2
}

#password-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer
}

#password-form button:hover {
    filter: brightness(.95)
}

#intro h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    margin: 6px 0;
    color: #8a0f2e
}

#intro .subtitle {
    color: #6b213f;
    margin-top: 0
}

#animation-stage {
    position: relative;
    width: calc(100% - 56px);
    margin: 0 28px;
    padding: 8px 0 12px 0;
    text-align: center;
}

#hearts {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1920 / 1516;
    width: 100%;
    height: auto;
    margin-bottom: -100px;
    z-index: 4;
}

#image-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    z-index: 1;
    border-radius: 14px;
    overflow: hidden;
    margin: 0;
}

#image-wrapper.hidden {
    visibility: hidden;
    opacity: 0
}

#image-wrapper.show {
    visibility: visible;
    opacity: 1
}

#surprise-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 1416;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity .6s ease, transform .6s ease;
    transform: scale(.98);
}

#surprise-image.revealed {
    opacity: 1;
    transform: scale(1)
}


.heart {
    --s: 28px;
    position: absolute;
    width: var(--s);
    height: var(--s);
    background: linear-gradient(180deg, var(--accent), #ff6b86);
    transform: rotate(-45deg);
    left: 50%;
    top: 80%;
    margin-left: calc(var(--s) / -2);
    border-radius: 4px;
    opacity: 0.98;
    box-shadow: 0 6px 18px rgba(255, 77, 109, 0.12);
    transform-origin: center center;
}

.heart:before,
.heart:after {
    content: '';
    position: absolute;
    width: var(--s);
    height: var(--s);
    background: linear-gradient(180deg, var(--accent), #ff6b86);
    border-radius: 50%;
}

.heart:before {
    top: calc(var(--s) * -0.5);
    left: 0;
}

.heart:after {
    top: 0;
    left: calc(var(--s) * 0.5);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1) rotate(0);
        opacity: 0
    }

    10% {
        opacity: 1
    }

    100% {
        transform: translateY(-360px) scale(.8) rotate(20deg);
        opacity: 0
    }
}

.heart.animate {
    animation: floatUp linear forwards
}

#download-button {
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    position: relative;
    top: 54px;
    z-index: 5
}