:root {
    color-scheme: dark;
    --bg: #080b0d;
    --bg-deep: #050708;
    --surface: rgba(17, 21, 24, .94);
    --surface-solid: #111518;
    --surface-raised: #171c20;
    --surface-soft: #1c2227;
    --text: #f4efe5;
    --text-soft: #d8d3c8;
    --muted: #aaa89f;
    --muted-strong: #c1beb4;
    --gold: #d5a84a;
    --gold-bright: #ffc95c;
    --gold-dark: #8b6528;
    --copper: #9a4d2a;
    --red: #a33b31;
    --green: #6ed184;
    --border: rgba(221, 177, 83, .22);
    --border-soft: rgba(255, 255, 255, .09);
    --shadow: 0 24px 64px rgba(0, 0, 0, .44);
    --radius: 6px;
    --content-width: 1400px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--gold-dark) var(--bg-deep);
}

body.site-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(6, 8, 9, .74) 0, rgba(6, 8, 9, .95) 560px, #080b0d 1000px),
        url('/images/treegaming-background.webp') center top 74px / min(1280px, 100vw) auto no-repeat,
        var(--bg);
    font: 16px/1.55 "Segoe UI", Arial, Helvetica, sans-serif;
}

body.site-page::before { content: none; }
body.modal-open { overflow: hidden; }
::selection { color: #090b0c; background: var(--gold-bright); }

a, button, input, summary { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--gold-bright);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    padding: 11px 15px;
    color: #0a0b0c;
    background: var(--gold-bright);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform .18s ease;
}

.skip-link:focus { transform: translateY(0); }

/* Main navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-top: 3px solid var(--gold-dark);
    border-bottom: 1px solid rgba(221, 177, 83, .24);
    background: rgba(11, 14, 16, .94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    width: min(var(--content-width), calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 216px;
    color: var(--text);
    text-decoration: none;
}

.site-brand__mark {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 201, 92, .42);
    border-radius: 50%;
    background: #090b0c;
    box-shadow: 0 0 24px rgba(213, 168, 74, .16);
}

.site-brand__mark img {
    width: 67px;
    height: 67px;
    object-fit: cover;
}

.site-brand__copy { display: grid; line-height: 1.05; }

.site-brand__copy strong {
    color: var(--text);
    font: 700 1.18rem/1.05 Georgia, "Times New Roman", serif;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.site-brand__copy small {
    margin-top: 6px;
    color: var(--gold);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    align-self: stretch;
    min-width: 0;
}

.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    color: var(--text-soft);
    font-size: .86rem;
    font-weight: 750;
    letter-spacing: .015em;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}

.site-nav__link::after {
    content: '';
    position: absolute;
    right: 14px;
    bottom: -1px;
    left: 14px;
    height: 3px;
    background: var(--gold-bright);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.site-nav__link:hover,
.site-nav__link.active {
    color: #fff;
    background: rgba(255, 255, 255, .035);
}

.site-nav__link:hover::after,
.site-nav__link.active::after { transform: scaleX(1); }

.site-nav__link--vote { color: var(--gold-bright); }

.site-nav__link--vote::before {
    content: '◆';
    color: var(--gold);
    font-size: .52rem;
}

.live-dot,
.site-utility__game > span {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(110, 209, 132, .72);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    font-size: .8rem;
    font-weight: 850;
    letter-spacing: .055em;
    text-decoration: none;
    text-transform: uppercase;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.header-action:hover { transform: translateY(-1px); }

.header-action--support {
    color: var(--gold-bright);
    background: rgba(213, 168, 74, .06);
}

.header-action--support:hover {
    border-color: var(--gold);
    background: rgba(213, 168, 74, .13);
}

.site-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    background: var(--surface-raised);
    font: 800 .8rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.site-menu-toggle__icon { display: grid; gap: 4px; width: 18px; }

.site-menu-toggle__icon i {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gold-bright);
    transition: transform .18s ease, opacity .18s ease;
}

.site-header.menu-open .site-menu-toggle__icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.menu-open .site-menu-toggle__icon i:nth-child(2) { opacity: 0; }
.site-header.menu-open .site-menu-toggle__icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Banner and secondary links */
.site-banner-shell {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 18px auto 0;
    overflow: hidden;
    border: 1px solid rgba(220, 174, 80, .24);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
}

