/* Verspielte, bunte Optik - reine Handy/Browser-Optimierung, kein TV-Modus. */
:root {
  --bg-1: #6c5ce7;
  --bg-2: #fd79a8;
  --card: #ffffff;
  --text: #2d2140;
  --text-muted: #6b6280;
  --accent: #00cec9;
  --accent-dark: #019a97;
  --warn: #fdcb6e;
  --danger: #e74c3c;
  --radius: 20px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  padding: 4px 4px 18px;
}

.topbar .brand {
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
}

.topbar nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 14px;
  margin-left: 14px;
  font-weight: 600;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  margin-bottom: 18px;
}

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 0 0 12px; }
p.sub { color: var(--text-muted); margin: 0 0 18px; font-size: 15px; }

label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin: 14px 0 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="date"],
input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #eee0f5;
  font-size: 17px;
  background: #faf7ff;
  color: var(--text);
}

input:focus { outline: none; border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  margin-top: 16px;
  transition: transform 0.08s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #013735; }
.btn-secondary { background: #f0edf9; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block-row { display: flex; gap: 10px; }
.btn-block-row .btn { margin-top: 10px; }

.error {
  background: #ffe8e6;
  color: #a3271a;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.room-code {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--bg-1);
  margin: 6px 0 14px;
}

.qr-box { text-align: center; margin-bottom: 8px; }
.qr-box img { border-radius: var(--radius-sm); }

.player-list { list-style: none; padding: 0; margin: 0; }
.player-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid #f1edf9;
  font-weight: 600;
}
.player-list li:last-child { border-bottom: none; }
.player-list .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #ccc; display: inline-block; margin-right: 8px;
}
.player-list .dot.on { background: #2ecc71; }
.player-list .score { color: var(--accent-dark); font-weight: 800; }

.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-tile {
  background: #f7f4fd;
  border: none;
  border-radius: var(--radius-sm);
  padding: 18px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.game-tile .emoji { font-size: 30px; display: block; margin-bottom: 8px; }
.game-tile:active { transform: scale(0.97); }

.choice-list { display: grid; gap: 10px; margin-top: 6px; }
.choice-btn {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #eee0f5;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.choice-btn.selected { border-color: var(--accent); background: #e6fbfa; }

.waiting { text-align: center; color: var(--text-muted); font-weight: 600; padding: 20px 0; }

.tally-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1edf9;
  font-weight: 700;
}
.tally-row:last-child { border-bottom: none; }

.role-imposter { background: linear-gradient(135deg, #ff7675, #d63031); color: #fff; text-align: center; padding: 26px 16px; border-radius: var(--radius-sm); }
.role-normal { background: linear-gradient(135deg, #55efc4, #00b894); color: #013734; text-align: center; padding: 26px 16px; border-radius: var(--radius-sm); }
.role-normal .word, .role-imposter .word { font-size: 30px; font-weight: 900; margin-top: 6px; }
.role-cat { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--warn);
  color: #5c4000;
}

.qlist { list-style: none; padding: 0; margin: 0 0 20px; }
.qlist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1edf9;
  font-size: 14px;
}
.qlist li:last-child { border-bottom: none; }
.qlist .del { background: none; border: none; color: var(--danger); font-weight: 700; cursor: pointer; font-size: 13px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab-btn { flex: 1; padding: 10px; border-radius: var(--radius-sm); border: none; background: #f0edf9; font-weight: 700; cursor: pointer; }
.tab-btn.active { background: var(--bg-1); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.leaderboard { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.leaderboard li { counter-increment: rank; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1edf9; }
.leaderboard li::before {
  content: counter(rank);
  width: 26px; height: 26px; border-radius: 50%;
  background: #f0edf9; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.leaderboard .name { font-weight: 700; flex: 1; }
.leaderboard .stat { color: var(--text-muted); font-size: 13px; }

.center { text-align: center; }
.muted { color: var(--text-muted); font-size: 14px; }
