body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #87CEEB; /* Himmelblau */
    font-family: Arial, sans-serif;
    overflow: hidden; 
}

#gameCanvas {
    border: 2px solid #333;
    cursor: crosshair; /* Wichtig, damit der Systemcursor nicht stört */
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
}

#score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 28px; 
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7); 
    font-weight: bold;
    z-index: 10; 
}

#loadingText {
    position: absolute;
    font-size: 2em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 11;
}

#gameInfo {
            display: flex;
            justify-content: space-between;
            width: 1400px; /* Gleiche Breite wie Canvas */
            margin-bottom: 10px;
            font-size: 24px;
            font-weight: bold;
            color: #333;
        }
        #loadingText {
            font-size: 30px;
            font-weight: bold;
            color: #555;
            margin-top: 20px;
        }
        #gameOverScreen {
            display: none; /* Anfangs versteckt */
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: 40px;
            text-align: center;
            z-index: 100;
        }
        #gameOverScreen button {
            padding: 15px 30px;
            width: 100%;
            font-size: 28px;
            cursor: pointer;
            margin-top: 30px;
            border: none;
            background-color: #4CAF50;
            color: white;
            border-radius: 8px;
            transition: background-color 0.3s ease;
        }
        #gameOverScreen button:hover {
            background-color: #45a049;
        }

.life-image {
    transition: opacity 0.3s ease, filter 0.3s ease;
}        



#playerNameInput {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 4px;
    margin: 0 10px;
}

#submitScoreButton {
    align-items: center;
    align-self: center;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#submitScoreButton:hover:not(:disabled) {
    background-color: #45a049;
}

#submitScoreButton:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Ranglisten-Container auf der Hauptseite */
#highscoreContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
}

#toggleHighscoresButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

#toggleHighscoresButton:hover {
    background-color: #555;
}

#highscoreSection {
    margin-top: 20px;
}

#highscoreSection h3 {
    color: white;
    margin-bottom: 10px;
    text-align: center;
}

#highscoreList table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

#highscoreList th,
#highscoreList td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#highscoreList th {
    background-color: #333;
    color: white;
}

#highscoreList tr.rank-1 {
    background-color: #FFD700;
    font-weight: bold;
}

#highscoreList tr.rank-2 {
    background-color: #C0C0C0;
}

#highscoreList tr.rank-3 {
    background-color: #CD7F32;
}

/* Responsive Design */
@media (max-width: 768px) {
    #highscoreContainer {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}



