/* =====================================================================
   Querek.net
   Flat, panel-based layout (forum style) with a pixel-art header.
   ===================================================================== */

:root {
    --bg:          #0c0e1d;
    --bg-deep:     #080915;
    --panel:       #14172c;
    --panel-head:  #1a1e38;
    --panel-hover: #191d36;
    --line:        #252a4b;
    --line-soft:   #1e2240;
    --input:       #0e1124;

    --text:        #e6e8f7;
    --text-2:      #b4b9dc;
    --muted:       #7d84ad;

    --accent:      #6c5cff;
    --accent-2:    #8b7bff;
    --accent-dark: #4a3cd6;

    --green:  #3ecf8e;
    --red:    #f0506e;
    --amber:  #f5b941;
    --discord:#5865f2;

    --r: 6px;
    --head: 'Rubik', 'Inter', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font: 15px/1.6 var(--body);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
main { flex: 1; padding-bottom: 56px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; font-weight: 700; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--input); padding: 1px 6px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.pixel { font-family: 'Silkscreen', monospace; font-weight: 400; letter-spacing: .5px; }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -.15em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border: 0; border-radius: var(--r); cursor: pointer;
    font: 600 .92rem/1.2 var(--body); white-space: nowrap;
    transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 var(--accent-dark); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--panel-head); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { color: #fff; background: #20254a; }
.btn-danger { background: rgba(240, 80, 110, .12); color: #ff8098; box-shadow: inset 0 0 0 1px rgba(240, 80, 110, .35); }
.btn-danger:hover { background: rgba(240, 80, 110, .22); }
.btn-sm { padding: 7px 12px; font-size: .84rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: .82rem; display: inline-flex; align-items: center; gap: 5px; }
.link-btn:hover { color: var(--red); }

/* ---------- Header (pixel art, Hypixel layout) ---------- */
.site-header {
    position: relative;
    background: var(--bg-deep) url('../img/header-bg.png') center bottom / cover no-repeat;
    image-rendering: pixelated;
    border-bottom: 1px solid #000;
}
.site-header::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 9, 21, .15), rgba(8, 9, 21, .55));
}
.header-inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    min-height: 230px; padding-top: 18px; padding-bottom: 18px;
}
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; image-rendering: auto; }
.brand img { height: 112px; width: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); transition: transform .2s; }
.brand:hover img { transform: translateY(-3px); }
.brand-name { font: 800 1.9rem/1 var(--head); letter-spacing: 1px; text-shadow: 3px 3px 0 #000; }
.brand-name span { color: var(--accent-2); }

.header-pill {
    justify-self: start; display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 10px 16px; border-radius: var(--r); text-align: left;
    background: rgba(8, 9, 21, .78); border: 1px solid rgba(255, 255, 255, .08);
    transition: border-color .15s, background .15s;
}
.header-pill:hover { border-color: var(--accent); background: rgba(8, 9, 21, .9); }
.header-pill-right { justify-self: end; }
.header-pill-text { display: flex; flex-direction: column; line-height: 1.3; font-size: .8rem; color: var(--text-2); }
.header-pill-text b { font-size: .95rem; color: #fff; }
.header-pill-text strong { color: #fff; }
.discord-mark { width: 26px; height: 26px; color: #8e98ff; }

.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(62, 207, 142, .2); flex-shrink: 0; display: inline-block; }
.live-dot.off { background: var(--red); box-shadow: 0 0 0 3px rgba(240, 80, 110, .2); }

/* ---------- Navigation ---------- */
.site-nav { position: sticky; top: 0; z-index: 40; background: #11142a; border-bottom: 1px solid var(--line); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.nav-links { list-style: none; display: flex; }
.nav-links a {
    position: relative; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px;
    font: 600 .9rem var(--body); color: var(--text-2); transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.nav-tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .6px; padding: 2px 6px; border-radius: 3px; background: rgba(245, 185, 65, .15); color: var(--amber); }
.nav-account { display: flex; align-items: center; gap: 14px; }
.nav-link-plain { font-weight: 600; font-size: .9rem; color: var(--text-2); }
.nav-link-plain:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .i-close, .nav-toggle.open .i-open { display: none; }
.nav-toggle.open .i-close { display: block; }

.account-menu { position: relative; }
.account-btn {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer;
    background: var(--panel-head); border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; font-size: .88rem;
}
.account-btn img { border-radius: 3px; image-rendering: pixelated; }
.account-btn .icon { width: 15px; height: 15px; color: var(--muted); }
.dropdown {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; display: none;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); overflow: hidden;
}
.account-menu.open .dropdown { display: block; }
.dropdown-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.dropdown-head span { font-size: .78rem; color: var(--muted); }
.dropdown a, .dropdown button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; font-size: .9rem;
    background: none; border: 0; cursor: pointer; color: var(--text-2); text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--panel-hover); color: #fff; }
.dropdown .icon { width: 16px; height: 16px; }

/* ---------- Flash / notices ---------- */
.flashes { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); font-weight: 500; font-size: .92rem; }
.flash .icon { width: 18px; height: 18px; }
.flash-success { background: rgba(62, 207, 142, .1); border: 1px solid rgba(62, 207, 142, .3); color: #7ee2b4; }
.flash-error { background: rgba(240, 80, 110, .1); border: 1px solid rgba(240, 80, 110, .3); color: #ff9aae; }
.notice {
    display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; margin: 16px 0;
    background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r);
    font-size: .9rem; color: var(--text-2);
}
.notice .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-2); }
.notice a { color: var(--accent-2); font-weight: 600; }
.notice a:hover { text-decoration: underline; }

