/* === STATS VIEW === */
.stats-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Stats Hero */
.stats-hero {
    position: relative;
    padding: 40px 32px;
    margin-bottom: 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.stats-hero-content {
    position: relative;
    z-index: 1;
}

.stats-hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left !important;
}

.stats-hero-subtitle {
    color: var(--secondary);
    font-size: 16px;
}

.stats-hero-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Sections */
.stats-section {
    margin-bottom: 40px;
}

.stats-section-featured {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.stats-section-container {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.04) 0%, rgba(74, 222, 128, 0.03) 100%);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(6, 182, 212, 0.12);
}

.stats-section-container-alt {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.03) 0%, rgba(6, 182, 212, 0.04) 100%);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(74, 222, 128, 0.12);
}

.stats-section-header {
    display: block;
    width: 100%;
    margin: 0 0 24px 0;
    padding: 0;
    text-align: left;
}

.stats-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    padding: 0;
    text-align: left;
    width: 100%;
    display: block;
}

.stats-page .section-header {
    text-align: center;
    margin: 0 auto 20px;
    max-width: 100%;
}

.stats-page .section-header h2,
.stats-page .section-header .section-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-align: center;
}

.stats-page .section-header p {
    font-size: 14px;
    color: var(--secondary);
    margin: 0;
}

.section-icon {
    font-size: 22px;
}

.section-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-badge-live {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(74, 222, 128, 0.1));
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 16px;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1000px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Stat Cards */
.stat-card {
    position: relative;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stat-card:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.stat-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover .stat-card-glow {
    opacity: 1;
}

.stat-card-primary .stat-card-glow {
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.8), transparent);
}

.stat-card-secondary .stat-card-glow {
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.8), transparent);
}

.stat-card-accent .stat-card-glow {
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.8), transparent);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.stat-icon-small {
    font-size: 24px;
    margin-bottom: 10px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.stat-card-small .stat-value {
    font-size: 24px;
}

.stat-label {
    font-size: 13px;
    color: var(--secondary);
}

.stat-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    opacity: 0.7;
}

.stat-trend-up {
    color: #4ade80;
}

/* Jigsaw Hero Stats */
.jigsaw-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .jigsaw-hero-stats {
        grid-template-columns: 1fr;
    }
}

.jigsaw-stat-big {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(74, 222, 128, 0.04) 100%);
    border: 1px solid rgba(6, 182, 212, 0.15);
    transition: all 0.3s ease;
}

.jigsaw-stat-big:hover {
    transform: scale(1.02);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.1);
}

.jigsaw-stat-icon {
    font-size: 48px;
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.3));
}

.jigsaw-stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jigsaw-stat-value {
    font-size: 42px;
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #06b6d4 0%, #4ade80 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.jigsaw-stat-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.jigsaw-stat-sublabel {
    font-size: 13px;
    color: var(--secondary);
}

/* Current Puzzle Progress */
.current-puzzle-card {
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
}

.puzzle-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.puzzle-progress-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    display: block;
}

.puzzle-progress-percent {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #4ade80, #06b6d4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.puzzle-progress-bar {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.puzzle-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #06b6d4, #4ade80);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.puzzle-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.puzzle-progress-glow {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.2), rgba(74, 222, 128, 0.2));
    filter: blur(20px);
    pointer-events: none;
    opacity: 0.5;
}

.puzzle-progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--secondary);
    font-size: 14px;
}

.puzzle-join-btn {
    padding: 10px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4 0%, #4ade80 100%);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.puzzle-join-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

/* Jigsaw Leaderboard */
.jigsaw-leaderboard {
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-header {
    margin-bottom: 20px;
}

.leaderboard-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    text-align: left !important;
    display: block;
    text-align: left !important;
}

.leaderboard-subtitle {
    font-size: 13px;
    color: var(--secondary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.leaderboard-empty-icon {
    font-size: 40px;
    opacity: 0.5;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: scale(1.01);
    border-color: rgba(255, 255, 255, 0.06);
}

.leaderboard-top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 165, 0, 0.04) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.leaderboard-top-1:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.08) 100%);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
}

