body {
    margin: 0;
    padding: 0;
    background-color: #2c3e50;
    font-family: 'Arial', sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-ui {
    position: relative;
    background-color: #34495e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

h1 {
    margin: 0;
    font-size: 24px;
    color: #ecf0f1;
}

#stage-display {
    font-size: 20px;
    font-weight: bold;
    color: #f1c40f;
}

canvas {
    background-color: #87CEEB;
    /* Sky blue background */
    border: 4px solid #1abc9c;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

#controls-hint {
    margin-top: 15px;
    font-size: 14px;
    color: #bdc3c7;
}

.hidden {
    display: none !important;
}

#game-over,
#game-clear {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 30px 50px;
    border-radius: 15px;
    border: 3px solid #e74c3c;
    color: white;
    text-align: center;
    z-index: 100;
}

#game-clear {
    border-color: #2ecc71;
}

#game-over h2 {
    color: #e74c3c;
    margin-top: 0;
}

#game-clear h2 {
    color: #2ecc71;
    margin-top: 0;
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #e67e22;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #d35400;
}