@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

.scene {
    position: relative;
    min-height: 100vh;
    padding: 140px 40px 80px;
    background: 
        radial-gradient(ellipse at 50% 20%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
        url('../images/Black_Space.png') center / cover no-repeat fixed;
    color: #f5f5f5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 0;
}

.scene::before {
    content:"";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(255, 215, 0, 0.03) 49px, rgba(255, 215, 0, 0.03) 50px),
        repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(255, 215, 0, 0.03) 49px, rgba(255, 215, 0, 0.03) 50px);
    opacity: 0.4;
}

.scene::after {
    content:"";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.leaderboard-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.header-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffd700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.15em;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    margin-bottom: 10px;
}

.header-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.05em;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(8, 10, 14, 0.85);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.stat-card:hover {
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: #ffd700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.leaderboard-table-wrapper {
    background: rgba(8, 10, 14, 0.9);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    overflow-x: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 215, 0, 0.15);
    margin-bottom: 30px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Rajdhani', sans-serif;
}

.leaderboard-table thead th {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.rank-col {
    width: 80px;
    text-align: center !important;
}

.score-col,
.credits-col,
.missions-col,
.achievements-col {
    text-align: center !important;
}

.player-row {
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.player-row:hover {
    background: rgba(255, 215, 0, 0.05);
    transform: scale(1.01);
}

.player-row.top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
}

.player-row.top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, rgba(192, 192, 192, 0.05) 100%);
}

.player-row.top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, rgba(205, 127, 50, 0.05) 100%);
}

.player-row.current-user {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 255, 255, 0.03) 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.player-row td {
    padding: 16px 12px;
    color: rgba(255, 255, 255, 0.85);
}

.rank-cell {
    text-align: center;
}

.rank-badge {
    font-size: 1.8rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

.rank-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Orbitron', sans-serif;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.player-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.you-badge {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.5);
    color: #00ffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.score-value,
.credits-value,
.missions-value,
.achievements-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffd700;
    font-family: 'Orbitron', sans-serif;
}

.score-cell,
.credits-cell,
.missions-cell,
.achievements-cell {
    text-align: center;
}

.no-data {
    padding: 60px 20px !important;
    text-align: center;
}

.no-data-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.no-data-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
}

.no-data-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.no-data-sub {
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.leaderboard-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Rajdhani', sans-serif;
}

.update-info {
    font-size: 0.9rem;
    color: #ffd700;
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-note {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .scene {
        padding: 120px 20px 60px;
    }

    .header-title {
        font-size: 1.8rem;
    }

    .header-icon {
        font-size: 3rem;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }

    .leaderboard-table-wrapper {
        padding: 10px;
    }

    .leaderboard-table {
        font-size: 0.85rem;
    }

    .player-row td {
        padding: 12px 8px;
    }

    .player-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .missions-col,
    .achievements-col {
        display: none;
    }
}
