/* Progress Tracking System Styles */

.progress-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* Overall Progress Section */
.overall-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.overall-progress-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.progress-level {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.level-icon {
    font-size: 1.2rem;
}

.level-text {
    font-weight: 600;
    color: #2c3e50;
}

.level-score {
    font-weight: 700;
    color: #3498db;
}

.overall-progress-bar {
    background: white;
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

/* Subject Progress Section */
.subject-progress-header {
    margin-bottom: 20px;
}

.subject-progress-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.subject-progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subject-progress-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.subject-progress-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.subject-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.subject-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.subject-score {
    font-weight: 700;
    color: #3498db;
    font-size: 1.1rem;
}

.subject-progress-bar {
    height: 16px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.subject-level {
    display: flex;
    justify-content: flex-end;
}

.level-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Concept Mastery Grid */
.concept-mastery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.concept-mastery-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.mastery-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #ddd;
}

.legend-dot.mastered { background-color: #44ff44; }
.legend.dot.practiced { background-color: #ffdd00; }
.legend.dot.learning { background-color: #ff8800; }
.legend-dot.not-started { background-color: #ff4444; }

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.concept-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.concept-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mastery-color);
}

.concept-item.mastered {
    --mastery-color: #44ff44;
    border: 2px solid #44ff44;
}

.concept-item.practiced {
    --mastery-color: #ffdd00;
    border: 2px solid #ffdd00;
}

.concept-item.learning {
    --mastery-color: #ff8800;
    border: 2px solid #ff8800;
}

.concept-item.not-started {
    --mastery-color: #ff4444;
    border: 2px solid #ff4444;
}

.concept-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.concept-item.mastered::after {
    content: '🏆';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
}

.concept-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 12px;
    background: var(--mastery-color);
    color: white;
}

.concept-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.concept-score {
    font-weight: 700;
    color: var(--mastery-color);
    font-size: 1.1rem;
}

/* Mastery Distribution Chart */
.distribution-header {
    margin-bottom: 20px;
}

.distribution-header h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.distribution-summary {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: #666;
}

.distribution-summary span {
    background: white;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.distribution-chart {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.distribution-bar {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.distribution-bar:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.distribution-bar.mastered {
    border-left: 4px solid #44ff44;
}

.distribution-bar.practiced {
    border-left: 4px solid #ffdd00;
}

.distribution-bar.learning {
    border-left: 4px solid #ff8800;
}

.distribution-bar.not-started {
    border-left: 4px solid #ff4444;
}

.bar-label {
    font-weight: 600;
    color: #2c3e50;
}

.bar-value {
    font-weight: 700;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.distribution-bar.mastered .bar-value {
    background-color: #44ff44;
}

.distribution-bar.practiced .bar-value {
    background-color: #ffdd00;
    color: #333;
}

.distribution-bar.learning .bar-value {
    background-color: #ff8800;
}

.distribution-bar.not-started .bar-value {
    background-color: #ff4444;
}

/* Progress Timeline */
.timeline-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.progress-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-item.current {
    border: 2px solid #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
    min-width: 60px;
}

.date-day {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.date-month {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.timeline-content {
    flex: 1;
}

.timeline-progress {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.timeline-details {
    flex: 1;
}

.progress-change {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 4px;
}

.progress-change.positive {
    color: #27ae60;
}

.progress-change.negative {
    color: #e74c3c;
}

.progress-change.neutral {
    color: #95a5a6;
}

.concept-summary {
    font-size: 0.9rem;
    color: #666;
}

/* Progress Notifications */
.progress-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3498db;
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
    max-width: 320px;
}

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

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

.level-icon {
    font-size: 1.2rem;
}

.level-text {
    font-weight: 600;
    color: #2c3e50;
}

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

.concept-name {
    font-weight: 600;
    color: #2c3e50;
}

.mastery-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new-mastery {
    color: #3498db;
    font-weight: 600;
}

.mastery-level {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-section {
        padding: 16px;
        margin: 12px 0;
    }

    .overall-progress-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .concept-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-date {
        margin-right: 0;
        margin-bottom: 12px;
        flex-direction: row;
        gap: 8px;
    }

    .progress-timeline {
        gap: 12px;
    }

    .subject-progress-list {
        gap: 12px;
    }

    .distribution-summary {
        flex-direction: column;
        gap: 8px;
    }

    .progress-notification {
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .concept-grid {
        grid-template-columns: 1fr;
    }

    .mastery-legend {
        justify-content: center;
    }

    .progress-circle {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .level-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .progress-fill,
    .progress-item,
    .timeline-item,
    .progress-notification {
        transition: none;
    }

    .progress-fill::after {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .progress-section {
        border: 2px solid #000;
    }

    .concept-item {
        border: 2px solid #000;
    }

    .distribution-bar {
        border: 2px solid #000;
    }
}

/* Print styles */
@media print {
    .progress-section {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .progress-notification {
        display: none;
    }

    .timeline-item {
        break-inside: avoid;
    }
}