﻿.page-head h1 {
    margin: 0 0 4px;
    font-size: 30px;
    font-weight: 600;
}

.page-head p {
    margin: 0 0 20px;
    color: var(--ink-dim);
    font-size: 14px;
}

.upd {
    font-size: 14px;
    color: var(--ink-dim);
    display: flex;
    align-items: center;
    padding-right:30px;
    gap: 8px;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

    .upd i {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #3E8E4F;
        display: inline-block;
    }

    .upd.busy i {
        background: var(--gold);
        animation: pulse 1s ease-in-out infinite;
    }

.topbar {
    justify-content: flex-start;
}

@keyframes pulse {
    50% {
        opacity: .25;
    }
}

.banner {
    margin: 0 0 12px;
    padding: 9px 14px;
    border: 1px solid #E3C9C5;
    background: #FBF0EE;
    color: #8A352F;
    border-radius: 8px;
    font-size: 13px;
}

.tbl-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
}

table.lb {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

    table.lb th {
        background: #FAF8F3;
        border-bottom: 1px solid var(--line);
        padding: 0;
        text-align: left;
        font-weight: 600;
        font-size: 14px;
        color: var(--ink-dim);
        white-space: nowrap;
    }

.th-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 12px 14px;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: inherit;
    justify-content:center;
}

    .th-btn:hover {
        color: var(--ink);
        background: #F3EFE4;
    }

    .th-btn:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: -2px;
    }

th.txt{
    justify-content:left;
}

th.txt .th-btn{
    justify-content:left;
}

th.num {
    justify-content: flex-end;
}

th[aria-sort="ascending"] .th-btn, th[aria-sort="descending"] .th-btn {
    color: var(--ink);
}

.arr {
    display: inline-flex;
    width: 12px;
    height: 12px;
    color: var(--gold);
}

    .arr svg {
        width: 12px;
        height: 12px;
    }

th[aria-sort="none"] .arr {
    color: #CFC8B6;
    opacity: 0;
}

th[aria-sort="none"] .th-btn:hover .arr, th[aria-sort="none"] .th-btn:focus-visible .arr {
    opacity: 1;
}

table.lb td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    vertical-align: middle;
}

table.lb tbody tr:last-child td {
    border-bottom: none;
}

table.lb tbody tr {
    cursor: pointer;
    transition: background .12s ease;
}

    table.lb tbody tr:hover {
        background: #FAF6EA;
    }

td.num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

td.c-pos {
    width: 56px;
}

.rank {
    font-weight: 600;
    color: var(--ink-dim);
    font-variant-numeric: tabular-nums;
}

    .rank.top {
        color: var(--gold);
        font-weight: 700;
    }

.name-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

    .name-link:hover {
        color: var(--gold);
        text-decoration: underline;
    }

    .name-link:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
        border-radius: 3px;
    }

td.c-tag {
    color: var(--ink-dim);
    white-space: nowrap;
}

td.dim {
    color: var(--ink-dim);
}

.streak-row {
    display: flex;
    gap: 5px;
}

.wl {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 13px/1 'Inter',sans-serif;
    color: #fff;
    border: none;
    padding: 0;
}

button.wl {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

    button.wl:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(14,13,17,.25);
    }

    button.wl:focus-visible, .live-link:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
    }

.wl.w {
    background: #34834A;
}

.wl.l {
    background: #B0453D;
}

.wl.empty {
    background: #F1EEE6;
    border: 1px dashed #D8D2C2;
}

.live-link {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    background: none;
    padding: 3px 0;
    font: 600 13.5px 'Inter',sans-serif;
    color: var(--gold);
    cursor: pointer;
}

    .live-link:hover {
        text-decoration: underline;
    }

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .live-dot, .upd.busy i {
        animation: none;
    }

    tr.flash td {
        animation: none !important;
    }
}

tr.flash td {
    animation: flash 1.6s ease-out;
}

@keyframes flash {
    from {
        background: #F3E7C3;
    }

    to {
        background: transparent;
    }
}

.lb-foot {
    margin: 14px 2px 0;
    font-size: 12.5px;
    color: var(--ink-dim);
}

/* Popup con el detalle de la partida */
dialog.match-dlg {
    border: none;
    padding: 0;
    border-radius: 14px;
    width: min(1040px, calc(100vw - 32px));
    max-width: none;
    background: var(--bg);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(14,13,17,.4);
}

    dialog.match-dlg::backdrop {
        background: rgba(14,13,17,.55);
    }

.dlg-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 14px 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
}

    .dlg-h h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

        .dlg-h h2 small {
            font-family: 'Inter',sans-serif;
            font-size: 13px;
            font-weight: 500;
            color: var(--ink-dim);
            margin-left: 8px;
        }

.dlg-x {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .dlg-x:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

.dlg-b {
    padding: 18px 22px 24px;
}



.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: var(--dark);
    color: #F1EDE1;
    border: 1px solid var(--gold);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 50;
    max-width: calc(100vw - 32px);
}

    .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

.demo-bar select {
    font: inherit;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
}
