body {
    background-color: #87CEEB; /* Sky blue - Day mode default */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Arial', sans-serif;
    color: #333;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* Night Mode Theme */
body.night-mode {
    background-color: #001f3f; /* Dark Navy Blue */
}
body.night-mode #gameCanvas {
    background-color: #0d2d4f;
}
body.night-mode #hud {
    color: #f0f0f0;
}
body.night-mode #bottom-help-hint {
    color: #ccc;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}
body.night-mode #bottom-help-hint:hover {
    color: #fff;
}

#app-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-container {
    position: relative;
    border: 3px solid #333;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

canvas {
    display: block;
    background-color: #87CEEB;
    transition: background-color 0.5s;
}

#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}
#hud > span {
    margin-right: 20px;
}

/* Health and Fuel Bars */
#health-container, #fuel-container {
    display: flex;
    align-items: center;
}
#health-bar-outer, #fuel-bar-outer {
    width: 150px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid white;
    border-radius: 5px;
    margin-left: 8px;
    overflow: hidden;
}
#health-bar-inner {
    width: 100%;
    height: 100%;
    background-color: #4CAF50; /* Green */
    transition: width 0.2s linear;
}
#fuel-bar-inner {
    width: 100%;
    height: 100%;
    background-color: #FFC107; /* Amber */
    transition: width 0.2s linear;
}

/* Overlay Screens (Start, Help, Game Over) */
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    min-width: 400px;
    max-height: 90%;
    overflow-y: auto;
}

#start-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    max-height: none;
    overflow-y: hidden;
}
#start-screen h2 { font-size: 48px; text-shadow: 3px 3px 5px #000; }
#start-screen p { font-size: 20px; }
#start-screen .autobot-info { font-size: 14px; color: #ccc; margin-top: 20px; }

/* MODIFICATION START: Style for main menu difficulty selector */
.difficulty-setting-main {
    margin-top: 15px;
    font-size: 18px;
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
}
.difficulty-setting-main label {
    margin-bottom: 8px; /* Add some space between the label and the dropdown */
}
/* MODIFICATION END */

#help-screen ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
    display: inline-block;
}
#help-screen li {
    margin-bottom: 10px;
}

#audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
}
#volume-slider {
    width: 120px;
    cursor: pointer;
}
#mute-button {
    padding: 8px 15px;
    font-size: 14px;
    background-color: #7f8c8d;
    color: white;
}

button {
    padding: 15px 30px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
    margin: 5px;
}
button:hover { transform: scale(1.05); }
button:active { transform: scale(1.0); }

select {
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
}

#start-day-button { background-color: #3498db; color: white; }
#start-night-button { background-color: #2c3e50; color: white; }
#help-button, #close-help-button { background-color: #f1c40f; color: #333; }
#restart-button { background-color: #e74c3c; color: white; }

#bottom-help-hint {
    width: 800px; /* Match the canvas width */
    text-align: left;
    margin-top: 10px;
    font-size: 16px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

#bottom-help-hint:hover {
    transform: scale(1.02);
}

#autobot-countdown {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: white;
    text-shadow: 2px 2px 4px black;
    z-index: 110;
}

/* Styling for the bot mode display */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    pointer-events: none; /* Crucial to not block clicks */
    z-index: 100;
    display: none; /* Initially hidden */
    text-align: center;
}

/* Styling for the new section in the help menu */
#help-screen .controls-section {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #ccc;
    text-align: left;
    display: block; /* Changed from inline-block */
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

#help-screen .controls-section h3 {
    text-align: center;
    margin-bottom: 15px; /* Increased margin */
}

#help-screen .controls-section li {
    margin-bottom: 5px;
}

#help-screen .controls-section label {
    font-weight: bold;
    margin-right: 8px;
}

/* MODIFICATION START: Custom Difficulty Styles */
.setting-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

#custom-difficulty-settings {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.slider-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.slider-control label {
    font-weight: normal;
    font-size: 14px;
    flex-basis: 120px;
    flex-shrink: 0;
}

.slider-control input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.slider-control span {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    min-width: 35px;
    text-align: right;
    background-color: #eee;
    padding: 2px 4px;
    border-radius: 3px;
}

.slider-note {
    font-size: 12px;
    color: #555;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
    font-style: italic;
}
/* MODIFICATION END */
