/* =========================================================
   Dart Weltrangliste – Theme
   Akzentfarbe (Unternehmensfarbe): #f28e16
   Stil: weich und rund – große Radien, warme Neutraltöne,
   ruhige Flächen, kräftige Zahlen. Keine Effekt-Verläufe.
   Aufbau:
     1. Schrift & Design-Tokens (hell/dunkel)
     2. Basis & Typografie
     3. Navigation
     4. Buttons, Formulare, Zahlen
     5. Seitenaufbau (Kopf, Eingabe, Tabellen)
     6. Ranglisten-Tabelle (inkl. Mobile)
     7. Statistik
     8. Pagination & Hinweise
     9. Standard Game (Livewire)
    10. Jubel-Animationen
   ========================================================= */

/* ---------- 1. Schrift & Tokens ---------- */
@font-face {
    font-family: "Figtree";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
    /* Marke */
    --accent: #f28e16;
    --accent-dark: #d97908;
    --accent-light: #fef1de;
    --accent-rgb: 242, 142, 22;
    --accent-text: #f28e16;

    /* Neutrals (warm) */
    --ink: #25211c;
    --ink-2: #55504a;
    --muted: #8a847b;
    --bg: #f6f4f0;
    --surface: #ffffff;
    --surface-2: #faf8f5;
    --border: #ebe7e0;
    --border-strong: #d9d4ca;

    /* Formen */
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 22px;
    --pill: 999px;
    --shadow-sm: 0 1px 2px rgba(37, 33, 28, 0.05);
    --shadow: 0 1px 2px rgba(37, 33, 28, 0.04), 0 8px 24px rgba(37, 33, 28, 0.05);
    --shadow-lg: 0 12px 40px rgba(37, 33, 28, 0.14);

    --nav-h: 68px;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a847b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-num: var(--font);
    color-scheme: light;
}

/* Dark Mode: nur aktiv, wenn der Nutzer ihn per Toggle wählt (data-theme="dark" auf <html>) */
:root[data-theme="dark"] {
    --accent-light: rgba(242, 142, 22, 0.15);

    --ink: #f3efe8;
    --ink-2: #cdc8bf;
    --muted: #94908a;
    --bg: #141311;
    --surface: #1e1d1a;
    --surface-2: #262521;
    --border: #2f2d29;
    --border-strong: #48453f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
}

/* ---------- 2. Basis & Typografie ---------- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    padding-top: var(--nav-h);
    min-height: 100vh;
}

h1, h2, h3, h4, .display-3 {
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.lead {
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 400;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-dark);
}

.text-muted {
    color: var(--muted) !important;
}

.text-primary {
    color: var(--accent) !important;
}

.bg-primary {
    background-color: var(--accent) !important;
}

.text-warning {
    color: var(--accent) !important;
}

.table td,
.table th,
input[type="number"],
.tabular {
    font-variant-numeric: tabular-nums;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::selection {
    background: rgba(var(--accent-rgb), 0.3);
}

/* ---------- 3. Navigation ---------- */
#header {
    height: var(--nav-h);
    background-color: var(--bg);
}

#header .navbar {
    padding-top: 0;
    padding-bottom: 0;
    min-height: var(--nav-h);
}

.navbar-brand {
    padding: 0;
    color: var(--ink) !important;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.brand-text::after {
    content: "";
    display: inline-block;
    width: 0.3em;
    height: 0.3em;
    margin-left: 0.08em;
    border-radius: 50%;
    background-color: var(--accent);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--ink-2);
    font-size: 0.98rem;
    font-weight: 600;
    border-radius: var(--pill);
    padding: 0.5rem 1.05rem;
    margin: 0 0.1rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
    color: var(--ink);
    background-color: rgba(37, 33, 28, 0.06);
}

:root[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover,
:root[data-theme="dark"] .navbar-light .navbar-nav .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.07);
}

.navbar-light .navbar-nav .nav-item.active .nav-link,
.navbar-light .navbar-nav .active > .nav-link {
    color: var(--accent);
    background-color: var(--accent-light);
}

.navbar-light .navbar-toggler {
    border: 0;
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0.65rem;
}

.navbar-light .navbar-toggler:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

:root[data-theme="dark"] .navbar-light .navbar-toggler-icon {
    filter: invert(1) brightness(1.6);
}

@media (min-width: 992px) {
    #header .navbar-nav:first-child {
        margin-left: 1.5rem;
    }
}

