body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #222;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    max-width: 768px;
    width: 100%;
    height: 100vh;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    /* Review 13: Apply generated background image */
    background-image: url('./background.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

canvas {
    display: block;
    margin: 0 auto;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed, but UI elements will re-enable pointer-events */
}

#start-screen,
#results-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

h1,
h2 {
    margin-top: 0;
    color: #4CAF50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.control-group {
    margin: 20px 0;
    font-size: 1.2rem;
}

input,
select {
    padding: 8px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    margin-left: 10px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50px;
    transition: transform 0.1s, background-color 0.2s;
    margin-top: 20px;
    font-weight: bold;
}

button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

#rank-list {
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
    margin: 20px 0;
}

#rank-list li {
    padding: 10px;
    border-bottom: 1px solid #444;
    font-size: 1.1rem;
}

#rank-list li:first-child {
    color: #FFD700;
    font-weight: bold;
    font-size: 1.3rem;
}

#game-hud {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#minimap-container {
    pointer-events: auto;
    /* Allow interactions if needed later */
}