.leaderboard-top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.06) 0%, rgba(169, 169, 169, 0.03) 100%);
    border: 1px solid rgba(192, 192, 192, 0.15);
}

.leaderboard-top-2:hover {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(169, 169, 169, 0.06) 100%);
    border-color: rgba(192, 192, 192, 0.3);
    box-shadow: 0 8px 24px rgba(192, 192, 192, 0.15);
}

.leaderboard-top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.06) 0%, rgba(184, 115, 51, 0.03) 100%);
    border: 1px solid rgba(205, 127, 50, 0.15);
}

.leaderboard-top-3:hover {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(184, 115, 51, 0.06) 100%);
    border-color: rgba(205, 127, 50, 0.3);
    box-shadow: 0 8px 24px rgba(205, 127, 50, 0.15);
}

.leaderboard-rank {
    width: 40px;
    text-align: center;
}

.rank-badge {
    font-size: 20px;
}

.rank-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary);
}

.leaderboard-user {
    flex: 1;
    min-width: 0;
}

.leaderboard-username {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.leaderboard-score {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.leaderboard-pieces {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #06b6d4, #4ade80);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.leaderboard-pieces-label {
    font-size: 11px;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.chart-card-full {
    grid-column: 1 / -1;
}

@media (max-width: 800px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    padding: 24px;
    border-radius: 20px;
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.chart-header {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100%;
    display: block;
}

.chart-title span {
    font-size: 18px;
}

.chart-area {
    height: 250px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Legacy compatibility */
.stats-container {
    max-width: 1100px;
    margin: 0 auto;
}

.stats-grid:not(.stats-grid-4) {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.stats-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.3);
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card-icon {
    width: 76px;
    height: 56px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1;
    min-width: 0;
    flex: 1;
}

.stats-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--secondary);
    white-space: nowrap;
}

.stats-card-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-display);
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    word-break: break-word;
}

.stats-card-sublabel {
    font-size: 13px;
    color: var(--secondary);
    opacity: 0.7;
    margin-top: -2px;
}

@media (max-width: 1100px) {
    .stats-grid:not(.stats-grid-4) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid:not(.stats-grid-4) {
        grid-template-columns: 1fr;
    }

    .stats-card-value {
        font-size: 24px;
    }

    .stats-hero-title {
        font-size: 24px;
    }

    .jigsaw-stat-value {
        font-size: 32px;
    }

    .jigsaw-stat-icon {
        font-size: 36px;
    }

    .stats-page {
        padding: 0 12px;
    }

    .stats-section-container,
    .stats-section-container-alt,
    .stats-section-featured {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .stats-hero {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .jigsaw-stat-big {
        padding: 20px;
        gap: 16px;
    }

    .current-puzzle-card {
        padding: 18px 16px;
    }

    .jigsaw-leaderboard {
        padding: 18px 16px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-title {
        font-size: 18px;
    }

    .chart-card {
        padding: 18px 16px;
    }
}

@media (max-width: 480px) {
    .stats-page {
        padding: 0 8px;
    }

    .stats-section-container,
    .stats-section-container-alt,
    .stats-section-featured {
        padding: 16px 12px;
        border-radius: 12px;
    }

    .stats-hero {
        padding: 20px 16px;
        margin-bottom: 20px;
    }

    .stats-hero-title {
        font-size: 20px;
    }

    .stats-hero-subtitle {
        font-size: 14px;
    }

    .jigsaw-stat-big {
        padding: 16px;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }

    .jigsaw-stat-icon {
        font-size: 32px;
    }

    .jigsaw-stat-value {
        font-size: 28px;
    }

    .jigsaw-stat-label {
        font-size: 14px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stats-card-value {
        font-size: 20px;
    }

    .stats-card-icon {
        width: 56px;
        height: 44px;
        font-size: 22px;
    }

    .puzzle-progress-header h3 {
        font-size: 14px;
    }

    .puzzle-progress-percent {
        font-size: 20px;
    }

    .chart-area {
        height: 200px;
    }

    .leaderboard-item {
        padding: 12px 14px;
    }

    .leaderboard-pieces {
        font-size: 16px;
    }
}

/* === ENHANCED LEADERBOARD SECTION === */
.leaderboard-section-enhanced {
    margin-bottom: 40px;
}

.leaderboard-section-container {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 500px;
    background: linear-gradient(145deg,
            rgba(10, 15, 30, 0.95) 0%,
            rgba(15, 20, 40, 0.92) 50%,
            rgba(10, 15, 30, 0.95) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 92, 246, 0.1) inset,
        0 0 60px rgba(6, 182, 212, 0.08);
}

.stats-leaderboard-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.leaderboard-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(251, 191, 36, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    animation: overlayPulse 8s ease-in-out infinite;
}

@keyframes overlayPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.leaderboard-section-content {
    position: relative;
    z-index: 2;
    padding: 40px 32px;
}

.leaderboard-section-header {
    text-align: center;
    margin-bottom: 36px;
}

.leaderboard-section-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 900;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg,
            #fff 0%,
            #06b6d4 25%,
            #8b5cf6 50%,
            #fbbf24 75%,
            #fff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 6s ease-in-out infinite;
    text-shadow: 0 0 60px rgba(6, 182, 212, 0.5);
    letter-spacing: -1px;
}

@keyframes titleShimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.leaderboard-section-subtitle {
    display: block;
    font-size: 15px;
    color: var(--secondary);
    font-weight: 500;
    opacity: 0.9;
}

.cred-leaderboard-content {
    min-height: 100px;
}

.leaderboard-loading {
    text-align: center;
    padding: 60px 40px;
    color: var(--secondary);
    font-size: 15px;
}

/* === PREMIUM PODIUM === */
.cred-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    padding: 20px 0 40px;
    flex-wrap: wrap;
}

.cred-podium-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: podiumSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: hidden;
    width: 180px;
    /* Fixed width */
    min-width: 180px;
}

.cred-podium-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cred-podium-entry:hover::before {
    opacity: 1;
}

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

.cred-podium-entry:hover {
    transform: scale(1.08) translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.cred-podium-first {
    background: linear-gradient(145deg,
            rgba(251, 191, 36, 0.15) 0%,
            rgba(245, 158, 11, 0.08) 100%);
    border: 2px solid rgba(251, 191, 36, 0.4);
    box-shadow:
        0 12px 40px rgba(251, 191, 36, 0.25),
        0 0 80px rgba(251, 191, 36, 0.1);
    order: 2;
    padding: 32px 28px;
    animation-delay: 0.1s;
    width: 220px;
    /* Wider for 1st place */
    min-width: 220px;
}

.cred-podium-first:hover {
    box-shadow:
        0 25px 60px rgba(251, 191, 36, 0.35),
        0 0 100px rgba(251, 191, 36, 0.15);
}

.cred-podium-second {
    background: linear-gradient(145deg,
            rgba(192, 192, 192, 0.12) 0%,
            rgba(169, 169, 169, 0.06) 100%);
    border: 1px solid rgba(192, 192, 192, 0.3);
    box-shadow: 0 8px 30px rgba(192, 192, 192, 0.1);
    order: 1;
    animation-delay: 0.2s;
}

.cred-podium-third {
    background: linear-gradient(145deg,
            rgba(205, 127, 50, 0.12) 0%,
            rgba(184, 115, 51, 0.06) 100%);
    border: 1px solid rgba(205, 127, 50, 0.3);
    box-shadow: 0 8px 30px rgba(205, 127, 50, 0.1);
    order: 3;
    animation-delay: 0.3s;
}

.cred-podium-medal {
    font-size: 36px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    animation: medalFloat 3s ease-in-out infinite;
}

@keyframes medalFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-6px) rotate(3deg);
    }
}

