body {
    margin: 0;
    padding: 0;
    background-color: #222;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    text-align: center;
    padding: 10px;
    max-width: 100vw;
    box-sizing: border-box;
}

#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: calc(100vw - 40px);
    margin: 0 auto 10px auto;
    padding: 0 10px;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 10px;
}

#health-container {
    width: 200px;
    height: 20px;
    background-color: #555;
    border: 2px solid #777;
    border-radius: 10px;
    overflow: hidden;
}

#health-bar {
    width: 100%;
    height: 100%;
    background-color: #ff4444;
    transition: width 0.2s;
}

#timer {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: monospace;
}

#score-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
}

#seed-display {
    font-size: 0.9rem;
    color: #aaa;
}

canvas {
    background-color: #333;
    border: 2px solid #555;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: none; /* Hide default cursor inside canvas */
    display: block;
    margin: 0 auto;
}

#ui {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #555;
    text-shadow: 1px 1px 2px black;
    z-index: 10;
}

.input-group {
    margin: 15px 0;
}

input[type="text"] {
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #555;
    background: #333;
    color: white;
}

#result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.7); /* More transparent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(2px); /* Slight blur to make text readable */
}

.button-row {
    display: flex;
    gap: 10px;
}

.small-btn {
    padding: 5px 10px;
    font-size: 0.9rem;
    background-color: #555;
    margin-top: 0;
}

.small-btn:hover {
    background-color: #666;
}

button {
    pointer-events: auto;
    padding: 10px 20px;
    font-size: 1.2rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #45a049;
}