/* ============================================================
   leaderboard.css — نسخه‌ی پرافکت با گرادیان صورتی-هلویی و درخشش
   ============================================================ */

.lb-body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    margin: 0;
    padding: 16px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: #4a2f1a;
    background: radial-gradient(circle at 50% 0%, #ffe0d6 0%, #ffd0c2 35%, #ffbfae 100%);
}

/* ---------- اسپارکل‌های تزئینی متحرک ---------- */
.lb-sparkle {
    position: fixed;
    font-size: 1.1rem;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
    animation: lb-twinkle 2.4s ease-in-out infinite;
}
.lb-sparkle:nth-child(2) { animation-delay: 0.4s; }
.lb-sparkle:nth-child(3) { animation-delay: 0.8s; }
.lb-sparkle:nth-child(4) { animation-delay: 1.2s; }
.lb-sparkle:nth-child(5) { animation-delay: 1.6s; }

@keyframes lb-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- هدر ---------- */
.lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    margin-bottom: 14px;
}

.lb-egg-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(217, 122, 62, 0.25);
}

.lb-egg-glow {
    filter: drop-shadow(0 0 6px rgba(255, 215, 130, 0.9));
}

.lb-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d97a3e;
    text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(217, 122, 62, 0.3);
}

.lb-trophy {
    filter: drop-shadow(0 0 8px rgba(255, 200, 60, 0.8));
}

/* ---------- تب‌ها ---------- */
.lb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.lb-tab {
    flex: 1;
    padding: 11px 8px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.6);
    color: #a07850;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: bold;
    cursor: pointer;
}

.lb-tab.active {
    background: linear-gradient(135deg, #ffb85c, #d97a3e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(217, 122, 62, 0.4);
}

/* ---------- کارت رتبه‌ی شخصی با درخشش تخم‌مرغ ---------- */
.my-rank-card {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    text-align: right;
    background: #fff;
    border-radius: 22px;
    padding: 16px 18px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 24px rgba(217, 122, 62, 0.18);
    overflow: hidden;
}

.my-rank-card::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255,215,150,0.5), transparent 70%);
    z-index: 0;
}

.my-rank-card .mr-egg-icon {
    font-size: 2.6rem;
    filter: drop-shadow(0 0 12px rgba(255, 215, 130, 0.9));
    position: relative;
    z-index: 1;
}

.my-rank-card .mr-info { position: relative; z-index: 1; }

.my-rank-card .mr-label {
    font-size: 0.78rem;
    color: #a07850;
}

.my-rank-card .mr-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d97a3e;
}

.my-rank-card .mr-eggs {
    font-size: 1rem;
    font-weight: bold;
    text-align: left;
    position: relative;
    z-index: 1;
}

/* ---------- لیست ردیف‌ها ---------- */
.lb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 18px;
    padding: 10px 14px;
    box-shadow: 0 3px 10px rgba(217, 122, 62, 0.12);
}

.lb-row.is-me {
    box-shadow: 0 0 0 2px #d97a3e, 0 6px 18px rgba(217, 122, 62, 0.3);
}

/* ---------- نشان رتبه (مدال با روبان برای سه نفر اول) ---------- */
.lb-rank-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.92rem;
    flex-shrink: 0;
    background: #f0d98a;
    color: #4a2f1a;
    position: relative;
}

.lb-rank-badge.top1 {
    background: radial-gradient(circle at 35% 30%, #fff6d0, #ffd700 60%, #b8860b 100%);
    color: #5a3d00;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}
.lb-rank-badge.top2 {
    background: radial-gradient(circle at 35% 30%, #f5f5f5, #c0c0c0 60%, #888 100%);
    color: #333;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.6);
}
.lb-rank-badge.top3 {
    background: radial-gradient(circle at 35% 30%, #f0c090, #cd7f32 60%, #8b5a2b 100%);
    color: #fff;
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.6);
}

/* روبان کوچک زیر مدال‌های top3 برای حس «جایزه» */
.lb-rank-badge.top1::after,
.lb-rank-badge.top2::after,
.lb-rank-badge.top3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid currentColor;
    opacity: 0.5;
}

/* ---------- آواتار: عکس واقعی اگر موجود بود، وگرنه ایموجی جوجه ----------
   محل قرارگیری عکس‌های آواتار: public/assets/img/avatars/*.png
   ابعاد پیشنهادی: 120x120px، PNG با پس‌زمینه‌ی شفاف
*/
.lb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.6);
    font-size: 1.2rem;
}

.lb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-info {
    flex: 1;
    text-align: right;
    min-width: 0;
}

.lb-name {
    font-weight: bold;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-sub {
    font-size: 0.74rem;
    color: #a07850;
}

.lb-eggs {
    font-weight: bold;
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lb-empty {
    text-align: center;
    padding: 30px 16px;
    color: #a07850;
    position: relative;
    z-index: 2;
}

.quiz-state {
    text-align: center;
    padding: 30px 16px;
    color: #a07850;
    position: relative;
    z-index: 2;
}

.quiz-error {
    color: #b03030;
    background: #ffe0e0;
    border-radius: 14px;
}
