:root {
    --bg: #0f1117;
    --panel: #181c26;
    --panel-2: #202535;
    --line: #262b3a;
    --text: #ffffff;
    --muted: #b8bdd0;
    --primary: #7c3cff;
    --wishes: #ffd84d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

.wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 52px;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    font-size: 18px;
}

.nav,
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a,
.tabs a,
.filters button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--panel-2);
    font-weight: 700;
    cursor: pointer;
}

.nav a.active,
.tabs a.active,
.filters button {
    background: var(--primary);
}

.hero { margin-bottom: 20px; }

h1 {
    margin: 0 0 8px;
    font-size: clamp(38px, 6vw, 68px);
}

.hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.tabs {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    margin-bottom: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.filters input {
    min-height: 42px;
    min-width: min(320px, 100%);
    color: var(--text);
    background: #0f1117;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 12px;
    outline: none;
}

.ranking {
    display: grid;
    gap: 8px;
}

.rank-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 170px;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.rank-pos {
    color: var(--wishes);
    font-weight: 900;
}

.rank-user strong,
.rank-user span {
    display: block;
}

.rank-user span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.rank-score {
    text-align: right;
    color: var(--wishes);
    font-weight: 900;
}

.empty {
    padding: 32px;
    color: var(--muted);
    background: var(--panel);
    border: 1px dashed var(--line);
    border-radius: 16px;
}

.empty h2 {
    margin: 0 0 8px;
    color: var(--text);
}

.empty p {
    margin: 0;
}

@media (max-width: 680px) {
    .top,
    .rank-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rank-score {
        text-align: left;
    }
}
