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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f2fbff;
    font-family: 'Ubuntu', sans-serif;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Overlays */
#overlays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Start Menu and Death Popup Modal */
#startMenu, #deathPopup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-align: center;
    pointer-events: auto;
    width: 300px;
    z-index: 100;
}

#startMenu h1, #deathPopup h1 {
    margin-top: 0;
    color: #333;
    font-size: 48px;
}

#playerNameInput {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

#playBtn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#playBtn:hover {
    background-color: #45a049;
}

/* Leaderboard */
#leaderboard {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 15px;
    border-radius: 5px;
    width: 200px;
    font-size: 14px;
}

#leaderboard h3 {
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 18px;
    text-transform: uppercase;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

/* Score */
#scoreBox {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 18px;
}

.hidden {
    display: none !important;
}
