/* Layout idea: uppercase nav with a PLAY NOW button, big hero on the home page, plain page headers on inner pages, panels and cards on a warm dark ground. */
:root {
  --bg: #140c08;
  --panel: #1e1310;
  --panel-2: #271813;
  --line: #3d2620;
  --text: #f0e6d6;
  --muted: #b39d8d;
  --accent: #e8a33d;
  --accent-ink: #1e1204;
  --ember: #ff4a14;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 18px; line-height: 1.55; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Nav */
nav { border-bottom: 1px solid var(--line); background: rgba(20,12,8,.94); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .08em; text-decoration: none; }
.brand img { width: 40px; height: 40px; display: block; }
.links { display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.links a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }
.links a:hover, .links a[aria-current="page"] { color: var(--text); }
.links a[aria-current="page"] { box-shadow: 0 2px 0 var(--accent); }
.links a.play { color: var(--accent-ink); background: var(--accent); padding: 9px 18px; border-radius: 5px; box-shadow: none; }
.links a.play:hover { background: #f4b95a; color: var(--accent-ink); }

/* Home hero */
.hero { position: relative; border-bottom: 1px solid var(--line); background: #2a0e08 url("background.jpg") center 30% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,8,.35) 0%, rgba(20,12,8,.55) 55%, var(--bg) 100%); }
.hero .wrap { position: relative; display: grid; justify-items: center; text-align: center; gap: 18px; padding-top: 52px; padding-bottom: 72px; }
.hero .logo { width: min(520px, 86%); height: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kicker { font-family: var(--font-display); font-weight: 600; letter-spacing: .28em; text-transform: uppercase; font-size: 15px; color: var(--accent); margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.hero .big { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 7vw, 64px); line-height: 1; letter-spacing: .03em; margin: -4px 0 0; text-shadow: 0 4px 24px rgba(0,0,0,.85); text-wrap: balance; }
.hero p.lead { margin: 0; font-size: 21px; max-width: 48ch; text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 32px; border-radius: 6px; font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 2px solid var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 28px rgba(255,74,20,.4); }
.btn.primary:hover { background: #f4b95a; }
.btn.ghost { color: var(--text); border-color: var(--line); background: rgba(30,19,16,.88); }
.btn.ghost:hover { border-color: var(--accent); }
.stats { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 16px; margin-top: 6px; }
.stats b { display: block; color: var(--text); font-family: var(--font-display); font-size: 26px; font-variant-numeric: tabular-nums; }

/* Inner page header */
.page-head { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #2a140c 0%, var(--bg) 100%); padding: 56px 0 40px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(32px, 6vw, 48px); margin: 0 0 8px; letter-spacing: .05em; text-transform: uppercase; }
.page-head p { margin: 0; color: var(--muted); max-width: 60ch; font-size: 20px; }

/* Sections */
section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
h2 { font-family: var(--font-display); font-size: 30px; margin: 0 0 6px; letter-spacing: .04em; text-transform: uppercase; }
.sub { color: var(--muted); margin: 0; max-width: 60ch; }
.clock { text-align: right; color: var(--muted); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.clock b { display: block; font-family: var(--font-display); font-size: 28px; color: var(--accent); letter-spacing: .06em; font-variant-numeric: tabular-nums; }

/* Events */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.event { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ember); border-radius: 8px; padding: 16px 20px; }
.event.boss { border-left-color: var(--accent); }
.event.minigame { border-left-color: #8d7bd6; }
.event .n { font-family: var(--font-display); font-size: 26px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); margin-bottom: 2px; }
.event.boss .tag { color: var(--accent); }
.event.minigame .tag { color: #a99be8; }
.event h3 { margin: 0; font-size: 21px; }
.event .where { color: var(--muted); font-size: 16px; }
.event .desc { margin: 4px 0 0; color: var(--muted); font-size: 16px; max-width: 60ch; }
.event .when { text-align: right; white-space: nowrap; }
.event .count { display: block; font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.event .utc { color: var(--muted); font-size: 15px; }
.more { margin-top: 14px; background: none; border: 1px solid var(--line); color: var(--text); font: inherit; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 11px 20px; border-radius: 6px; cursor: pointer; }
.more:hover { border-color: var(--accent); }
.hint { color: var(--muted); font-size: 15px; margin: 12px 0 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.tile h3 { margin: 0; font-size: 21px; color: var(--accent); }
.tile .date { color: var(--muted); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.tile p { margin: 0; color: var(--muted); font-size: 17px; flex: 1; }
.tile a { margin-top: 6px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; text-decoration: none; color: var(--text); }
.tile a:hover { color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ember); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps h3 { margin: 0 0 4px; font-size: 20px; }
.steps p { margin: 0; color: var(--muted); font-size: 17px; }

.table-scroll { overflow-x: auto; }
.rates { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
.rates th, .rates td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rates th { font-family: var(--font-display); font-size: 15px; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.rates tr:last-child td { border-bottom: 0; }
.rates td:last-child { color: var(--accent); font-weight: 700; }

/* Discord */
.discord { display: grid; justify-items: center; text-align: center; gap: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 44px 20px; }
.discord h2 { margin: 0; }
.discord p { margin: 0; color: var(--muted); max-width: 46ch; }

/* Footer */
footer { padding: 44px 0 52px; color: var(--muted); font-size: 16px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.cols h4 { margin: 0 0 10px; font-family: var(--font-display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cols a { text-decoration: none; }
.cols a:hover { color: var(--accent); }
.fbrand { display: flex; align-items: center; gap: 12px; }
.fbrand img { width: 56px; height: 56px; }
.fbrand strong { font-family: var(--font-display); letter-spacing: .08em; font-size: 22px; color: var(--text); }
.fabout { margin: 10px 0 0; max-width: 34ch; }
.legal { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 14px 0 0; }
.legal a { text-decoration: none; font-size: 15px; }
.legal a:hover { color: var(--accent); }
.fine { margin: 18px 0 0; font-size: 14px; max-width: 80ch; }

@media (max-width: 800px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr 1fr; }
  .cols > :first-child { grid-column: 1 / -1; }
  nav .wrap { padding-top: 10px; padding-bottom: 10px; justify-content: center; }
  /* On a phone the nav wraps to three rows: pinned it would cover a fifth of the screen, so it scrolls away with the page. */
  nav { position: static; }
  .links { justify-content: center; }
  .event { grid-template-columns: 1fr; gap: 6px; }
  .event .n { display: none; }
  .event .when { text-align: left; }
  .clock { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Simple home page */
.hero p.lead { font-size: 22px; }
main#features { padding-top: 24px; padding-bottom: 24px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 48px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .pic { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.feature .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature .pic.crest { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #3a1a10 0%, var(--panel) 70%); }
.feature .pic.crest img { width: 62%; height: auto; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(255,74,20,.35)); }
.feature .txt h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 10px; }
.feature .txt p { margin: 0; color: var(--muted); font-size: 20px; max-width: 40ch; }
.feature.flip .pic { order: 2; }
.closer { text-align: center; background: linear-gradient(180deg, var(--bg) 0%, #2a140c 100%); border-top: 1px solid var(--line); }
.closer .wrap { display: grid; justify-items: center; gap: 12px; }
.closer h2 { margin: 0; font-size: clamp(28px, 5vw, 40px); }
.closer p { margin: 0 0 8px; color: var(--muted); font-size: 20px; }
.fbrand { margin-bottom: 6px; }
@media (max-width: 800px) {
  .feature { grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
  .feature.flip .pic { order: 0; }
}

/* Discord buttons */
.dicon { display: inline-flex; margin-right: 8px; }
.dicon svg { display: block; }
.links a.discord-btn { display: inline-flex; align-items: center; color: var(--text); border: 2px solid var(--line); background: var(--panel); padding: 7px 16px; border-radius: 5px; box-shadow: none; }
.links a.discord-btn:hover { border-color: #5865f2; color: #fff; }
.btn.ghost { display: inline-flex; }
.btn.ghost:hover .dicon { color: #8f9bff; }

/* Download page */
.dl { padding-top: 40px; padding-bottom: 56px; }
.dl-card { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 40px 20px; margin-bottom: 28px; background: radial-gradient(circle at 50% 0%, #3a1a10 0%, var(--panel) 70%); border: 1px solid var(--line); border-radius: 10px; }
.dl-btn { font-size: 22px; padding: 18px 44px; }
.dl-btn.off { opacity: .6; box-shadow: none; cursor: not-allowed; }
.dl-sub { margin: 0; color: var(--muted); max-width: 52ch; }
.dl .steps a { color: var(--accent); }
.dl-help { display: grid; justify-items: center; text-align: center; gap: 10px; margin-top: 32px; padding: 36px 20px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.dl-help h2 { margin: 0; font-size: 26px; }
.dl-help p { margin: 0 0 6px; color: var(--muted); max-width: 46ch; }

/* Hiscores */
#hiscores { padding-top: 36px; padding-bottom: 64px; }
.hs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.hs-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.hs-side h3 { margin: 18px 0 6px; font-family: var(--font-display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.hs-side h3:first-child { margin-top: 0; }
.hs-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hs-cat { width: 100%; text-align: left; font: inherit; font-size: 16px; color: var(--muted); background: none; border: 0; border-left: 3px solid transparent; padding: 6px 10px; border-radius: 0 5px 5px 0; cursor: pointer; }
.hs-cat:hover { color: var(--text); background: var(--panel); }
.hs-cat.on { color: var(--text); font-weight: 700; background: var(--panel-2); border-left-color: var(--accent); }
.hs-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.hs-field { display: grid; gap: 4px; flex: 1 1 160px; }
.hs-field label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hs-field input, .hs-field select { font: inherit; font-size: 17px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; min-height: 46px; width: 100%; }
.hs-field input:focus, .hs-field select:focus { border-color: var(--accent); }
.hs-catsel { display: none; flex-basis: 100%; }
.hs-go { padding: 11px 26px; min-height: 46px; font-size: 16px; cursor: pointer; }
.hs-msg { min-height: 1.55em; margin: 10px 2px; color: var(--accent); font-weight: 700; }
.hs-panel { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; overflow: hidden; scroll-margin-top: 90px; }
.hs-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.hs-head h2 { margin: 0; font-size: 22px; }
.hs-updated { color: var(--muted); font-size: 14px; }
.table-scroll { overflow-x: auto; }
.hs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hs-table th { text-align: left; padding: 13px 18px; font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: #1a0f0b; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hs-table td { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.hs-table th.num, .hs-table td.num { text-align: right; }
.hs-table td.rk { width: 72px; color: var(--muted); font-weight: 700; }
.hs-table td.who { font-weight: 700; letter-spacing: .02em; }
.hs-table td.none { text-align: center; color: var(--muted); padding: 36px 18px; }
.hs-table tbody tr:hover { background: rgba(232,163,61,.06); }
.hs-table tbody tr.hit { background: rgba(232,163,61,.16); box-shadow: inset 3px 0 0 var(--accent); }
.hs-table tbody tr:last-child td { border-bottom: 0; }
.medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; color: #1e1204; }
.medal.m1 { background: linear-gradient(135deg, #ffe08a, #e8a33d); }
.medal.m2 { background: linear-gradient(135deg, #f1f1f1, #aab0b8); }
.medal.m3 { background: linear-gradient(135deg, #f0b27a, #b0652c); }
.hs-note { margin: 0; padding: 10px 20px; color: var(--muted); font-size: 15px; }
.hs-note:empty { display: none; }
.hs-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 16px; border-top: 1px solid var(--line); }
.hs-pager:empty { display: none; }
.pg { min-width: 40px; min-height: 40px; font: inherit; font-weight: 700; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.pg:hover:not(:disabled) { border-color: var(--accent); }
.pg.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pg:disabled { opacity: .4; cursor: default; }
.hs-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 56px 20px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; }
.hs-empty h2 { margin: 0; }
.hs-empty p { margin: 0 0 6px; color: var(--muted); max-width: 52ch; }
@media (max-width: 800px) {
  .hs-layout { grid-template-columns: 1fr; gap: 16px; }
  .hs-side { display: none; }
  .hs-catsel { display: grid; }
  .hs-table th, .hs-table td { padding: 11px 12px; }
  .hs-table td.rk { width: 52px; }
  .dl-btn { padding: 16px 28px; font-size: 20px; }
}

/* Vote page (vote.html: username first, then the voting sites) */
.vote { max-width: 560px; margin: 0 auto; padding: 56px 20px 72px; display: grid; gap: 18px; }
.vote-card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px; padding: 26px 24px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.vote-card[hidden] { display: none; }
.vote-step { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.vote-card h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 30px; letter-spacing: .04em; text-transform: uppercase; }
.vote-lead { margin: 0 0 18px; color: var(--muted); }
.vote-lead strong { color: var(--text); }
.vote form { display: grid; gap: 8px; }
.vote label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.vote input { font: inherit; font-size: 20px; color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 6px; padding: 12px 14px; min-height: 52px; width: 100%; }
.vote input:focus { border-color: var(--accent); outline: none; }
.vote input[aria-invalid="true"] { border-color: #e5533d; }
.vote-error { min-height: 1.5em; margin: 0; color: #ff8a73; font-weight: 700; font-size: 16px; }
.vote form .btn { width: 100%; cursor: pointer; }
.vote-sites { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.vote-sites li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.vote-sites li.none { justify-content: center; color: var(--muted); }
.vote-sites strong { display: block; font-size: 20px; }
.vote-sites span { color: var(--muted); font-size: 15px; }
.vote-sites .btn { padding: 11px 26px; flex: none; }
.vote-fine { margin: 0; color: var(--muted); font-size: 14px; }
.linklike { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: #f4b95a; }
@media (max-width: 420px) { .vote-sites li { flex-direction: column; align-items: stretch; text-align: center; } }

/* Vote status and recent voters */
.vote-status { display: grid; gap: 2px; margin: 0 0 14px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid var(--muted); background: var(--panel-2); }
.vote-status[hidden] { display: none; }
.vote-status strong { font-size: 19px; }
.vote-status span { color: var(--muted); font-size: 16px; }
.vote-status.ok { border-left-color: #5fbf6a; }
.vote-status.ok strong { color: #8fe29a; }
.vote-status.wait { border-left-color: var(--accent); }
.vote-status.wait strong { color: var(--accent); }
.vote-refresh { margin: 0 0 12px; font-size: 15px; }
.vote-recent[hidden] { display: none; }
.vote-recent h2 { margin: 0 0 4px; font-size: 22px; }
.vote-counts { margin: 0 0 12px; color: var(--accent); font-weight: 700; }
.vote-recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.vote-recent-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.vote-recent-list li:last-child { border-bottom: 0; }
.vote-recent-list li.none { justify-content: center; color: var(--muted); }
.vote-recent-list span { color: var(--muted); font-size: 15px; white-space: nowrap; }
.vote-recent h3 { margin: 18px 0 6px; font-family: var(--font-display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.vote-top-list { list-style: none; counter-reset: none; }
