:root {
    --bg: #0f1118;
    --text: #f5f6fb;
    --muted: #b7bbcc;
    --panel: rgba(20, 24, 36, 0.82);
    --panel-strong: rgba(20, 24, 36, 0.95);
    --border: rgba(255, 255, 255, 0.12);
    --accent: #ffb84a;
    --accent-2: #ffe3a8;
    --pal-green: #6bc78f;
    --pal-green-soft: rgba(107, 199, 143, 0.14);
    --pal-red: #ff7a54;
    --pal-red-soft: rgba(255, 122, 84, 0.14);
    --font-display: "Cinzel", Georgia, "Times New Roman", serif;
    --font-body: "JetBrains Mono", ui-monospace, monospace, "Segoe UI", Inter, system-ui, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html,
body {
    min-height: 100%;
}

body.site-body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--text);
    background:
        /* radial-gradient(1000px 420px at 10% -20%, rgba(255, 184, 74, 0.16), transparent 55%), */
        /* radial-gradient(700px 320px at 100% 0%, rgba(95, 118, 255, 0.14), transparent 50%), */
        linear-gradient(rgba(15, 18, 24, 0.5), rgba(15, 18, 24, 0.5)),
        url('/assets/bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    font-family: var(--font-body);
}

body.site-body>div.container {
    flex: 1 0 auto;
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

a {
    color: var(--accent-2);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

.server-nav {
    background: rgba(10, 12, 18, 0.78);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.server-brand {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.nav-link {
    color: #dce2ef;
    font-weight: 500;
}

.nav-link:hover {
    color: #fff;
}

.nav-discord-link {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 0.9rem !important;
}

/* ---------- hero ---------- */

.hero {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.hero-section {
    margin-bottom: 2.5rem;
}

.hero-surface,
.panel-card {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* carved corner notches — the one signature flourish, used sparingly */
.hero-surface::before,
.hero-surface::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent-2);
    opacity: 0.55;
}

.hero-surface::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.hero-surface::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.hero-surface {
    padding: 3rem 2.5rem;
}

.hero-kicker {
    margin: 0 0 0.9rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-2);
}

.hero-title {
    margin: 0 0 1.1rem;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.08;
}

.hero-description {
    margin: 0;
    color: var(--muted);
    max-width: 620px;
    line-height: 1.65;
}

.hero-actions {
    margin-top: 1.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.btn-cta,
.btn-soft {
    border-radius: 3px;
    padding: 0.7rem 1.5rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent), #ffcf77);
    color: #24190b;
    border: 1px solid #ffcf77;
}

.btn-cta:hover {
    color: #24190b;
    filter: brightness(1.04);
}

.btn-soft {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
}

.btn-soft:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-2);
}

.content-section {
    margin-bottom: 2rem;
}

.panel-card {
    padding: 1.75rem;
}

.section-title {
    margin: 0 0 0.9rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.info-label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.info-value {
    margin: 0.3rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.panel-text {
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- status badge ---------- */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1.35rem;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: var(--panel-strong);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.badge-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-status.online {
    color: var(--pal-green);
    background: var(--pal-green-soft);
    border-color: var(--pal-green);
}

.badge-status.online::before {
    background: var(--pal-green);
    box-shadow: 0 0 0 4px var(--pal-green-soft);
}

.badge-status.offline {
    color: var(--pal-red);
    background: var(--pal-red-soft);
    border-color: var(--pal-red);
}

.badge-status.offline::before {
    background: var(--pal-red);
    box-shadow: 0 0 0 4px var(--pal-red-soft);
}

.badge-status.loading {
    color: var(--muted);
}

.badge-status.loading::before {
    background: var(--muted);
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.player-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 8px;
    z-index: 100;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.6rem 0.4rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.player-tooltip ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.player-tooltip li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 3px;
    font-size: 0.82rem;
}

.player-tooltip li:hover {
    background: rgba(232, 176, 75, 0.08);
}

.player-tooltip .name {
    color: var(--text);
    font-weight: 600;
}

.player-tooltip .level {
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.player-tooltip .empty {
    display: block;
    padding: 0.5rem 0.6rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.status-wrapper {
    position: relative;
    display: inline-block;
}

.status-wrapper:hover .player-tooltip {
    display: block;
}

/* ---------- status row + IP box, grouped into one bar ---------- */

.status-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.connect-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
}

.status-slot {
    display: flex;
    align-items: center;
}

.connect-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border);
}

/* inside the grouped bar the badge sheds its own box so both halves read as one unit */
.connect-bar .badge-status {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.connect-bar .badge-status::before {
    box-shadow: 0 0 0 4px currentColor;
    opacity: 0.18;
}

.connect-slot {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-ip-row {
    display: flex;
}

.ip-box {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: color 0.15s ease;
}

.ip-box:hover {
    color: var(--accent-2);
}

.ip-box code {
    color: var(--text);
    font-family: inherit;
}

.ip-box-hint {
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ip-box.copied code,
.ip-box.copied .ip-box-hint {
    color: var(--pal-green);
}

@media (max-width: 575.98px) {
    .connect-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .connect-divider {
        width: 100%;
        height: 1px;
    }
}

/* ---------- leaderboard ---------- */

.leaderboard {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.leaderboard thead th {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
}

.leaderboard thead th:first-child,
.leaderboard thead th:nth-child(2) {
    text-align: left;
}

.leaderboard thead th:nth-child(n+3) {
    text-align: right;
}

.leaderboard tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.12s ease;
}

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

.leaderboard tbody tr:hover {
    background: rgba(232, 176, 75, 0.05);
}

.leaderboard td {
    padding: 1rem 1.4rem;
    font-size: 0.92rem;
}

.leaderboard td.rank {
    text-align: left;
    font-family: var(--font-mono);
    font-weight: 700;
    width: 3.5rem;
    color: var(--text);
}

.leaderboard tbody tr:first-child td.rank {
    color: var(--accent-2);
}

.leaderboard td.user {
    font-weight: 700;
}

.leaderboard td.kills,
.leaderboard td.deaths {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    text-align: right;
    width: 5rem;
    color: var(--muted);
}

.leaderboard td.kills {
    color: var(--pal-green);
    font-weight: 700;
}

.leaderboard td.deaths {
    color: var(--pal-red);
}

.leaderboard td.playtime {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--muted);
}

span.leaderboard {
    display: block;
    text-align: center;
    padding: 2rem;
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.leaderboard .rank {
    text-align: left;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.leaderboard .rank::before {
    content: attr(data-rank);
}

.leaderboard .rank[data-rank="1"]::before {
    content: "🥇";
}

.leaderboard .rank[data-rank="2"]::before {
    content: "🥈";
}

.leaderboard .rank[data-rank="3"]::before {
    content: "🥉";
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.leaderboard-panel {
    min-width: 0;
}

.leaderboard-title {
    margin: 0 0 0.9rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.leaderboard-title::before {
    content: "";
    width: 3px;
    height: 1.1em;
    background: var(--accent);
    display: inline-block;
    border-radius: 2px;
}

@media (max-width: 767.98px) {
    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
}

.leaderboard-updated.flash::before {
    animation: pulse 0.6s ease-out;
}

/* ---------- last updated ---------- */

.leaderboard-updated {
    margin: 0 0 0.9rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: default;
}

.leaderboard-updated::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pal-green);
    box-shadow: 0 0 0 3px var(--pal-green-soft);
    flex-shrink: 0;
}

.leaderboard-updated-text {
    color: var(--text);
    font-weight: 600;
}

/* ---------- rules page ---------- */

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

.rules-card:hover {
    border-color: var(--accent-2);
    transition: border-color 0.2s ease;
}

.rules-icon {
    font-size: 1.1rem;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rules-list li {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    padding-left: 1.1rem;
    position: relative;
}

.rules-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-2);
}

.rules-footer-note {
    margin-top: 2rem;
    text-align: center;
}

/* ---------- footer ---------- */

.site-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 3rem;
    text-align: center;
}

.footer-content p {
    margin: 0;
    color: var(--muted);
    text-align: center;
    font-size: 0.85rem;
}

/* ---------- responsive ---------- */

@media (max-width: 767.98px) {
    body.site-body>div.container {
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .hero {
        gap: 1.25rem;
    }

    .hero-surface {
        padding: 2rem 1.4rem;
    }

    .leaderboard td,
    .leaderboard thead th {
        padding: 0.8rem 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
/* ---------- leaderboard scroll wrapper ---------- */

.leaderboard-scroll {
    max-height: 34rem;
    /* Header (~48px) + 10 Zeilen (~52px) ≈ 568px */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.06);
}

.leaderboard-scroll .leaderboard {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.leaderboard-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 12, 18, 0.96);
}

.leaderboard-scroll::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    opacity: 0.6;
}

.leaderboard-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

/* ---------- mobile refinements ---------- */

@media (max-width: 575.98px) {
    .leaderboard-scroll {
        max-height: 26rem;
        border-radius: 3px;
    }

    .leaderboard-title {
        font-size: 1.05rem;
    }

    .leaderboard-grid {
        gap: 1rem;
    }

    /* stack the table into cards instead of scrolling horizontally */
    .leaderboard thead {
        position: sticky;
        top: 0;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        width: 1px;
        overflow: hidden;
        white-space: nowrap;
        /* visually hidden but still readable by screen readers */
    }

    .leaderboard,
    .leaderboard tbody,
    .leaderboard tr,
    .leaderboard td {
        display: block;
        width: 100%;
    }

    .leaderboard tr {
        padding: 0.85rem 0.9rem;
        border-bottom: 1px solid var(--border);
        position: relative;
    }

    .leaderboard td {
        border: none;
        width: auto;
        text-align: left !important;
        padding: 0.15rem 0;
        font-size: 0.88rem;
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .leaderboard td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--muted);
        font-family: var(--font-body);
        flex-shrink: 0;
    }

    .leaderboard td.rank {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text);
    }

    .leaderboard td.rank::before {
        content: none;
        /* rank shown inline via ::before content: attr(data-rank), no label needed */
    }

    .leaderboard td.user {
        font-size: 1rem;
        font-weight: 700;
    }

    .leaderboard td.user::before {
        content: none;
    }

    .leaderboard tbody tr:first-child td.rank {
        color: var(--accent-2);
    }
}
