/* ==========================================
   MATCH FILTER BAR (HOME PAGE)
   ========================================== */

.match-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: rgba(30, 35, 50, 0.4);
    border-radius: 8px;
    margin-bottom: var(--spacing-xl);
}

.filter-toggle {
    display: flex;
    gap: var(--spacing-sm);
    background: rgba(20, 25, 40, 0.6);
    padding: 4px;
    border-radius: 6px;
}

.filter-toggle-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    color: var(--text-primary);
}

.filter-toggle-btn.active {
    background: var(--accent-primary);
    color: white;
}

.game-filter-icons {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: var(--spacing-sm);
}

.game-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: rgba(30, 35, 50, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.game-icon-btn img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.game-icon-btn svg {
    stroke: var(--text-secondary);
}

.game-icon-btn:hover {
    background: rgba(40, 45, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.game-icon-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
}

.game-icon-btn.active svg {
    stroke: var(--accent-primary);
}

/* ==========================================
   MY MATCHES PAGES
   ========================================== */

.my-matches-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.my-matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
}

.my-matches-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.queue-filter select {
    padding: 10px 16px;
    background: rgba(30, 35, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

/* Matches Table */
.matches-table-container {
    background: rgba(30, 35, 50, 0.4);
    border-radius: 8px;
    overflow-x: auto;
}

.matches-table {
    width: 100%;
    border-collapse: collapse;
}

.matches-table thead {
    background: rgba(20, 25, 40, 0.8);
}

.matches-table th {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    user-select: none;
}

.matches-table th:hover {
    color: var(--text-secondary);
}

.matches-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.matches-table tbody tr:hover {
    background: rgba(40, 45, 60, 0.3);
}

.matches-table td {
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 13px;
    color: var(--text-primary);
}

.matches-table tbody tr.win {
    border-left: 3px solid #10b981;
}

.matches-table tbody tr.loss {
    border-left: 3px solid #ef4444;
}

/* Champion/Map Cell */
.champion-cell,
.map-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.champ-icon,
.map-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

/* Role Cell */
.role-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

.role-icon {
    font-size: 14px;
}

/* Result Cell */
.result-cell .result-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.result-cell .result-badge.win {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.result-cell .result-badge.loss {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* LP Cell */
.lp-cell {
    font-weight: 600;
}

.lp-cell.lp-gain {
    color: #10b981;
}

.lp-cell.lp-loss {
    color: #ef4444;
}

/* Rating Cell */
.rating-cell {
    font-weight: 600;
}

.rating-cell.positive {
    color: #10b981;
}

.rating-cell.negative {
    color: #ef4444;
}

/* Score Cell (CS2) */
.score-cell .score {
    font-weight: 600;
}

.score-cell .score.win {
    color: #10b981;
}

.score-cell .score.loss {
    color: #ef4444;
}

/* Rank Cell */
.rank-badge {
    padding: 4px 8px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 4px;
    font-size: 12px;
    color: #ffc107;
}

/* Progress Bar Mini (for Aim/Utility) */
.progress-bar-mini {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 3px;
    transition: width 0.3s;
}

/* Achievements & Highlights */
.achievements-cell .achievement {
    font-size: 16px;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

/* Loading/Error/Empty States */
.loading-cell,
.error-cell,
.empty-cell {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
}

.error-cell {
    color: var(--error);
}

/* Responsive */
@media (max-width: 1024px) {
    .match-filter-bar {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .matches-table-container {
        overflow-x: scroll;
    }

    .matches-table {
        min-width: 900px;
    }
}