/* Reset Dasar & Tema Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #0b0c10;
    background-image: url('IMG_3916.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 10px;
}

/* Container Utama */
.game-container {
    background: rgba(11, 12, 16, 0.88);
    border: 4px solid #f0efe9;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
    text-align: center;
    backdrop-filter: blur(5px);
}

/* Header & Logo */
header {
    margin-bottom: 10px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.rialo-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #f0efe9;
    object-fit: cover;
    background-color: #a3b808; 
}

h1 {
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: #f0efe9;
    margin-bottom: 8px;
}

.scoreboard {
    display: flex;
    justify-content: space-between;
    background: #1f2833;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.8rem;
    border: 1px solid rgba(240, 239, 233, 0.3);
}

/* Canvas & Area Game */
.game-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 380px;
    margin: 0 auto;
}

#gameCanvas {
    background: #121212;
    border: 2px solid #f0efe9;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    display: block;
}

/* Overlay Menu / Game Over */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    z-index: 10;
}

.overlay h2 {
    color: #ff4a4a;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.overlay p {
    font-size: 0.8rem;
    margin-bottom: 15px;
    color: #ccc;
}

#start-btn {
    background: #f0efe9;
    color: #0b0c10;
    border: none;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

/* Desain Gaya Leaderboard */
.leaderboard-section {
    background: rgba(31, 40, 51, 0.6);
    border: 1px solid rgba(240, 239, 233, 0.2);
    border-radius: 6px;
    margin-top: 12px;
    padding: 8px;
    text-align: left;
}

.leaderboard-section h3 {
    font-size: 0.85rem;
    color: #ffdd53;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

#leaderboard-list {
    list-style-position: inside;
    font-size: 0.8rem;
    padding-left: 5px;
}

#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

#leaderboard-list li:last-child {
    border-bottom: none;
}

.rank-name {
    color: #fff;
}

.rank-score {
    color: #ffdd53;
    font-weight: bold;
}

/* Footer Kredit */
footer {
    margin-top: 10px;
    border-top: 1px solid rgba(240, 239, 233, 0.2);
    padding-top: 8px;
}

.credits {
    font-size: 0.75rem;
    color: #888;
}
