@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&display=swap');

:root {
    --primary-blue: #0e7eff;
    --secondary-blue: #2c8fff;
    --accent-blue: #469cff;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue), var(--accent-blue));
    --gradient-hover: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue), var(--primary-blue));
    --electric-blue: #00ffcc;
    --electric-blue-light: #33ffe6;
    --electric-blue-dark: #00cc99;
    --dark-surface: rgba(10, 10, 10, 0.8);
    --card-bg: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.1);
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --roundy-font: 'Quicksand', 'Inter', 'Segoe UI', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--roundy-font);
    background: #0a0a12;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--text-white);
    line-height: 1.6;
}

body::before, body::after, .bg-glass-circle1, .bg-glass-circle2, .bg-glass-circle3 {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(18px) saturate(1.5) brightness(1.2);
    opacity: 0.32;
    mix-blend-mode: lighten;
    animation-timing-function: ease-in-out;
}
.bg-glass-circle1 {
    width: 420px; height: 420px;
    left: 5vw; top: 10vh;
    background: linear-gradient(120deg, #007fffcc 60%, #33aaff99 100%);
    animation: float1 18s infinite alternate;
}
.bg-glass-circle2 {
    width: 320px; height: 320px;
    right: 8vw; top: 40vh;
    background: linear-gradient(120deg, #33aaffcc 60%, #007fff99 100%);
    animation: float2 22s infinite alternate;
}
.bg-glass-circle3 {
    width: 260px; height: 260px;
    left: 40vw; bottom: 5vh;
    background: linear-gradient(120deg, #0055aa99 60%, #33aaffcc 100%);
    animation: float3 26s infinite alternate;
}
@keyframes float1 {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.08); }
}
@keyframes float2 {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(60px) scale(1.12); }
}
@keyframes float3 {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.05); }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(14, 126, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
    align-items: center;
}

.nav-link {
    color: #33aaff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.08rem;
    padding: 0.38rem 1.1rem;
    border-radius: 8px;
    background: rgba(30, 40, 60, 0.7);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px #007fff11;
    border: 1.5px solid transparent;
    width: auto;
    justify-content: center;
}
.nav-link:hover, .nav-link.active {
    background: #007fff;
    color: #fff;
    box-shadow: 0 4px 24px #33aaff33;
    border: 1.5px solid #33aaff;
}

.stat-selector {
    position: relative;
    min-width: 180px;
    z-index: 2;
}

