* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: linear-gradient(135deg, #ffdde8, #fff5f8);
    color: #3a2630;
}

.app {
    width: 100%;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.screen {
    width: 100%;
    max-width: 420px;
    text-align: center;

    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;

    position: absolute;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.screen.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.emoji {
    font-size: 64px;
    margin-bottom: 20px;
}

h1 {
    font-size: 29px;
    line-height: 1.2;
    margin: 0 0 14px;
}

p {
    font-size: 17px;
    line-height: 1.5;
    color: #765c67;
    margin: 0 0 30px;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

button {
    width: 100%;
    max-width: 320px;
    min-height: 56px;

    border: none;
    border-radius: 18px;

    font-size: 17px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.primary {
    background: #e9527f;
    color: white;
    box-shadow: 0 8px 20px rgba(233, 82, 127, 0.25);
}

.primary:active {
    transform: scale(0.96);
}

.secondary {
    background: white;
    color: #d54470;
    box-shadow: 0 5px 20px rgba(100, 50, 70, 0.08);
}

/* Área onde o botão pode fugir */
.escape-area {
    position: relative;
    width: 100%;
    height: 180px;
}

#simButton {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    width: 220px;

    transition:
        left 0.35s ease,
        top 0.35s ease,
        transform 0.35s ease;
}

.message {
    min-height: 28px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #d54470;
}

.heart {
    animation: heartbeat 1.4s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

.final-message {
    font-size: 18px;
    line-height: 1.7;
}

.photo-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 25px;

    background: #f3b5c7;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 60px;

    box-shadow: 0 12px 35px rgba(150, 50, 90, 0.18);
}

.small {
    font-size: 14px;
    color: #987985;
}

/* ==========================================
   TELA DA CHARADA
========================================== */

.riddle-area {
    position: relative;

    margin-top: 25px;

    min-height: 230px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* ==========================================
   CONTAGEM REGRESSIVA
========================================== */

.countdown {
    display: none;

    width: 70px;
    height: 70px;

    margin-bottom: 20px;

    border-radius: 50%;

    background: #e9527f;
    color: white;

    font-size: 30px;
    font-weight: 700;

    align-items: center;
    justify-content: center;

    box-shadow:
        0 8px 25px rgba(233, 82, 127, 0.3);

    animation: countdownPulse 1s infinite;
}

.countdown.active {
    display: flex;
}

@keyframes countdownPulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}


/* ==========================================
   CHARADA
========================================== */

.riddle {
    display: none;

    max-width: 340px;

    padding: 25px;

    border-radius: 22px;

    background: rgba(255, 255, 255, 0.8);

    color: #5b3b47;

    font-size: 18px;
    line-height: 1.7;

    box-shadow:
        0 10px 30px rgba(100, 50, 70, 0.1);

    animation: riddleAppear 0.6s ease;
}

.riddle.active {
    display: block;
}

@keyframes riddleAppear {

    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ==========================================
   DESAPARECER / EXPLODIR
========================================== */

.riddle.exploding {
    animation: riddleExplosion 0.7s ease forwards;
}

@keyframes riddleExplosion {

    0% {
        opacity: 1;
        transform: scale(1);
    }

    30% {
        transform: scale(1.08);
    }

    100% {
        opacity: 0;
        transform: scale(2.5) rotate(8deg);
        filter: blur(8px);
    }
}


/* ==========================================
   BOA SORTE
========================================== */

.good-luck {
    display: none;

    animation: goodLuckAppear 0.8s ease forwards;
}

.good-luck.active {
    display: block;
}

.explosion-heart {
    font-size: 75px;

    animation: explosionHeart 0.8s ease;
}

@keyframes explosionHeart {

    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes goodLuckAppear {

    0% {
        opacity: 0;
        transform: scale(0.7);
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}