@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    overflow: hidden; /* Hide scrollbars */
    background-color: #a0e9ff; /* Light sky blue background */
    font-family: sans-serif; /* Default fallback font */
}

canvas {
    display: block; /* Remove default inline spacing */
}

#info {
    position: absolute;
    top: 10px;
    width: 100%;
    text-align: center;
    z-index: 100;
    display: block;
    color: #333;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px 5px; /* Added more padding */
    font-family: 'Press Start 2P', cursive; /* Apply Font */
    font-size: 10px; /* Adjust size for pixel font */
    line-height: 1.6; /* Improve readability */
}

/* --- Goal Alert Styles --- */
#goal-alert {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; /* Use flexbox for centering */
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5); /* Darker background for contrast */
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    /* Faster fade-in for the background overlay */
    transition: opacity 0.25s ease-in-out;
}

#goal-alert.show {
    opacity: 1;
    pointer-events: auto;
}

#goal-alert .goal-text {
    color: #FFD700;
    font-size: 7vw; /* Slightly larger */
    font-weight: normal;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.6);
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    padding: 10px;

    /* --- Initial state for pop-up --- */
    opacity: 0;                     /* Start invisible */
    transform: translateY(40px) scale(0.6); /* Start lower and smaller */

    /* --- Transition properties --- */
    /* Animate transform faster with overshoot, opacity slightly slower */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease-out;
    transition-delay: 0.1s; /* Start animation slightly after background fades */
}

#goal-alert.show .goal-text {
    /* --- Final state for pop-up --- */
    opacity: 1;                 /* Fade in */
    transform: translateY(0) scale(1); /* Move up to final position and scale */
}
/* --- End Goal Alert Styles --- */