:root {
  --bg: #12102b;
  --bg2: #1b1840;
  --accent: #7c5cff;
  --accent2: #ff5c8a;
  --ok: #2ecc71;
  --bad: #ff4757;
  --text: #f2f0ff;
  --muted: #a9a3d6;
  --card: #211d4d;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(160deg, var(--bg), var(--bg2));
  color: var(--text);
  min-height: 100vh;
}
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
h1, h2, h3 { margin: 0 0 12px; }
a { color: var(--accent); }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #3b3670;
  background: #0f0d28;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 10px;
}
button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  transition: transform .1s ease;
}
button:hover { transform: translateY(-2px); }
button:disabled { opacity: .5; cursor: not-allowed; transform:none; }
button.secondary { background: #3b3670; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; }
.muted { color: var(--muted); font-size: 14px; }
.pin {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
  color: var(--accent);
}
.center { text-align: center; }
.qr-box {
  background: white;
  padding: 16px;
  border-radius: var(--radius);
  display: inline-block;
}
.qr-box img { display: block; width: 260px; height: 260px; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #3b3670;
  font-size: 13px;
  margin: 3px;
}
.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px;
  margin-bottom: 12px;
  font-size: 18px;
  border-radius: 14px;
  color: white;
  font-weight: 600;
}
.opt-0 { background: #e63946; }
.opt-1 { background: #3a86ff; }
.opt-2 { background: #ffb703; }
.opt-3 { background: #2ecc71; }
.option-btn.correct { outline: 4px solid #2ecc71; }
.option-btn.wrong { outline: 4px solid #ff4757; opacity: .6; }
.timer-bar-bg {
  height: 10px;
  background: #0f0d28;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.timer-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 100%;
}
.leaderboard-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: #0f0d28;
  margin-bottom: 8px;
  font-size: 18px;
}
.leaderboard-item.top1 { background: linear-gradient(135deg, #ffd700, #ff9d00); color: #12102b; font-weight: 800; }
.leaderboard-item.top2 { background: #c0c0c0; color: #12102b; font-weight: 700; }
.leaderboard-item.top3 { background: #cd7f32; color: #12102b; font-weight: 700; }
.question-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #0f0d28;
  border-radius: 10px;
  margin-bottom: 8px;
}
.remove-btn { background: var(--bad); padding: 8px 12px; font-size: 14px; }
.nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.nav-top .links a { margin-left: 14px; font-size: 14px; }
