/* Quiz Leaderboard Widget Styles */
.quiz-leaderboard-section {
    margin: 3rem 0;
}

.leaderboard-card {
    border-radius: 1.5rem;
    overflow: hidden;
}

.leaderboard-card .card-header {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    padding: 1.5rem;
    border: none;
}

.leaderboard-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545, #fd7e14) !important;
}

/* Podium Display */
.podium-display {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5), rgba(255, 255, 255, 0.3));
    border-radius: 1rem;
    padding: 1.5rem;
}

.podium-position {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9), rgba(255, 255, 255, 0.8));
    border-radius: 1rem;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.3s ease;
    flex: 1;
}

.podium-position:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.podium-rank {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.podium-rank.gold {
    color: #FFD700;
    animation: pulse 2s ease-in-out infinite;
}

.podium-rank.silver {
    color: #C0C0C0;
}

.podium-rank.bronze {
    color: #CD7F32;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.podium-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 3px solid;
}

.podium-avatar.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #fff;
}

.podium-avatar.silver {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    border-color: #C0C0C0;
    color: #fff;
}

.podium-avatar.bronze {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    border-color: #CD7F32;
    color: #fff;
}

.podium-name {
    margin-top: 0.5rem;
    font-weight: 600;
}

.podium-score {
    margin-top: 0.25rem;
}

/* Leaderboard List */
.leaderboard-list {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5), rgba(255, 255, 255, 0.3));
    border-radius: 1rem;
    padding: 1.5rem;
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.list-group-item {
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: rgba(var(--bs-primary-rgb), 0.05) !important;
    transform: translateX(5px);
}

.rank-score .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.stat-mini {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(var(--bs-primary-rgb), 0.05);
    transition: all 0.3s ease;
}

.stat-mini:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    transform: translateY(-2px);
}

[data-theme="dark"] .leaderboard-card .card-body {
    background: rgba(20, 28, 36, 0.6);
}

[data-theme="dark"] .podium-display,
[data-theme="dark"] .leaderboard-list {
    background: linear-gradient(135deg, rgba(30, 38, 46, 0.6), rgba(35, 50, 68, 0.5));
}

[data-theme="dark"] .podium-position {
    background: linear-gradient(135deg, rgba(30, 38, 46, 0.9), rgba(35, 50, 68, 0.8));
}

[data-theme="dark"] .rank-avatar {
    background: linear-gradient(135deg, rgba(50, 58, 66, 0.9), rgba(60, 70, 80, 0.8));
    color: #adb5bd;
}

[data-theme="dark"] .stat-mini {
    background: rgba(var(--bs-primary-rgb), 0.15);
}

[data-theme="dark"] .stat-mini:hover {
    background: rgba(var(--bs-primary-rgb), 0.25);
}

@media (max-width: 992px) {
    .podium-display {
        margin-bottom: 2rem;
    }

    .podium-position {
        padding: 0.75rem 0.5rem;
    }

    .podium-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .podium-rank {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .leaderboard-card .card-header {
        padding: 1rem;
    }

    .leaderboard-card .card-header h4 {
        font-size: 1.1rem;
    }

    .leaderboard-icon {
        width: 40px;
        height: 40px;
    }

    .leaderboard-icon i {
        font-size: 1.5rem !important;
    }

    .podium-display,
    .leaderboard-list {
        padding: 1rem;
    }

    .podium-position {
        padding: 0.5rem 0.25rem;
    }

    .podium-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .podium-rank {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .podium-name {
        font-size: 0.75rem !important;
    }

    .podium-score {
        font-size: 0.7rem !important;
    }

    .rank-badge,
    .rank-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .stat-mini {
        padding: 0.5rem;
    }

    .stat-mini .h5 {
        font-size: 1.1rem;
    }

    .stat-mini small {
        font-size: 0.7rem;
    }
}

[data-theme="dark"] .featured-quizzes-section {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.08), rgba(var(--bs-info-rgb), 0.05));
}

[data-theme="dark"] .quiz-card {
    background: rgba(30, 38, 46, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .quiz-card:hover {
    background: rgba(30, 38, 46, 1);
    border-color: var(--topic-color);
}

[data-theme="dark"] .quiz-overview-card {
    background: linear-gradient(135deg, rgba(30, 38, 46, 0.95), rgba(35, 50, 68, 0.9));
}

[data-theme="dark"] .stat-box {
    background: rgba(var(--bs-primary-rgb), 0.15);
}

[data-theme="dark"] .stat-box:hover {
    background: rgba(var(--bs-primary-rgb), 0.25);
}
