:root {
    --primary: #314c8c;
    --white: #ffffff;
    --accent: #0b8c7e;
    --black: #000000;
    --bg: #f4f7fb;
    --muted: #637084;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: var(--bg); color: #12213a; }
a { color: var(--primary); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.top-notice {
    background: #ffd400;
    color: #111111;
    border-bottom: 2px solid #c79d00;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    font-weight: 700;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}
.top-notice .container {
    padding-top: .7rem;
    padding-bottom: .7rem;
    font-size: 1.05rem;
}
.nav {
    background: linear-gradient(120deg, #1d346f 0%, #314c8c 60%, #0b8c7e 100%);
    color: var(--white);
    box-shadow: 0 2px 10px rgba(12, 30, 68, .18);
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}
.nav .container { display: flex; gap: .9rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: .72rem; padding-bottom: .72rem; }
.nav a { color: var(--white); font-weight: 600; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; }
.brand-title { font-weight: 800; letter-spacing: .1px; }
.nav-links { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .42rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .35);
}
.nav-links a.active {
    background: #fff;
    color: #1e396d;
    border-color: #fff;
}
.grid { display: grid; gap: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: #fff; border: 1px solid #d8e1ef; border-radius: 12px; padding: .9rem; }
.card h2 { margin-top: 0; font-size: 1.1rem; }
.meta { color: var(--muted); font-size: .9rem; }
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d8e1ef;
    border-radius: 12px;
    background: #fff;
}
table { width: 100%; border-collapse: collapse; background: #fff; border: 0; min-width: 760px; table-layout: auto; }
th, td { border-bottom: 1px solid #e4eaf4; padding: .48rem .45rem; text-align: left; line-height: 1.2; }
th { background: #edf3ff; font-size: .86rem; white-space: nowrap; }
.compact-table td { font-size: .9rem; }
.status { font-size: .82rem; font-weight: 700; padding: .2rem .45rem; border-radius: 999px; display: inline-block; }
.st-geplant { background: #eef3fd; color: #23427a; }
.st-laeuft { background: #e8fbf7; color: #0b6f60; }
.st-beendet { background: #eef8ea; color: #2e6f2e; }
.st-verschoben, .st-abgesagt { background: #fdecec; color: #963030; }
form.filters { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: .55rem; margin-bottom: .75rem; }
input, select, button { min-height: 42px; padding: .48rem .6rem; border-radius: 10px; border: 1px solid #c9d6ea; font-size: .95rem; }
button { background: var(--primary); color: #fff; border-color: var(--primary); cursor: pointer; }
button.secondary { background: #fff; color: var(--primary); }
button.danger { background: #b42318; border-color: #b42318; color: #fff; }
.error { background: #ffefef; border: 1px solid #e2b1b1; padding: .6rem; border-radius: 8px; }
.success { background: #ebfbef; border: 1px solid #9fddb0; padding: .6rem; border-radius: 8px; }
.row-focus td { background: #fff8d9; }
.hero {
    background: linear-gradient(135deg, #314c8c 0%, #1f3370 55%, #0b8c7e 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.hero h1 { margin: 0 0 .3rem 0; }
.hero .meta { color: rgba(255,255,255,.9); margin: 0; }
.hero-date { font-size: 1.18rem; font-weight: 700; }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 10px;
    padding: .62rem .95rem;
    border: 2px solid transparent;
}
.btn-primary { background: #fff; color: #1f3370; }
.btn-accent { background: #0b8c7e; color: #fff; border-color: #fff; }
.quick-links { display: flex; gap: .55rem; margin-bottom: 1rem; flex-wrap: wrap; }
.quick-link {
    background: #eef3fd;
    border: 1px solid #d4dff3;
    border-radius: 999px;
    padding: .4rem .8rem;
    color: #1e396d;
    font-weight: 600;
}
.match-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .55rem;
}
.match-list li {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: start;
    gap: .55rem;
    border: 1px solid #e2e9f6;
    background: #f9fbff;
    border-radius: 10px;
    padding: .5rem .55rem;
}
.match-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 8px;
    background: #edf3ff;
    color: #1f3c76;
    font-weight: 800;
    font-size: .84rem;
}
.match-time.score {
    background: #e8fbf7;
    color: #0d6558;
}
.match-teams {
    font-weight: 600;
    line-height: 1.24;
}
.beamer-container { max-width: 100%; padding-left: 1rem; padding-right: 1rem; }
.beamer-view .nav { position: static; }
.beamer-view .nav .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.beamer-view .brand img {
    width: 56px;
    height: 56px;
}
.beamer-view .brand-title {
    font-size: 2.05rem;
    font-weight: 800;
    letter-spacing: .2px;
}
.beamer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.beamer-card { min-height: calc(100vh - 130px); }
.beamer-list li { grid-template-columns: 96px 1fr; padding: .6rem .65rem; }
.beamer-list .match-time { font-size: 1rem; min-height: 34px; }
.beamer-list .match-teams { font-size: 1rem; line-height: 1.28; }
.beamer-clock-wrap { color: #fff; font-weight: 900; font-size: 2.9rem; letter-spacing: 1px; line-height: 1; }
.beamer-clock { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
    .container { padding: .72rem; }
    .brand-title { font-size: .95rem; }
    .nav .container { gap: .72rem; padding-top: .62rem; padding-bottom: .62rem; }
    .nav-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .6rem;
    }

    @media (max-width: 1200px) {
        .beamer-grid { grid-template-columns: 1fr; }
        .beamer-card { min-height: 0; }
        .beamer-view .brand-title { font-size: 1.35rem; }
        .beamer-view .brand img { width: 46px; height: 46px; }
        .beamer-clock-wrap { width: 100%; text-align: left; margin-top: .2rem; font-size: 1.9rem; }
    }
    .nav-links a {
        width: 100%;
        min-height: 46px;
        padding: .55rem .35rem;
        font-size: .98rem;
        font-weight: 700;
    }
    form.filters { grid-template-columns: 1fr; }
    button.secondary { width: 100%; }
    .table-wrap { overflow-x: hidden; }
    table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }
    th, td {
        font-size: .75rem;
        padding: .34rem .2rem;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    th { font-size: .74rem; }
    .status { font-size: .78rem; padding: .18rem .36rem; }
    .hero-date { font-size: 1.03rem; }
    .match-list li { grid-template-columns: 62px 1fr; padding: .45rem .5rem; }
    .match-time { font-size: .78rem; min-height: 25px; }
    .match-teams { font-size: .88rem; }
}

@media (max-width: 720px) and (orientation: portrait) {
    .nav-links a {
        font-size: .9rem;
        min-height: 44px;
    }
    th, td {
        font-size: .56rem;
        padding: .22rem .12rem;
        line-height: 1.12;
        word-break: normal;
        overflow-wrap: normal;
    }
    table { table-layout: fixed; }
    .schedule-table th, .schedule-table td { border-right: 1px solid #edf2fb; }
    .schedule-table th:last-child, .schedule-table td:last-child { border-right: 0; }
    .schedule-table th, .schedule-table td {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .schedule-table th:nth-child(1), .schedule-table td:nth-child(1) { width: 9%; }
    .schedule-table th:nth-child(2), .schedule-table td:nth-child(2) { width: 12%; }
    .schedule-table th:nth-child(3), .schedule-table td:nth-child(3) { width: 15%; }
    .schedule-table th:nth-child(4), .schedule-table td:nth-child(4) { width: 7%; text-align: center; }
    .schedule-table th:nth-child(5), .schedule-table td:nth-child(5) { width: 21%; }
    .schedule-table th:nth-child(6), .schedule-table td:nth-child(6) { width: 21%; }
    .schedule-table th:nth-child(7), .schedule-table td:nth-child(7) { width: 7%; text-align: center; }
    .schedule-table th:nth-child(8), .schedule-table td:nth-child(8) { width: 8%; text-align: center; }
    .schedule-table th:nth-child(1), .schedule-table th:nth-child(2), .schedule-table th:nth-child(3), .schedule-table th:nth-child(4), .schedule-table th:nth-child(7), .schedule-table th:nth-child(8),
    .schedule-table td:nth-child(1), .schedule-table td:nth-child(2), .schedule-table td:nth-child(3), .schedule-table td:nth-child(4), .schedule-table td:nth-child(7), .schedule-table td:nth-child(8) {
        white-space: nowrap;
    }
    .schedule-table th:nth-child(5), .schedule-table th:nth-child(6) { white-space: nowrap; }
    .schedule-table td:nth-child(5), .schedule-table td:nth-child(6) {
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .standings-table th:nth-child(1), .standings-table td:nth-child(1) { width: 10%; text-align: center; }
    .standings-table th:nth-child(2), .standings-table td:nth-child(2) { width: 34%; }
    .standings-table th:nth-child(3), .standings-table td:nth-child(3),
    .standings-table th:nth-child(4), .standings-table td:nth-child(4),
    .standings-table th:nth-child(5), .standings-table td:nth-child(5),
    .standings-table th:nth-child(6), .standings-table td:nth-child(6) { width: 8%; text-align: center; white-space: nowrap; }
    .standings-table th:nth-child(7), .standings-table td:nth-child(7) { width: 14%; text-align: center; white-space: nowrap; }
    .standings-table th:nth-child(8), .standings-table td:nth-child(8) { width: 10%; text-align: center; white-space: nowrap; }
    .standings-table th:nth-child(9), .standings-table td:nth-child(9) { width: 8%; text-align: center; white-space: nowrap; }
    .standings-table td:nth-child(2) {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .status {
        font-size: .58rem;
        padding: .12rem .24rem;
        white-space: nowrap;
    }
}
