/* ============================================
   Bracket System — Redesign
   LAN-Party Turniersystem
   ============================================ */

:root {
    --accent:        #00ffaa;
    --accent-12:     rgba(0,255,170,0.12);
    --accent-30:     rgba(0,255,170,0.30);
    --bg:            #0f0f1a;
    --surface:       #1e1e2e;
    --card:          #252538;
    --fg:            #e0e0f0;
    --fg-soft:       #c0c0d0;
    --muted:         #8888aa;
    --border:        rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.12);
}

/* Keyframes */
@keyframes lanPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}
@keyframes lanFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes lanScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Page Layout
   ============================================ */
.bracket-page {
    padding: 1.5rem 1rem;
    max-width: 100%;
    animation: lanFadeIn 200ms ease;
}

/* ============================================
   Tournament Header
   ============================================ */
.tournament-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 16px;
}

.th-game-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.th-game-icon-text {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

.th-info { flex: 1; min-width: 0; }

.th-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.th-meta-item {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.th-meta-sep { color: var(--border-strong); font-size: 11px; }

.th-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 4px 0 0;
    line-height: 1.3;
}

.th-sub-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.th-slots {
    font-size: 12px;
    color: var(--muted);
}

.th-team-size {
    font-size: 12px;
    color: var(--muted);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.status-badge--registration { background: rgba(148,163,184,0.12); color: #94a3b8; }
.status-badge--active       { background: rgba(239,68,68,0.14); color: #f87171; }
.status-badge--finished     { background: rgba(0,255,170,0.12); color: #00ffaa; }
.status-badge--disputed     { background: rgba(234,179,8,0.14); color: #fbbf24; }

.status-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: lanPulse 1.4s ease-in-out infinite;
}

/* ============================================
   Bracket Empty State
   ============================================ */
.bracket-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
}

.bracket-empty p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   Bracket Canvas (Zoom/Pan)
   ============================================ */
.bracket-canvas-wrap {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    height: 620px;
    margin-bottom: 16px;
}

.bracket-canvas-wrap--grabbing { cursor: grabbing !important; }
.bracket-canvas-wrap:not(.bracket-canvas-wrap--grabbing) { cursor: grab; }

.bracket-stage {
    position: absolute;
    top: 30px;
    left: 30px;
    transform-origin: 0 0;
}

.bracket-stage--smooth { transition: transform 140ms ease; }

/* Round Headers */
.bracket-round-header {
    position: absolute;
    top: -24px;
    width: 248px;
    font-size: 13px;
    font-weight: 700;
    color: var(--fg-soft);
    letter-spacing: 0.3px;
}

/* SVG Connectors */
.bracket-connectors {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

/* Zoom Toolbar */
.bracket-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15,15,26,0.88);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.bracket-toolbar__btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.08);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 120ms;
}

.bracket-toolbar__btn:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.bracket-toolbar__zoom {
    font-size: 11px;
    color: var(--muted);
    font-family: ui-monospace, monospace;
    min-width: 36px;
    text-align: center;
}

.bracket-toolbar__sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 2px;
}

/* ============================================
   Match Card
   ============================================ */
.match-card {
    width: 248px;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 140ms;
    box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset;
    position: absolute;
}

.match-card:hover {
    border-color: var(--accent-30);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 1px var(--accent-30) inset;
}

.match-card--live {
    border-color: rgba(239,68,68,0.45) !important;
}

.match-card--disputed {
    border-color: rgba(234,179,8,0.45) !important;
}

/* Match Card Header */
.match-card__header {
    padding: 5px 10px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-card__live-tag {
    color: #f87171;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-card__disputed-tag {
    color: #fbbf24;
    font-weight: 700;
}

/* Team Row */
.team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    transition: background 120ms;
    border-left: 3px solid transparent;
}

.team-row--winner {
    background: rgba(0,255,170,0.12);
    border-left-color: var(--accent);
}

.team-row--loser {
    opacity: 0.6;
}

.team-row__divider {
    height: 1px;
    background: var(--border);
}

/* Team Logo */
.team-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.25);
    overflow: hidden;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-logo--empty {
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.25);
    font-size: 11px;
}

/* Team Info */
.team-row__info { flex: 1; min-width: 0; }

