@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Press Start 2P', cursive;
    color: white;
    overflow: hidden;
}

#game-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    border: 4px solid #444;
}

canvas {
    background-color: #006994;
    display: block;
    image-rendering: pixelated;
}

#ui-layer {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    font-size: 16px;
    text-shadow: 2px 2px 0 #000;
    z-index: 10;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
}

.screen h1 {
    font-size: 60px;
    color: #ffcc00;
    text-shadow: 4px 4px 0 #cc0000;
    margin-bottom: 20px;
}

.screen p {
    font-size: 20px;
    margin: 10px 0;
    animation: blink 1s infinite;
}

.screen .controls {
    font-size: 12px;
    color: #aaa;
    margin-top: 40px;
    animation: none;
}

.hidden {
    display: none !important;
}

input,
button {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    padding: 10px;
    margin: 10px;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    text-transform: uppercase;
}

button:hover {
    background: #fff;
    color: #000;
    cursor: pointer;
}

#leaderboard {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

#highScoresList {
    list-style: none;
    padding: 0;
    text-align: left;
}

#highScoresList li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #ffcc00;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}