/* Dark theme */
:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #ededed;
  background: #000;
}

/* Centered layout */
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}
main { width: min(100%, 400px); }

/* Username input */
label { display: block; margin-bottom: 8px; font-size: 14px; }
input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #111;
  color: inherit;
  font: inherit;
}

/* Text, focus and errors */
input::placeholder, p, a { color: #888; }
:focus-visible { outline: 2px solid #777; outline-offset: 2px; }
input:invalid:not(:placeholder-shown) { border-color: #fb7185; }

/* Help and error messages */
p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
#username-error { color: #fb7185; }

/* Stats page layout */
.stats-page { align-items: start; padding: 32px 0 24px; }
.stats-page main { width: calc(100% - 48px); }
a { font-size: 14px; text-underline-offset: 4px; }
h1 { margin: 24px 0 12px; font-size: 28px; overflow-wrap: anywhere; }