.team-row__name {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-row--winner .team-row__name { font-weight: 700; }

.team-row__name--tbd { color: var(--muted); }

.team-row__meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

/* Score */
.team-row__score {
    font-size: 16px;
    font-weight: 800;
    color: var(--fg-soft);
    font-family: ui-monospace, monospace;
    min-width: 18px;
    text-align: right;
}

.team-row__score--empty { color: var(--muted); }
.team-row--winner .team-row__score { color: #6dffc6; }

/* ============================================
   Match Detail Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    /* Ueber Seitenleiste (1100) und Navigation (1000), sonst verdeckt die Seitenleiste
       auf Laptops den linken Rand des Dialogs (gefunden beim Anleitungsfoto 05.10.2026) */
    z-index: 2000;
    background: rgba(2,6,23,0.78);
    backdrop-filter: blur(6px);
    display: none;
    place-items: center;
    padding: 24px;
    animation: lanFadeIn 160ms ease;
}

.modal-overlay--visible {
    display: grid;
}

.modal-dialog {
    width: min(960px, 100%);
    max-height: 92vh;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    animation: lanScaleIn 180ms cubic-bezier(.4,1.4,.6,1);
}

/* Modal Header */
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent);
}

.modal-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.modal-header__meta .sep { color: var(--border-strong); }

.modal-header__title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

.modal-header__title .vs {
    color: var(--muted);
    font-weight: 500;
    margin: 0 6px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    display: grid;
    place-items: center;
    transition: all 120ms;
}

.modal-close:hover {
    color: #f87171;
    border-color: rgba(248,113,113,0.3);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    padding: 0 20px;
}

.modal-tab {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 120ms;
}

.modal-tab:hover { color: var(--fg-soft); }
.modal-tab--active { color: #fff; border-bottom-color: var(--accent); }

.modal-tab__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

/* Score Hero */
.score-hero {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 22px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 18px;
}

.score-hero__team {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-hero__team--right { justify-content: flex-end; }
.score-hero__team--left  { justify-content: flex-start; }

.score-hero__logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.score-hero__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.score-hero__logo--ring {
    box-shadow: 0 0 0 2px rgba(0,255,170,0.45);
}

.score-hero__team-info { text-align: left; }
.score-hero__team--right .score-hero__team-info { text-align: right; }

.score-hero__team-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.score-hero__team-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.score-hero__winner-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.score-hero__scores {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.score-hero__score {
    font-size: 38px;
    font-weight: 800;
    font-family: ui-monospace, monospace;
    color: var(--fg-soft);
}

.score-hero__score--winner { color: #6dffc6; }

.score-hero__colon {
    color: var(--muted);
    font-size: 14px;
}

/* Roster Cards */
.roster-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.roster-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.roster-card--winner { border-color: rgba(0,255,170,0.4); }

.roster-card__header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.roster-card__team-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.roster-card__player {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.roster-card__player:first-of-type { border-top: none; }

.player-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3);
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.roster-card__player-info { flex: 1; min-width: 0; }

.roster-card__player-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
}

.roster-card__player-handle {
    font-size: 10.5px;
    color: var(--muted);
}

.roster-card__player-stat {
    font-size: 11px;
    font-family: ui-monospace, monospace;
    color: var(--fg-soft);
    background: rgba(255,255,255,0.04);
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.roster-card--tbd {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    font-size: 13px;
    display: grid;
    place-items: center;
    min-height: 160px;
}

/* Match Meta Row */
.match-meta-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 18px;
}

.match-meta-row__label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.4px;
    font-weight: 600;
    text-transform: uppercase;
}

.match-meta-row__val {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    margin-top: 2px;
}

.match-meta-row__val--mono { font-family: ui-monospace, monospace; }

/* Scoreboard Table */
.scoreboard-section {
    margin-top: 16px;
}

.scoreboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.scoreboard-header__info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scoreboard-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.scoreboard-table-wrap__header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.02);
}

.scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.scoreboard-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.015);
}

.scoreboard-table th.center { text-align: center; min-width: 44px; }

.scoreboard-table td {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
}

.scoreboard-table td.center { text-align: center; }

.stat-cell {
    font-size: 12.5px;
    color: var(--fg-soft);
    font-family: ui-monospace, monospace;
    font-weight: 600;
}

.stat-input {
    width: 48px;
    padding: 4px 6px;
    text-align: center;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-size: 12px;
    font-family: ui-monospace, monospace;
}

