.hist-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.hist-stat {
    background: rgba(74, 111, 165, 0.08);
    border: 1px solid rgba(74, 111, 165, 0.18);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: center;
}
.hist-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.1;
}
.hist-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-gray);
    margin-top: 0.3rem;
}

.lb-container { max-width: 800px; padding-bottom: 1.75rem; }
.lb-container .page-back { margin-top: 1.25rem; }
.lb-header { margin-bottom: 2rem; }
.lb-header p { opacity: 0.7; }
.lb-filters { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2rem; }
.lb-filter-group { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.lb-filter-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-gray); min-width: 90px; opacity: 0.9; }
.lb-filter-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.lb-tab {
    background: transparent; border: 1px solid var(--card-border); color: var(--text-gray);
    font-family: var(--font-family); font-size: 0.8rem; padding: 0.3rem 0.85rem; border-radius: 20px;
    cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lb-tab:hover { border-color: rgba(74, 111, 165, 0.6); background: rgba(74, 111, 165, 0.08); color: var(--text-white); }
.lb-tab.active { background: var(--primary-blue); border-color: var(--primary-blue); color: var(--text-white); }
.lb-search-input {
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border); color: var(--text-white);
    font-family: var(--font-family); font-size: 0.82rem; padding: 0.3rem 0.75rem; border-radius: 20px;
    outline: none; transition: border-color 0.15s; width: 200px;
}
.lb-search-input::placeholder { color: var(--text-gray); opacity: 0.6; }
.lb-search-input:focus { border-color: rgba(74, 111, 165, 0.6); }
.lb-status { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 2rem 0; color: var(--text-gray); font-size: 0.9rem; }
.lb-empty { text-align: center; padding: 2.5rem 0; color: var(--text-gray); font-size: 0.9rem; }
.lb-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--card-border); }
.lb-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.lb-table thead th {
    background: rgba(74, 111, 165, 0.1); color: var(--text-gray); font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em; padding: 0.7rem 1rem; text-align: left;
    border-bottom: 1px solid var(--card-border); white-space: nowrap;
}
.lb-table tbody tr { border-bottom: 1px solid rgba(74, 111, 165, 0.12); transition: background 0.12s; }
.lb-table tbody tr:last-child { border-bottom: none; }
.lb-table tbody tr:hover { background: rgba(74, 111, 165, 0.06); }
.lb-table td { padding: 0.75rem 1rem; vertical-align: middle; }
.lb-row-gold   { background: rgba(255, 215, 0, 0.05); }
.lb-row-silver { background: rgba(192, 192, 192, 0.04); }
.lb-row-bronze { background: rgba(205, 127, 50, 0.04); }
.lb-col-rank { text-align: center; font-size: 1.1rem; width: 48px; color: var(--text-gray); }
.lb-col-player { min-width: 130px; }
.lb-player { display: flex; align-items: center; gap: 0.55rem; }
.lb-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lb-player-name { font-weight: 700; color: var(--text-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.lb-col-difficulty { min-width: 80px; }
.lb-diff-tag { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.55rem; border-radius: 20px; white-space: nowrap; }
.lb-diff-easy   { background: rgba(76, 175, 80, 0.2); color: #a5d6a7; border: 1px solid rgba(76, 175, 80, 0.3); }
.lb-diff-medium { background: rgba(255, 152, 0, 0.2); color: #ffd180; border: 1px solid rgba(255, 152, 0, 0.3); }
.lb-diff-hard   { background: rgba(244, 67, 54, 0.2); color: #ef9a9a; border: 1px solid rgba(244, 67, 54, 0.3); }
.lb-diff-expert { background: rgba(156, 39, 176, 0.2); color: #e1bee7; border: 1px solid rgba(156, 39, 176, 0.3); }
.lb-col-mode { min-width: 70px; }
.lb-mode-tag {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.15rem 0.55rem; border-radius: 20px; white-space: nowrap;
}
.lb-mode-libre { background: rgba(255, 255, 255, 0.06); color: #d0d7ec; border: 1px solid rgba(255, 255, 255, 0.1); }
.lb-mode-3vies { background: rgba(244, 67, 54, 0.15); color: #ef9a9a; border: 1px solid rgba(244, 67, 54, 0.3); }
.lb-col-result { min-width: 70px; }
.hist-tag-win {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.15rem 0.55rem; border-radius: 20px;
    background: rgba(76, 175, 80, 0.15); color: #a5d6a7; border: 1px solid rgba(76, 175, 80, 0.3);
}
.hist-tag-loss {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.15rem 0.55rem; border-radius: 20px;
    background: rgba(244, 67, 54, 0.15); color: #ef9a9a; border: 1px solid rgba(244, 67, 54, 0.3);
}
.lb-col-errors { text-align: center; white-space: nowrap; color: var(--text-gray); font-size: 0.85rem; }
.lb-col-time, .lb-table thead th.lb-col-time { text-align: right; white-space: nowrap; }
.lb-time-val { font-size: 1.15rem; font-weight: 700; color: var(--text-white); }
.lb-col-date { color: var(--text-gray); font-size: 0.8rem; white-space: nowrap; text-align: right; }
.lb-date-time { font-size: 0.7rem; opacity: 0.55; }
.lb-pagination { display: flex; align-items: center; justify-content: center; gap: 0.3rem; margin-top: 1.25rem; flex-wrap: wrap; }
.lb-page-btn {
    background: transparent; border: 1px solid var(--card-border); color: var(--text-gray);
    font-family: var(--font-family); font-size: 0.82rem; min-width: 32px; height: 32px;
    padding: 0 0.5rem; border-radius: 8px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lb-page-btn:hover:not(:disabled) { border-color: var(--primary-blue); color: var(--text-white); }
.lb-page-btn.active { background: var(--primary-blue); border-color: var(--primary-blue); color: var(--text-white); font-weight: 700; }
.lb-page-btn:disabled { opacity: 0.3; cursor: default; }
.lb-page-dots { color: var(--text-gray); font-size: 0.82rem; padding: 0 0.2rem; line-height: 32px; }
.lb-view-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: rgba(74, 111, 165, 0.08);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}
.lb-view-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.lb-view-tab:hover { color: var(--text-white); background: rgba(74, 111, 165, 0.1); }
.lb-view-tab.active { background: var(--primary-blue); color: var(--text-white); }
.lb-col-streak { text-align: center; white-space: nowrap; min-width: 100px; }
.streak-value { font-size: 1.1rem; font-weight: 700; color: #ffa726; }
.streak-max { color: var(--text-gray); font-weight: 600; }
.lb-diff-wrap { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.lb-daily-tag {
    font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.1rem 0.4rem; border-radius: 20px; white-space: nowrap;
    background: rgba(255, 152, 0, 0.15); color: #ffd180; border: 1px solid rgba(255, 152, 0, 0.3);
}
@media (max-width: 700px) {
    .lb-filter-label { min-width: unset; width: 100%; }
    .lb-col-date { display: none; }
    .lb-col-mode { display: none; }
    .lb-player-name { max-width: 120px; }
    .lb-search-input { width: 100%; }
    .lb-table thead th, .lb-table td { padding: 0.65rem 0.75rem; }
}
@media (max-width: 480px) {
    .lb-col-errors { display: none; }
    .lb-table thead th, .lb-table td { padding: 0.5rem 0.4rem; }
    .lb-table { font-size: 0.8rem; }
    .lb-avatar { width: 22px; height: 22px; }
    .lb-player-name { max-width: 80px; font-size: 0.75rem; }
    .lb-time-val { font-size: 0.95rem; }
    .lb-diff-tag { font-size: 0.55rem; padding: 0.1rem 0.4rem; }
    .lb-col-rank { width: 32px; font-size: 0.95rem; }
    .hist-tag-win, .hist-tag-loss { font-size: 0.55rem; padding: 0.1rem 0.4rem; }
    .hist-stats { gap: 0.6rem; }
    .hist-stat { padding: 0.75rem 0.5rem; }
    .hist-stat-value { font-size: 1.2rem; }
}
