body {
    margin: 0;
    overflow: hidden; /* Verhindert Scrollbalken */
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100vw; /* Mindestbreite des Bodys ist die volle Viewport-Breite */
    min-height: 100vh; /* Mindesthöhe des Bodys ist die volle Viewport-Höhe */
    background-color: #008000; /* Himmelblau als Hintergrund */
    font-family: 'Arial', sans-serif;
    color: #333;
}

#game-container {
    width: 100vw; /* Nimmt die volle Breite des Bildschirms ein */
    height: 100vh; /* Nimmt die volle Höhe des Bildschirms ein */
    /* Anpassung für Seitenverhältnis auf Handys (z.B. 9:16 für Hochformat) */
    max-width: calc(100vh * 0.5625); /* 9/16 des Viewport-Höhe */
    max-height: calc(100vw * 1.777); /* 16/9 des Viewport-Breite */
    position: relative;
    background-color: #183b11;
    border: 5px solid #183b11;
    box-sizing: border-box; /* Stellt sicher, dass Padding und Border innerhalb der Breite sind */
    overflow: hidden; /* Wichtig, damit die Katzen nicht außerhalb des Containers sichtbar sind */
    margin: auto; /* Zentriert den Container, wenn er kleiner als der Body ist */
}

#score, #lives {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    font-weight: bold;
    z-index: 10;
}

#score {
    left: 10px;
}

#lives {
    right: 10px;
}

#game-area {
    width: 100%;
    height: calc(100% - 60px); /* Platz für Score/Lives oben */
    position: absolute;
    bottom: 0;
    left: 0;
    overflow: hidden;
    /* Hintergrundbild-Einstellungen NEU */
    background-image: url('spielfeld.jpg'); /* HIER: Pfad zu deinem Hintergrundbild */
    background-size: cover; /* Passt das Bild so an, dass es den Bereich ausfüllt und dabei das Seitenverhältnis beibehält */
    background-repeat: no-repeat; /* Verhindert, dass das Bild wiederholt wird */
    background-position: center; /* Zentriert das Bild im Hintergrund */
    /* Ende der Hintergrundbild-Einstellungen */
    background-color: #008000; /* Dieser Wert dient nur als Fallback, falls das Bild nicht geladen wird */
}
#basket {
    width: 80px; /* Breite des Korbs */
    height: 60px; /* Höhe des Korbs */
    background-image: url('basket.png'); /* Pfad zum Korb-Bild */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    bottom: 80px; /* Korb etwas höher setzen als die Steuerbuttons */
    left: calc(50% - 40px); /* Zentriert den Korb */
    z-index: 5; /* Stellt sicher, dass der Korb über den Katzen ist */
}

.cat {
    width: 30px; /* Breite der Katze */
    height: 30px; /* Höhe der Katze */
    background-image: url('foot.png'); /* Pfad zum Katzen-Bild */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 0; /* Katzen starten oben */
    z-index: 2;
}

/* NEU: Style für die Bombe */
.bomb {
    width: 30px; /* Breite der Bombe */
    height: 30px; /* Höhe der Bombe */
    background-image: url('bask.png'); /* Pfad zum Bomben-Bild */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 0; /* Bomben starten oben */
    z-index: 2;
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
}

#start-screen h1, #game-over-screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

#start-screen p, #game-over-screen p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

#start-button, #restart-button {
    padding: 15px 30px;
    font-size: 1.5em;
    background-color: #4CAF50; /* Grün für den Button */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#start-button:hover, #restart-button:hover {
    background-color: #45a049;
}

/* Styles für die Steuerkreise */
.control-button {
    position: absolute;
    bottom: 0; /* Unten im Spielbereich */
    width: 45%; /* Breite des Buttons relativ zum Spielbereich */
    height: 100px; /* Höhe des Buttons */
    background-color: rgba(0, 0, 0, 0.2); /* Leicht transparentes Schwarz */
    cursor: pointer;
    z-index: 10; /* Stellt sicher, dass sie über Korb und Katzen sind */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em; /* Größe des Pfeils */
   color: rgba(255, 0, 0, 0.5); /* Farbe des Pfeils in halbtransparentem Rot */
    user-select: none; /* Verhindert Textauswahl beim Tippen */
    -webkit-tap-highlight-color: transparent; /* Entfernt den blauen Tap-Highlight auf iOS */
}

#left-button {
    left: 0;
}

#left-button::before {
    content: '◀'; /* Unicode-Pfeil nach links */
}

#right-button {
    right: 0;
}

#right-button::before {
    content: '▶'; /* Unicode-Pfeil nach rechts */
}
/* NEU: Klasse zum Anzeigen der Buttons für Touch-Geräte */
.show-control-buttons #left-button,
.show-control-buttons #right-button {
    display: flex; /* Zeigt die Buttons an */
}