/* 
 * Learning Progress and Achievement Styles
 * Gamified onboarding experience
 */

/* Achievement Notifications */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(79, 195, 247, 0.3);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.achievement-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-icon {
    font-size: 48px;
    animation: achievementBounce 0.6s ease-in-out;
}

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

.achievement-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.achievement-details h5 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
}

.achievement-details p {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.3;
}

.points-earned {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

/* Level Up Notifications */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.4);
    z-index: 2001;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.level-up-notification.show {
    transform: translate(-50%, -50%) scale(1);
}

.level-up-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: levelUpSpin 1s ease-in-out;
}

@keyframes levelUpSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.level-up-details h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.level-up-details h4 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 800;
}

.level-up-details p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Learning Progress Widget */
.learning-progress-widget {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

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

.progress-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.level-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #4fc3f7, #29b6f6);
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    margin: 0;
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
}

.progress-widget-container {
    position: relative;
    z-index: 1;
}

/* Milestone List Styles */
.milestones-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.milestone-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.milestone-item.completed {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.milestone-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.milestone-icon {
    font-size: 32px;
    opacity: 0.7;
}

.milestone-item.completed .milestone-icon {
    opacity: 1;
    animation: completedPulse 2s ease-in-out infinite;
}

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

.milestone-details h6 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.milestone-details p {
    margin: 0 0 5px 0;
    font-size: 14px;
    opacity: 0.8;
}

.milestone-points {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .achievement-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .achievement-notification.show {
        transform: translateY(0);
    }
    
    .level-up-notification {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .learning-progress-widget {
        margin: 15px 0;
        padding: 15px;
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-value {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    .achievement-content {
        flex-direction: column;
        text-align: center;
    }
    
    .achievement-icon {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .achievement-notification {
        top: 10px;
        padding: 15px;
    }
    
    .level-up-notification {
        padding: 25px 15px;
    }
    
    .level-up-icon {
        font-size: 48px;
    }
    
    .level-up-details h3 {
        font-size: 20px;
    }
    
    .level-up-details h4 {
        font-size: 24px;
    }
}

/* Accessibility */
.achievement-notification,
.level-up-notification {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .achievement-notification,
    .level-up-notification,
    .progress-fill,
    .milestone-item {
        transition: none;
        animation: none;
    }
    
    .achievement-icon,
    .level-up-icon,
    .milestone-icon {
        animation: none;
    }
}

/* Focus States */
.milestone-item:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .achievement-notification,
    .level-up-notification {
        display: none;
    }
}