.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Form card styles */
.filter-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 70, 229, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.filter-card:hover {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(79, 70, 229, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Modern select styles */
.select-wrapper {
    position: relative;
}

.modern-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
    width: 100%;
    min-height: 120px;
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.modern-select option {
    padding: 0.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
}

.modern-select option:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
}

/* Submit button */
.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Stats results card */
.stats-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 70, 229, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(79, 70, 229, 0.1);
}

.stats-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(79, 70, 229, 0.2);
}

.stats-header h3 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.player-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 2rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.player-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    color: white;
}

.stats-body {
    padding: 2rem;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-fast);
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.stat-box h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-box.success .stat-value {
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-box.danger .stat-value {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Progress bar wrapper */
.progress-wrapper {
    margin-top: 1rem;
}

.progress {
    height: 40px;
    background: var(--bg-dark);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    transition: width 0.6s ease;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Alert styles */
.modern-alert {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.modern-alert i {
    font-size: 1.5rem;
}

/* History table */
.history-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 70, 229, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.history-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(79, 70, 229, 0.2);
}

.history-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.history-table {
    background: transparent;
    margin-bottom: 0;
}

.history-table thead th {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.history-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.history-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.05);
}

.history-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.result-badge.victory {
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.result-badge.defeat {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.team-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.team-player-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.75rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.team-player-badge.winner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.team-player-badge.loser {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.team-player-badge.selected {
    border-width: 2px;
    border-color: var(--warning);
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.team-player-badge:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-card {
        padding: 1.5rem;
    }
    
    .stats-header h3 {
        font-size: 1.25rem;
    }
}