/* Bundesliga Spieltage Styles */
.matchday-section {
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.matchday-section h2 {
    margin-top: 0;
    color: #333;
}

.match {
    padding: 10px;
    margin: 8px 0;
    background: white;
    border-left: 4px solid #0066cc;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.match.finished {
    border-left-color: #28a745;
}

.match-teams {
    text-align: left;
}

.match-teams .winner {
    font-weight: bold;
}

.match-teams .team-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.match-teams .team-link:hover {
    text-decoration: underline;
    color: #0066cc;
}

.match-result {
    text-align: left;
    min-width: 120px;
    font-weight: bold;
}

.match-datetime {
    text-align: right;
    white-space: nowrap;
    min-width: 140px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.error {
    color: #dc3545;
    padding: 20px;
    background: #f8d7da;
    border-radius: 4px;
}

/* ============================================
   MOBILE OPTIMIERUNG
   ============================================ */

/* Tablets und kleinere Desktops */
@media (max-width: 768px) {
    .matchday-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .matchday-section h2 {
        font-size: 1.3em;
    }
    
    .match {
        gap: 10px;
        padding: 8px;
        font-size: 0.9em;
    }
    
    .match-result {
        min-width: 90px;
    }
    
    .match-datetime {
        min-width: 110px;
        font-size: 0.85em;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .matchday-section {
        margin: 10px 0;
        padding: 10px;
        border-radius: 6px;
    }
    
    .matchday-section h2 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .match {
        /* Umstellung auf 2 Zeilen Layout für sehr kleine Screens */
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 5px;
        padding: 10px 8px;
        font-size: 0.85em;
    }
    
    .match-teams {
        grid-column: 1;
        grid-row: 1;
        word-wrap: break-word;
    }
    
    .match-result {
        grid-column: 1;
        grid-row: 2;
        text-align: left;
        min-width: auto;
        display: inline;
    }
    
    .match-datetime {
        grid-column: 1;
        grid-row: 2;
        text-align: right;
        min-width: auto;
        display: inline;
        float: right;
        font-size: 0.8em;
    }
    
    /* Container für Ergebnis + Datum in einer Zeile */
    .match {
        position: relative;
    }
    
    .loading {
        padding: 30px 15px;
        font-size: 16px;
    }
    
    .error {
        padding: 15px;
        font-size: 0.9em;
    }
}

/* Sehr kleine Smartphones */
@media (max-width: 360px) {
    .matchday-section {
        padding: 8px;
    }
    
    .match {
        padding: 8px 6px;
        font-size: 0.8em;
        margin: 6px 0;
    }
    
    .match-teams .team-link {
        display: inline-block;
        max-width: 100%;
    }
    
    .match-datetime {
        font-size: 0.75em;
    }
}

/* Landscape-Modus auf Smartphones */
@media (max-width: 768px) and (orientation: landscape) {
    .match {
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto;
        gap: 8px;
        font-size: 0.85em;
    }
    
    .match-teams {
        grid-column: 1;
        grid-row: 1;
    }
    
    .match-result {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
        display: block;
        float: none;
    }
    
    .match-datetime {
        grid-column: 3;
        grid-row: 1;
        text-align: right;
        display: block;
        float: none;
    }
}

/* Touch-Optimierung für Links */
@media (hover: none) and (pointer: coarse) {
    .match-teams .team-link {
        padding: 2px 4px;
        margin: -2px -4px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}