.cred-podium-first .cred-podium-medal {
    font-size: 48px;
    filter: drop-shadow(0 6px 16px rgba(251, 191, 36, 0.5));
}

.cred-podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 3px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.cred-podium-entry:hover .cred-podium-avatar {
    transform: scale(1.1);
    border-color: rgba(6, 182, 212, 0.5);
}

.cred-podium-first .cred-podium-avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
    background: linear-gradient(145deg, #f59e0b, #fbbf24);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 0 30px rgba(251, 191, 36, 0.4),
        0 0 60px rgba(251, 191, 36, 0.2);
    animation: championPulse 2s ease-in-out infinite;
}

@keyframes championPulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.4), 0 0 60px rgba(251, 191, 36, 0.2);
    }

    50% {
        box-shadow: 0 0 50px rgba(251, 191, 36, 0.6), 0 0 80px rgba(251, 191, 36, 0.3);
    }
}

.cred-podium-name {
    font-weight: 700;
    font-size: 14px;
    /* Smaller */
    color: #fff;
    margin-bottom: 8px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    /* Fade out effect */
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.cred-podium-first .cred-podium-name {
    font-size: 16px;
    /* Smaller */
}

.cred-podium-score {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 800;
    color: #4ade80;
    transition: all 0.3s ease;
}

.cred-podium-entry:hover .cred-podium-score {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    transform: scale(1.05);
}

.cred-podium-first .cred-podium-score {
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.cred-icon {
    font-size: 16px;
}

/* === PREMIUM LIST === */
.cred-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 8px;
}

.cred-list-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: listSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: translateX(-20px);
    position: relative;
    overflow: hidden;
}