.site-banner-shell picture { display: block; }

.banner {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.site-utility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(var(--content-width), calc(100% - 32px));
    min-height: 48px;
    margin: 0 auto 20px;
    padding: 8px 14px;
    border: 1px solid rgba(220, 174, 80, .24);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(11, 14, 16, .96);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .28);
}

.site-utility__game {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--gold-bright);
    font-size: .71rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-utility__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.site-utility__links a {
    padding: 7px 11px;
    color: var(--muted-strong);
    font-size: .78rem;
    font-weight: 750;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}

.site-utility__links a:hover { color: #fff; background: rgba(255, 255, 255, .055); }

/* Shared layout and content */
.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 22px;
    width: min(var(--content-width), calc(100% - 32px));
    margin: 0 auto 28px;
}

.main-content,
.sidebar { min-width: 0; }

.sidebar { display: grid; gap: 20px; }

.info-card,
.chart-container,
.content-box {
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(24, 29, 33, .97), rgba(13, 17, 19, .97));
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    padding: clamp(20px, 2.4vw, 30px);
}

.main-content > :not(:last-child),
.home-community-images-section,
.home-map-preview-section { margin-bottom: 22px; }

.home-community-images-section,
.home-map-preview-section { display: block; clear: both; }

.home-community-images-section > *,
.home-map-preview-section > * { margin: 0 !important; }

h1,
h2,
h3,
.highlight-title,
.server-detail-title {
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -.025em;
}

h1 {
    margin: 0 0 14px;
    font-size: clamp(2.45rem, 5vw, 4.7rem);
    line-height: .98;
}

.highlight-title {
    margin: 0;
    font-size: clamp(1.65rem, 2.6vw, 2.45rem);
    line-height: 1.08;
}

p,
.lead-text,
.compact-text,
.features-intro { color: var(--muted); line-height: 1.68; }

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--gold-bright);
    background: transparent;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
    content: '';
    width: 22px;
    height: 1px;
    margin-right: 9px;
    background: var(--gold);
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading-row .section-kicker + .highlight-title,
.section-heading-row .section-kicker + h2 { margin-top: 8px; }

.button-row,
.hero-actions,
.server-status-actions,
.commands-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.inline-link-button,
.action-button,
.mini-stat-button,
.latest-activity-open-link,
.footer-link-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--gold-bright);
    background: rgba(213, 168, 74, .06);
    font: 850 .75rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: .065em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.inline-link-button:hover,
.action-button:hover,
.mini-stat-button:hover,
.latest-activity-open-link:hover,
.footer-link-button:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    color: #fff;
    background: rgba(213, 168, 74, .13);
}

.primary-action {
    border-color: var(--gold-bright);
    color: #11100d;
    background: linear-gradient(180deg, #ffd265, #dba62f);
    box-shadow: 0 10px 24px rgba(213, 168, 74, .18);
}

.primary-action:hover {
    color: #070707;
    background: linear-gradient(180deg, #ffdf8c, #edbd4e);
}

button:disabled { cursor: wait; opacity: .64; }

/* Home hero */
.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .65fr);
    align-items: end;
    gap: 34px;
    min-height: 510px;
    overflow: hidden;
    padding: clamp(30px, 5vw, 58px);
    background:
        linear-gradient(90deg, rgba(7, 9, 10, .97) 0%, rgba(7, 9, 10, .78) 54%, rgba(7, 9, 10, .35) 100%),
        linear-gradient(0deg, rgba(7, 9, 10, .92) 0, transparent 56%),
        url('/images/treegaming-7dtd-hero.webp') center 38% / cover no-repeat;
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 201, 92, .12);
    pointer-events: none;
}

