body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    height: auto;
    margin: 0;
    padding: 20px 0;
}

#game-container {
    text-align: center;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

h1 {
    margin-top: 0;
    color: #4CAF50;
}

#stats-bar {
    display: flex;
    justify-content: space-around;
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#stats-bar div {
    min-width: 150px;
}

canvas {
    background-color: #444;
    border: 2px solid #555;
    border-radius: 5px;
}

#controls {
    margin-top: 10px;
    background-color: #333;
    padding: 15px;
    border-radius: 5px;
}

#wave-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

#boss-unit-button-container {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

#boss-unit-button-container.hidden {
    display: none;
}

#boss-unit-button-container h3 {
    margin: 0 0 10px 0;
    color: #FFC107;
}

#boss-button {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#enemy-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.enemy-btn {
    background-color: #5C6BC0;
    color: white;
    border: 2px solid #3F51B5;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    min-width: 120px;
}

.enemy-btn:hover {
    background-color: #7986CB;
}

.enemy-btn:active {
    transform: scale(0.95);
}

.enemy-btn.disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
    border-color: #444;
}

#start-wave-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-wave-btn:hover {
    background-color: #66BB6A;
}

#start-wave-btn.hidden {
    display: none;
}

#speed-toggle-btn, #settings-btn {
    background-color: #03A9F4;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    min-width: 120px;
}

#speed-toggle-btn:hover, #settings-btn:hover {
    background-color: #29B6F6;
}

#speed-toggle-btn {
    min-width: 150px;
}

#speed-toggle-btn.active {
    background-color: #0288D1;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

/* Message Overlay */
#message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#message-overlay.hidden {
    display: none;
}

#message-box {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.7);
    text-align: center;
    border: 2px solid #4CAF50;
    min-width: 300px;
}

#message-title {
    margin-top: 0;
    color: #FFC107;
}

#message-button {
    background-color: #FF9800;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

#message-button:hover {
    background-color: #FFA726;
}

/* Settings Overlay */
#settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#settings-overlay.hidden {
    display: none;
}

#settings-box {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.7);
    text-align: center;
    border: 2px solid #03A9F4;
    min-width: 350px;
}

#settings-title {
    margin-top: 0;
    color: #FFC107;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 1.1em;
}

.toggle-btn {
    padding: 8px 15px;
    border-radius: 5px;
    border: 2px solid #555;
    background-color: #444;
    color: #ccc;
    cursor: pointer;
    font-weight: bold;
    min-width: 70px;
}

.toggle-btn.on {
    background-color: #4CAF50;
    border-color: #388E3C;
    color: white;
}

#settings-close-button {
    background-color: #FF9800;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

#settings-close-button:hover {
    background-color: #FFA726;
}