/* Overview Stat Cards */

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
    min-width: 0;
    /* Prevents card from pushing grid width */
    overflow: hidden;
    /* Contains any overflowing content (like trends) */
}

.stat-content {
    min-width: 0;
    /* Ensures text truncation works if ever needed */
    flex: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.2rem;
}

.stat-card.total-tests .stat-icon-wrapper {
    background: rgba(40, 120, 235, 0.1);
    color: var(--primary);
}

.stat-card.avg-score .stat-icon-wrapper {
    background: rgba(241, 77, 93, 0.1);
    color: var(--secondary);
}

.stat-card.study-time .stat-icon-wrapper {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-card.streak .stat-icon-wrapper {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--dark);
}

.stat-content p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    font-weight: 600;
}

.stat-trend.up {
    color: #28a745;
}

.stat-trend.down {
    color: var(--secondary);
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

@media (max-width: 768px) {
    .stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-card {
        padding: 1rem;
        border-radius: 15px;
    }

    .stat-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
        margin-right: 0.6rem;
    }

    .stat-content h3 {
        font-size: 1.1rem;
    }

    .stat-content p {
        font-size: 0.7rem;
    }
}

@media (max-width: 380px) {
    .stats-overview-grid {
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.8rem;
    }
}