@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@600;800;900&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #142b36;
    color: white;
    font-family: 'Nunito', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    background: #203e49;
    border: 5px solid #101f29;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 0 #0b171d;
}

.screen {
    text-align: center;
}

.hidden {
    display: none !important;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(18px, 4vw, 30px);
    line-height: 1.7;
    color: #a9f56b;
}

p {
    font-size: 17px;
}

.logo {
    width: 220px;
    max-width: 80%;
    height: 110px;
    object-fit: contain;
    image-rendering: pixelated;
}

input {
    width: min(300px, 90%);
    padding: 14px;
    border: 3px solid #111;
    border-radius: 6px;
    font-size: 16px;
    margin: 12px;
}

button {
    padding: 13px 18px;
    border: 3px solid #10221b;
    border-radius: 6px;
    background: #79d84b;
    color: #10221b;
    font-weight: 900;
    cursor: pointer;
    margin: 5px;
    font-size: 14px;
    box-shadow: 0 4px 0 #315d29;
}

button:hover {
    background: #a5f477;
    transform: translateY(-2px);
}

.instructions {
    color: #d8f3dd;
    line-height: 1.8;
    margin-top: 25px;
}

.hud {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 12px;
    font-weight: 900;
    margin-bottom: 12px;
    color: #d9ffb9;
}

.progress-container {
    width: 100%;
    height: 13px;
    background: #10232b;
    border: 2px solid #0c171c;
    margin-bottom: 10px;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: #8be45d;
    transition: width 0.2s;
}

#missionText {
    color: #fff3a5;
    font-weight: 900;
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #83d8f5;
    border: 4px solid #101f29;
    image-rendering: pixelated;
}

.game-buttons {
    margin-top: 12px;
}

.mobile-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.mobile-controls button {
    width: 65px;
    height: 55px;
    font-size: 22px;
}

#resultMessage {
    font-size: 20px;
    line-height: 1.7;
}

@media (max-width: 600px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 10px;
    }

    .hud {
        font-size: 12px;
    }

    #missionText {
        font-size: 13px;
    }
}