:root {

    --bg: #07111f;

    --panel: rgba(255,255,255,.06);

    --panel-border: rgba(255,255,255,.12);

    --text: #f4f7fb;

    --text-muted: #a8b3c7;

    --cyan: #00d4ff;

    --green: #00d26a;

    --gold: #f4c542;

    --silver: #d1d5db;

    --bronze: #c97842;

    --danger: #ff5f7a;

    --shadow:
        0 20px 40px rgba(0,0,0,.30);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {

    min-height: 100%;

    background: var(--bg);

    color: var(--text);

    font-family:
        "Segoe UI",
        system-ui,
        sans-serif;
}

body {
    padding: 25px;
}

/*
--------------------------------------------------
BACKGROUND
--------------------------------------------------
*/

.background {

    position: fixed;

    inset: 0;

    z-index: -1;

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(0,212,255,.15),
            transparent 25%
        ),

        radial-gradient(
            circle at 90% 10%,
            rgba(244,197,66,.10),
            transparent 20%
        ),

        radial-gradient(
            circle at 85% 90%,
            rgba(0,210,106,.12),
            transparent 25%
        );
}

/*
--------------------------------------------------
HEADER
--------------------------------------------------
*/

.hero {

    margin-bottom: 30px;
}

.hero-content {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    flex-wrap: wrap;
}

.title-block h1 {

    font-size: clamp(2rem,5vw,4rem);

    margin-bottom: 8px;
}

.title-block p {

    color: var(--text-muted);

    font-size: 1rem;
}

.status-box {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 16px;

    border-radius: 50px;

    background: var(--panel);

    border: 1px solid var(--panel-border);

    backdrop-filter: blur(20px);
}

.status-dot {

    width: 12px;
    height: 12px;

    background: var(--green);

    border-radius: 50%;

    box-shadow:
        0 0 10px var(--green);
}

/*
--------------------------------------------------
KPI GRID
--------------------------------------------------
*/

.kpi-grid {

    display: grid;

    gap: 20px;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px,1fr)
        );

    margin-bottom: 35px;
}

.kpi-card {

    background: var(--panel);

    border: 1px solid var(--panel-border);

    border-radius: 24px;

    backdrop-filter: blur(18px);

    padding: 25px;

    text-align: center;

    box-shadow: var(--shadow);

    transition:
        transform .2s,
        border-color .2s;
}

.kpi-card:hover {

    transform: translateY(-4px);

    border-color: var(--cyan);
}

.kpi-icon {

    font-size: 2rem;

    margin-bottom: 12px;
}

.kpi-value {

    font-size: 2.8rem;

    font-weight: 700;

    margin-bottom: 8px;
}

.kpi-label {

    color: var(--text-muted);
}

/*
--------------------------------------------------
PANELS
--------------------------------------------------
*/

.glass-panel {

    background: var(--panel);

    border: 1px solid var(--panel-border);

    border-radius: 24px;

    backdrop-filter: blur(18px);

    padding: 24px;

    margin-bottom: 25px;

    box-shadow: var(--shadow);
}

.panel-header {

    margin-bottom: 20px;
}

.panel-header h2 {

    font-size: 1.4rem;
}

/*
--------------------------------------------------
CHARTS
--------------------------------------------------
*/

.chart-grid {

    display: grid;

    gap: 25px;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(420px,1fr)
        );
}

.chart-panel {

    min-height: 500px;
}

canvas {

    width: 100% !important;

    max-width: 100%;

    min-height: 420px;
}

/*
--------------------------------------------------
PODIUM
--------------------------------------------------
*/

.podium {

    display: flex;

    justify-content: center;

    align-items: flex-end;

    gap: 20px;

    min-height: 280px;

    margin-top: 20px;
}

.podium-place {

    width: 180px;

    border-radius: 20px;

    padding: 20px;

    text-align: center;

    font-weight: 600;

    box-shadow: var(--shadow);
}

.place-first {

    min-height: 220px;

    background:
        linear-gradient(
            180deg,
            var(--gold),
            #a57b00
        );

    color: black;
}

.place-second {

    min-height: 170px;

    background:
        linear-gradient(
            180deg,
            var(--silver),
            #97a0ad
        );

    color: black;
}

.place-third {

    min-height: 130px;

    background:
        linear-gradient(
            180deg,
            var(--bronze),
            #8c4f27
        );
}

.podium-rank {

    font-size: 2rem;

    margin-bottom: 10px;
}

.podium-player {

    font-size: 1.2rem;

    margin-bottom: 10px;
}

.podium-value {

    font-size: 2rem;
}

/*
--------------------------------------------------
PLAYER SELECTOR
--------------------------------------------------
*/

.player-selector {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;

    margin-bottom: 25px;
}

.player-selector label {

    padding: 10px 14px;

    border-radius: 50px;

    background: rgba(255,255,255,.07);

    cursor: pointer;

    transition: .2s;
}

.player-selector label:hover {

    background:
        rgba(0,212,255,.15);
}

.player-selector input {

    margin-right: 8px;
}

/*
--------------------------------------------------
TABLE
--------------------------------------------------
*/

.table-wrapper {

    overflow-x: auto;
}

table {

    width: 100%;

    border-collapse: collapse;
}

thead {

    background:
        rgba(255,255,255,.07);
}

th,
td {

    padding: 14px;

    text-align: center;
}

tbody tr {

    border-top:
        1px solid rgba(255,255,255,.08);
}

tbody tr:hover {

    background:
        rgba(255,255,255,.04);
}

th {

    color: var(--cyan);

    font-weight: 600;
}

/*
--------------------------------------------------
MISC
--------------------------------------------------
*/

.section-description {

    color: var(--text-muted);

    margin-bottom: 15px;
}

.loading-placeholder {

    color: var(--text-muted);
}

.footer-content {

    margin-top: 40px;

    text-align: center;

    color: var(--text-muted);

    display: flex;

    flex-direction: column;

    gap: 6px;
}

/*
--------------------------------------------------
RESPONSIVE
--------------------------------------------------
*/

@media (max-width: 900px) {

    .chart-grid {

        grid-template-columns: 1fr;
    }

    .podium {

        flex-direction: column;

        align-items: center;
    }

    .podium-place {

        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 600px) {

    body {
        padding: 12px;
    }

    .kpi-value {
        font-size: 2rem;
    }

    canvas {
        min-height: 320px;
    }

    .glass-panel {
        padding: 18px;
    }
}