/* HAXAUS: dark community-hub look, warm orange accent */
:root {
	--bg: #0c0e13; --bg2: #10131a; --panel: #141821; --panel2: #1a1f2a; --line: #242a36; --line2: #2f3644;
	--text: #e9edf3; --muted: #8e98a8; --dim: #5f6878;
	--accent: #ff9b45; --accent2: #ffb877; --accent-bg: #ff9b4519; --accent-line: #ff9b4555;
	--good: #4ad98a; --red: #ff6b5e; --blue: #4ba3ff; --warn: #f5c451;
	--radius: 14px; --radius-sm: 9px;
	--display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
	margin: 0; color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background:
		radial-gradient(1200px 500px at 15% -10%, #ff9b4512, transparent 60%),
		radial-gradient(900px 500px at 100% 0%, #4ba3ff0d, transparent 60%),
		radial-gradient(#ffffff08 1px, transparent 1px) 0 0 / 22px 22px,
		var(--bg);
	min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; margin: 1.4rem 0 .9rem; }
h2 { font-size: 1.12rem; font-weight: 700; margin: 0 0 .8rem; }
h3 { font-size: 1rem; font-weight: 700; margin: .8rem 0 .5rem; }
code { background: var(--panel2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .85em; word-break: break-all; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.accent { color: var(--accent); }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: #0c0e13d9; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand .mark { width: 28px; height: 28px; }
.brand .pt { color: var(--accent); }
.top nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.top nav a { color: var(--muted); padding: 7px 13px; border-radius: 999px; white-space: nowrap; font-weight: 500; font-size: .93rem; }
.top nav a:hover { color: var(--text); background: var(--panel2); }
.top nav a.on { color: var(--accent); background: var(--accent-bg); }
.search-pill { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; height: 38px; width: 210px; }
.search-pill input { background: none; border: 0; padding: 0; width: 100%; color: var(--text); font: inherit; font-size: .9rem; outline: none; }
.search-pill svg { flex: none; color: var(--dim); }
.acct-nav { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.acct-nav a:not(.btn) { color: var(--muted); font-weight: 500; }
.acct-nav a.me { color: var(--text); display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-line); font-weight: 800; font-size: .85rem; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: #1b0f04; border: 0; border-radius: 999px; padding: 9px 17px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent2); color: #1b0f04; }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.lg { padding: 12px 22px; font-size: 1rem; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.btn.ghost:hover { border-color: var(--accent-line); color: var(--accent2); }
.btn.danger, button.danger { background: #e5484d; color: #fff; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { color: var(--text); }
button.link.danger { color: var(--red); background: none; }
form.inline { display: inline; }
input, select, textarea { background: var(--bg2); color: var(--text); border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 9px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
textarea { resize: vertical; }
label { display: inline-flex; gap: 8px; align-items: center; }
.row { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; }
.stack { display: flex; flex-direction: column; gap: 13px; }
.stack label { display: flex; flex-direction: column; align-items: stretch; gap: 5px; font-weight: 500; }
.stack .btn { align-self: flex-start; }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.filters input[type=number] { width: 84px; }
.filters input[name=q] { flex: 1; max-width: 420px; }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg a { padding: 6px 13px; color: var(--muted); border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: .88rem; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
.err { background: #3a1416; border: 1px solid #6e2228; color: #ffb3b0; padding: 11px 15px; border-radius: var(--radius-sm); }
.ok-msg { background: #10291c; border: 1px solid #1f5a38; color: #9ff0c0; padding: 11px 15px; border-radius: var(--radius-sm); }

/* ---------- panels ---------- */
.card { background: linear-gradient(180deg, #171c26, var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; box-shadow: 0 1px 0 #ffffff06 inset; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.card-head > a { font-size: .88rem; white-space: nowrap; }
.narrow { max-width: 440px; margin: 48px auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-top: 18px; }
.grid2 > .card { margin: 0 0 18px; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 18px; align-items: start; }
.split > .card { margin: 0; }
.links .btn { margin: 0 6px 6px 0; }
.admin-only { border-color: #5c4a1a; }

/* ---------- home hub ---------- */
.hub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 34px 0 22px; flex-wrap: wrap; }
.hub-title { font-family: var(--display); font-size: 3rem; font-weight: 900; line-height: 1; margin: 6px 0 0; letter-spacing: -.02em; }
.hub-title .aus { color: var(--accent); }
.hub-side { text-align: right; color: var(--muted); font-size: .92rem; }
.hub-side a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tiles-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.tile-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(180deg, #171c26, var(--panel)); border: 1px solid var(--line); color: var(--text); position: relative; transition: border-color .15s, transform .15s; }
.tile-link:hover { border-color: var(--accent-line); color: var(--text); transform: translateY(-1px); }
.tile-link.featured { border-color: var(--accent-line); background: linear-gradient(135deg, #ff9b4522, var(--panel) 60%); }
.tile-link .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line2); color: var(--accent2); flex: none; }
.tile-link.featured .ico { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent); }
.tile-link b { display: block; font-size: 1rem; }
.tile-link span.t { color: var(--muted); font-size: .85rem; }
.tile-link .arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.tile-link:hover .arrow { color: var(--accent); }
.statbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.statbar > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.statbar .big { font-size: 1.6rem; }

/* rooms */
.room { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.room + .room { margin-top: 10px; }
.room-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.room-name { font-weight: 700; }
.room-meta { color: var(--muted); font-size: .85rem; margin: 2px 0 10px; }
.room .btn { margin-top: 10px; }
.live-score { font-size: 1.5rem; font-weight: 800; margin: 4px 0 10px; font-family: var(--display); }
.live-teams { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.live-teams h4 { margin: 0 0 4px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.live-teams .t-red h4 { color: var(--red); }
.live-teams .t-blue h4 { color: var(--blue); }
.live-teams .t-spec h4 { color: var(--muted); }
.live-teams ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.live-teams li { padding: 2px 0; }
.live-teams .elo { color: var(--muted); font-size: .8rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--dim); vertical-align: 1px; }
.dot.ok { background: var(--good); box-shadow: 0 0 10px var(--good); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--red); }

/* replay list */
.replays { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.replay { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.replay:first-child { border-top: 0; }
.score-chip { min-width: 64px; text-align: center; padding: 8px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line2); font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.replay .title { font-weight: 700; }
.replay .meta { color: var(--muted); font-size: .82rem; }
.replay .acts { display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line2); }
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); }

/* discord */
.discord-btn { color: #aab4ff; }
.discord-btn:hover { color: #fff; background: #5865f2; border-color: #5865f2; }
.discord-banner { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); position: relative;
	background: linear-gradient(135deg, #5865f233, var(--panel) 70%); border: 1px solid #5865f266; color: var(--text); }
.discord-banner:hover { border-color: #5865f2; color: var(--text); }
.discord-banner .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: #5865f2; color: #fff; flex: none; }
.discord-banner b { display: block; }
.discord-banner .t { color: var(--muted); font-size: .85rem; }
.discord-banner .arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #aab4ff; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 9px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { color: var(--dim); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: #ffffff05; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { color: var(--muted); border-bottom: 0; border-top: 1px solid var(--line2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.small td { padding: 6px 9px; }
.tbl td.msg { word-break: break-word; }
.rank { color: var(--dim); width: 40px; font-weight: 700; }
.lb tbody tr:nth-child(1) .rank { color: #ffd166; }
.lb tbody tr:nth-child(2) .rank { color: #cfd8e3; }
.lb tbody tr:nth-child(3) .rank { color: #e0a06b; }
.team.win { font-weight: 700; }
.score a { color: var(--text); }
.r { color: var(--red); }
.b { color: var(--blue); }
.up { color: var(--good); }
.down { color: var(--red); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); vertical-align: 1px; }
.tag.win { color: var(--good); border-color: #1f5a38; }
.tag.loss { color: var(--red); border-color: #6e2228; }
.tag.hot { color: var(--accent); border-color: var(--accent-line); background: var(--accent-bg); }
.clan { font-size: .7rem; font-weight: 800; color: var(--warn); border: 1px solid #5c4a1a; border-radius: 5px; padding: 0 5px; margin-right: 3px; }
a.acct { color: var(--dim); font-size: .85em; }
a.acct:hover { color: var(--accent2); }
.team-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.team-dot.red { background: var(--red); }
.team-dot.blue { background: var(--blue); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; }

/* ---------- profiles & stats ---------- */
.big { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--display); }
.ph { display: flex; justify-content: space-between; align-items: flex-end; margin: 10px 0 16px; gap: 16px; }
.ph h1 { margin-bottom: 4px; }
.ph-ident { display: flex; gap: 16px; align-items: center; }
.ph .avatar { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.tile:first-child { border-color: var(--accent-line); background: linear-gradient(135deg, #ff9b4518, var(--panel) 70%); }
.chart { width: 100%; height: auto; }
.chart .grid { stroke: var(--line2); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.chart .area { fill: #ff9b4520; }
.chart .pt { fill: var(--accent); }
.bio { max-width: 640px; white-space: pre-wrap; color: var(--muted); }

/* ---------- match page ---------- */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; margin-top: 18px; padding: 26px 20px; }
.sb-team { font-size: 1.15rem; font-weight: 800; font-family: var(--display); letter-spacing: .06em; text-transform: uppercase; }
.sb-team.red { color: var(--red); text-align: right; }
.sb-team.blue { color: var(--blue); text-align: left; }
.sb-score { font-size: 3.4rem; font-weight: 900; padding: 0 26px; font-variant-numeric: tabular-nums; font-family: var(--display); }
.sb-score .sep { color: var(--dim); padding: 0 12px; }
.sb-meta { grid-column: 1 / -1; margin-top: 8px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.team-card.red { border-top: 3px solid var(--red); }
.team-card.blue { border-top: 3px solid var(--blue); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 12px; border-left: 3px solid var(--line2); margin-bottom: 6px; background: var(--bg2); border-radius: 0 9px 9px 0; }
.timeline li.red { border-left-color: var(--red); }
.timeline li.blue { border-left-color: var(--blue); }
.timeline .t { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 6px; }
.zones { display: flex; height: 30px; border-radius: 8px; overflow: hidden; font-size: .8rem; font-weight: 700; }
.zones .z { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.zones .r { background: #ff6b5e55; }
.zones .m { background: #ffffff14; }
.zones .b { background: #4ba3ff55; }
.zones-l { display: flex; justify-content: space-between; margin-top: 4px; }
.hm-wrap { background: #0a2412; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
#heatmap { width: 100%; height: auto; display: block; }
.player-actions { display: flex; gap: 8px; }

/* ---------- account ---------- */
.auth h1 { margin-top: 0; }
.code-box { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.code-box code { font-size: 1.4rem; padding: 9px 15px; letter-spacing: .08em; color: var(--accent); border-color: var(--accent-line); background: var(--accent-bg); }
.steps ol { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 8px; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.5rem; }
.prose li { margin-bottom: 6px; }

footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 28px 18px 44px; border-top: 1px solid var(--line); margin-top: 30px; }

@media (max-width: 900px) {
	.split { grid-template-columns: 1fr; }
	.statbar { grid-template-columns: repeat(2, 1fr); }
	.search-pill { display: none; }
	.top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
	.top nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 640px) {
	.tiles-nav { grid-template-columns: 1fr; }
	.hub-title { font-size: 2.3rem; }
	.hub-side { text-align: left; }
	.live-teams { grid-template-columns: 1fr 1fr; }
	.sb-score { font-size: 2.3rem; padding: 0 10px; }
	.replay { grid-template-columns: auto 1fr; }
	.replay .acts { grid-column: 1 / -1; }
}