@media (max-width: 991.98px) {
    #header {
        height: auto;
        min-height: var(--nav-h);
    }

    #header .navbar-collapse {
        padding: 0.5rem 0 1rem;
    }

    #header .navbar-nav + .navbar-nav {
        margin-top: 0.5rem;
    }
}

.location-pill {
    background-color: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.location-pill:hover,
.location-pill:focus {
    border-color: var(--border-strong);
}

/* Dark-Mode-Toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--ink-2);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.5);
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 991.98px) {
    .theme-toggle {
        margin: 0.5rem 0 0;
    }
}

/* ---------- Dropdown ---------- */
.dropdown-menu {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    color: var(--ink-2);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--surface-2);
    color: var(--ink);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent);
    color: #fff;
}

/* ---------- 4. Buttons, Formulare, Zahlen ---------- */
.btn {
    border-radius: var(--pill);
    padding: 0.55rem 1.3rem;
    font-weight: 700;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-sm {
    padding: 0.3rem 0.9rem;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary,
.btn-success {
    color: #fff;
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-success:not(:disabled):not(.disabled):active,
.btn-primary.active,
.btn-success.active {
    color: #fff;
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-primary:focus,
.btn-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--accent-rgb), 0.35);
}

.btn-lg {
    padding: 0.85rem 2.2rem;
    font-size: 1.1rem;
    border-radius: var(--pill);
}

.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-light,
.btn-secondary {
    background-color: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}

.btn-light:hover,
.btn-light:focus,
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--ink);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* ---------- Formulare ---------- */
.form-control,
.custom-select {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    height: auto;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: var(--muted);
    opacity: 0.9;
}

