/* TV-Seitenhintergrund mit deinem Logo */
body.tv {
    min-height: 100vh;
    position: relative;
    background: #fff8d6;
    color: #1a1200;
}

/* milchige Schicht */
body.tv::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 245, 210, 0.35);
    pointer-events: none;
    z-index: 0;
}

/* Logo-Ebene skaliert + transparent */
body.tv::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/static/scoreboard/img/logo.png") center center no-repeat;
    background-size: 80%;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Inhalt drüber */
body.tv main,
body.tv .tv-grid,
body.tv .table-wrap,
body.tv .section-title {
    position: relative;
    z-index: 1;
}

/* --- CARDS --------------------------------------------------- */
.tv-card {
    /* etwas kräftiger für bessere Lesbarkeit */
    background: rgba(255, 249, 228, 0.85);
    border: 1px solid rgba(255, 204, 0, 0.7);
    border-radius: 14px;
    padding: 0.6rem 0.9rem;
}

.tv-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #b27600;
    font-weight: 600;
}

/* Liste in den Cards */
.tv-card .toplist {
    list-style: none; /* <- doppelte Nummerierung weg */
    margin: 0;
    padding: 0;
}

.tv-card .toplist li {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(244, 196, 48, 0.25);
}

.tv-card .toplist li:last-child {
    border-bottom: none;
}

.tv-card .rank {
    font-weight: 600;
    color: #b27600;
    min-width: 1.6rem;
}

.tv-card .who {
    flex: 1 1 auto;
}

.tv-card .meta {
    color: #6d5a21;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.tv-card .score {
    font-weight: 600;
    color: #1a1200;
    min-width: 2.5rem;
    text-align: right;
}

/* Grid wie gehabt */
.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Abschnittsüberschrift besser lesbar */
.section-title {
    color: #2a1a00; /* statt fast weiß */
    text-shadow: none; /* damit es nicht milchig wird */
    margin-bottom: 0.4rem;
}

/* Tabelle enger machen */
.table-wrap {
    background: rgba(255, 249, 228, 0.65);
    border-radius: 10px;
    padding: 0.5rem;
    max-width: 62rem; /* ~992px, anpassen nach Geschmack */
    margin: 0 auto 1rem auto; /* zentrieren */
}

/* Tabelle selbst */
.table-wrap .table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* damit colgroup greift und nicht alles auseinanderzieht */
}

/* Spalten enger – falls dein colgroup im Template schon drin ist, greift das hier zusätzlich */
.table-wrap .table col:nth-child(1) {
    width: 3.2rem;
} /* # */
.table-wrap .table col:nth-child(2) {
    width: 20rem;
} /* Team */
.table-wrap .table col:nth-child(3),
.table-wrap .table col:nth-child(4),
.table-wrap .table col:nth-child(5) {
    width: 8.5rem;
} /* Punkte-Spalten */

/* Kopfzeile bleibt gelb, aber Text dunkel */
.table.head-strong thead th {
    background: linear-gradient(90deg, #ffcc00 0%, #f4c430 100%);
    color: #241700;
    border-bottom: 1px solid rgba(247, 209, 97, 0.8);
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}

/* Zellen etwas dichter */
.table tbody td {
    padding: 0.25rem 0.5rem;
}

/* Team-Namen nicht zu breit laufen lassen */
.table tbody td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ===== TV WALL tuning: 50" FullHD @ ~2m ===== */

body.tv main.container {
    max-width: 1200px; /* nicht über die ganze Breite ziehen */
    margin: 0 auto;
}

/* Immer 2 Spalten -> große Cards */
body.tv .tv-wall-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Card: mehr Fläche */
body.tv .tv-card {
    padding: 1.1rem 1.3rem;
    border-radius: 16px;
}

/* Teamname groß genug aus 2m */
body.tv .tv-card h3 {
    font-size: 1.8rem; /* ~29px */
    font-weight: 800;
    margin-bottom: 0.7rem;
}

/* Zeilen in der Liste größer und luftiger */
body.tv .tv-card .toplist li {
    padding: 0.42rem 0;
    font-size: 1.15rem; /* ~18px */
}

/* Kürzel (S/K) etwas größer */
body.tv .tv-card .rank {
    font-size: 1.1rem;
    min-width: 2rem;
}

/* Scores kräftig + etwas größer */
body.tv .tv-card .score {
    font-size: 1.2rem; /* ~19px */
    min-width: 3.2rem;
}

/* Meta (Knobeln K x (tb)) lesbar halten */
body.tv .tv-card .meta {
    font-size: 0.95rem; /* ~15px */
}

/* Optional: wenn Namen zu lang sind -> sauber abschneiden */
body.tv .tv-card .who {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ===== Einzelergebnisse in Cards: klare S/K-Spalten ===== */

body.tv .tv-scores {
    margin-top: 0.6rem;
    border-top: 1px solid rgba(244, 196, 48, 0.3);
    padding-top: 0.45rem;
}

body.tv .tv-scores-head,
body.tv .tv-scores-row {
    display: grid;
    grid-template-columns: 1fr 3.5rem 5.5rem; /* Name | S | K */
    column-gap: 0.6rem;
    align-items: baseline;
}

body.tv .tv-scores-head {
    font-weight: 700;
    color: #6d5a21;
    font-size: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(244, 196, 48, 0.2);
    margin-bottom: 0.25rem;
}

body.tv .tv-scores-row {
    padding: 0.28rem 0;
    border-bottom: 1px solid rgba(244, 196, 48, 0.18);
}

body.tv .tv-scores-row:last-child {
    border-bottom: none;
}

body.tv .tv-person {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.tv .tv-s,
body.tv .tv-k {
    font-weight: 800;
    color: #1a1200;
}

body.tv .tv-k .muted {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.75;
}
