body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #222;
    color: white;
    margin: 0;
}

h1 {
    color: #0f0;
}

.game-container {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    text-align: center;
}

canvas {
    background-color: black;
    border: 2px solid #0f0;
    display: block;
    margin: 0 auto 15px auto;
    max-width: 100%; /* Der Canvas wird nie breiter als sein Eltern-Element */
    height: auto;    /* Höhe proportional zur Breite anpassen */
}

.controls {
    margin-top: 10px; /* NEU: Etwas weniger Abstand nach oben, um Buttons höher zu bringen */
}

/* NEU: Container für die oberen Buttons */
.top-buttons {
    display: flex; /* Buttons nebeneinander */
    justify-content: center; /* Zentriert die Buttons */
    margin-top: 10px; /* Abstand zur Punkteanzeige */
    margin-bottom: 5px; /* Abstand zu den Mobile-Controls, falls sichtbar */
}

.top-buttons button { /* Stile für die "Neues Spiel" und "Bestenliste" Buttons */
    background-color: #0a0;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 8px; /* NEU: Etwas mehr Abstand zwischen diesen Buttons */
    transition: background-color 0.3s ease;
}

.top-buttons button:hover {
    background-color: #0c0;
}

#score {
    font-weight: bold;
    color: #0f0;
}

/* --- Mobile Steuerung Styles (angepasst) --- */
.mobile-controls {
    display: none; /* Standardmäßig ausblenden, nur auf Mobilgeräten anzeigen */
    flex-direction: column;
    align-items: center;
    margin-top: 25px; /* NEU: Etwas weniger Abstand nach oben */
    padding: 10px;
}

.mobile-controls .horiz-btns {
    display: flex;
    justify-content: center;
    width: 100%;
}

.control-btn {
    background-color: orange;
    color: white;
    border: none;
    padding: 15px 25px; /* NEU: Etwas kleinerer Padding */
    font-size: 2em;      /* NEU: Etwas kleinere Pfeilgröße */
    border-radius: 8px; /* NEU: Etwas kleinere Abrundung */
    cursor: pointer;
    margin: 6px; /* NEU: Etwas weniger Abstand zwischen den Buttons */
    transition: background-color 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    background-color: darkorange;
}

/* Medienabfrage: Zeige mobile Steuerung nur auf kleinen Bildschirmen */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex; /* Auf Mobilgeräten anzeigen */
    }
    .controls { /* Gesamter Kontrollbereich */
        flex-direction: column;
        display: flex;
        align-items: center;
    }
    .top-buttons { /* Die "Neues Spiel" und "Bestenliste" Buttons */
        margin-bottom: 15px; /* NEU: Mehr Abstand von den unteren Mobile-Buttons */
    }
}