/* style.css — Global styles & overrides */
/* This file can be used for page-specific or global overrides */
/* Core design tokens are in variables.css */
/* Layout grid rules are in layout.css */
/* Component styles are in components.css */

/* ─── Leaderboard ────────────────────────────────────────── */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    margin: 4rem 0 5rem;
    padding: 0 1rem;
}

.podium-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 140px;
}

.podium-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    background: var(--bg-soft);
    margin-bottom: -20px;
    z-index: 2;
    position: relative;
}

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

.step-1 .podium-avatar {
    width: 110px;
    height: 110px;
    border-color: #f59e0b;
    border-width: 5px;
    margin-bottom: -25px;
}

.crown-icon {
    position: absolute;
    top: -45px;
    font-size: 3rem;
    color: #f59e0b;
    z-index: 3;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.podium-rank {
    width: 100%;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    border-radius: 16px 16px 0 0;
    padding-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.step-1 .podium-rank {
    height: 180px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.step-2 .podium-rank {
    height: 130px;
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.step-3 .podium-rank {
    height: 100px;
    background: linear-gradient(135deg, #cd7f32, #8b5a2b);
}

.podium-info {
    text-align: center;
    margin-top: 1rem;
}

.podium-info h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-navy);
}

.podium-info p {
    font-size: 0.9rem;
    color: var(--primary-purple);
    font-weight: 700;
}

[data-theme="dark"] .podium-info h4 {
    color: white;
}

.leaderboard-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}

.leaderboard-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

[data-theme="dark"] .leaderboard-row {
    background: #1e293b;
    border-color: #334155;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    width: 40px;
    text-align: center;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 2;
}

.student-avatar-small {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    overflow: hidden;
}
.student-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-name {
    font-weight: 800;
    color: var(--text-navy);
    font-size: 1.1rem;
}

[data-theme="dark"] .student-name {
    color: white;
}

.student-grade {
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.student-score {
    font-weight: 800;
    color: var(--primary-purple);
    font-size: 1.1rem;
    background: #e0e7ff;
    padding: 4px 12px;
    border-radius: 20px;
}

[data-theme="dark"] .student-score {
    background: rgba(99, 102, 241, 0.2);
}

/* ─── Rank Pill ─────────────────────────────── */
.rank-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: help;
    transition: all 0.3s;
}
.rank-pill.rank-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1b4b;
    box-shadow: 0 0 12px rgba(251,191,36,0.3);
    animation: rankPulse 2s ease-in-out infinite;
}
.rank-pill.rank-silver {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #334155;
}
.rank-pill.rank-bronze {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    color: #7c2d12;
}
.rank-pill.rank-neutral {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple, #7c3aed);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.rank-pill i.fa-fire {
    animation: firePulse 1.5s ease-in-out infinite;
}
@keyframes firePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
@keyframes rankPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(251,191,36,0.3); }
    50% { box-shadow: 0 0 20px rgba(251,191,36,0.6); }
}
.pill-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .podium-container {
        gap: 0.5rem;
    }
    .podium-step {
        width: 100px;
    }
    .step-1 .podium-avatar { width: 80px; height: 80px; margin-bottom: -15px; }
    .podium-avatar { width: 60px; height: 60px; margin-bottom: -15px; }
    .podium-rank { font-size: 1.8rem; padding-top: 20px; }
    
    .leaderboard-row {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .student-grade {
        display: none;
    }
    .student-score {
        margin-right: auto;
    }
}
