.leaderboard-page {
    padding: var(--space-lg);
    max-width: 1600px;
    min-height: 100vh;
    background-image: radial-gradient(circle at 2px 2px, var(--color-border) 1px, transparent 0);
    background-size: 32px 32px;
}

.leaderboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.leaderboard-podium {
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 900px) {
    .leaderboard-layout {
        grid-template-columns: 1fr 350px;
    }
}

.filter-chip {
    transition: all 0.3s ease;
    border: none;
    background: #908d8d1a;
    padding: var(--space-sm) var(--space-base);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.filter-chip.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

[data-theme="dark"] .leaderboard-podium {
    background: linear-gradient(180deg, rgba(30, 31, 48, 0.6) 0%, rgba(15, 15, 26, 0.4) 100%);
}

.leaderboard-podium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--color-primary-soft) 0%, transparent 70%);
    opacity: 0.1;
    z-index: 0;
}

.podium-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.podium-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease;
}

.podium-item:hover {
    transform: translateY(-5px);
}

.podium-item.rank-1 {
    order: 2;
    z-index: 2;
    margin-bottom: 20px;
}

.podium-item.rank-2 {
    order: 1;
    z-index: 1;
}

.podium-item.rank-3 {
    order: 3;
    z-index: 1;
}

.podium-avatar-wrapper {
    position: relative;
    padding: var(--space-xs);
    border-radius: 50%;
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1;
}

.rank-1 .podium-avatar-wrapper {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: var(--space-xs);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    transform: scale(1.1);
}

.rank-2 .podium-avatar-wrapper {
    background: linear-gradient(135deg, #E0E0E0, #9E9E9E);
}

.rank-3 .podium-avatar-wrapper {
    background: linear-gradient(135deg, #D79921, #8C5E1B);
}

.podium-avatar-wrapper .avatar-img {
    border: 3px solid var(--color-bg-secondary);
}

.podium-crown {
    margin-bottom: 12px;
}

.laurel-wreath {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
}

.rank-2 .laurel-wreath {
    color: #C0C0C0;
}

.rank-3 .laurel-wreath {
    color: #CD7F32;
}

.rank-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-text-main);
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .rank-number {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.rank-number sup {
    font-size: 10px;
    text-transform: uppercase;
}

.laurel-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    stroke-dasharray: 200;
    animation: draw 2s ease-out forwards;
}

@keyframes draw {
    from {
        stroke-dashoffset: 200;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.podium-name {
    margin-top: 12px;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.podium-points {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.points-icon {
    font-size: 12px;
    color: var(--color-primary);
}

/* List Section */
.leaderboard-list {
    padding: var(--space-base);
}

.list-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--color-text-secondary);
}

.list-divider::before,
.list-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.list-divider span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-warning);
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: var(--space-base);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.leaderboard-row:hover {
    background: var(--color-bg-secondary);
    transform: translateX(5px);
    border-color: var(--color-primary-soft);
}

.row-rank-num {
    width: 30px;
    font-size: 12px;
    font-weight: 800;
    color: var(--color-text-secondary);
    display: none;
}

.row-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.row-info {
    display: flex;
    flex-direction: column;
}

.row-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text-main);
}

.row-points {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
}

.points-icon-sm {
    font-size: 10px;
    color: var(--color-primary);
}

.row-badge {
    margin-left: auto;
}

.rank-badge-mini {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    position: relative;
    border: 1.5px dashed rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge-mini sup {
    font-size: 8px;
}

/* Loading & Empty States */
.leaderboard-loading,
.leaderboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
    color: var(--color-text-secondary);
}

.leaderboard-empty p {
    font-weight: 500;
    margin-top: 12px;
}

/* Animations */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pop-in {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.rank-1.animate-pop-in {
    animation-delay: 0.2s;
}

.rank-2.animate-pop-in {
    animation-delay: 0.1s;
}

.rank-3.animate-pop-in {
    animation-delay: 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease both;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.rank-1 .podium-avatar-wrapper {
    animation: pulse-glow 2s infinite;
}

/* Responsive */
@media (max-width: 480px) {
    .podium-wrapper {
        gap: 8px;
    }

    .podium-item.rank-1 {
        margin-bottom: 15px;
    }

    .podium-name {
        font-size: 12px;
        max-width: 80px;
    }
}

/* Points History Styles */
.points-history-list {
    padding: var(--space-md);
}

.points-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-base);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.points-history-row:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-primary-soft);
}

.history-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.history-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--color-bg-secondary);
}

.history-icon-wrapper.positive {
    color: var(--color-success);
    background: rgba(var(--color-success-rgb, 0, 200, 83), 0.1);
}

.history-icon-wrapper.negative {
    color: var(--color-error);
    background: rgba(var(--color-error-rgb, 255, 82, 82), 0.1);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-action {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text-main);
    text-transform: capitalize;
}

.history-date {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.history-amount {
    font-weight: 800;
    font-size: 16px;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-lg);
}

.history-amount.positive {
    color: var(--color-success);
    background: rgba(var(--color-success-rgb, 0, 200, 83), 0.1);
}

.history-amount.negative {
    color: var(--color-error);
    background: rgba(var(--color-error-rgb, 255, 82, 82), 0.1);
}