* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: url(/data/bg_1920x1080.jpg) no-repeat center center fixed;
    background-size: cover;
}

body {
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: #e1e1e1;
}
a:hover {
    text-decoration: none;
    color: #414141;
}

/* --- Impressum --- */
.impressum {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 0.8em;
    color: #e1e1e1;
    z-index: 200;
}

/* --- Logo --- */
.logo {
    position: absolute;
    right: 5%;
    bottom: 80px;
    width: 10%;
    z-index: 100;
}
.logo img {
    width: 100%;
}

/* --- Contentbox --- */
.contentbox {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    min-height: 70%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    z-index: 90;
}

.contentboxTable {
    margin-left: auto;
    margin-right: auto;
}

/* --- Header --- */
.header1, .header2, .header3 {
    font-weight: 800;
}
.header1 {
    font-size: clamp(20px, 5vw, 85px);
    color: #1C1C1C;
}
.header2 {
    font-size: clamp(16px, 3.5vw, 60px);
    color: #E60019;
}
.header3 {
    font-size: clamp(16px, 3.5vw, 60px);
    color: #FFE941;
    margin-bottom: 10px;
}

/* --- Games Table --- */
.games-table {
    margin: 0 auto;
    border-collapse: collapse;
}

.game td {
    padding: 8px 10px;
    font-size: clamp(12px, 2.2vw, 36px);
    font-weight: bold;
    color: #000;
    vertical-align: middle;
}

.game td.datum {
    text-align: left;
    padding-right: 15px;
    white-space: nowrap;
}
.game td.team1 {
    text-align: right;
}
.game td.team2 {
    text-align: left;
}
.game td.separator {
    text-align: center;
    padding: 8px 5px;
}
.game td.flag {
    text-align: center;
}
.flag img {
    height: 1.2em;
    vertical-align: middle;
}

/* ==================== Responsive ==================== */

/* --- Tablet Portrait (768-1023) --- */
@media (max-width: 1023px) and (orientation: portrait) {
    html {
        background-image: url(/data/bg_1080x1920.jpg);
    }
    .contentbox {
        left: 3%;
        width: 94%;
        min-height: 60%;
    }
    .logo {
        right: 5%;
        bottom: 10%;
        width: 15%;
    }
}

/* --- Tablet Landscape (768-1023) --- */
@media (max-width: 1023px) and (orientation: landscape) {
    .contentbox {
        left: 3%;
        width: 94%;
    }
    .logo {
        width: 8%;
        bottom: 60px;
    }
}

/* --- Smartphone (<768px) --- */
@media (max-width: 767px) {
    html {
        background-image: url(/data/bg_1080x1920.jpg);
    }
    .contentbox {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        min-height: auto;
        padding: 15px 5px;
    }
    .logo {
        position: relative;
        width: 30%;
        margin: 20px auto 10px;
        right: auto;
        bottom: auto;
    }
    .impressum {
        position: relative;
        right: auto;
        top: auto;
        text-align: center;
        padding: 10px 0;
    }

    /* Spiele-Tabelle: Datum als eigene Zeile, dann Team1 Flag Score Flag Team2 */
    .games-table,
    .games-table tbody,
    .games-table tr.game,
    .games-table td {
        display: block;
        width: 100%;
    }
    .games-table tr.game {
        display: grid;
        grid-template-columns: 1fr auto auto auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: center;
        padding: 10px 0;
        gap: 4px 6px;
    }
    .game td.datum {
        grid-column: 1 / -1;
        text-align: center;
        padding: 0 0 4px;
        font-size: clamp(11px, 3.5vw, 18px);
        color: #444;
    }
    .game td.team1 {
        grid-column: 1;
        grid-row: 2;
        text-align: right;
        padding: 0 4px 0 0;
        font-size: clamp(12px, 4vw, 20px);
    }
    .game td.flag1 {
        grid-column: 2;
        grid-row: 2;
        padding: 0;
    }
    .game td.separator {
        grid-column: 3;
        grid-row: 2;
        padding: 0 4px;
        font-size: clamp(12px, 4vw, 20px);
    }
    .game td.flag2 {
        grid-column: 4;
        grid-row: 2;
        padding: 0;
    }
    .game td.team2 {
        grid-column: 5;
        grid-row: 2;
        text-align: left;
        padding: 0 0 0 4px;
        font-size: clamp(12px, 4vw, 20px);
    }
    .flag img {
        height: 1.4em;
    }
}

/* --- Sehr kleine Smartphones (<400px) --- */
@media (max-width: 400px) {
    .game td.team1,
    .game td.team2 {
        font-size: clamp(10px, 3.5vw, 16px);
    }
    .game td.datum {
        font-size: clamp(10px, 3vw, 14px);
    }
}
