:root {
  --bg: #14161a;
  --card: #1f2329;
  --line: #2e333b;
  --text: #e8eaed;
  --muted: #9aa1ab;
  --accent: #5dbb46;
  --accent-dark: #3f8f2d;
  --error: #ff6b6b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

header { text-align: center; margin-bottom: 20px; }
h1 { font-size: 1.35rem; margin: 12px 0 2px; }
h2 { font-size: 1.2rem; margin: 8px 0; text-align: center; }
.sub, .muted { color: var(--muted); margin: 0; font-size: .92rem; }
p { line-height: 1.5; }

/* Kleiner Grasblock als Logo */
.logo {
  width: 44px; height: 44px; margin: 0 auto;
  border-radius: 6px;
  background:
    linear-gradient(#6cc04a 0 35%, transparent 35%),
    repeating-linear-gradient(90deg, #8b5a2b 0 8px, #7a4e24 8px 16px);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.2);
}

form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.code-input {
  font: 600 2rem/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .35em;
  text-align: center;
  padding: 14px 10px 14px calc(10px + .35em);
}

input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  color: var(--text);
  background: #15181d;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93,187,70,.2); }

label { font-size: .9rem; color: var(--muted); display: block; margin-bottom: 6px; }

button {
  padding: 13px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #0d1a09;
  background: var(--accent);
  border: 0;
  border-bottom: 3px solid var(--accent-dark);
  border-radius: 10px;
  cursor: pointer;
}
button:hover { filter: brightness(1.07); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font-weight: 500;
}

.player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #15181d;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.player img { image-rendering: pixelated; border-radius: 6px; }
.name { font-size: 1.4rem; font-weight: 700; margin: 2px 0 0; word-break: break-all; }

.check {
  width: 64px; height: 64px; margin: 4px auto 0;
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 700;
  color: #0d1a09; background: var(--accent);
  border-radius: 50%;
}
#step-done p { text-align: center; }
.address code {
  background: #15181d; border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 6px; user-select: all;
}

.error {
  margin: 16px 0 0;
  padding: 10px 12px;
  color: var(--error);
  background: rgba(255,107,107,.08);
  border: 1px solid rgba(255,107,107,.3);
  border-radius: 10px;
  font-size: .95rem;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

[hidden] { display: none !important; }
