body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px;
    background-color: #f0f4f8;
    color: #333;
}

h1 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.5em;
}

h2 {
    font-size: 1em;
    margin-top: 5px;
}

#gameCanvas {
    max-width: 95vw;
    height: auto;
    border: 3px solid #34495e;
    background-color: #e6f7ff;
    margin-top: 10px;
}

#controls {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    background-color: #ffffff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 95vw;
}

#arrow-counter {
    font-size: 1.1em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
}

#controls label, #controls span {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: bold;
    margin-top: 5px;
    font-size: 0.9em;
}

input[type="range"] {
    width: 90%;
    vertical-align: middle;
    margin-bottom: 5px;
}

#options-toggle {
    margin: 10px 0;
    font-size: 0.9em;
    font-weight: normal;
}

.button-group {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    /* Ermöglicht das Umbrechen auf neue Zeile bei sehr kleinen Bildschirmen */
    flex-wrap: wrap; 
}

#reloadButton, #fireButton, #directFireButton, #newGameButton {
    padding: 8px 10px; /* Leicht kleinere Polsterung, um alle drei unterzubringen */
    font-size: 13px;
    cursor: pointer;
    margin: 5px 3px; /* Etwas mehr Margin vertikal */
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    flex-grow: 1;
    min-width: 100px; /* Mindestbreite für Lesbarkeit */
}

#reloadButton {
    background-color: #3498db;
    color: white;
}

#directFireButton {
    background-color: #2ecc71; /* Grün für direkten Schuss */
    color: white;
}

#fireButton {
    background-color: #f39c12; /* Orange für Laden */
    color: white;
}

#newGameButton {
    background-color: #2ecc71;
    color: white;
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
    width: 90%; /* volle Breite für New Game Button */
}

#reloadButton:hover {
    background-color: #2980b9;
}
#directFireButton:hover {
    background-color: #27ae60;
}
#fireButton:hover {
    background-color: #d35400;
}

#message {
    margin-top: 10px;
    font-size: 1em;
    font-weight: bold;
    min-height: 20px;
}

/* Ladeanzeige Styling */
#charge-bar-container {
    width: 90%;
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    margin: 10px auto 0;
    overflow: hidden;
}

#charge-bar {
    height: 100%;
    width: 0%;
    background-color: #e67e22;
    transition: width 0.1s ease-out;
}

/* Game Over Screen */
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.95);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.5em;
    z-index: 100;
}