.hero-copy,
.hero-side { position: relative; z-index: 1; }
.hero-copy { max-width: 720px; }

.hero-copy h1 {
    margin: 16px 0 20px;
    text-wrap: balance;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .75);
}

.hero-copy h1 span { color: var(--gold-bright); }

.hero-copy .lead-text {
    max-width: 660px;
    margin: 0;
    color: #d2cec4;
    font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.hero-actions { margin-top: 24px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; }

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-strong);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero-trust span::before { content: '◆'; color: var(--gold); font-size: .52rem; }
.hero-side { display: grid; gap: 12px; }

.mini-stat-card {
    padding: 18px;
    border: 1px solid rgba(225, 181, 89, .28);
    border-radius: 4px;
    background: rgba(8, 11, 12, .78);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
    backdrop-filter: blur(12px);
}

.mini-stat-label {
    display: block;
    margin-bottom: 7px;
    color: var(--gold);
    font-size: .67rem;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.mini-stat-card strong,
.mini-stat-card small { display: block; }

.mini-stat-card strong {
    color: var(--text);
    font: 600 1.15rem/1.25 Georgia, "Times New Roman", serif;
}

.mini-stat-card small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.mini-stat-button { margin-top: 14px; }

/* Server status */
.server-status-card { overflow: hidden; }

.server-status-item {
    position: relative;
    min-width: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    color: var(--text);
    background: radial-gradient(circle at 100% 0, rgba(213, 168, 74, .1), transparent 42%), rgba(6, 9, 10, .68);
}

.server-status-item::before,
.server-status-item::after { content: none !important; }

.home-server-banner-link {
    position: relative;
    z-index: 2;
    display: block;
    width: min(100%, 560px);
    margin: 0 auto 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #080b0e;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .4);
}

.home-server-banner { display: block; width: 100%; height: auto; }

.status-topline,
.status-wrapper,
.home-server-meta { display: flex; align-items: center; }

.status-topline {
    position: relative;
    z-index: 2;
    justify-content: space-between;
    gap: 12px;
}

.status-wrapper { gap: 9px; }

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px rgba(163, 59, 49, .62);
}

.server-status-item.online .status-indicator {
    background: var(--green);
    box-shadow: 0 0 12px rgba(110, 209, 132, .64);
}

.status-text,
.server-badge {
    color: var(--muted-strong);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.server-badge { padding: 5px 9px; border: 1px solid var(--border); color: var(--gold-bright); }

.server-name {
    margin-top: 16px;
    color: var(--text);
    font: 600 clamp(1.6rem, 3vw, 2.3rem)/1.1 Georgia, "Times New Roman", serif;
}

.server-ip {
    margin-top: 5px;
    color: var(--gold);
    font: 700 .84rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.home-server-meta {
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
    margin: 16px 0 11px;
}

.home-server-meta span {
    padding: 6px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .035);
    font-size: .76rem;
    font-weight: 700;
}

.player-info { margin-top: 10px; color: var(--text-soft); font-weight: 800; }

.progress-bar {
    height: 6px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 0;
    background: rgba(255, 255, 255, .08);
}

.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright)); }

/* Feature and media panels */
.game-panel-tabs { display: flex; margin: 20px 0 0; border-bottom: 1px solid var(--border); }

.game-panel-tab {
    position: relative;
    width: auto !important;
    min-height: 0 !important;
    padding: 10px 0 !important;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.game-panel-tab.active {
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--gold-bright) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.game-panel-tab.active::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--gold-bright);
}

.features-intro { margin: 16px 0 20px; }
.features-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.feature-detail-tile {
    position: relative;
    min-width: 0;
    padding: 20px 20px 20px 24px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 3px;
    background: rgba(255, 255, 255, .025);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.feature-detail-tile::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gold-bright), var(--copper));
}

.feature-detail-tile:hover {
    transform: translateY(-2px);
    border-color: var(--border);
    background: rgba(213, 168, 74, .045);
}

