

/* =========================================================
   Dark theme integration
   2026-08-16
========================================================= */

.history-toolbar label{
    color:#c9d1d9;
}

.history-toolbar select{
    color:#e6edf3;
    background:#0d1117;
    border-color:#30363d;
    outline:none;
}

.history-toolbar select:hover,
.history-toolbar select:focus{
    border-color:#58a6ff;
}

.history-player-chip{
    color:#c9d1d9;
    background:#0d1117;
    border-color:#30363d;
}

.history-player-chip:hover{
    color:#f0f6fc;
    background:#161b22;
    border-color:#484f58;
}

.history-player-chip.active{
    color:#fff;
    background:#1f6feb;
    border-color:#388bfd;
}

.history-state{
    color:#8b949e;
}

.history-error{
    color:#ff7b72;
}

.history-notice{
    color:#d29922;
    background:rgba(187,128,9,.12);
    border-color:rgba(187,128,9,.4);
}

.history-table-wrap{
    background:#0d1117;
    border-color:#30363d;
}

.history-table{
    color:#c9d1d9;
}

.history-table th,
.history-table td{
    border-color:#21262d;
}

.history-table thead th{
    color:#f0f6fc;
    background:#161b22;
}

.history-table tbody tr:hover{
    background:rgba(56,139,253,.06);
}

.history-best{
    color:#f0f6fc;
    background:rgba(187,128,9,.18);
}

.history-ranking-row{
    color:#c9d1d9;
    background:#0d1117;
    border-color:#30363d;
}

.history-ranking-row:hover{
    background:#161b22;
    border-color:#484f58;
}

.history-rank{
    color:#c9d1d9;
    background:#21262d;
}

.history-ranking-row:nth-child(1) .history-rank{
    color:#f2cc60;
    background:rgba(187,128,9,.18);
}

.history-ranking-player{
    color:#f0f6fc;
}

.history-ranking-value{
    color:#79c0ff;
}

.history-feed{
    color:#c9d1d9;
}

.history-feed-dot{
    background:#58a6ff;
}

.history-feed-main{
    border-color:#30363d;
}

.history-feed-head strong{
    color:#f0f6fc;
}

.history-feed-head time{
    color:#8b949e;
    opacity:1;
}

.history-feed-description{
    color:#c9d1d9;
}

.adv-history-item::before{
    background:#30363d;
}

.adv-history-marker{
    background:#8b949e;
    border-color:#0d1117;
    box-shadow:0 0 0 1px #484f58;
}

.adv-history-marker.goal{
    background:#d29922;
}

.adv-history-marker.challenge{
    background:#a371f7;
}

.adv-history-card{
    color:#c9d1d9;
    background:#0d1117;
    border-color:#30363d;
}

.adv-history-card:hover{
    background:#161b22;
    border-color:#484f58;
}

.adv-history-meta{
    color:#8b949e;
    opacity:1;
}

.adv-history-mod{
    color:#8b949e;
    background:#21262d;
}

.adv-history-title{
    color:#f0f6fc;
}

.adv-history-description{
    color:#8b949e;
    opacity:1;
}

.history-json-fallback{
    color:#c9d1d9;
    background:#0d1117;
    border:1px solid #30363d;
}


/* Prevent native white select appearance */
#history-ranking-period,
#history-ranking-metric,
#history-activity-period{
    color-scheme:dark;
}


/* Mobile */
@media(max-width:650px){

    .history-table{
        min-width:580px;
    }

    .history-ranking-row{
        background:#0d1117;
    }

    .adv-history-card{
        padding:12px;
    }
}

/* =========================================================
   History UI final integration
   2026-08-16
========================================================= */

#compare-tab,
#ranking-tab,
#recent-activity-tab,
#timeline-tab{
    color:#e6edf3;
}

#compare-tab .panel-section,
#ranking-tab .panel-section,
#recent-activity-tab .panel-section,
#timeline-tab .panel-section{
    color:#e6edf3;
}

