:root {
  --bg: #0f1218;
  --card: #181c25;
  --text: #e8ebf1;
  --muted: #8b93a5;
  --accent: #4f7cff;
  --ok: #2ecc71;
  --danger: #e5484d;
  --border: #2a3040;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  padding: 1rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

h1 { margin: 0 0 1.5rem; font-size: 1.4rem; text-align: center; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }

input {
  width: 100%;
  padding: .8rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10141b;
  color: var(--text);
  margin-bottom: 1rem;
}
input:focus { outline: 2px solid var(--accent); border-color: transparent; }
#pin { text-align: center; font-size: 1.6rem; letter-spacing: .5rem; }

button {
  width: 100%;
  padding: .8rem 1rem;
  font-size: 1rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--accent); }
.secondary { background: #2a3040; }
.secondary.active { background: var(--danger); }
.danger { background: var(--danger); }
.link { background: none; color: var(--muted); font-weight: 400; margin-top: .5rem; text-decoration: underline; }

.muted { color: var(--muted); font-size: .9rem; }
.center { text-align: center; }
.error { color: var(--danger); min-height: 1.2em; font-size: .9rem; }

.status { text-align: center; margin: 0 0 1rem; color: var(--muted); }
.status.ok { color: var(--ok); }

.participants { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.participants li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #10141b;
  border: 2px solid transparent;
  transition: border-color .12s;
}
.participants li.speaking { border-color: var(--ok); }
.participants li.waiting { color: var(--muted); font-style: italic; }
.participants .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); font-weight: 700;
}
.participants .name { flex: 1; }
.participants .badge { font-size: .8rem; color: var(--muted); }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