.form-control:focus,
.custom-select:focus {
    background-color: var(--surface);
    color: var(--ink);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: var(--select-arrow);
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ---------- Badges & Zahlen ---------- */
.badge {
    border-radius: var(--pill);
    padding: 0.35em 0.7em;
    font-weight: 700;
    font-size: 0.75rem;
}

.badge-primary {
    background-color: var(--accent);
    color: #fff;
}

.badge-light {
    background-color: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
}

.stat-chip {
    display: inline-block;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stat-chip--block {
    display: block;
}

/* Bester Wurf: weiche Pille */
.stat-chip--accent {
    padding: 0.2rem 0.7rem;
    border-radius: var(--pill);
    background-color: var(--accent-light);
    color: var(--accent);
    text-align: center;
}

/* Wochensumme: gefüllte Pille in Akzentfarbe */
.stat-chip--solid {
    padding: 0.3rem 0.8rem;
    border-radius: var(--pill);
    background-color: var(--accent);
    color: #fff;
    text-align: center;
}

/* Monatssumme: Pille mit Rand */
.stat-chip--outline {
    padding: 0.3rem 0.8rem;
    border-radius: var(--pill);
    border: 1.5px solid var(--accent);
    color: var(--ink);
    text-align: center;
}

.stat-chip--ghost {
    color: var(--muted);
    font-weight: 600;
}

button.stat-chip {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    background-color: var(--surface-2);
    text-align: center;
    cursor: pointer;
    font-family: inherit;
}

button.stat-chip:hover {
    border-color: rgba(var(--accent-rgb), 0.6);
}

.stat-chip-btn::after {
    content: "";
    display: inline-block;
    width: 0.38rem;
    height: 0.38rem;
    margin-left: 0.4rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    opacity: 0.45;
}

.throw-set {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: var(--pill);
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-2);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---------- 5. Seitenaufbau ---------- */
.page-hero {
    padding: 2.5rem 0 1.25rem;
}

.page-hero--compact {
    padding: 2.25rem 0 0.75rem;
}

.page-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.page-hero .lead {
    max-width: 38rem;
    margin-bottom: 0;
}

.section {
    padding: 1.25rem 0;
}

.section-title {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.section-title small {
    margin-left: 0.4rem;
    color: var(--muted);
    font-weight: 600;
}

/* Eingabe: weiße, runde Fläche */
.entry-wrap {
    margin-top: 0;
}

.entry-card {
    padding: 1.25rem 1.25rem 0.5rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.entry-card__title {
    margin-bottom: 0.75rem;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
}

.entry-card .form-control,
.entry-card .custom-select {
    height: 3.1rem;
    font-size: 1.02rem;
}

.entry-card .btn-success {
    height: 3.1rem;
    padding-left: 1.8rem;
    padding-right: 1.8rem;
}

/* Tabellen in runden Flächen */
.table-responsive {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.table {
    margin-bottom: 0;
    color: var(--ink);
}

.table thead th {
    border-top: none;
    border-bottom: 1px solid var(--border);
    background: none;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.9rem 0.9rem;
    white-space: nowrap;
}

.table thead th small {
    font-size: inherit;
    font-weight: 500;
}

.table td,
.table th {
    border-top: 1px solid var(--border);
    vertical-align: middle;
    padding: 0.8rem 0.9rem;
}

.table tbody tr:first-child td,
.table tbody tr:first-child th {
    border-top: none;
}

.table-hover tbody tr {
    transition: background-color 0.12s ease;
}

.table-hover tbody tr:hover {
    background-color: var(--surface-2);
    color: var(--ink);
}

.table-striped tbody tr:nth-of-type(odd),
.table-striped tbody tr:nth-of-type(even) {
    background-color: transparent;
}

/* Abschnitte */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.1rem 1.4rem 0.4rem;
    background: none;
    border: 0;
}

.card-header h2 {
    font-size: 1.4rem;
}

.card .table-responsive {
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: none;
}

.card .table-responsive thead th {
    background: none;
}

/* Platzierung: Zahl, Platz 1 als orange Kreis */
.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.rank--1 {
    background-color: var(--accent);
    color: #fff;
}

.rank--2,
.rank--3 {
    color: var(--ink);
}

.person {
    font-weight: 700;
    white-space: nowrap;
}

.person small {
    font-weight: 500;
}

.cake {
    color: var(--accent);
}

/* ---------- 6. Ranglisten-Tabelle: jede Zeile eine runde Fläche ---------- */
.table-responsive--rows {
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.table.rank-table {
    border-collapse: separate;
    border-spacing: 0 0.6rem;
    margin-top: -0.6rem;
}

.table.rank-table thead th {
    padding: 0.4rem 0.9rem;
    border: 0;
}

.table.rank-table tbody tr td,
.table.rank-table tbody tr th {
    padding: 0.85rem 0.9rem;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.table.rank-table tbody tr td:first-child,
.table.rank-table tbody tr th:first-child {
    border-left: 1px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
}

.table.rank-table tbody tr td:last-child,
.table.rank-table tbody tr th:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.table.rank-table tbody tr:first-child td,
.table.rank-table tbody tr:first-child th {
    background-color: var(--accent-light);
    border-color: rgba(var(--accent-rgb), 0.35);
}

.table.rank-table tbody tr td[colspan] {
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.week-progress {
    min-width: 5.5rem;
}

.week-progress__label {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.week-progress__label small {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.week-progress__bar {
    height: 6px;
    margin-top: 0.35rem;
    border-radius: var(--pill);
    background-color: var(--border);
    overflow: hidden;
}

.week-progress__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background-color: var(--accent);
}

.avg-detail {
    margin-top: 0.5rem;
}

.avg-detail small {
    display: block;
    margin: 0.4rem 0 0.15rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.avg-detail .stat-chip {
    padding: 0.25rem 0.7rem;
    border-radius: var(--pill);
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
}

/* Wochen-Matrix */
.matrix-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--surface);
}

.matrix-table tbody th:first-child {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 1px 0 0 var(--border);
}

.matrix-table td {
    font-weight: 600;
}

.matrix-table td.is-winner {
    background-color: var(--accent-light);
}

.matrix-table td.is-winner .winner-score {
    font-weight: 800;
}

/* Mobile: jede Zeile wird eine eigene runde Karte */
@media (max-width: 767.98px) {
    .table.rank-table {
        border-spacing: 0;
        margin-top: 0;
    }

    .rank-table,
    .rank-table tbody,
    .rank-table tr,
    .rank-table td,
    .rank-table th {
        display: block;
    }

    .rank-table thead {
        display: none;
    }

    .rank-table tbody tr {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem 1rem;
        margin-bottom: 0.7rem;
        padding: 1rem 1.1rem;
        background-color: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
    }

    .rank-table tbody tr:first-child {
        background-color: var(--accent-light);
        border-color: rgba(var(--accent-rgb), 0.35);
    }

    .table.rank-table tbody tr td,
    .table.rank-table tbody tr th {
        padding: 0;
        background: none !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    .rank-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 600;
    }

    .rank-table .cell-rank {
        position: absolute;
        top: 1rem;
        left: 1.1rem;
    }

    .rank-table .cell-name {
        grid-column: 1 / -1;
        padding-left: 2.8rem !important;
        min-height: 2rem;
        font-size: 1.1rem;
    }

    .rank-table .cell-throws {
        grid-column: 1 / -1;
    }

    .rank-table .cell-throws .week-progress {
        max-width: 14rem;
    }

    .rank-table td[colspan] {
        grid-column: 1 / -1;
        padding: 0.5rem 0 !important;
    }

    .entry-card {
        padding: 1rem 1rem 0.35rem;
    }
}

/* ---------- 7. Statistik ---------- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.toolbar form {
    margin: 0;
}

.userSelect,
.select-pill {
    appearance: none;
    -webkit-appearance: none;
    min-width: 12rem;
    height: 2.9rem;
    padding: 0 2.5rem 0 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    background-color: var(--surface);
    background-image: var(--select-arrow);
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-family: inherit;
    font-weight: 600;
    text-align: left;
}

.userSelect:focus,
.select-pill:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
}

.segmented {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
}

.seg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.4rem;
    padding: 0 1.1rem;
    border: 0;
    border-radius: var(--pill);
    background: transparent;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-btn:hover {
    color: var(--ink);
}

.seg-btn.active {
    background-color: var(--accent);
    color: #fff;
}

.chart-card {
    position: relative;
    padding: 1.25rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ---------- 8. Pagination & Hinweise ---------- */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.page-link {
    min-width: 2.5rem;
    text-align: center;
    background-color: var(--surface);
    color: var(--ink-2);
    border: 1px solid var(--border);
    border-radius: var(--pill) !important;
    margin: 0 0.15rem 0.3rem;
    font-weight: 700;
}

.page-link:hover {
    background-color: var(--surface-2);
    color: var(--ink);
    border-color: var(--border-strong);
}

.page-link:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
}

.page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page-item.disabled .page-link {
    background-color: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.alert-info {
    background-color: var(--accent-light);
    border-color: rgba(var(--accent-rgb), 0.35);
    color: var(--ink);
    border-radius: var(--radius);
}

.alert-danger {
    border-radius: var(--radius);
}

.empty-state {
    padding: 2.25rem 1rem;
    color: var(--muted);
    text-align: center;
}

/* ---------- 9. Standard Game (Livewire) ---------- */
.gm-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 16px 4rem;
}

.gm-wrap--wide {
    max-width: 1180px;
}

.gm-title {
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 5vw, 2.6rem);
    letter-spacing: -0.035em;
}

.panel {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.panel-title {
    margin-bottom: 1.1rem;
    font-size: 1.2rem;
}

.field-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--ink-2);
    font-size: 0.9rem;
    font-weight: 700;
}

.field + .field {
    margin-top: 1.25rem;
}

.field-row {
    display: flex;
    gap: 0.6rem;
}

.field-row > .form-control,
.field-row > .custom-select {
    flex: 1;
    min-width: 0;
}

/* Auswahl (Radio) */
.choice-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
}

.choice {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    color: var(--ink-2);
    font-weight: 700;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.choice-body--lg {
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.choice:hover .choice-body {
    border-color: var(--border-strong);
}

.choice input:checked + .choice-body {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--ink);
}

.choice input:focus-visible + .choice-body {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Spielerliste (Setup) */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem 0.55rem 0.9rem;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.player-row__name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    font-weight: 700;
}

.player-row__no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 800;
}

.player-row__actions {
    display: flex;
    gap: 0.15rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.icon-btn:hover {
    background-color: var(--border);
    color: var(--ink);
}

.icon-btn--danger:hover {
    background-color: rgba(220, 53, 69, 0.14);
    color: #dc3545;
}

/* Spielansicht */
.gm-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.gm-layout .gm-board {
    order: -1;
}

@media (min-width: 992px) {
    .gm-layout {
        grid-template-columns: 370px 1fr;
        align-items: start;
        gap: 1.5rem;
    }

    .gm-layout .gm-board {
        order: 0;
    }
}

.gm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.player-card {
    margin-bottom: 0.6rem;
    padding: 0.9rem 1.1rem;
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.player-card.is-active {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.player-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.player-card__name {
    font-size: 1.1rem;
    font-weight: 700;
}

.player-card__head .stat-chip {
    padding: 0.15rem 0.65rem;
    font-size: 0.8rem;
}

.player-card__score {
    margin: 0.2rem 0;
    text-align: center;
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.player-card.is-active .player-card__score {
    color: var(--accent);
}

.player-card__note {
    text-align: center;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
}

.player-card__avg {
    margin-top: 0.3rem;
    text-align: center;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
}

.link-btn:hover {
    color: var(--accent);
}

.checkout-box {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    text-align: center;
    background-color: var(--accent-light);
    border: 2px dashed rgba(var(--accent-rgb), 0.55);
    border-radius: var(--radius);
}

.checkout-box h3 {
    margin-bottom: 0.2rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 800;
}

.checkout-box p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.turn-head {
    margin-bottom: 1rem;
    text-align: center;
}

.turn-head h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.turn-head__stats {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.turn-head__stats .stat-chip {
    padding: 0.3rem 0.9rem;
    border-radius: var(--pill);
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

.turn-head__stats .stat-chip--accent {
    background-color: var(--accent-light);
    border-color: transparent;
}

.board-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Statistik-Modal */
.gm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(20, 18, 15, 0.5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.gm-modal {
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.gm-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.gm-modal__head h3 {
    margin: 0;
    font-size: 1.2rem;
}

.stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

.stat-row span:first-child {
    color: var(--muted);
}

.stat-row span:last-child {
    font-weight: 700;
}

/* Spielende */
.winner-banner {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.winner-banner h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(2rem, 6vw, 2.8rem);
}

.winner-banner__name {
    margin-bottom: 1.75rem;
    color: var(--accent);
    font-size: 1.4rem;
    font-weight: 800;
}

.final-scores {
    max-width: 28rem;
    margin: 0 auto 2rem;
    text-align: left;
}

/* Dartscheibe */
.dartboard-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

.dartboard-svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.dartboard-segment {
    cursor: pointer;
    transition: opacity 0.12s ease, filter 0.12s ease;
}

.dartboard-segment:hover {
    opacity: 0.8;
    filter: brightness(1.15);
}

.dartboard-label {
    pointer-events: none;
    user-select: none;
}

/* ---------- 10. Jubel-Animationen (Würfe > 100 und 180) ---------- */
.celebration-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none;
    text-align: center;
}

.celebration-overlay.show {
    display: flex;
}

.celebration-content {
    transform: scale(0.3);
    opacity: 0;
}

.celebration-overlay.show .celebration-content {
    animation: celebrate-in 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.celebration-score {
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.celebration-label {
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Stufe 1: > 100 – cool, ohne Abdunklung */
.celebration-overlay.tier-big .celebration-score {
    font-size: clamp(3.5rem, 14vw, 8rem);
    color: var(--accent);
    text-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.45);
}

.celebration-overlay.tier-big .celebration-label {
    font-size: clamp(1rem, 3.5vw, 1.6rem);
    color: var(--accent-dark);
}

/* Stufe 2: 180 – krass, mit Abdunklung, Puls & Glühen */
.celebration-overlay.tier-max {
    background: radial-gradient(circle at center, rgba(20, 23, 28, 0.55), rgba(20, 23, 28, 0.82));
    backdrop-filter: blur(2px);
}

.celebration-overlay.tier-max .celebration-score {
    font-size: clamp(6rem, 30vw, 20rem);
    color: #fff;
    background: linear-gradient(180deg, #ffd9a0 0%, var(--accent) 55%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 26px rgba(var(--accent-rgb), 0.85));
    animation: celebrate-pulse 0.65s ease-in-out infinite alternate;
}

.celebration-overlay.tier-max .celebration-label {
    font-size: clamp(1.4rem, 6vw, 3rem);
    color: #fff;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 18px rgba(var(--accent-rgb), 0.9);
}

@keyframes celebrate-in {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes celebrate-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* Bildschirm-Wackeln bei der 180 */
@keyframes celebrate-shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-8px, 4px); }
    20% { transform: translate(7px, -6px); }
    30% { transform: translate(-6px, 5px); }
    40% { transform: translate(6px, -4px); }
    50% { transform: translate(-5px, 3px); }
    60% { transform: translate(5px, -3px); }
    70% { transform: translate(-4px, 2px); }
    80% { transform: translate(3px, -2px); }
    90% { transform: translate(-2px, 1px); }
}

.celebrate-shake {
    animation: celebrate-shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
    }

    .celebration-overlay.show .celebration-content,
    .celebration-overlay.tier-max .celebration-score,
    .celebrate-shake {
        animation: none;
    }

    .celebration-content {
        transform: none;
        opacity: 1;
    }
}

/* === Bestehende Klassen (Statistik-Filter) === */
.userSelect {
    text-align: left;
}

.selectDiv {
    display: flex;
}

.border-radius {
    border-radius: var(--pill);
}
