/* ==============================================
   STATS MODAL
   ============================================== */

.stats-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000 !important;
    padding: var(--spacing-md, 1rem);
    animation: fadeIn 0.3s ease;
    max-width: none !important;
    margin: 0 !important;
}

.stats-modal {
    background: var(--secondary-bg, #1e293b);
    border: 2px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.stats-title {
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary, #ffffff);
}

.stats-icon {
    font-size: 1.75rem;
    color: var(--accent-primary, #00f5ff);
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary, #ffffff);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--danger, #ef4444);
    color: var(--danger, #ef4444);
}

.stats-table-container {
    padding: 1.5rem;
    overflow-x: auto;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead th {
    padding: 1rem;
    text-align: left;
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
    border-bottom: 2px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    position: sticky;
    top: 0;
    background: var(--secondary-bg, #1e293b);
    z-index: 1;
}

.stats-table tbody tr {
    transition: background 0.2s;
}

.stats-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.stats-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #ffffff);
}

.stat-highlight {
    color: var(--success, #22c55e) !important;
    font-weight: 700;
}

.stat-danger {
    color: var(--danger, #ef4444) !important;
    font-weight: 700;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .stats-modal {
        width: 95%;
        max-height: 85vh;
    }

    .stats-header {
        padding: 1rem;
    }

    .stats-title {
        font-size: 1.25rem;
    }

    .stats-table-container {
        padding: 0.75rem;
    }

    .stats-table thead th,
    .stats-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}
