:root {
  --bg: #0f1220;
  --card: #1a1f35;
  --accent: #ffb703;
  --accent2: #fb8500;
  --text: #f1f3f8;
  --muted: #8b93b0;
  --good: #2ec4b6;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wrap {
  width: 100%;
  max-width: 560px;
  padding: 20px 16px 60px;
}

h1 { font-size: 28px; text-align: center; margin: 24px 0 4px; }
.sub { text-align: center; color: var(--muted); margin: 0 0 28px; font-size: 14px; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

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

input {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2c3358;
  background: #11152a;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 12px;
  text-align: center;
}
input:focus { outline: 2px solid var(--accent); }

button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a1206;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; }

button.ghost {
  background: transparent;
  border: 1px solid #2c3358;
  color: var(--text);
}

.code-badge {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 16px;
}
.code-badge b {
  display: inline-block;
  font-size: 32px;
  letter-spacing: 6px;
  color: var(--accent);
  margin-left: 6px;
}

.players { list-style: none; padding: 0; margin: 0; }
.players li {
  padding: 12px 14px;
  background: #11152a;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.players li .host-tag {
  margin-left: auto;
  font-size: 12px;
  background: var(--accent);
  color: #1a1206;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

.game-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.game-picker .opt {
  padding: 14px 6px;
  text-align: center;
  border-radius: 12px;
  background: #11152a;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 13px;
}
.game-picker .opt .emo { font-size: 26px; display: block; margin-bottom: 4px; }
.game-picker .opt.sel { border-color: var(--accent); background: #20264a; }

canvas {
  width: 100%;
  background: #0b0e1c;
  border-radius: 14px;
  display: block;
  margin: 0 auto;
}

#winnerBox {
  text-align: center;
  margin: 18px 0;
  min-height: 40px;
}
#winnerBox .big {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
#winnerBox .label { color: var(--muted); font-size: 14px; }

.hidden { display: none !important; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: 10px; }
a.link { color: var(--accent); text-align:center; display:block; margin-top:16px; text-decoration:none; }
