/* Scuola Illustrata - Gamification Module Styles */

/* Level Widget */
.si-user-level-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.si-level-badge {
    text-align: center;
    margin-bottom: 15px;
}

.si-level-number {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.si-level-title {
    display: block;
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}

.si-level-progress {
    margin-top: 15px;
}

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

.si-progress-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.si-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: shimmer 2s infinite;
}

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

.si-progress-text {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    text-align: center;
    display: block;
}

/* XP Notification */
.si-xp-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    z-index: 99999;
    animation: slideInRight 0.5s ease, pulse 2s ease 0.5s;
    font-weight: 500;
}

.si-xp-notification .si-xp-amount {
    font-size: 20px;
    font-weight: bold;
    margin-left: 8px;
}

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

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

/* Badge Unlock Notification */
.si-badge-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 999999;
    text-align: center;
    animation: badgeUnlock 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgeUnlock {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0);
        opacity: 1;
    }
}

.si-badge-notification-icon {
    font-size: 100px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.si-badge-notification-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.si-badge-notification-desc {
    color: #666;
    margin-bottom: 20px;
}

.si-badge-notification-close {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.si-badge-notification-close:hover {
    background: #005177;
}

/* Achievements Grid */
.si-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.si-achievement-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.si-achievement-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.si-achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.si-achievement-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
}

.si-achievement-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-align: center;
}

.si-achievement-desc {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
}

.si-achievement-progress {
    margin-top: 15px;
}

.si-achievement-progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.si-achievement-progress-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    height: 100%;
    transition: width 0.5s ease;
}

.si-achievement-progress-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .si-achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .si-xp-notification {
        right: 10px;
        left: 10px;
        font-size: 14px;
    }
    
    .si-badge-notification {
        left: 10px;
        right: 10px;
        transform: translate(0, -50%);
        padding: 30px 20px;
    }
}