.feature-detail-tile h3 { margin: 0 0 8px; color: var(--gold-bright); font-size: 1.08rem; letter-spacing: 0; }
.feature-detail-tile p { margin: 0; color: var(--muted); font-size: .91rem; }
.feature-detail-tile strong { color: var(--text-soft); }

.player-screenshot-image {
    border: 1px solid var(--border) !important;
    border-radius: 3px !important;
}

.player-screenshot-link:hover .player-screenshot-image { box-shadow: 0 18px 38px rgba(0, 0, 0, .42) !important; }

.player-screenshot-meta span,
.player-screenshot-desc { color: var(--muted-strong) !important; }

.player-screenshot-avatar { border: 1px solid var(--gold-dark); }

.map-preview-click-area {
    border-color: var(--border) !important;
    border-radius: 3px !important;
}

.map-preview-overlay-label {
    border: 1px solid var(--border);
    border-radius: 2px !important;
    color: var(--gold-bright) !important;
    background: rgba(7, 9, 10, .88) !important;
    font-size: .7rem !important;
    letter-spacing: .06em !important;
    text-transform: uppercase;
}

/* Sidebar */
.discord-widget-card iframe {
    display: block;
    width: 100%;
    min-height: 500px;
    border: 1px solid var(--border-soft);
    border-radius: 3px;
    background: #202225;
}

.latest-activity-header-row { align-items: center; }
.latest-activity-title { margin-top: 8px; font-size: 1.55rem; }
.latest-activity-intro { margin-top: 0; }
.latest-activity-list,
.last-voters-list { display: grid; gap: 8px; }

.latest-activity-item,
.last-voter-item,
.bloodmoon-player-item {
    min-width: 0;
    border: 1px solid var(--border-soft);
    border-radius: 3px;
    color: var(--text);
    background: rgba(255, 255, 255, .025);
    transition: border-color .18s ease, background .18s ease;
}

.latest-activity-item { display: block; padding: 11px 12px; text-decoration: none; }

.latest-activity-item:hover,
.last-voter-item:hover,
.bloodmoon-player-item:hover {
    transform: none;
    border-color: var(--border);
    background: rgba(213, 168, 74, .055);
    box-shadow: none;
}

.latest-activity-item-top,
.latest-activity-header-row,
.last-voter-item,
.last-voter-top { display: flex; align-items: center; }

.latest-activity-item-top,
.last-voter-top { justify-content: space-between; gap: 8px; }

.latest-activity-item-title,
.last-voter-name,
.bloodmoon-player-name { color: var(--text) !important; font-weight: 800; }

.latest-activity-item-meta,
.last-voter-meta,
.bloodmoon-player-kills,
.latest-activity-loading,
.latest-activity-empty { color: var(--muted) !important; }

.latest-activity-badge {
    flex: 0 0 auto;
    padding: 3px 6px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    color: var(--gold);
    background: rgba(213, 168, 74, .07);
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.last-voter-item { gap: 10px; padding: 10px; }
.last-voter-icon-wrap,
.last-voter-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; }
.last-voter-icon { object-fit: cover; border: 1px solid var(--gold-dark); }
.last-voter-content { min-width: 0; flex: 1; }

.bloodmoon-player-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 10px;
}

.bloodmoon-player-rank {
    display: grid;
    min-height: 40px;
    place-items: center;
    border: 1px solid rgba(163, 59, 49, .32);
    border-radius: 2px;
    color: #e67f71;
    background: rgba(163, 59, 49, .1);
    font-weight: 900;
}

/* Commands */
.commands-page { display: grid; gap: 20px; }

.commands-page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(10, 13, 14, .97), rgba(10, 13, 14, .68)),
        url('/images/treegaming-7dtd-badge.webp') 92% 42% / 460px auto no-repeat;
}

.commands-page-hero h1 { margin: 10px 0 10px; font-size: clamp(2.4rem, 5vw, 4rem); }
.commands-page-hero .lead-text { max-width: 650px; margin: 0; }