.stat-selector select {
    width: 100%;
    padding: 0.6rem 2.2rem 0.6rem 1.1rem;
    border-radius: 10px;
    border: 2px solid #33aaff;
    background: linear-gradient(90deg, #0a0a12 0%, #181a20 100%);
    color: #fff;
    font-size: 1.13rem;
    font-weight: 700;
    appearance: none;
    outline: none;
    box-shadow: 0 0 16px 2px #007fff33, 0 2px 8px #00336622;
    transition: border 0.2s, box-shadow 0.2s;
}

.stat-selector select:focus {
    border: 2px solid #33aaff;
    box-shadow: 0 0 24px 4px #33aaff55;
}

.stat-selector select,
.stat-selector select option {
    background-color: #181a20 !important;
    color: #fff !important;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #33aaff;
    pointer-events: none;
    font-size: 1.2rem;
}

.leaderboard-container {
    max-width: 1100px;
    margin: 2.5rem auto 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.leaderboard-card {
    width: 100%;
    max-width: 1100px;
    background: rgba(20, 30, 50, 0.55);
    border-radius: 22px 22px 18px 18px;
    box-shadow: 0 2px 32px 0 #007fff22, 0 1.5px 0 #003366;
    margin-bottom: 2rem;
    overflow: visible;
    padding: 0 0 1.5rem 0;
    z-index: 2;
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.leaderboard-table th {
    background: linear-gradient(90deg, #007fff 0%, #33aaff 100%);
    color: #fff;
    font-weight: 800;
    padding: 1.2rem 1.2rem;
    text-align: left;
    border-bottom: 2px solid #33aaff;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.leaderboard-table th.rank-col {
    border-top-left-radius: 22px;
}

.leaderboard-table th.value-col {
    border-top-right-radius: 22px;
}

.leaderboard-table td {
    background: rgba(20, 30, 50, 0.45);
    color: var(--text-primary);
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 1.05rem;
    backdrop-filter: blur(8px) saturate(1.1);
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.rank-cell {
    text-align: center;
    font-weight: bold;
    width: 80px;
    font-size: 1.1rem;
}

.player-cell {
    width: 260px;
}

.value-cell {
    text-align: left;
    font-weight: 700;
    color: #33aaff;
    width: 140px;
    font-size: 1.1rem;
    padding-left: 2.5rem !important;
}

.leaderboard-row {
    transition: background 0.18s;
}

.leaderboard-row:hover {
    background: rgba(0,127,255,0.10);
}

.leaderboard-row:hover .player-avatar img {
    border-color: var(--electric-blue);
}

.rank-icon {
    font-size: 1.5rem;
    vertical-align: middle;
}

.rank-icon.gold { color: var(--gold); }
.rank-icon.silver { color: var(--silver); }
.rank-icon.bronze { color: var(--bronze); }

.player-info {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.player-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: #222;
    transition: border-color 0.2s;
}
.leaderboard-row:hover .player-avatar img,
.player-avatar img:hover {
    border-color: #33aaff !important;
}

.player-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.2rem;
}

.player-name {
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
    font-size: 1.08rem;
}

.player-name:hover {
    color: #33aaff !important;
}

.player-actions {
    margin-top: 0.2rem;
}

.view-profile-btn {
    background: none;
    color: #33aaff;
    border: none;
    border-radius: 7px;
    padding: 0.38rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: none;
    text-decoration: none;
}

.view-profile-btn:hover {
    color: #fff;
    text-decoration: underline;
}

.no-data-cell {
    text-align: center;
    padding: 2.5rem 0;
}

.no-data-message {
    color: var(--text-secondary);
}

.no-data-message h3 {
    color: var(--electric-blue);
    margin: 0.5rem 0 0.2rem 0;
    font-size: 1.3rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    background: rgba(20, 30, 50, 0.7);
    color: #33aaff;
    border: none;
    border-radius: 7px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: none;
}

.pagination-btn:hover {
    background: #007fff;
    color: #fff;
}

.page-info {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 500;
}

.page-limit-info {
    color: #33aaff;
    font-size: 0.98rem;
    margin-left: 0.7rem;
}

.footer {
    background: rgba(20, 30, 50, 0.7);
    border-top: 1px solid var(--border-color);
    padding: 1.2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.98rem;
    margin-top: 2rem;
    width: 100vw;
    box-shadow: 0 -2px 24px #007fff11;
    position: relative;
    z-index: 3;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}
.footer-link {
    color: #33aaff !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #007fff !important;
}

.header-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    z-index: 2;
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
    padding-top: 3.5rem;
}
.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0090ff;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    text-shadow: 0 2px 16px #007fff44, 0 1px 0 #003366;
    flex: 1 1 auto;
    justify-content: flex-start;
}
.stat-selector {
    min-width: 180px;
    margin-left: auto;
}
@media (max-width: 700px) {
    .header-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        padding-top: 2.2rem;
    }
    .page-title {
        font-size: 1.3rem;
        justify-content: flex-start;
    }
    .stat-selector {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 1300px) {
    .leaderboard-container, .leaderboard-card {
        max-width: 100vw;
        min-width: 0;
    }
    .leaderboard-table {
        min-width: 600px;
    }
}

@media (max-width: 1100px) {
    .leaderboard-container, .leaderboard-card {
        max-width: 98vw;
    }
    .leaderboard-table {
        min-width: 400px;
    }
}

@media (max-width: 900px) {
    .leaderboard-container, .leaderboard-card {
        max-width: 100vw;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .leaderboard-table {
        min-width: 400px;
    }
    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 700px) {
    .main-content {
        padding: 0 0.2rem 2rem 0.2rem;
    }
    .leaderboard-container, .leaderboard-card {
        max-width: 100vw;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .table-container {
        min-width: 0;
        width: 100vw;
        padding: 0;
    }
    .leaderboard-table {
        min-width: 0;
        width: 100%;
        font-size: 0.98rem;
    }
    .leaderboard-table th, .leaderboard-table td {
        padding: 0.7rem 0.5rem;
        font-size: 0.98rem;
    }
    .player-avatar img {
        width: 32px;
        height: 32px;
    }
    .player-cell {
        width: 100px;
    }
    .value-cell {
        width: 60px;
        padding-left: 0.7rem !important;
    }
    .stat-selector {
        width: 100%;
        min-width: 0;
        margin-top: 0.7rem;
    }
    .stat-selector select {
        font-size: 1rem;
        padding: 0.5rem 2rem 0.5rem 0.7rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .footer {
        font-size: 0.92rem;
        padding: 0.7rem 0;
    }
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}
