/**
 * Matematik Vakti - Rozet Sistemi CSS
 * Version: 1.0.0
 */

/* =========================================================
   ROZET GRID (Profil Sayfası)
   ========================================================= */

.mv-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.mv-badge-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.mv-badge-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.mv-badge-item.locked {
    opacity: 0.6;
    background: #f8f9fa;
}

.mv-badge-item.locked .mv-badge-icon {
    background: #dee2e6 !important;
    color: #adb5bd;
}

/* =========================================================
   ROZET İKONU
   ========================================================= */

.mv-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background: #667eea;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mv-badge-item.earned .mv-badge-icon {
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
    0%, 100% {
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255,215,0,0.5);
    }
}

/* =========================================================
   ROZET BİLGİLERİ
   ========================================================= */

.mv-badge-info {
    flex: 1;
    min-width: 0;
}

.mv-badge-name {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    margin-bottom: 3px;
}

.mv-badge-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.mv-badge-date {
    font-size: 11px;
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mv-badge-date i {
    font-size: 12px;
}

/* =========================================================
   ROZET İLERLEME ÇUBUĞU
   ========================================================= */

.mv-badge-progress {
    position: relative;
    height: 18px;
    background: #e9ecef;
    border-radius: 9px;
    overflow: hidden;
    margin-top: 5px;
}

.mv-badge-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 9px;
    transition: width 0.5s ease;
}

.mv-badge-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* =========================================================
   INLINE ROZET (Kullanıcı Adı Yanı)
   ========================================================= */

.mv-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    vertical-align: middle;
}

.mv-badge-inline i {
    font-size: 10px;
}

/* =========================================================
   ROZET LİSTESİ (Kompakt)
   ========================================================= */

.mv-badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.mv-badges-list .mv-badge-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.mv-badges-list .mv-badge-mini:hover {
    transform: scale(1.2);
    z-index: 10;
}

.mv-badges-list .mv-badge-mini[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 5px;
}

/* =========================================================
   PROFİL ROZET SEKMESİ
   ========================================================= */

.mv-profile-badges-section {
    padding: 20px;
}

.mv-profile-badges-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mv-profile-badges-section h3 i {
    color: #ffd700;
}

/* Kazanılan / Kilitli ayrımı */
.mv-badges-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.mv-badges-section-title:first-of-type {
    margin-top: 0;
}

/* =========================================================
   ROZET KAZANIM ANİMASYONU
   ========================================================= */

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

.mv-badge-item.just-earned {
    animation: badgeEarned 0.5s ease-out;
}

/* =========================================================
   ROZET POPUP (Yeni rozet kazanıldığında)
   ========================================================= */

.mv-badge-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    z-index: 10000;
    animation: popupIn 0.4s ease-out;
}

@keyframes popupIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.mv-badge-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.mv-badge-popup h3 {
    margin: 0 0 20px;
    font-size: 24px;
    color: #333;
}

.mv-badge-popup .mv-badge-icon {
    width: 80px;
    height: 80px;
    font-size: 36px;
    margin: 0 auto 20px;
}

.mv-badge-popup .mv-badge-name {
    font-size: 20px;
    margin-bottom: 10px;
}

.mv-badge-popup .mv-badge-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.mv-badge-popup button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mv-badge-popup button:hover {
    transform: scale(1.05);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .mv-badges-grid {
        grid-template-columns: 1fr;
    }
    
    .mv-badge-item {
        padding: 12px;
    }
    
    .mv-badge-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 18px;
    }
    
    .mv-badge-name {
        font-size: 14px;
    }
    
    .mv-badge-popup {
        padding: 25px;
        width: 90%;
        max-width: 320px;
    }
    
    .mv-badge-popup .mv-badge-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* =========================================================
   ADMIN PANEL
   ========================================================= */

.badge-icon-preview {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
