/* Analytics Page Styles - Comprehensive Interactive Course Design System */
:root {
    --udemy-purple: #A435F0;
    --udemy-purple-hover: #8B2BD9;
    --dark-bg: #1C1D1F;
    --text-dark: #1C1D1F;
    --text-light: #4A5568;
    --text-lighter: #718096;
    --border-color: #E2E8F0;
    --white: #FFFFFF;
    --yellow-star: #F4C150;
    --red-timer: #D93B04;
    --green-success: #28A745;
    --blue-info: #17A2B8;
    --orange-warning: #FFC107;
    --shadow: 0 2px 4px rgba(0,0,0,.08);
    --shadow-hover: 0 4px 8px rgba(0,0,0,.12);
    --shadow-card: 0 4px 12px rgba(0,0,0,.1);
    --gradient-primary: linear-gradient(135deg, #A435F0 0%, #8B2BD9 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #28A745 0%, #20C997 100%);
    --primary-yellow: #F4C150;
    --primary-yellow-hover: #E0B040;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header styles inherited from dashboard.css - removed conflicting styles */

/* Analytics Hero Section */
.analytics-hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    position: relative;
}

.analytics-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(164, 53, 240, 0.95) 0%, rgba(139, 43, 217, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    color: var(--white);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    backdrop-filter: blur(8px);
}

.stat-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(164, 53, 240, 0.1) 0%, rgba(244, 193, 80, 0.1) 100%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.stat-item:hover::after {
    opacity: 1;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 500;
}

/* Main Content */
.analytics-main {
    padding: 40px 0;
    background-color: #f8f9fa;
}

/* Time Filter */
.time-filter {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-options {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: var(--light-bg);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--udemy-purple);
    color: var(--white);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.apply-btn {
    background: var(--udemy-purple);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.apply-btn:hover {
    background: var(--udemy-purple-hover);
}

/* Key Metrics */
.key-metrics {
    margin-bottom: 60px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.metric-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-success);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.metric-content h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-change.positive {
    color: var(--green-success);
}

.metric-change.negative {
    color: var(--red-error);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.section-header h2 i {
    color: var(--primary-yellow);
}

.chart-controls,
.export-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chart-type-select,
.export-format-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Learning Progress */
.learning-progress {
    margin-bottom: 40px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.chart-card canvas {
    width: 100%;
    height: 300px;
}

.streak-calendar {
    margin-bottom: 40px;
}

.streak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
}

.calendar-day {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background-color: #ebedf0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.calendar-day.learned {
    background-color: var(--green-success);
    color: var(--white);
}

.calendar-day.current-streak {
    background-color: var(--primary-yellow);
    color: var(--dark-bg);
    font-weight: 600;
}

.calendar-day.empty {
    background-color: transparent;
    border: 1px dashed var(--border-color);
}

/* Skill Development */
.skill-development {
    margin-bottom: 40px;
}

.export-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.export-btn:hover {
    background: var(--primary-yellow-hover);
    transform: translateY(-1px);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.skill-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.skill-level {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-success);
}

.skill-progress {
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-light);
    font-size: 0.8rem;
}

.skill-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.skill-stat {
    text-align: center;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.skill-trend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.trend-label {
    color: var(--text-light);
}

.trend-value.positive {
    color: var(--green-success);
}

.trend-value.negative {
    color: var(--red-timer);
}

/* Performance Analytics */
.performance-analytics {
    margin-bottom: 40px;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.performance-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.performance-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.performance-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.performance-card canvas {
    height: 200px !important;
    max-height: 200px;
    width: 100% !important;
    margin-bottom: 16px;
}

.performance-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    color: var(--text-dark);
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.efficiency-metrics {
    display: grid;
    gap: 16px;
}

.efficiency-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.efficiency-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    background: var(--gradient-primary);
}

.efficiency-content {
    flex: 1;
}

.efficiency-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

.efficiency-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-yellow);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.efficiency-desc {
    color: var(--text-dark);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Peer Comparison */
.peer-comparison {
    margin-bottom: 40px;
}

.comparison-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.comparison-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.01em;
}

.comparison-bar {
    flex: 2;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.comparison-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.comparison-fill.average {
    background: var(--gradient-secondary);
}

.comparison-fill.top {
    background: var(--gradient-success);
}

.comparison-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 60px;
    text-align: right;
    letter-spacing: -0.01em;
}

.comparison-insight {
    color: var(--text-dark);
    font-size: 0.85rem;
    margin-top: 8px;
    padding-left: 16px;
    font-weight: 500;
}

/* Learning Insights */
.learning-insights {
    margin-bottom: 40px;
}

.refresh-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.refresh-btn:hover {
    background: var(--primary-yellow-hover);
    transform: translateY(-1px);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.insight-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.insight-card:nth-child(1) {
    border-left: 4px solid var(--green-success);
}

.insight-card:nth-child(2) {
    border-left: 4px solid var(--blue-info);
}

.insight-card:nth-child(3) {
    border-left: 4px solid var(--orange-warning);
}

.insight-card:nth-child(4) {
    border-left: 4px solid var(--primary-yellow);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.insight-header i {
    font-size: 1.5rem;
    color: var(--primary-yellow);
}

.insight-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.insight-card p {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.insight-action {
    color: var(--primary-yellow);
    font-weight: 600;
    cursor: pointer;
}

/* Detailed Reports */
.detailed-reports {
    margin-bottom: 40px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.report-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.report-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.report-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

.report-content {
    margin-bottom: 16px;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.report-item:last-child {
    border-bottom: none;
}

.item-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.item-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-yellow-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* Footer */
.main-footer {
    background: var(--dark-bg);
    color: var(--white);
    margin-top: 80px;
}

.footer-content {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #b5b5b5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 20px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom .logo {
    color: var(--white);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-bottom-links a {
    color: #b5b5b5;
    text-decoration: none;
    font-size: 0.9rem;
}

.language-selector {
    background: none;
    border: 1px solid #333;
    color: #b5b5b5;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .distribution-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .breakdown-header {
        flex-direction: column;
        gap: 16px;
    }

    .header-stats {
        justify-content: center;
    }

    .activity-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .chart-container {
        aspect-ratio: 1;
        max-width: 350px;
        padding: 20px;
        margin: 0 auto;
    }

    .chart-container canvas {
        max-height: 280px;
    }

    .search-bar {
        order: 3;
        max-width: none;
        margin: 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .time-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-options {
        justify-content: center;
        flex-wrap: wrap;
    }

    .date-range {
        justify-content: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .charts-grid,
    .skills-grid,
    .performance-grid,
    .insights-grid,
    .reports-grid {
        grid-template-columns: 1fr;
    }

    .skill-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .performance-summary {
        flex-direction: column;
        gap: 15px;
    }

    .performance-card canvas {
        height: 180px !important;
        max-height: 180px;
    }

    .efficiency-metrics {
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-nav ul {
        gap: 15px;
    }

    .main-nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
    }

    .chart-controls,
    .performance-filters,
    .report-actions {
        flex-direction: column;
        width: 100%;
    }

    .chart-type-select,
    .performance-select {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--udemy-purple);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .metric-card,
    .chart-card,
    .skill-card,
    .performance-card,
    .insight-card,
    .report-card {
        border: 2px solid var(--text-dark);
    }
}

/* Daily Learning Activity Styles */
.daily-activity {
    margin-bottom: 48px;
}

.activity-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.metric-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.metric-header i {
    font-size: 1.5rem;
    color: var(--primary-yellow);
    background: rgba(244, 193, 80, 0.1);
    padding: 12px;
    border-radius: 12px;
}

.metric-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.metric-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.metric-progress .progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.metric-progress span {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

/* Course Completion Rate Styles */
.completion-rate {
    margin-bottom: 48px;
}

.completion-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    margin-top: 24px;
}

.completion-overview {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.overall-completion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.completion-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completion-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.completion-text .percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.completion-text .label {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

.completion-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.completion-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.completion-stats .stat:last-child {
    border-bottom: none;
}

.completion-stats .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.completion-stats .label {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

.course-completions {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.course-completions h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.course-progress-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.course-progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.course-progress-item:last-child {
    border-bottom: none;
}

.course-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.course-category {
    font-size: 0.8rem;
    color: var(--text-lighter);
    background: rgba(244, 193, 80, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.progress-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.progress-info .progress-bar {
    width: 100px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-info .progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-lighter);
}

/* Learning Streak Styles */
.learning-streak {
    margin-bottom: 48px;
}

.streak-info {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.current-streak, .longest-streak {
    font-size: 0.9rem;
    color: var(--text-lighter);
    padding: 8px 16px;
    background: rgba(244, 193, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(244, 193, 80, 0.2);
}

.streak-display {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-top: 24px;
}

.streak-calendar {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.streak-calendar h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-lighter);
    cursor: pointer;
    transition: all 0.2s ease;
}

.day.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(164, 53, 240, 0.3);
}

.day:hover {
    transform: scale(1.1);
}

.calendar-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #f0f0f0;
}

.legend-color.active {
    background: var(--gradient-primary);
}

.legend-item span {
    font-size: 0.8rem;
    color: var(--text-lighter);
}

.streak-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.streak-stat {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-lighter);
}

/* Time Distribution Styles */
.time-distribution {
    margin-bottom: 48px;
}

.distribution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
    align-items: start;
}

.chart-container {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-card);
    border: 2px solid #A435F0;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    max-width: 400px;
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(164, 53, 240, 0.15);
    border-color: #8B2BD9;
}

.chart-container canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 320px;
    background-color: transparent;
    border-radius: 8px;
}

.category-breakdown {
    background: var(--white);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(164, 53, 240, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 600px;
    height: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: space-between;
}

.category-breakdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(164, 53, 240, 0.12);
    border-color: rgba(164, 53, 240, 0.2);
}

.category-breakdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-shrink: 0;
}

.header-main h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-main h3 i {
    color: var(--primary-yellow);
    font-size: 1.3rem;
}

.time-period {
    font-size: 0.9rem;
    color: var(--text-lighter);
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(244, 193, 80, 0.1);
    border-radius: 20px;
    display: inline-block;
}

.header-stats {
    display: flex;
    gap: 12px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(164, 53, 240, 0.08);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
}

.stat-badge i {
    color: var(--primary-yellow);
    font-size: 0.9rem;
}

.activity-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.activity-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-yellow), var(--udemy-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.activity-card:hover {
    background: var(--white);
    border-color: rgba(164, 53, 240, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.activity-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--white);
    flex-shrink: 0;
}

.activity-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.activity-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hours {
    font-size: 0.9rem;
    color: var(--text-lighter);
    font-weight: 500;
}

.percentage {
    font-size: 0.85rem;
    color: var(--primary-yellow);
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(244, 193, 80, 0.1);
    border-radius: 8px;
}

.activity-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

.ring-text {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.breakdown-footer {
    border-top: 1px solid rgba(164, 53, 240, 0.1);
    padding-top: 12px;
    flex-shrink: 0;
}

.footer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(164, 53, 240, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(164, 53, 240, 0.1);
    transform: translateY(-1px);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--white);
    flex-shrink: 0;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: #f8f9fa;
    font-weight: 500;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-item:hover {
    background: #ffffff;
    border-color: var(--border-color);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--white);
    flex-shrink: 0;
    background: var(--gradient-primary);
}

.category-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.category-time {
    font-size: 0.85rem;
    color: var(--text-lighter);
    font-weight: 500;
}

.category-progress {
    width: 100px;
}

.category-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-progress .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.total-time {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--gradient-primary);
    border-radius: 10px;
    color: var(--white);
    margin-top: 0;
    flex-shrink: 0;
}

.total-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.total-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.total-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.total-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

/* AI Assistant Chat Widget */
.ai-assistant {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    width: 350px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.ai-assistant.minimized {
    width: auto;
    height: auto;
}

.ai-assistant.focused {
    box-shadow: 0 8px 32px rgba(250, 204, 76, 0.2);
    border-color: var(--primary-yellow);
}

.ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 16px 16px 0 0;
    cursor: pointer;
}

.ai-header:hover {
    background: var(--primary-yellow-hover);
}

.ai-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.ai-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.status {
    font-size: 0.8rem;
    opacity: 0.9;
}

.minimize-btn {
    background: none;
    border: none;
    color: var(--white);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.minimize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ai-chat {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-yellow);
    border-radius: 2px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: messageSlideIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
}

.message.ai {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.user .message-content {
    background: var(--gradient-primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message.ai .message-content {
    background: var(--border-color);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 4px;
    align-self: flex-end;
}

.message.user .message-time {
    align-self: flex-end;
}

.message.ai .message-time {
    align-self: flex-start;
}

/* Typing Indicator */
.typing-indicator .message-content {
    background: var(--border-color);
    padding: 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-light);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0s;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 0 0 16px 16px;
}

.chat-input input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input input:focus {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(250, 204, 76, 0.1);
}

.chat-input button {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-input button:hover {
    background: var(--primary-yellow-hover);
    transform: scale(1.1);
}

.chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Animations */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Minimized state */
.ai-assistant.minimized .ai-chat {
    display: none;
}

.ai-assistant.minimized .ai-header {
    border-radius: 16px;
    cursor: pointer;
}

.ai-assistant.minimized:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(11, 8, 4, 0.15);
}

@media (max-width: 768px) {
    .ai-assistant {
        width: calc(100vw - 48px);
        left: 24px;
        right: 24px;
    }
}

@media (max-width: 480px) {
    .ai-assistant {
        left: 16px;
        right: 16px;
        width: calc(100vw - 32px);
    }
}