:root {
    --primary: #007bff;
    --bg: #f9f9f9;
    --card: #ffffff;
    --text: #222;
    --radius: 10px;
    --btn-bg: #e0e0e0;
    --btn-active: #007bff;
    --btn-dark: #5a6268;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 5rem;
}

header {
    background: var(--primary);
    color: #fff;
    padding: 1.2rem;
    text-align: center;
    font-size: 1.4rem;
}

.nav {
    background: #e9ecef;
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    max-width: 800px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-buttons a {
    text-align: center;
    padding: 0.5rem;
    background: var(--btn-bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 0.95rem;
    width: 110px;
    border: none;
}

.nav-buttons a.active {
    background: var(--btn-active);
    color: #fff;
}

.nav-buttons a.dark {
    background: var(--btn-dark);
    color: #fff;
}

main {
    padding: 1rem;
    max-width: 800px;
    margin: auto;
}

.gruppe {
    margin-bottom: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.gruppe h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Gruppenspiel-Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

th, td {
    padding: 0.3rem;
    text-align: center;
    vertical-align: middle;
    height: 2.8rem; /* Einheitliche Höhe für alle */
    overflow: hidden;
}

/* Tabellenkopf */
th {
    background: #eee;
}

/* Zebra-Streifen */
tr:nth-child(even) {
    background: #f3f3f3;
}

/* Teamnamen */
td.team-name {
    text-align: left;
    white-space: normal;         /* Umbruch nach Wörtern */
    overflow-wrap: break-word;  /* Falls nötig */
    line-height: 1.2;
    font-size: 0.88rem;
}







.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #e9ecef;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #ccc;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Filter */
.filter-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.filter-inline select {
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    width: 140px;
    border: 1px solid #ccc;
    background: #fff;
    box-sizing: border-box;
    text-align: center;
}

/* Filter Button-Gruppe */
.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-actions button {
    flex-grow: 1;
    min-height: 36px;
    height: 36px;
    padding: 0 0.7rem;
    font-size: 0.9rem;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
}

.filter-actions button:hover {
    background: #0056b3;
}

.filter-actions .reset-button {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-dark);
    color: white;
    border-radius: var(--radius);
    border: none;
    text-decoration: none;
    cursor: pointer;
}

.filter-actions .reset-button:hover {
    background: #444;
}

/* Mobil */
@media (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        font-size: 0.85rem;
    }

    .nav-buttons a {
        width: 90px;
        font-size: 0.85rem;
        padding: 0.4rem;
    }

    .filter-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-inline select {
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }

    .filter-actions button {
        flex-grow: 1;
        width: auto;
    }

    .filter-actions .reset-button {
        margin-left: 0.3rem;
    }

    .gruppe table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
