:root {
  --bg: #313338;
  --bg-alt: #2b2d31;
  --bg-deep: #1e1f22;
  --line: #3f4147;
  --text: #dbdee1;
  --text-strong: #f2f3f5;
  --muted: #949ba4;
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --green: #57f287;
  --red: #ed4245;
  --yellow: #fee75c;
  --radius: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app.loading { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

a { color: #00a8fc; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--bg-deep);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand svg { color: #fff; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; color: var(--text-strong); font-weight: 600; }
.brand-text span { font-size: 12px; color: var(--muted); }

.user { display: flex; align-items: center; gap: 10px; }
.user img { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-deep); }
.user .name { font-size: 14px; color: var(--text-strong); }

main { max-width: 860px; margin: 0 auto; padding: 28px 20px 80px; }

.page-title { margin: 0 0 6px; font-size: 24px; font-weight: 600; color: var(--text-strong); }
.page-sub { margin: 0 0 22px; font-size: 14px; color: var(--muted); }

.card {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 20px;
}
.card + .card { margin-top: 16px; }

.card h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge.ok { background: rgba(87,242,135,.14); color: #7ef0a1; }
.badge.warn { background: rgba(254,231,92,.14); color: #f4e07a; }
.badge.bad { background: rgba(237,66,69,.14); color: #ff8b8d; }
.badge.neutral { background: rgba(148,155,164,.14); color: #b9bfc7; }

.steps { display: flex; gap: 8px; margin: 14px 0 18px; }
.step {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-deep);
}
.step.done { background: var(--green); }
.step.current { background: var(--blurple); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--blurple);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: var(--blurple-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: var(--red); }

.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }

.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rules li { display: flex; gap: 10px; font-size: 14px; color: var(--text); }
.rules li::before { content: "•"; color: var(--blurple); }

.center-screen { display: grid; place-items: center; min-height: 90vh; padding: 24px; }
.panel {
  width: min(440px, 100%);
  padding: 32px;
  text-align: center;
  background: var(--bg-alt);
  border-radius: 12px;
}
.panel h1 { margin: 0 0 8px; font-size: 20px; color: var(--text-strong); }
.panel p { margin: 0 0 20px; font-size: 14px; color: var(--muted); }

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--blurple);
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.discord-btn:hover { background: var(--blurple-hover); text-decoration: none; }

/* quiz */
.question {
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-deep);
}
.question:last-child { border-bottom: 0; }
.q-title { font-size: 15px; font-weight: 600; color: var(--text-strong); margin-bottom: 10px; }
.q-num { color: var(--muted); font-weight: 400; margin-right: 8px; }

.options { display: grid; gap: 8px; }
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}
.option:hover { border-color: var(--line); }
.option input { accent-color: var(--blurple); }
.option.selected { border-color: var(--blurple); background: rgba(88,101,242,.1); }

.quiz-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 20px;
  background: rgba(43,45,49,.95);
  border-top: 1px solid var(--bg-deep);
  backdrop-filter: blur(6px);
}

.counter { font-size: 13px; color: var(--muted); }

.result-score { font-size: 44px; font-weight: 700; color: var(--text-strong); line-height: 1; }
.result-label { font-size: 14px; color: var(--muted); margin-top: 6px; }

.countdown {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.countdown div {
  min-width: 64px;
  padding: 10px;
  text-align: center;
  background: var(--bg-deep);
  border-radius: var(--radius);
}
.countdown span { display: block; font-size: 22px; font-weight: 700; color: var(--text-strong); }
.countdown small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
