/* ==========================================================
   Catch the Froyo Game
   ========================================================== */

.game-area {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;

    border: 2px dashed var(--lb-color-border);
    border-radius: 18px;
    background-color: var(--lb-color-card);
}

.froyo-button {
    position: absolute;
    left: 40%;
    top: 40%;
    z-index: 2;

    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;

    transition:
        left 0.25s ease,
        top 0.25s ease,
        transform 0.15s ease;
}

.froyo-icon {
    display: block;
    width: 72px;
    height: auto;
}

.score-board {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 4;

    font-size: 1.25rem;
    font-weight: 700;
}

.game-message {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;

    color: var(--lb-color-text-muted);
    font-weight: 600;
}

.victory-message {
    position: absolute;
    inset: 0;
    z-index: 5;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    font-size: 1.5rem;
    text-align: center;
    pointer-events: none;
}

.victory-message strong {
    font-size: 2rem;
}

.confetti {
    --confetti-x: 0px;
    --confetti-rotation: 720deg;

    position: absolute;
    top: -20px;
    z-index: 10;

    width: 10px;
    height: 18px;
    border-radius: 2px;

    background-color: hsl(
        calc(360 * var(--random-color, 0.5)),
        85%,
        60%
    );

    pointer-events: none;

    animation-name: confetti-fall;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes confetti-fall {
    from {
        transform:
            translate(0, 0)
            rotate(0deg);

        opacity: 1;
    }

    to {
        transform:
            translate(var(--confetti-x), 500px)
            rotate(var(--confetti-rotation));

        opacity: 0;
    }
}

@media (max-width: 600px) {
    .game-area {
        height: 500px;
    }

    .froyo-icon {
        width: 64px;
    }
}