:root {
  --bg: #fff8e7;
  --card: #ffffff;
  --text: #2b2b3a;
  --muted: #7a7a8c;
  --accent: #4f8cff;
  --accent-dark: #2f6ae0;
  --disabled: #c9c9d3;
  --gold: #ffd54a;
  --silver: #d7dde5;
  --bronze: #f0b27a;
  --mine: #c8f7c5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1f2b;
    --card: #2a2d3d;
    --text: #f2f2f7;
    --muted: #a0a3b5;
    --disabled: #4a4d5e;
    --gold: #b8932a;
    --silver: #6b7280;
    --bronze: #9a6a3f;
    --mine: #2f6b3a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
}

main {
  width: 100%;
  max-width: 420px;
  padding: 24px 16px;
  text-align: center;
}

h1 { font-size: 2.4rem; margin: 8px 0 24px; }

label { display: block; font-size: 1.5rem; margin-bottom: 12px; }

input {
  width: 100%;
  font-size: 1.6rem;
  padding: 14px;
  border: 3px solid var(--accent);
  border-radius: 16px;
  text-align: center;
  background: var(--card);
  color: var(--text);
  margin-bottom: 16px;
}

.big {
  width: 100%;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 20px;
  border: none;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--accent-dark);
  transition: transform .08s, box-shadow .08s, background .3s;
}

.big:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-dark); }

.big:disabled {
  background: var(--disabled);
  box-shadow: none;
  cursor: not-allowed;
  color: var(--muted);
}

.hello { font-size: 1.3rem; }

.link {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: .9rem;
  cursor: pointer;
}

#queue {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
}

#queue li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.6rem;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: var(--card);
  text-align: left;
}

#queue li .medal { font-size: 2rem; }
#queue li .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#queue li.empty .who { color: var(--muted); font-style: italic; }

#queue li:nth-child(1) { border-left: 10px solid var(--gold); }
#queue li:nth-child(2) { border-left: 10px solid var(--silver); }
#queue li:nth-child(3) { border-left: 10px solid var(--bronze); }
#queue li.mine { background: var(--mine); }

.status { font-size: 1.2rem; color: var(--muted); min-height: 1.5em; margin-top: 18px; }

.offline { color: #d9534f; font-weight: 600; }
