body {
    background-color: #f0f2f5;
    overflow: hidden; /* Prevents scrollbars from appearing */
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 600px;
    margin: 1rem auto;
    border: 3px solid #000;
    border-radius: 10px;
    box-shadow: 8px 8px 0px #000;
    overflow: hidden; /* Keeps overlays inside */
    background-color: #87CEEB; /* Sky blue background */
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
}

.overlay h1 {
    font-size: 2.5rem;
    text-shadow: 4px 4px 0px #000;
    margin-bottom: 1rem;
}

.overlay p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.instructions {
    animation: blink 1.5s linear infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#score-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: white;
    text-shadow: 3px 3px 0px #000;
    z-index: 10;
}

.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #game-container {
        width: 95%;
        height: 80vh; /* Adjust height for mobile screens */
        margin: 1rem auto;
    }

    .overlay h1 {
        font-size: 2rem;
    }

    #score-counter {
        font-size: 1.2rem;
    }
}