.commands-showcase-card {
    margin: 0;
    padding: 10px;
    background: #0b0e10;
}

.commands-embed-wrap {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #111;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.commands-embed-frame {
    display: block;
    width: 100%;
    height: min(78vh, 920px);
    min-height: 700px;
    border: 0;
    background: #111;
}

.commands-frame-note { margin: 10px 4px 2px; color: var(--muted); font-size: .78rem; }

/* All players and legacy content pages */
.chart-container,
.content-box { display: block; width: 100%; max-width: none; margin: 0; }

.chart-container > h1,
.content-box > h1 { font-size: clamp(2.35rem, 5vw, 4rem); }

#allPlayersContainer .total-count {
    margin: 16px 0 !important;
    color: var(--muted-strong) !important;
    font-weight: 750 !important;
}

#allPlayersContainer #playerSearch {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    min-height: 48px !important;
    margin: 0 auto 20px !important;
    padding: 11px 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: 3px !important;
    color: var(--text) !important;
    background: #0c1012 !important;
    font-size: 16px !important;
}

#allPlayersContainer #playerSearch::placeholder { color: #777a78 !important; }

#allPlayersContainer .table-wrapper {
    max-height: 720px !important;
    overflow: auto !important;
    border: 1px solid var(--border) !important;
    border-radius: 3px !important;
    background: #0c0f11 !important;
}

#allPlayersContainer table {
    width: 100% !important;
    min-width: 790px !important;
    color: var(--text-soft) !important;
    background: transparent !important;
}

#allPlayersContainer th,
#allPlayersContainer td {
    padding: 11px 10px !important;
    border-color: var(--border-soft) !important;
    color: var(--text-soft) !important;
    background: transparent !important;
}

#allPlayersContainer th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--gold-bright) !important;
    background: #171b1d !important;
    font-size: .68rem !important;
    letter-spacing: .07em;
    text-transform: uppercase;
}

#allPlayersContainer tbody tr:hover td { background: rgba(213, 168, 74, .045) !important; }
#allPlayersContainer .player-name a { color: var(--text) !important; }

#allPlayersContainer .lastseen,
#allPlayersContainer .playtime,
#allPlayersContainer .status,
#allPlayersContainer .ping { color: var(--muted) !important; }

#allPlayersContainer .pagination button,
#allPlayersContainer .pagination span {
    border: 1px solid var(--border) !important;
    border-radius: 2px !important;
    color: var(--text-soft) !important;
    background: var(--surface-raised) !important;
}

#allPlayersContainer .pagination button:hover,
#allPlayersContainer .pagination button.active { color: #111 !important; background: var(--gold-bright) !important; }

/* Footer and modals */
.page-footer {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 0 auto 24px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(11, 14, 16, .94);
    box-shadow: var(--shadow);
    text-align: center;
}

.page-footer p { margin: 0; }

.footer-disclaimer {
    max-width: 850px;
    margin: 8px auto 0 !important;
    color: #858681;
    font-size: .78rem;
}

.page-footer .treemt { color: var(--gold-bright); font-weight: 900; }

.footer-links { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.footer-link-button { min-height: 36px; padding: 7px 12px; }

.site-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.site-modal.is-open { display: flex; }

.site-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(8px);
}

.site-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    padding: clamp(22px, 4vw, 34px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background: linear-gradient(145deg, #1a1f22, #0e1113);
    box-shadow: 0 34px 100px rgba(0, 0, 0, .72);
}

.site-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    color: var(--text);
    background: rgba(255, 255, 255, .04);
    font-size: 1.6rem;
    cursor: pointer;
}

.site-modal__title { margin: 10px 42px 16px 0; font-size: 2rem; }

.site-modal__content,
.site-modal__content p { color: var(--muted-strong); }

.site-modal__disclaimer {
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted) !important;
    font-size: .84rem;
}

/* Responsive navigation and layout */
@media (max-width: 1220px) {
    .site-header__inner { gap: 15px; }
    .site-brand { min-width: 185px; }
    .site-brand__copy small { letter-spacing: .07em; }
    .site-nav__link { padding: 0 10px; font-size: .8rem; }
    .header-action { padding-right: 10px; padding-left: 10px; }
}

