/* uhc.games: dark, calm, red accents. All colours live here so the look can change in one place. */
:root {
  --bg: #0b0b0e;
  --panel: #131318;
  --panel-2: #1a1a21;
  --line: #24242d;
  --line-2: #30303b;
  --text: #ececf1;
  --muted: #9b9ba8;
  --faint: #6b6b78;
  --accent: #e5484d;
  --accent-soft: rgba(229, 72, 77, 0.14);
  --live: #3dd68c;
  --live-soft: rgba(61, 214, 140, 0.14);
  --warn: #f5a524;
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(11, 11, 14, 0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: 0.02em; font-size: 17px; }
.brand b { color: var(--accent); font-weight: 800; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 9px; font-weight: 500; font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--text); background: var(--panel-2); }
.nav .avatar { width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--panel-2); padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: #ff8589; }
.btn[disabled] { opacity: .5; cursor: default; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 160px; resize: vertical; font-family: var(--mono); font-size: 13px; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 5px; }
.field { margin-bottom: 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Headings */
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 28px 0 12px; letter-spacing: -0.01em; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.title-row h1 { margin: 0; }
.clock { display: inline-flex; align-items: baseline; gap: 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 7px 14px; }
.clock span { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.clock b { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.lead { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }

/* Filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.toolbar .search { flex: 1; min-width: 180px; max-width: 280px; margin-left: auto; padding: 7px 12px; border-radius: 999px; font-size: 13px; }
.toolbar .tz-select { width: auto; padding: 6px 30px 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); background: transparent url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27%3E%3Cpath d=%27M0 0l5 6 5-6z%27 fill=%27%239b9ba8%27/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; cursor: pointer; }
.toolbar .tz-select option { background: var(--panel); color: var(--text); }

/* Calendar */
.day { margin-bottom: 26px; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }
.day-head b { color: var(--text); letter-spacing: .04em; }
.cards { display: grid; gap: 10px; }
.card { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
.card:hover { border-color: var(--line-2); background: var(--panel-2); }
.card.past { opacity: .6; }
.time { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; }
.time small { display: block; font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: 0; margin-top: 3px; }
.card .title { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .meta { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.card > div { min-width: 0; }
.card .scen { color: var(--faint); font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.right { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.tag.region { color: var(--text); }
.tag.accent { background: var(--accent-soft); border-color: transparent; color: #ff9a9d; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--live); background: var(--live-soft); padding: 3px 9px; border-radius: 999px; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(61, 214, 140, .25); }
.live.off { color: var(--faint); background: var(--panel-2); }
.live.off::before { background: var(--faint); box-shadow: none; }
.soon { color: var(--warn); font-size: 12px; font-weight: 700; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 14px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; border: 1px solid var(--line-2); background: var(--panel-2); }
.notice.bad { border-color: rgba(229, 72, 77, .5); background: var(--accent-soft); }
.notice.good { border-color: rgba(61, 214, 140, .4); background: var(--live-soft); }

/* Game page */
.game-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.fact { background: var(--panel); padding: 14px 16px; box-shadow: 1px 1px 0 var(--line); }
.fact span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 700; margin-bottom: 4px; }
.fact b { font-weight: 600; }
.ip { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 8px 8px 14px; }
.scenarios { display: flex; flex-wrap: wrap; gap: 6px; }
.scenarios .tag { font-size: 13px; padding: 4px 10px; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose { line-height: 1.7; color: #d6d6de; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3 { margin: 18px 0 8px; font-size: 17px; color: var(--text); }
.prose a { color: #ff9a9d; }
.prose code { font-family: var(--mono); font-size: 13px; background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }
.prose ul { padding-left: 20px; }
.countdown { font-variant-numeric: tabular-nums; }

/* Tables (account, admin) */
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.row .grow { flex: 1; min-width: 160px; }
.row img { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: #ff9a9d; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.key { font-family: var(--mono); word-break: break-all; background: var(--bg); padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--accent); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { display: flex; gap: 16px; justify-content: space-between; color: var(--faint); font-size: 13px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

@media (max-width: 640px) {
  .card { grid-template-columns: 64px 1fr; }
  .card .right { grid-column: 2; flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .card .right .tag.region { display: none; }
  .card .right:not(:has(.live)) { display: none; }
  .card .scen { white-space: normal; }
  .time { font-size: 17px; }
  .nav a { padding: 7px 7px; font-size: 13px; }
  .brand { font-size: 15px; }
  .top-inner { gap: 8px; }
  .nav .label { display: none; }
  h1 { font-size: 23px; }
  .toolbar .search { max-width: none; margin-left: 0; flex-basis: 100%; }
}

/* Host application */
.steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; }
.application { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); font-size: 13px; display: grid; gap: 4px; }
.application span { display: inline-block; min-width: 64px; color: var(--muted, #888); }
.application p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.application .mono { font-family: var(--mono); font-weight: 500; }
