/* ── Duel History ─────────────────────────────────── */
.duel-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.duel-history-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(129, 140, 248, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.duel-history-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Result badge — left side */
.duel-history-badge {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.duel-history-badge.win {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.duel-history-badge.loss {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.duel-history-badge.tie {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.duel-history-badge.forfeit {
    background: rgba(163, 163, 163, 0.12);
    border: 1px solid rgba(163, 163, 163, 0.3);
    color: #a3a3a3;
}

/* Main info — center */
.duel-history-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.duel-history-opponent {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.duel-history-score {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.duel-history-score .you {
    color: #22d3ee;
    font-weight: 700;
}

.duel-history-score .opp {
    color: #818cf8;
    font-weight: 700;
}

/* Right side — meta */
.duel-history-meta {
    flex-shrink: 0;
    text-align: right;
}

.duel-history-cps {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.duel-history-date {
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.55;
    margin-top: 0.15rem;
}

/* Load more */
#duel-history-load-more {
    margin-top: 0.75rem;
}

/* Summary stats row */
.duel-history-summary {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.duel-history-stat {
    text-align: center;
}

.duel-history-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.duel-history-stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 500px) {
    .duel-history-card {
        padding: 0.7rem 0.75rem;
        gap: 0.65rem;
    }

    .duel-history-badge {
        width: 36px;
        height: 36px;
        font-size: 0.6rem;
    }

    .duel-history-opponent {
        font-size: 0.82rem;
    }

    .duel-history-meta {
        display: none;
    }
}