.cred-list-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #06b6d4, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s;
}

.cred-list-entry:hover::before {
    opacity: 1;
}

@keyframes listSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cred-list-entry:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.cred-rank {
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--secondary);
    width: 36px;
    text-align: center;
    transition: all 0.3s ease;
}

.cred-list-entry:hover .cred-rank {
    color: #06b6d4;
    transform: scale(1.15);
}

.cred-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    transition: all 0.3s ease;
}

.cred-list-entry:hover .cred-avatar-small {
    transform: scale(1.1) rotate(-5deg);
    border-color: rgba(6, 182, 212, 0.4);
}

.cred-username {
    flex: 1;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    transition: all 0.3s ease;
}

.cred-list-entry:hover .cred-username {
    color: #fff;
    transform: translateX(4px);
}

.cred-score-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #4ade80;
    transition: all 0.3s ease;
}

.cred-list-entry:hover .cred-score-pill {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.3);
    transform: scale(1.05);
}

.empty-icon {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .leaderboard-section-container {
        border-radius: 20px;
        min-height: 400px;
    }

    .leaderboard-section-content {
        padding: 28px 20px;
    }

    .leaderboard-section-title {
        font-size: 32px;
    }

    .cred-podium {
        gap: 14px;
        padding: 16px 0 30px;
    }

    .cred-podium-entry {
        padding: 18px 16px;
    }

    .cred-podium-first {
        padding: 24px 20px;
    }

    .cred-podium-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .cred-podium-first .cred-podium-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .cred-podium-medal {
        font-size: 28px;
    }

    .cred-podium-first .cred-podium-medal {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    .leaderboard-section-container {
        border-radius: 16px;
    }

    .leaderboard-section-content {
        padding: 24px 16px;
    }

    .leaderboard-section-title {
        font-size: 28px;
    }

    .cred-podium {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .cred-podium-entry {
        order: unset !important;
        width: 100%;
        max-width: 220px;
    }

    .cred-podium-first {
        margin-bottom: 8px;
    }

    .cred-list-entry {
        padding: 14px 16px;
        gap: 12px;
    }

    .cred-avatar-small {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .cred-username {
        font-size: 14px;
    }

    .cred-score-pill {
        padding: 6px 12px;
        font-size: 13px;
    }
}