/* Player Entry Status */
.player-status {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.player-status--confirmed { background: rgba(0,255,170,0.12); color: var(--accent); }
.player-status--pending   { background: rgba(148,163,184,0.12); color: #94a3b8; }
.player-status--disputed  { background: rgba(234,179,8,0.14); color: #fbbf24; }

/* Result Entry Form */
.result-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    margin-top: 16px;
}

.result-form h3 {
    font-size: 14px;
    color: #fff;
    margin: 0 0 14px;
}

.result-form__grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
}

.result-form__player h4 {
    color: var(--fg-soft);
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.result-form__vs {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    padding-top: 28px;
    text-align: center;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 120ms;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 120ms;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover { filter: brightness(0.9); }

.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--fg-soft);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: rgba(255,255,255,0.08); }

.btn-danger {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.25);
}

.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ============================================
   Chat Section
   ============================================ */
.chat-section {
    margin-top: 16px;
}

.chat-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.chat-container__header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 4px;
    animation: slideUp 120ms ease;
}

.chat-message:hover { background: rgba(255,255,255,0.02); }

.chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
    background: linear-gradient(135deg, #64748b, #334155);
}

.chat-msg-content { flex: 1; min-width: 0; }

.chat-msg-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.chat-nick {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.chat-nick--admin { color: #fbbf24; }

.chat-admin-badge {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    font-weight: 700;
}

.chat-time {
    font-size: 10.5px;
    color: var(--muted);
    margin-left: auto;
}

.chat-text {
    font-size: 12.5px;
    color: var(--fg-soft);
    margin-top: 2px;
    line-height: 1.45;
    word-break: break-word;
}

.chat-input-bar {
    padding: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
}

.chat-input-bar .form-input {
    flex: 1;
    padding: 8px 10px;
    font-size: 12.5px;
}

.chat-input-bar .btn {
    padding: 0 14px;
    font-size: 12px;
}

/* ============================================
   Participants Panel
   ============================================ */
.participants-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.participants-panel__header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participants-panel__count {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.participants-panel__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
}

.participants-panel__item:first-of-type { border-top: none; }

.participants-panel__seed {
    width: 20px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    font-family: ui-monospace, monospace;
    text-align: center;
}

.participants-panel__name {
    flex: 1;
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}

.participants-panel__tag {
    font-size: 11px;
    color: var(--muted);
    font-family: ui-monospace, monospace;
}

/* ============================================
   Content Grid (Bracket + Sidebar)
   ============================================ */
.bracket-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}

@media (max-width: 1100px) {
    .bracket-content-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
.modal-body::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar { width: 8px; height: 8px; }
.modal-body::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .bracket-canvas-wrap { height: 450px; }
    .tournament-header { flex-wrap: wrap; }
    .score-hero { grid-template-columns: 1fr; gap: 12px; text-align: center; }
    .score-hero__team { justify-content: center !important; }
    .score-hero__team-info { text-align: center !important; }
    .roster-grid { grid-template-columns: 1fr; }
    .match-meta-row { grid-template-columns: repeat(2, 1fr); }
    .result-form__grid { grid-template-columns: 1fr; }
    .result-form__vs { padding: 0; }
    .modal-dialog { max-height: 95vh; }
    .modal-body { padding: 14px; }
}

/* Result-Form: Team-Roster Stat-Eingabe */
.result-form__team .result-form__roster {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.result-form__roster-row {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border, #2d2654);
    border-radius: 6px;
    padding: 8px 10px;
}
.result-form__roster-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}
.result-form__roster-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.result-form__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10.5px;
    color: var(--muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.result-form__stat input {
    padding: 4px 6px;
    font-size: 12.5px;
    width: 100%;
}

/* Turnierserver: Marke auf der Match-Karte und Kasten im Match-Fenster */
.match-card__server {
    color: var(--accent);
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.match-card__server--wartet { color: #93c5fd; font-weight: 500; }

.match-server {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 170, 0.4);
    background: rgba(0, 255, 170, 0.07);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.match-server--wartet { border-color: rgba(0, 170, 255, 0.4); background: rgba(0, 170, 255, 0.07); }
.match-server__titel {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.match-server__name { font-weight: 700; }
.match-server__knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.match-server__daten { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* Jeder gegen jeden: Tabelle ueber dem Spielplan */
.liga-tabelle-wrap { margin-bottom: 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.liga-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.liga-tabelle th, .liga-tabelle td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.liga-tabelle th:nth-child(2), .liga-tabelle td:nth-child(2) { text-align: left; }
.liga-tabelle th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.liga-tabelle tr:last-child td { border-bottom: 0; }
.liga-sieger td { background: rgba(251, 191, 36, 0.1); font-weight: 700; }
.liga-hinweis { font-size: 12px; color: var(--muted); margin: 0; padding: 8px 12px; }