#compare-tab p,
#timeline-tab p{
    color:#8b949e;
}


/* controls */

.history-toolbar select{
    background:#0d1117 !important;
    color:#e6edf3 !important;
    border:1px solid #30363d !important;
}

.history-toolbar select option{
    background:#0d1117;
    color:#e6edf3;
}


/* player picker */

.history-player-picker{
    margin-top:12px;
}

.history-player-chip{
    background:#161b22 !important;
    color:#c9d1d9 !important;
    border:1px solid #30363d !important;
    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.history-player-chip:hover{
    background:#21262d !important;
    border-color:#58a6ff !important;
    transform:translateY(-1px);
}

.history-player-chip.active{
    background:#0d419d !important;
    border-color:#1f6feb !important;
    color:#fff !important;
}


/* compare table */

.history-table-wrap{
    border:1px solid #30363d !important;
    background:#0d1117 !important;
}

.history-table{
    background:#0d1117 !important;
    color:#c9d1d9 !important;
}

.history-table thead th{
    background:#161b22 !important;
    color:#8b949e !important;
}

.history-table th,
.history-table td{
    border-color:#30363d !important;
    background:transparent !important;
    color:#c9d1d9 !important;
}

.history-table tbody th{
    color:#f0f6fc !important;
}

.history-table td.history-best{
    background:rgba(210,153,34,.14) !important;
    color:#f2cc60 !important;
    font-weight:800 !important;
}


/* ranking */

.history-ranking-list{
    gap:10px;
}

.history-ranking-row{
    background:#0d1117 !important;
    color:#c9d1d9 !important;
    border:1px solid #30363d !important;
}

.history-ranking-row:hover{
    background:#161b22 !important;
}

.history-ranking-player{
    color:#f0f6fc !important;
}

.history-ranking-value{
    color:#79c0ff !important;
}

.history-rank{
    background:#21262d !important;
    color:#c9d1d9 !important;
}

.history-ranking-row:nth-child(1) .history-rank{
    background:rgba(210,153,34,.18) !important;
    color:#f2cc60 !important;
}

.history-ranking-row:nth-child(2) .history-rank{
    background:rgba(139,148,158,.18) !important;
    color:#c9d1d9 !important;
}

.history-ranking-row:nth-child(3) .history-rank{
    background:rgba(188,140,76,.15) !important;
    color:#d2996e !important;
}

.history-notice{
    background:rgba(187,128,9,.12) !important;
    border-color:rgba(187,128,9,.35) !important;
    color:#d29922 !important;
}


/* recent activity */

.history-feed-main{
    border-color:#30363d !important;
}

.history-feed-head strong{
    color:#f0f6fc !important;
}

.history-feed-head time{
    color:#8b949e !important;
}

.history-feed-description{
    color:#c9d1d9 !important;
}


/* timeline */

.adv-history-card{
    background:#0d1117 !important;
    color:#c9d1d9 !important;
    border:1px solid #30363d !important;
}

.adv-history-card:hover{
    background:#161b22 !important;
    border-color:#484f58 !important;
}

.adv-history-title{
    color:#f0f6fc !important;
}

.adv-history-description{
    color:#8b949e !important;
}

.adv-history-meta{
    color:#8b949e !important;
}

.adv-history-mod{
    background:#21262d !important;
    color:#c9d1d9 !important;
}

.adv-history-item::before{
    background:#30363d !important;
}


/* mobile */

@media(max-width:650px){

    #compare-tab,
    #ranking-tab,
    #recent-activity-tab,
    #timeline-tab{
        padding-left:0;
        padding-right:0;
    }

    .history-player-picker{
        overflow-x:auto;
        flex-wrap:nowrap;
        padding-bottom:6px;
    }

    .history-player-chip{
        flex:0 0 auto;
    }

    .history-ranking-row{
        min-height:58px;
    }

    .adv-history-card{
        padding:12px !important;
    }
}