@media (max-width: 1100px) {
    .site-header.menu-open {
        max-height: 100vh;
        overflow-y: auto;
    }

    .site-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 66px;
        padding: 7px 0;
    }

    .site-menu-toggle { display: inline-flex; }

    .site-nav,
    .site-header__actions { display: none; grid-column: 1 / -1; }

    .site-header.menu-open .site-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid var(--border-soft);
    }

    .site-header.menu-open .site-header__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        padding-bottom: 8px;
    }

    .site-nav__link {
        min-height: 44px;
        padding: 8px 10px;
        border: 1px solid transparent;
        border-radius: 2px;
    }

    .site-nav__link.active { border-color: var(--border); background: rgba(213, 168, 74, .08); }
    .site-nav__link::after { right: 10px; left: 10px; }
    .header-action { width: 100%; }
    .page-layout { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .discord-widget-card { grid-row: span 2; }
}

@media (max-width: 760px) {
    body.site-page { background-size: 980px auto; }

    .site-header__inner,
    .site-banner-shell,
    .site-utility,
    .page-layout,
    .page-footer { width: calc(100% - 20px); }

    .site-brand__mark { width: 46px; height: 46px; }
    .site-brand__mark img { width: 59px; height: 59px; }
    .site-brand__copy strong { font-size: 1rem; }
    .site-brand__copy small { font-size: .55rem; }
    .site-header.menu-open .site-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-banner-shell { margin-top: 10px; }

    .site-utility {
        align-items: stretch;
        gap: 6px;
        min-height: 44px;
        padding: 6px 8px;
        overflow-x: auto;
    }

    .site-utility__game { padding: 0 8px; }
    .site-utility__links { justify-content: flex-start; }
    .site-utility__links a { white-space: nowrap; }
    .page-layout { gap: 18px; }

    .info-card,
    .chart-container,
    .content-box { padding: 18px; }

    .section-heading-row,
    .commands-page-hero { display: grid; align-items: start; }

    .section-heading-row > a,
    .section-heading-row .button-row,
    .server-status-actions,
    .commands-page-hero > a { width: 100%; }

    .section-heading-row .button-row > *,
    .server-status-actions > * { flex: 1 1 auto; }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: 620px;
        padding: 30px 22px 22px;
        background-position: 62% center;
    }

    .home-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(6, 8, 9, .82), rgba(6, 8, 9, .65) 48%, rgba(6, 8, 9, .98));
        pointer-events: none;
    }

    .hero-copy,
    .hero-side { z-index: 2; }

    .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .features-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: 1fr; }
    .discord-widget-card { grid-row: auto; }

    .commands-page-hero {
        background-size: 330px auto;
        background-position: 115% 45%;
    }

    .commands-embed-frame { height: 72vh; min-height: 620px; }
    .footer-links { flex-wrap: wrap; }
}

@media (max-width: 520px) {
    .site-header__inner { width: calc(100% - 16px); }
    .site-brand { min-width: 0; }
    .site-brand__copy small { display: none; }
    .site-menu-toggle { padding: 9px 11px; }
    .site-header.menu-open .site-header__actions { grid-template-columns: 1fr; }

    .site-banner-shell,
    .site-utility,
    .page-layout,
    .page-footer { width: calc(100% - 12px); }

    .site-utility__game { font-size: .63rem; }

    .site-utility__links a {
        padding-right: 8px;
        padding-left: 8px;
        font-size: .72rem;
    }

    .home-hero { min-height: 660px; }
    .hero-actions { display: grid; }
    .hero-actions > * { width: 100%; }
    .hero-side { grid-template-columns: 1fr; }
    .home-server-meta { display: grid; grid-template-columns: 1fr; }
    .commands-showcase-card { padding: 6px; }
    .commands-embed-frame { min-height: 580px; }
    .page-footer { padding: 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
