/* ArcanumWisp: shared styles for the account, reset-password, leaderboards, achievements and download pages.
   Colors and fonts match the rest of the site. */
:root {
  --bg: #0A101C; --panel: #111A2A; --panel-2: #0E1626; --line: #1F2C42; --line-2: #2C3D57;
  --text: #E6ECF4; --body: #B8C4D4; --muted: #8FA0B6; --ice: #9CCBF2; --ice-light: #CFE6FA;
  --blue: #3D7FD1; --blue-hover: #5293E3; --error: #F0A8A8; --ok: #9FDDB6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Figtree', system-ui, sans-serif; }
a { color: var(--ice); } a:hover { color: #D4E9FB; }
[hidden] { display: none !important; }

.site-header { max-width: 1200px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.brand span { font-family: 'Cinzel', serif; font-weight: 700; font-size: 20px; letter-spacing: 0.12em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.site-nav a { padding: 12px 14px; text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a[aria-current="page"] { color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: 48px 24px 96px; }
.eyebrow { margin: 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ice); }
h1 { margin: 8px 0 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(34px, 6vw, 52px); letter-spacing: 0.03em; line-height: 1.1; }
.lede { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--body); max-width: 40rem; }

.card { margin-top: 32px; padding: 32px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.narrow { max-width: 480px; }
.card h2 { margin: 0 0 4px; font-size: 24px; }
.card p { color: var(--body); line-height: 1.6; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tabs button { flex: 1 1 auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--body); font: 600 15px 'Figtree', sans-serif; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: #1A2638; color: var(--text); }

form { display: flex; flex-direction: column; gap: 18px; }
label { display: flex; flex-direction: column; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=email], input[type=password] {
  min-height: 52px; padding: 0 16px; border-radius: 8px; border: 2px solid var(--line); background: var(--panel-2);
  color: var(--text); font: 18px 'Figtree', sans-serif; letter-spacing: normal; text-transform: none; outline: none;
}
input:focus { border-color: var(--ice); }
input::placeholder { color: #5A6A80; }
.check { flex-direction: row; align-items: center; gap: 10px; font: 16px 'Figtree', sans-serif; letter-spacing: normal; text-transform: none; color: var(--body); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 8px; border: 0; background: var(--blue); color: #fff; font: 700 16px 'Figtree', sans-serif; letter-spacing: 0.06em; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-hover); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-outline { background: transparent; border: 2px solid var(--line-2); color: var(--text); }
.btn-outline:hover { background: var(--panel-2); border-color: var(--ice); color: var(--text); }
.link-btn { align-self: center; background: none; border: 0; padding: 6px; color: var(--ice); font: 600 15px 'Figtree', sans-serif; cursor: pointer; }
.link-btn:hover { color: #D4E9FB; text-decoration: underline; }

.status { min-height: 24px; margin: 0; font-size: 16px; color: var(--ice-light); }
.status[data-kind="error"] { color: var(--error); }
.status[data-kind="ok"] { color: var(--ok); }

.notice { margin-top: 24px; padding: 16px 20px; border-radius: 10px; background: #1A2638; border: 1px solid var(--line-2); color: var(--body); }

.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #1F2C42; border: 2px solid var(--ice); color: var(--ice); font: 700 26px 'Figtree', sans-serif; }
.profile-head h2 { margin: 0; font-size: 26px; }
.profile-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; padding: 12px 14px; font: 500 12px 'JetBrains Mono', monospace; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
td { padding: 14px; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.rank { width: 64px; font: 600 16px 'JetBrains Mono', monospace; color: var(--muted); }
tr.top1 td.rank { color: #F2D27A; } tr.top2 td.rank { color: #D6DEE8; } tr.top3 td.rank { color: #E0A97A; }
tr.me td { background: rgba(156, 203, 242, 0.08); }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--ice); }
.empty { padding: 32px 14px; text-align: center; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.ach-bar { height: 6px; border-radius: 3px; background: #1A2638; margin: 4px 0 20px; overflow: hidden; }
.ach-bar span { display: block; height: 100%; width: 0; background: var(--ice); transition: width 0.4s; }
.ach-list { list-style: none; margin: 0; padding: 0; }
.ach-list li { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.ach-list li.empty { display: block; }
.ach-list .badge { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--line-2); color: var(--ice); font-weight: 700; font-size: 20px; }
.ach-list li.got .badge { background: #1F2C42; border-color: var(--ice); }
.ach-list div { flex: 1; min-width: 0; }
.ach-list strong { font-size: 17px; color: var(--muted); }
.ach-list li.got strong { color: var(--text); }
.ach-list p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.ach-list .side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 500 13px 'JetBrains Mono', monospace; color: var(--muted); }
.ach-list li.got .side span:last-child { color: var(--ice); }
@media (max-width: 520px) { .ach-list li { flex-wrap: wrap; } .ach-list .side { width: 100%; flex-direction: row; justify-content: space-between; padding-left: 60px; } }

.download-card { text-align: center; padding: 44px 32px; }
.btn-big { min-height: 64px; padding: 0 40px; font-size: 19px; }
.dl-meta { margin: 14px 0 0; font: 500 14px 'JetBrains Mono', monospace; color: var(--muted) !important; }
.dl-notes { margin: 10px auto 0; max-width: 40rem; }
.dl-soon-title { margin: 0; font-family: 'Cinzel', serif; font-size: 28px; color: var(--text) !important; }
.features { margin-top: 8px; }
.features .card { margin-top: 24px; }
.features h2 { font-size: 20px; }
.steps { margin: 12px 0 0; padding-left: 22px; color: var(--body); line-height: 1.7; }
.steps li { margin-bottom: 6px; }
.dl-req { font-size: 15px; color: var(--muted) !important; }

.player-head { margin-top: 12px; }
.player-head h1 { margin: 0; }
.player-head p { margin: 4px 0 0; color: var(--muted); }
.game-card h2 { margin-bottom: 16px; }
.stat-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { flex: 1 1 120px; padding: 14px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { font: 500 12px 'JetBrains Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
td a { color: var(--text); text-decoration: none; } td a:hover { color: var(--ice); text-decoration: underline; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 24px; }
.chart { position: relative; width: 100%; height: 240px; margin-top: 12px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .baseline { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { fill: var(--muted); font: 500 12px 'JetBrains Mono', monospace; }
.chart .bar { fill: var(--ice); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit.on { fill: rgba(156, 203, 242, 0.08); }
.chart-tip { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: #1A2638; border: 1px solid var(--line-2); color: var(--text); font-size: 14px; white-space: nowrap; }
section.card { position: relative; }
.table-toggle { margin-top: 12px; color: var(--muted); }
.table-toggle summary { cursor: pointer; font-size: 14px; }
.report { border-top: 1px solid var(--line); padding: 12px 0; }
.report summary { cursor: pointer; color: var(--body); }
.report pre { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 13px/1.5 'JetBrains Mono', monospace; color: var(--body); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font: 600 12px 'Figtree', sans-serif; background: #1A2638; color: var(--ice-light); }
.tag.crash { background: rgba(240, 168, 168, 0.15); color: var(--error); }

.game-tabs { margin-bottom: 12px; }
.game-tabs button { font-size: 16px; }
.board-tabs { background: transparent; border-color: transparent; padding: 0; gap: 8px; }
.board-tabs button { flex: 0 1 auto; min-height: 40px; border: 1px solid var(--line-2); font-size: 14px; }
.board-tabs button[aria-selected="true"] { border-color: var(--ice); }

footer { padding: 28px 24px; border-top: 1px solid var(--line); }
footer div { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
footer span:last-child { font-family: 'Cinzel', serif; letter-spacing: 0.12em; }

@media (max-width: 560px) {
  .card { padding: 22px; }
  td, th { padding: 10px 8px; }
}
