:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: rgba(10, 10, 11, 0.84);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f0;
  --muted: #a6a6a0;
  --dim: #6d6d68;
  --signal: #e9ff70;
  --green: #57e284;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(233, 255, 112, 0.09), transparent 28rem),
    linear-gradient(245deg, rgba(255, 255, 255, 0.06), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 0 64px;
}

.hero {
  display: grid;
  justify-items: center;
  padding: 32px 0 42px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 760;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 6px 0 0 var(--signal);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.86;
}

h1 {
  max-width: 980px;
  font-size: clamp(56px, 11vw, 128px);
}

h2 {
  font-size: clamp(38px, 7vw, 82px);
}

.lede {
  max-width: 760px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 720;
  line-height: 1.22;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 70%),
    var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  padding: clamp(20px, 4vw, 34px);
}

.setup {
  display: grid;
  gap: 18px;
}

.kicker,
label span,
.play-topline {
  color: var(--signal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.file-picker {
  position: relative;
  display: grid;
  min-height: 72px;
  place-items: center;
  border: 1px dashed rgba(233, 255, 112, 0.38);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.status,
.mini-stat,
.result-summary {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.quiz-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.quiz-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.score {
  color: var(--text);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 950;
  line-height: 0.9;
}

.question-panel {
  display: grid;
  gap: 24px;
}

.play-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  border: 1px solid rgba(233, 255, 112, 0.42);
  border-radius: 999px;
  padding: 7px 12px;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.answer:hover {
  border-color: rgba(233, 255, 112, 0.58);
  background: rgba(233, 255, 112, 0.06);
  transform: translateY(-2px);
}

.answer strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.answer span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.button {
  display: inline-flex;
  min-height: 44px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.button-light {
  border-color: #eff2d6;
  background: #f5f7e9;
  color: #11120e;
}

.button-dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.result-panel {
  display: grid;
  gap: 18px;
}

.result-score {
  color: var(--signal);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 950;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trait-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.trait-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--signal);
  font-size: 12px;
  text-transform: uppercase;
}

.trait-card span {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .app {
    width: min(100% - 28px, 1120px);
  }

  .quiz-shell,
  .answers,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .play-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
