/* =========================================================
   ANALYTICS PAGE — Jovan AI Premium (Zenith v3.0)
   ========================================================= */

.analytics-page {
    padding: var(--space-xl) var(--space-lg) 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.page-header h2 {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-header), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Stats Overview (Premium 3D Cards) ── */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    padding: 1.75rem;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-8px) rotateX(4deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.65);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.stat-info h3 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--text-header);
    font-weight: 800;
    line-height: 1;
}

.stat-info p {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Analytics Grid ── */
.analytics-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 2rem;
}

.chart-container {
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(32px);
    backdrop-filter: blur(32px);
    padding: 2.5rem;
    border-radius: 32px;
    height: 480px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary);
    opacity: 0.8;
}

/* ── Insights Section ── */
.insights-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.weak-topics {
    background: hsla(0, 100%, 50%, 0.03);
    padding: 1.75rem;
    border-radius: 24px;
    border: 1.5px solid hsla(0, 100%, 50%, 0.1);
}

.weak-topics h4 {
    margin: 0 0 1.25rem 0;
    color: #f43f5e;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.weak-topics ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.weak-topics li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
}

.topic-tag {
    background: white;
    padding: 4px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid rgba(244, 63, 94, 0.1);
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.05);
}

.ai-recommendation-box {
    background: linear-gradient(135deg, hsla(242, 100%, 70%, 0.1), hsla(242, 100%, 70%, 0.03));
    padding: 2rem;
    border-radius: 28px;
    border: 1.5px solid var(--primary-light);
    position: relative;
    animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 hsla(242, 100%, 70%, 0.1); }
    50% { box-shadow: 0 0 40px 0 hsla(242, 100%, 70%, 0.2); }
}

.ai-recommendation-box h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-recommendation-box h4::before {
    content: '✨';
}

.ai-recommendation-box p {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.7;
    font-weight: 500;
}

@media (max-width: 1000px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 380px;
    }
}