@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: 'VT323', 'Courier New', Courier, monospace;
    background-color: #1a1a1a;
    background-image: radial-gradient(circle, #2c2c2c 10%, #1a1a1a 70%);
    color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

#gameCanvas {
    border: 3px solid #00f7ff;
    background-color: #282c34;
    box-shadow: 0 0 25px rgba(0, 247, 255, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    image-rendering: pixelated;
    display: none; /* Disembunyikan dulu sampai aset siap */
}

.info { text-align: center; margin-bottom: 15px; }
.info h1 { font-size: 2.5em; color: #f7ff00; text-shadow: 0 0 5px #f7ff00; }
#loading-text { font-size: 1.5em; color: #00f7ff; margin-top: 10px; }
#score-container { margin-top: 15px; font-size: 2em; color: #f7ff00; }

#game-over-screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#game-over-screen h1 { font-size: 5em; color: #ff2a6d; text-shadow: 0 0 10px #ff2a6d; margin-bottom: 10px; }

#input-nama { display: flex; margin-bottom: 20px; align-items: center; }
#input-nama label { font-size: 1.5em; margin-right: 10px; }
#input-nama input {
    padding: 10px; font-size: 1.5em; font-family: 'VT323', Courier, monospace;
    border: 2px solid #ccc; background-color: #f0f0f0; border-radius: 5px;
    color: #1a1a1a; transition: all 0.2s ease;
}
#input-nama input:focus { outline: none; border-color: #00f7ff; box-shadow: 0 0 10px #00f7ff; }

button {
    padding: 10px 25px; font-size: 1.5em; font-family: 'VT323', Courier, monospace;
    cursor: pointer; border-radius: 5px; text-transform: uppercase;
    transition: all 0.2s ease-in-out;
}

#input-nama button, #game-over-screen button {
    background-color: #00f7ff; border: 2px solid #00f7ff; color: #1a1a1a;
    font-weight: bold; margin-left: 10px; box-shadow: 0 0 5px #00f7ff;
}
#input-nama button:hover, #game-over-screen button:hover {
    background-color: #1a1a1a; color: #00f7ff;
    box-shadow: 0 0 15px #00f7ff; transform: translateY(-3px);
}

#maps-button-container button {
    background-color: #f7ff00; border: 2px solid #f7ff00; color: #1a1a1a;
    font-weight: bold; box-shadow: 0 0 5px #f7ff00;
}
#maps-button-container button:hover {
    background-color: #1a1a1a; color: #f7ff00;
    box-shadow: 0 0 15px #f7ff00; transform: translateY(-3px);
}

#top-score-container {
    margin-top: 25px; text-align: center; border: 2px dashed #f0f0f0;
    padding: 10px 20px; border-radius: 10px;
}
#top-score-container h2 { color: #00f7ff; font-size: 2em; }
#top-score-list { list-style-position: inside; text-align: left; font-size: 1.5em; padding-left: 0; }
#top-score-list li { margin-bottom: 5px; }

#maps-button-container { margin-top: 25px; }
.hidden { display: none !important; }

@media (max-width: 850px) {
    body { padding: 10px; justify-content: flex-start; }
    .info h1 { font-size: 2em; }
    #score-container { font-size: 1.5em; }
    #game-over-screen h1 { font-size: 3em; }
    #input-nama { flex-direction: column; }
    #input-nama button { margin-top: 10px; margin-left: 0; }
    button { font-size: 1.2em; padding: 8px 20px; }
}