/* ---------- Page head ---------- */
.page-head { padding: 26px 0 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a:hover { color: #fff; }
.crumbs em { font-style: normal; color: var(--text-2); }
.page-head h1 { font-size: 1.9rem; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 720px; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 18px; }
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 16px; background: var(--panel-head); border-bottom: 1px solid var(--line);
    font: 600 .78rem var(--head); text-transform: uppercase; letter-spacing: 1px; color: var(--text-2);
}
.panel-head a { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font: 600 .82rem var(--body); color: var(--accent-2); }
.panel-head a:hover { color: #fff; }
.panel-head a .icon { width: 14px; height: 14px; }
.panel-body { padding: 18px 16px; }

.tag {
    display: inline-block; padding: 3px 8px; border-radius: 3px; font: 700 .66rem var(--body);
    text-transform: uppercase; letter-spacing: .8px; background: var(--accent); color: #fff;
}
.tag-update { background: #3f7bf0; }
.tag-event { background: #d9932a; }
.tag-network { background: #7c4ddb; }

/* ---------- Home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 24px; }
.featured-media { position: relative; display: block; background: #000; }
.featured-media img { width: 100%; height: auto; aspect-ratio: 960 / 384; object-fit: cover; transition: opacity .2s; }
.featured-media:hover img { opacity: .9; }
.featured-media .tag { position: absolute; left: 14px; top: 14px; }
.featured-body { padding: 18px 20px 20px; }
.featured-body h2 { font-size: 1.5rem; margin-bottom: 8px; }
.featured-body p { color: var(--text-2); }
.byline { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .84rem; color: var(--muted); }
.byline img { border-radius: 3px; image-rendering: pixelated; }
.byline b { color: var(--text); }

.news-row { display: flex; gap: 16px; padding: 16px; border-top: 1px solid var(--line-soft); }
.panel-head + .news-row { border-top: 0; }
.news-date {
    flex-shrink: 0; width: 54px; height: 58px; border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--panel-head); border: 1px solid var(--line); line-height: 1.1;
}
.news-date b { font: 800 1.35rem var(--head); }
.news-date span { font-size: .66rem; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.news-text h3 { font-size: 1.08rem; margin: 6px 0 4px; }
.news-text p { color: var(--text-2); font-size: .92rem; }
.byline-small { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.byline-small b { color: var(--text-2); }

.status-line { display: flex; align-items: center; gap: 10px; }
.status-count { margin-left: auto; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.status-count b { color: var(--text); }
.bar { height: 8px; margin: 12px 0 14px; background: var(--input); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.bar span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, var(--green) 0 6px, #34b97c 6px 8px); transition: width .8s; }
.ip-copy {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; cursor: pointer;
    background: var(--input); border: 1px dashed #343a6b; border-radius: var(--r); font-size: .9rem;
}
.ip-copy:hover { border-color: var(--accent); }
.ip-copy-hint { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.ip-copy:hover .ip-copy-hint { color: var(--accent-2); }

.steps { list-style: none; padding: 8px 16px 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: .9rem; color: var(--text-2); }
.steps li + li { border-top: 1px dashed var(--line-soft); }
.steps b {
    flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px;
    background: var(--accent); color: #fff; font: 700 .8rem var(--head); box-shadow: inset 0 -2px 0 var(--accent-dark);
}
.steps strong { color: #fff; }

.mini-board { list-style: none; padding: 6px 0; }
.mini-board li { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: .9rem; }
.mini-board li:hover { background: var(--panel-hover); }
.mini-board img { border-radius: 3px; image-rendering: pixelated; }
.mini-pos { width: 18px; font: 700 .85rem var(--head); color: var(--muted); }
.mini-pos.pos-1 { color: #f5c542; } .mini-pos.pos-2 { color: #cdd3e3; } .mini-pos.pos-3 { color: #e3995d; }
.mini-name { flex: 1; font-weight: 600; }
.mini-val { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.discord-card {
    display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); margin-bottom: 18px;
    background: var(--discord); color: #fff; box-shadow: inset 0 -3px 0 #3c45c5; transition: background .15s;
}
.discord-card:hover { background: #6872f5; }
.discord-card > .icon:first-child { width: 30px; height: 30px; }
.discord-card > span { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.discord-card > span span { font-size: .82rem; opacity: .85; }
.discord-card > .icon:last-child { width: 18px; height: 18px; }

/* ---------- Forum ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: .9rem; }
.mod-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.forum-node, .support-row {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 170px 250px; align-items: center; gap: 16px;
    padding: 14px 16px; border-top: 1px solid var(--line-soft);
}
.panel-head + .forum-node, .panel-head + .support-row { border-top: 0; }
.forum-node:hover, .support-row:hover { background: var(--panel-hover); }
.node-icon {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r);
    background: var(--panel-head); border: 1px solid var(--line); color: var(--accent-2);
}
.node-icon .icon { width: 21px; height: 21px; }
.node-main { display: flex; flex-direction: column; min-width: 0; }
.node-title { font-weight: 600; color: #fff; }
a.node-title:hover { color: var(--accent-2); }
.node-desc { font-size: .85rem; color: var(--muted); }
.node-stats { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); }
.node-stats b { color: var(--text); font-weight: 600; margin-right: 4px; }
.node-last { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: .84rem; }
.node-last img { border-radius: 4px; image-rendering: pixelated; flex-shrink: 0; }
.node-last > span { display: flex; flex-direction: column; min-width: 0; }
.node-last a { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-last a:hover { color: var(--accent-2); }
.node-last .muted { font-size: .78rem; }

.thread-row {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) 110px 150px; align-items: center; gap: 14px;
    padding: 12px 16px; border-top: 1px solid var(--line-soft);
}
.thread-row:first-child { border-top: 0; }
.thread-row:hover { background: var(--panel-hover); }
.thread-row.is-pinned { background: rgba(108, 92, 255, .05); }
.thread-avatar { border-radius: 4px; image-rendering: pixelated; }
.thread-main { display: flex; flex-direction: column; min-width: 0; }
.thread-title { font-weight: 600; color: #fff; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.thread-meta { font-size: .8rem; color: var(--muted); }
.thread-stat { font-size: .82rem; color: var(--muted); text-align: center; }
.thread-stat b { display: block; font-size: 1rem; color: var(--text); }
.thread-last { display: flex; flex-direction: column; text-align: right; font-size: .82rem; }
.pill-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 3px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.pill-tag .icon { width: 11px; height: 11px; }
.pill-pin { background: rgba(108, 92, 255, .18); color: #b3a9ff; }
.pill-lock { background: rgba(245, 185, 65, .15); color: var(--amber); }

.post { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.post-author {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 14px; text-align: center;
    background: var(--panel-head); border-right: 1px solid var(--line);
}
.post-author img { height: 120px; width: auto; image-rendering: pixelated; margin-bottom: 4px; }
.post-author strong { font-size: 1rem; }
.post-author-meta { font-size: .78rem; color: var(--muted); }
.post-author-meta b { color: var(--text-2); font-weight: 600; }
.role { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 3px; }
.role-admin { background: #c43a52; color: #fff; }
.role-staff { background: #2f8a5f; color: #fff; }
.post-content { display: flex; flex-direction: column; min-width: 0; }
.post-head { display: flex; justify-content: space-between; padding: 10px 18px; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.post-num { font-weight: 600; }
.post-body { padding: 18px; flex: 1; color: var(--text-2); overflow-wrap: anywhere; }
.post-body strong { color: #fff; }
.post-body a { color: var(--accent-2); text-decoration: underline; }
.post-actions { padding: 0 18px 12px; display: flex; justify-content: flex-end; }

.reply textarea { margin-bottom: 12px; }
.pager { display: flex; gap: 4px; justify-content: center; margin: 4px 0 18px; }
.pager a, .pager-gap { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); font-weight: 600; font-size: .88rem; }
.pager a { background: var(--panel); border: 1px solid var(--line); }
.pager a:hover { border-color: var(--accent); }
.pager a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager-gap { color: var(--muted); }

/* ---------- Forms / auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 440px; gap: 40px; align-items: center; margin-top: 36px; }
.auth-art { display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-art img { width: 200px; height: auto; margin-bottom: 18px; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .6)); }
.auth-art .auth-skin { width: auto; height: 260px; image-rendering: pixelated; }
.auth-art h2 { font-size: 1.8rem; font-weight: 800; }
.auth-art p { color: var(--muted); margin-top: 6px; }
.auth-form { margin: 0; }
.auth-switch { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--muted); }
.auth-switch a { color: var(--accent-2); font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.field small { font-size: .76rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea {
    width: 100%; padding: 11px 12px; border-radius: var(--r); font: 15px/1.5 var(--body); color: var(--text);
    background: var(--input); border: 1px solid #2a2f55; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108, 92, 255, .2); }
.input-wrap { position: relative; display: block; }
.input-wrap input { padding-right: 44px; }
.reveal-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); }
.reveal-pass:hover { color: #fff; }
.reveal-pass .icon { width: 18px; height: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; }
.check a { color: var(--accent-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: flex; align-items: center; gap: 8px; padding: 11px 14px; margin-bottom: 16px; border-radius: var(--r); background: rgba(240, 80, 110, .1); border: 1px solid rgba(240, 80, 110, .3); color: #ff9aae; font-size: .9rem; }
.form-error .icon { width: 18px; height: 18px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- Empty / 404 ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty p { color: var(--muted); }
.empty h1, .empty h3 { margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }
.empty-code { font: 800 4.5rem/1 var(--head); color: var(--accent); text-shadow: 4px 4px 0 #000; margin-bottom: 8px; }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: var(--r); background: var(--panel-head); border: 1px solid var(--line); color: var(--accent-2); }
.empty-icon .icon { width: 26px; height: 26px; }

/* ---------- Store / support ---------- */
.store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.store-item { display: flex; flex-direction: column; gap: 10px; padding: 24px; margin: 0; transition: border-color .15s; }
.store-item:hover { border-color: var(--accent); }
.store-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r); background: var(--panel-head); border: 1px solid var(--line); color: var(--accent-2); margin-bottom: 4px; }
.store-icon .icon { width: 26px; height: 26px; }
.store-item h3 { font-size: 1.3rem; }
.store-item p { flex: 1; color: var(--text-2); font-size: .92rem; margin-bottom: 8px; }
.support { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.support-row { grid-template-columns: 44px minmax(0, 1fr) 20px; }
.row-arrow { color: var(--muted); }
.faq details { border-top: 1px dashed var(--line); padding: 12px 0; }
.faq details:first-child { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-weight: 700; }
.faq details[open] summary::after { content: "-"; }
.faq p { margin-top: 8px; color: var(--text-2); font-size: .92rem; }

/* ---------- Leaderboards ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 4px; white-space: nowrap; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.tab .icon { width: 16px; height: 16px; }
.tab:hover { background: var(--panel-hover); color: #fff; }
.tab.active { background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 var(--accent-dark); }
.lb { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; align-items: start; }
.lb-podium { padding: 20px; }
.board-head { display: flex; align-items: center; gap: 10px; font: 700 1.1rem var(--head); margin-bottom: 22px; }
.board-head .icon { color: var(--accent-2); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; }
.podium-spot { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; }
.podium-spot img { border-radius: 4px; image-rendering: pixelated; }
.podium-spot strong { margin-top: 6px; font-size: .92rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-spot > span:not(.crown) { font-size: .78rem; color: var(--muted); }
.crown { color: #f5c542; }
.crown .icon { width: 24px; height: 24px; }
.podium-block { width: 100%; margin-top: 10px; display: grid; place-items: center; font: 800 1.5rem var(--head); color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .35); border-radius: 4px 4px 0 0; }
.place-1 .podium-block { height: 104px; background: #d9a520; box-shadow: inset 0 -6px 0 #a87b0c, inset 0 4px 0 #f2c94c; }
.place-2 .podium-block { height: 76px; background: #8e97ad; box-shadow: inset 0 -6px 0 #6b7389, inset 0 4px 0 #b6bdcf; }
.place-3 .podium-block { height: 56px; background: #b56a35; box-shadow: inset 0 -6px 0 #8a4b1f, inset 0 4px 0 #d38b55; }
.lb-list ol { list-style: none; }
.lb-list-head, .lb-list li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 9px 16px; }
.lb-list-head { background: var(--panel-head); border-bottom: 1px solid var(--line); font: 600 .72rem var(--head); text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.lb-list li { border-top: 1px solid var(--line-soft); }
.lb-list li:first-child { border-top: 0; }
.lb-list li:hover { background: var(--panel-hover); }
.place { font: 700 .95rem var(--head); color: var(--muted); }
.top-1 .place { color: #f5c542; } .top-2 .place { color: #cdd3e3; } .top-3 .place { color: #e3995d; }
.pname { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.pname img { border-radius: 3px; image-rendering: pixelated; }
.pval { font: 600 .95rem var(--head); font-variant-numeric: tabular-nums; }

/* ---------- Rules ---------- */
.rules-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.rules-nav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 8px; }
.rules-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.rules-nav-item:hover { border-color: #3a4170; }
.rules-nav-item > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rules-nav-item .small { color: var(--muted); line-height: 1.4; }
.rules-nav-icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r); background: var(--panel-head); border: 1px solid var(--line); color: var(--accent-2); }
.rules-nav-icon .icon { width: 18px; height: 18px; }
.rules-nav-arrow { width: 16px; height: 16px; color: var(--muted); }
.rules-nav-item.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rules-nav-item.active .rules-nav-icon { background: var(--accent); color: #fff; border-color: var(--accent); }
.important { padding: 14px 16px; border-radius: var(--r); background: rgba(245, 185, 65, .06); border: 1px solid rgba(245, 185, 65, .25); }
.important-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--amber); margin-bottom: 8px; }
.important-head .icon { width: 17px; height: 17px; }
.important ul { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: #d9d3bd; }
.important li { position: relative; padding-left: 14px; }
.important li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--amber); }
.rules-body { padding: 24px; margin: 0; }
.rules-body-head { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rules-body-head h2 { font-size: 1.45rem; }
.rules-body-head p { color: var(--muted); margin-top: 3px; }
.rule-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r); background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 var(--accent-dark); }
.rule-icon .icon { width: 21px; height: 21px; }
.rule-list { list-style: none; }
.rule-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 4px; border-top: 1px dashed var(--line-soft); color: var(--text-2); }
.rule-list li:first-child { border-top: 0; }
.rule-list strong { color: #fff; }
.rule-num { flex-shrink: 0; min-width: 32px; height: 24px; display: grid; place-items: center; border-radius: 3px; font: 700 .8rem ui-monospace, Consolas, monospace; background: var(--panel-head); border: 1px solid var(--line); color: var(--accent-2); }
.rules-outro { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.rules-outro .icon { width: 16px; height: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 52px; width: auto; }
.footer-brand strong { font: 800 1.15rem var(--head); letter-spacing: .5px; }
.footer-brand p { font-size: .86rem; color: var(--muted); }
.footer-ip { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; background: var(--panel); border: 1px dashed #343a6b; border-radius: var(--r); }
.footer-ip:hover { border-color: var(--accent); }
.footer-ip span { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.footer-ip .icon { width: 16px; height: 16px; color: var(--muted); }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 26px; padding-bottom: 26px; }
.footer-links h4 { font: 600 .74rem var(--head); text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 10px; }
.footer-links a { display: block; padding: 3px 0; font-size: .9rem; color: var(--text-2); }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--r);
    background: #1b1f3b; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-weight: 600; font-size: .9rem;
    transition: opacity .2s, transform .2s;
}
.toast .icon { color: var(--green); width: 18px; height: 18px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .home { grid-template-columns: 1fr; }
    .home-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
    .forum-node { grid-template-columns: 44px minmax(0, 1fr) 150px; }
    .node-last { display: none; }
    .lb, .rules-layout, .auth, .support { grid-template-columns: 1fr; }
    .rules-nav { position: static; }
    .auth-art { display: none; }
    .auth { max-width: 480px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 760px) {
    .header-inner { grid-template-columns: 1fr; justify-items: center; min-height: 0; padding-top: 22px; padding-bottom: 20px; gap: 14px; }
    .header-pill, .header-pill-right { justify-self: center; }
    .header-pill-right { display: none; }
    .brand img { height: 84px; }
    .brand-name { font-size: 1.5rem; }
    .nav-toggle { display: block; }
    .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: #11142a; border-bottom: 1px solid var(--line); padding: 6px 0; }
    .nav-links.open { display: flex; }
    .nav-links a { height: auto; padding: 12px 20px; }
    .nav-links a.active::after { left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
    .home-side { grid-template-columns: 1fr; }
    .store-grid { grid-template-columns: 1fr; }
    .forum-node { grid-template-columns: 40px minmax(0, 1fr); }
    .node-stats { display: none; }
    .thread-row { grid-template-columns: 36px minmax(0, 1fr); }
    .thread-stat, .thread-last { display: none; }
    .post { grid-template-columns: 1fr; }
    .post-author { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); text-align: left; }
    .post-author img { height: 40px; margin: 0; }
    .post-author-meta { display: none; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .page-head h1 { font-size: 1.55rem; }
    .footer-links { grid-template-columns: 1fr 1fr; }
    .featured-body h2 { font-size: 1.25rem; }
}

/* ---------- Support / help center ---------- */
.help-hero {
    position: relative; text-align: center; padding: 46px 0 52px; margin-bottom: -28px;
    background: linear-gradient(180deg, rgba(12, 14, 29, .2), var(--bg)), url('../img/header-bg.png') center 70% / cover;
    image-rendering: pixelated; border-bottom: 1px solid var(--line-soft);
}
.help-hero h1 { font-size: 2.2rem; font-weight: 800; text-shadow: 3px 3px 0 #000; image-rendering: auto; }
.help-hero p { color: var(--text-2); margin: 6px 0 22px; }
.help-search {
    display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 0 auto; padding: 0 16px;
    background: var(--input); border: 1px solid #2f3561; border-radius: var(--r); box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.help-search:focus-within { border-color: var(--accent); }
.help-search .icon { width: 20px; height: 20px; color: var(--muted); }
.help-search input { flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; padding: 15px 0; font-size: 1rem; }
.help-search input:focus { box-shadow: none; }
.topic-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.topic {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; cursor: pointer; text-align: left;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, background .15s;
}
.topic:hover { border-color: #3a4170; background: var(--panel-hover); }
.topic.active { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.topic-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 6px; border-radius: var(--r); background: var(--panel-head); border: 1px solid var(--line); color: var(--accent-2); }
.topic.active .topic-icon { background: var(--accent); color: #fff; border-color: var(--accent); }
.topic-icon .icon { width: 20px; height: 20px; }
.topic-title { font: 700 1rem var(--head); color: #fff; }
.topic-desc { font-size: .86rem; color: var(--muted); }
.topic-count { margin-top: 6px; font-size: .74rem; font-weight: 600; color: var(--accent-2); }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.article { border-top: 1px solid var(--line-soft); }
.article:first-child { border-top: 0; }
.article summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 44px 14px 16px; cursor: pointer; list-style: none; position: relative; }
.article summary::-webkit-details-marker { display: none; }
.article summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 700 1.2rem var(--head); color: var(--accent-2); }
.article[open] summary::after { content: "-"; }
.article summary:hover { background: var(--panel-hover); }
.article-topic { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.article-q { font-weight: 600; color: #fff; }
.article p { padding: 0 16px 16px; color: var(--text-2); font-size: .93rem; }
.article p strong { color: #fff; }
.articles-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.request-box p { color: var(--text-2); font-size: .92rem; margin-bottom: 14px; }
.request-tips { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--text-2); }
.request-tips .icon { width: 15px; height: 15px; color: var(--green); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line-soft); font-size: .9rem; color: var(--text-2); }
.panel-head + .side-link { border-top: 0; }
.side-link:hover { background: var(--panel-hover); color: #fff; }
.side-link .icon { width: 16px; height: 16px; color: var(--accent-2); }
@media (max-width: 1000px) {
    .help-layout { grid-template-columns: 1fr; }
    .topic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .help-hero h1 { font-size: 1.7rem; }
}
[hidden] { display: none !important; }
@media (max-width: 560px) {
    .topic-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .topic { padding: 14px; }
    .topic-desc { display: none; }
}

/* ---------- News page ---------- */
.featured-body h2 a:hover { color: var(--accent-2); }
.byline-more { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--accent-2); font-weight: 600; }
.byline-more .icon { width: 14px; height: 14px; }
a.news-row:hover { background: var(--panel-hover); }
a.news-row:hover h3 { color: var(--accent-2); }
.news-article .featured-media { position: relative; }
.news-article .featured-media .tag { position: absolute; left: 14px; top: 14px; }
.news-body { margin-top: 16px; color: var(--text-2); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.news-body strong { color: #fff; }
.news-body a { color: var(--accent-2); text-decoration: underline; }
.tag-maintenance { background: #b5473a; }
.tag-beta { background: #2f8a5f; }

/* ---------- Admin panel ---------- */
select {
    padding: 10px 34px 10px 12px; border-radius: var(--r); font: 500 .92rem var(--body); color: var(--text); cursor: pointer;
    background: var(--input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d84ad' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #2a2f55; appearance: none; outline: none;
}
select:focus { border-color: var(--accent); }
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-nav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px; font-weight: 600; font-size: .9rem; color: var(--text-2); }
.admin-nav a .icon { width: 17px; height: 17px; }
.admin-nav a:hover { background: var(--panel-hover); color: #fff; }
.admin-nav a.active { background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 var(--accent-dark); }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card { padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-card b { font: 800 1.6rem var(--head); }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.stat-label .icon { width: 15px; height: 15px; color: var(--accent-2); }
.admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head + .admin-row, .admin-row:first-child { border-top: 0; }
.admin-row img { border-radius: 4px; image-rendering: pixelated; }
.admin-row-main { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.admin-row-main b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-actions { display: flex; align-items: center; gap: 6px; }
.admin-actions select { padding-top: 6px; padding-bottom: 6px; font-size: .84rem; }
.push { margin-left: auto; }
.draft { color: var(--amber); font-weight: 600; }
.role-banned { background: #4a4f6e; color: #fff; }
.admin-search { max-width: 320px; }
.field-row-wide { grid-template-columns: 1fr 200px; }
.settings-intro { margin-bottom: 14px; font-size: .9rem; }
.setting-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--input); border: 1px solid var(--line); border-radius: var(--r); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 4px; font-size: .86rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg span .icon { width: 15px; height: 15px; }
.seg input:checked + span { background: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent-2); }
.form-actions-end { justify-content: flex-end; margin-top: 10px; }
@media (max-width: 1000px) {
    .admin { grid-template-columns: 1fr; }
    .admin-nav { position: static; flex-direction: row; overflow-x: auto; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .field-row-wide { grid-template-columns: 1fr; } }
