

CSS
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

#spieler-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.spieler-button {
    background-color: #00a86b; /* Ein schönes Rasen-Grün */
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.spieler-button:hover {
    background-color: #008f5a;
}

.spieler-button:active {
    transform: scale(0.95);
}

/* Eine Karte für jedes WM-Spiel */
.spiel-karte {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.spiel-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.tipp-reihe {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.team-name {
    font-weight: bold;
    width: 120px;
    text-align: right;
}
.team-name.rechts {
    text-align: left;
}

/* Die Plus/Minus-Reihe */
.button-gruppe {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kreis-button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #00a86b;
    background: white;
    color: #00a86b;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}
.kreis-button:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.tor-anzeige {
    font-size: 20px;
    font-weight: bold;
    min-width: 20px;
}

.speichern-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}
.speichern-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.status-text {
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

/* Bonusfragen Styling */
.bonus-feld {
    margin-bottom: 15px;
    text-align: left;
}

.bonus-feld label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.bonus-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

/* Rangliste Styling */
.rangliste-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
}

.rangliste-tabelle th, .rangliste-tabelle td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.rangliste-tabelle th {
    background-color: #00a86b;
    color: white;
    font-weight: bold;
}

.rangliste-tabelle tr:nth-child(even) {
    background-color: #f9f9f9;
}

.rangliste-tabelle tr:first-child td {
    font-weight: bold;
    font-size: 18px;
    color: #d4af37; /* Gold für den Ersten */
}

.rangliste-name {
    text-align: left !important;
}

/* Pop-up (Modal) Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    text-align: left;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close-button:hover {
    color: black;
}

.vergangenes-spiel {
    background: #f1f3f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.punkte-badge {
    background: #00a86b;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    float: right;
}

/* Hover-Effekt für die Tabellenzeilen */
.rangliste-tabelle tr.klickbar:hover {
    background-color: #e9ecef;
    cursor: pointer;
}

/* Styling für die Heute-Übersicht */
.heute-tipp-zeile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.heute-tipp-zeile:last-child {
    border-bottom: none;
}

.status-fehlt {
    color: #dc3545;
    font-weight: bold;
}

.status-geheim {
    color: #ffc107;
    font-style: italic;
}

.status-sichtbar {
    color: #00a86b;
    font-weight: bold;
    font-size: 16px;
}

/* ======================================================== */
/* 📱 SMARTPHONE-OPTIMIERUNG (Für Bildschirme unter 500px)   */
/* ======================================================== */
@media (max-width: 500px) {
    body {
        padding: 10px; /* Weniger Rand am Handy */
    }
    
    .container {
        padding: 15px; /* Mehr Platz für den Inhalt */
    }
    
    h1 {
        font-size: 20px; /* Überschrift leicht verkleinern */
    }

    /* Wir verwandeln die Tipp-Reihe in ein zweistöckiges Raster */
    .tipp-reihe {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 12px 8px; /* 12px Abstand nach unten, 8px zur Seite */
        align-items: center;
        margin: 20px 0;
    }

    .team-name {
        width: auto !important; /* Starre Breite von 120px aufheben */
        font-size: 15px;
        white-space: normal; /* Erlaubt langen Namen, sauber umzubrechen */
        word-break: break-word;
    }

    /* Reihe 1: Die Ländernamen und das Trennzeichen */
    .team-name:not(.rechts) {
        grid-column: 1;
        grid-row: 1;
        text-align: right;
    }

    .team-name.rechts {
        grid-column: 3;
        grid-row: 1;
        text-align: left;
    }

    .tipp-reihe > span:not(.team-name) {
        grid-column: 2;
        grid-row: 1;
        font-weight: bold;
        font-size: 18px;
    }

    /* Reihe 2: Die Plus/Minus-Buttons direkt unter den Ländern */
    .tipp-reihe > .button-gruppe:nth-of-type(1) {
        grid-column: 1;
        grid-row: 2;
        justify-self: end; /* Rechtsbündig unter Team A */
    }

    .tipp-reihe > .button-gruppe:nth-of-type(2) {
        grid-column: 3;
        grid-row: 2;
        justify-self: start; /* Linksbündig unter Team B */
    }
}