html {
    background: rgba(198,205,214,0.8);
}

body {
    font-family: sans-serif;
    padding: 20px;
    margin: 0;
}

.container {
    display: grid;
    grid-template-columns: 600px 700px;
    gap: 40px;
    align-items: start;
    justify-content: center;
    max-width: 100%;
}

.game-list {
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto; /* scrollbar für linke Liste */
}

.table-container {
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px; /* Tabelle rechts sticky */
    max-height: 80vh;
    overflow-y: auto;
}

.game {
    display: grid;
    grid-template-columns: 120px 1fr 1fr auto; /* Datum | Team A | Team B | Dropdown */
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 12px;
    background: #eee;
    border-radius: 4px;
}

.game .date {
    /*font-size: 0.9em;*/
    color: #555;
}

.game .team-a,
.game .team-b {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px;
}

.winner {
    background-color: #d4edda; /* dezentes Grün */
    border-radius: 4px;
    transition: background-color 0.3s;
}

select {
    min-width: 80px;
    padding: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 6px 10px;
    border: 1px solid #ccc;
    text-align: center;
}

th {
    background: #eee;
}

tbody tr:nth-child(even) {
    background: #f4f4f4;
}

tbody tr:hover {
    background: #e0eaff;
}

h1 {
    text-align: center;
}

.game-list h2,
.table-container h2 {
    margin-top: 0;
}

a.home {
    position: absolute;
    left: 10px;
    top: 10px;
}

a.home:hover {
    transform: scale(1.05);
}

/* league selection landing page */
.wrapper.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
    margin: 0;
    font-family: sans-serif;
}

.wrapper.landing h1 {
    margin-top: 0;
}

.wrapper.landing h2 {
    margin: 0;
}

.selection-container {
    display: flex;
    flex-direction: row;
    gap: 0px; /* Abstand zwischen den Logos */
    text-align: center;
}

.league-card {
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
}

.league-card.first:hover {
    transform: scale(1.05); /* Leichter Zoom-Effekt beim Drüberfahren */
}

.league-card.second:hover {
    transform: scale(1.03); /* Leichter Zoom-Effekt beim Drüberfahren */
}

.league-card.first img {
    width: 50vw;
    max-width: 350px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.league-card.second img {
    width: 30vw;
    max-width: 200px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

th .short-text {
    display: none;
}

/* Styling für die Buttons */
.mobile-controls {
    display: none; /* Standardmäßig aus (Desktop) */
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.mobile-controls button {
    font-size:  14px;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #ccc;
    cursor: pointer;
}

.mobile-controls button.active,
.mobile-controls #btn-home:active
 {
    background: #007bff;
    color: white;
}

/* Das Icon beim Klick weiß färben, damit der Kontrast stimmt */
.mobile-controls #btn-home:active .home-icon {
    filter: brightness(0) invert(1);
}

.home-icon {
    width: 20px;   /* Größe des Icons anpassen */
    height: 20px;
    display: block;
    margin: 0 auto;
}

/* Mobile Optimierung */
@media (max-width: 1350px) {
    .mobile-controls {
        display: flex;
    }

    .container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0;
    }

    .game-list, .table-container {
        display: none;
        width: 100%;
        max-width: 700px;
        max-height: none;
        margin-bottom: 30px; 
        overflow-y: visible;
    }

    /* Diese Klassen steuern, was angezeigt wird */
    .show-games .game-list {
        display: block;
    }

    .show-standings .table-container {
        display: block;
    }

    /* Sticky auf Mobile oft hinderlich, daher deaktivieren */
    .table-container {
        position: relative;
        top: 0;
    }
    
    /* Tabelle scrollbar machen, falls sie zu breit ist */
    .table-container {
        overflow-x: auto;
    }
    
    .league h1 {
        font-size: 25px;
    }
    
    a.home {
        display: none;
    }
    
    th .full-text {
        display: none;
    }
    th .short-text {
        display: inline;
    }
    .game-list h2,
    .table-container h2 {
        text-align: center;
    }
}

@media (max-width: 650px) {
    body {
        padding: 20px 5px;
    }
    .table-container,
    .game-list {
        padding: 20px 5px;
    }
    .table-container table,
    .game-list #games {
        /* Skaliert zwischen 12px und 16px basierend auf der Breite */
        font-size: clamp(12px, 2vw, 16px); 
    }
    
    .game {
        grid-template-columns: 60px 1fr 1fr auto; /* Datum schmaler auf Mobile */
        font-size: clamp(11px, 2vw, 14px);
    }
    
    .game select {
        font-size: clamp(11px, 2.5vw, 14px);
    }
    
    th, td {
        /* Paddings verringern, um Platz zu sparen */
        padding: 4px 2px; 
    }

    .landing h1 {
        margin: 0;
    }
        
    .league h1 {
        font-size: clamp(20px, 2vw, 25px);
    }
}
