/* Modern Dashboard Styles */
:root {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(15, 23, 42, 0.85);
    --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
}

body {
    background-color: #0f172a;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

.dashboard-container {
    max-width: 1400px;
    margin: 80px auto;
    padding: 20px;
}

/* Header Section */
.dashboard-header {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.welcome-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.welcome-text p {
    color: var(--text-muted);
}

.header-actions .btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-actions .btn-primary:hover {
    transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.total-questions .stat-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.accuracy .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.streak .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

/* Main Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* Common Widget Styles */
.widget-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px;
    height: 100%;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.widget-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

/* Chart Area */
.performance-chart {
    /* min-height removed, handled by inner container */
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Activity Feed */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-item.correct .activity-icon {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.activity-item.incorrect .activity-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.activity-content {
    flex-grow: 1;
}

.activity-question {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: center;
}

.category-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Share Section */
.share-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-btn {
    background: #25D366;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}