:root {
    --bg: #050816;
    --bg-accent: #0f1f3d;
    --panel: rgba(7, 14, 29, 0.84);
    --panel-soft: rgba(14, 28, 55, 0.72);
    --line: rgba(122, 210, 255, 0.3);
    --text: #f3f7ff;
    --muted: #a7bedc;
    --accent: #71e0ff;
    --accent-strong: #ffd166;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(57, 88, 154, 0.34), transparent 30%),
        radial-gradient(circle at 20% 20%, rgba(113, 224, 255, 0.14), transparent 18%),
        linear-gradient(180deg, #091226 0%, var(--bg) 55%, #03050c 100%);
}

.site-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.hero,
.catalog {
    width: min(1040px, 100%);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(8, 18, 37, 0.88), rgba(4, 8, 18, 0.94));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hero {
    padding: 88px 64px;
    text-align: center;
}

.hero-maintenance {
    max-width: 760px;
}

.catalog {
    padding: 48px;
}

.catalog-home {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.catalog-home-header {
    margin-bottom: 0;
}

.home-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-heading h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4.6vw, 3rem);
}

.section-heading p:last-child,
.catalog-header p,
.game-card p,
.leaderboard-state {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.eyebrow,
.game-tag {
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.8rem;
    color: var(--accent);
}

h1,
h2,
p {
    margin-top: 0;
}

.hero h1,
.catalog h1 {
    margin-bottom: 18px;
    font-size: clamp(2.8rem, 7vw, 5.4rem);
    line-height: 0.95;
}

.hero-actions,
.card-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 36px;
}

.hero-actions-left,
.card-actions-left {
    justify-content: flex-start;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 14px 22px;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, #1f6fff, #61d4ff);
    border-color: rgba(255, 255, 255, 0.24);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.06);
}

.catalog-header {
    margin-bottom: 36px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.game-card,
.leaderboard-panel {
    padding: 28px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.game-card h2 {
    margin-bottom: 14px;
    font-size: 2rem;
}

.game-card-muted {
    opacity: 0.82;
}

.leaderboard-page {
    gap: 28px;
}

.leaderboard-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-scroll-shell {
    min-height: 0;
}

.leaderboard-scroll {
    max-height: min(64vh, 820px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
}

.leaderboard-head,
.leaderboard-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 80px 110px;
    gap: 14px;
    align-items: center;
}

.leaderboard-head {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

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

.leaderboard-state {
    padding: 18px 0 10px;
}

.leaderboard-row {
    padding: 14px 0;
    border-bottom: 1px solid rgba(122, 210, 255, 0.12);
}

.leaderboard-row span:nth-child(2) {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .site-shell {
        padding: 24px 12px;
    }

    .hero {
        padding: 52px 20px;
    }

    .catalog {
        padding: 22px 16px;
    }

    .hero-actions,
    .card-actions {
        gap: 12px;
        margin-top: 24px;
    }

    .button {
        width: 100%;
        min-width: 0;
    }

    .hero-actions-left,
    .card-actions-left {
        justify-content: center;
    }

    .leaderboard-panel,
    .game-card {
        padding: 18px;
    }

    .leaderboard-scroll {
        max-height: 58vh;
        padding-right: 2px;
    }

    .leaderboard-head,
    .leaderboard-row {
        grid-template-columns: 48px minmax(0, 1fr) 52px 64px;
        gap: 6px;
        font-size: 0.86rem;
    }

    .leaderboard-head {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }
}
