:root {
  --bg: #061422;
  --bg-2: #0a2130;
  --panel: rgba(13, 38, 54, 0.82);
  --panel-strong: rgba(7, 28, 42, 0.96);
  --line: rgba(143, 209, 210, 0.18);
  --text: #f7fbf8;
  --muted: #9fb4bd;
  --green: #00d486;
  --green-2: #23e6a0;
  --cyan: #18bfc0;
  --blue: #5084c6;
  --purple: #9324a4;
  --danger: #ff7777;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 12%, rgba(0,212,134,.16), transparent 27rem),
    radial-gradient(circle at 10% 88%, rgba(80,132,198,.16), transparent 32rem),
    linear-gradient(145deg, #061422 0%, #071a29 50%, #0a242d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, a { font: inherit; }
button { color: inherit; }

.pixel-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(rgba(80,132,198,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,132,198,.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 80%);
}

.brand-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 18px;
  background: rgba(4, 16, 26, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-logo { display: block; object-fit: contain; }
.brand-logo-play { width: 112px; height: 48px; object-position: left center; }
.brand-logo-it { width: 150px; height: 48px; object-position: right center; }
.brand-x { color: rgba(255,255,255,.34); font-weight: 900; font-size: 22px; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding: 34px 0 56px;
}

.screen {
  width: 100%;
  position: relative;
  padding: clamp(24px, 4vw, 54px);
  border: 1px solid rgba(255,255,255,.075);
  border-radius: clamp(18px, 3vw, 32px);
  background: linear-gradient(135deg, rgba(7,28,42,.92), rgba(10,38,46,.84));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(0,212,134,.06), transparent 35%, rgba(147,36,164,.05));
}
.screen > * { position: relative; z-index: 1; }

.enter { animation: enter .32s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow, .panel-label, .quiz-topline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  color: var(--green-2);
}
.eyebrow { font-size: 13px; margin-bottom: 22px; }

.start-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.start-screen h1, .result-screen h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .96;
  letter-spacing: -.055em;
  font-weight: 950;
}
.start-screen h1 span {
  background: linear-gradient(90deg, var(--green-2), var(--cyan), var(--blue), #b259c0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 720px;
  color: #d6e3e5;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
  margin: 28px 0 30px;
}
.microcopy { color: var(--muted); margin: 14px 0 0; font-size: 13px; }

.primary-btn, .secondary-btn, .back-btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.primary-btn {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  color: #021511;
  box-shadow: 0 12px 30px rgba(0,212,134,.18);
}
.primary-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.secondary-btn, .back-btn {
  background: transparent;
  color: #cfdddf;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
}
.secondary-btn { min-height: 52px; padding: 0 20px; }
.back-btn { min-height: 42px; padding: 0 14px; font-size: 13px; }
.secondary-btn:hover, .back-btn:hover { border-color: rgba(0,212,134,.55); }

.start-art { min-height: 370px; display: grid; place-items: center; }
.level-card {
  width: min(100%, 440px);
  aspect-ratio: 1 / .9;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(0,212,134,.2), transparent 42%),
    linear-gradient(#061727, #0b2431 68%, #103143);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 60px rgba(0,0,0,.22);
}
.level-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background-image: linear-gradient(90deg, rgba(80,132,198,.22) 25%, transparent 25%), linear-gradient(rgba(80,132,198,.22) 25%, transparent 25%);
  background-size: 16px 16px;
  opacity: .45;
}
.level-label { position: absolute; left: 10%; top: 13%; font: 900 18px/1 ui-monospace, monospace; color: var(--green-2); transform: rotate(-5deg); }
.level-title { position: absolute; left: 16%; top: 21%; font: 950 28px/1 ui-monospace, monospace; color: var(--green-2); transform: rotate(-5deg); }
.platform { position: absolute; height: 17px; background: linear-gradient(#31c586 0 34%, #4c617b 34% 58%, #705863 58%); box-shadow: 0 5px 0 rgba(0,0,0,.25); z-index: 2; }
.p1 { width: 42%; left: 10%; top: 61%; }
.p2 { width: 30%; right: 12%; top: 47%; }
.p3 { width: 60%; right: -7%; top: 79%; }
.pixel-star { position: absolute; color: #7fc3ff; font: 900 30px/1 ui-monospace, monospace; }
.s1 { left: 17%; top: 35%; }.s2 { right: 14%; top: 17%; }.s3 { right: 42%; top: 39%; }

.quiz-topline { display: flex; justify-content: space-between; gap: 20px; color: #b8c9ce; font-size: 12px; }
.progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; margin: 12px 0 clamp(36px, 6vw, 64px); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan), var(--blue)); border-radius: inherit; transition: width .25s ease; }
.question-wrap { width: min(850px, 100%); margin: 0 auto; }
.question-wrap h2 {
  margin: 0 0 28px;
  font-size: clamp(27px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: -.035em;
}
.answers { display: grid; gap: 12px; }
.answer-btn {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 13px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(5,22,33,.68);
  color: #edf7f5;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.answer-btn:hover { transform: translateX(3px); border-color: rgba(0,212,134,.5); background: rgba(9,39,47,.9); }
.answer-btn.selected { border-color: var(--green); background: rgba(0,212,134,.12); }
.answer-key {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255,255,255,.07); color: var(--green-2); font: 900 14px/1 ui-monospace, monospace;
}
.question-actions { display: flex; justify-content: space-between; margin-top: 22px; }

.result-screen { text-align: center; }
.result-hero { width: min(850px, 100%); margin: 0 auto 34px; }
.result-icon { font-size: clamp(58px, 10vw, 94px); margin-bottom: 10px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.3)); }
.result-screen h1 { font-size: clamp(44px, 7vw, 78px); }
.match-badge {
  display: inline-flex;
  margin: 16px 0 24px;
  padding: 9px 14px;
  border: 1px solid rgba(0,212,134,.45);
  border-radius: 999px;
  color: var(--green-2);
  background: rgba(0,212,134,.08);
  font: 900 14px/1 ui-monospace, monospace;
  letter-spacing: .08em;
}
.result-hero h2 { font-size: clamp(23px, 3vw, 34px); margin: 0 0 14px; }
.result-hero p { color: #cadadd; line-height: 1.7; font-size: 17px; margin: 0 auto; max-width: 760px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; margin-top: 34px; }
.panel { padding: 22px; border-radius: 18px; background: rgba(4,20,31,.6); border: 1px solid rgba(255,255,255,.075); }
.panel-label { font-size: 11px; margin-bottom: 18px; }
.match-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.07); }
.match-row:first-of-type { border-top: 0; }
.match-row > div { display: flex; align-items: center; gap: 10px; }
.mini-icon { font-size: 24px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tags span { padding: 10px 12px; border-radius: 10px; background: rgba(0,212,134,.08); border: 1px solid rgba(0,212,134,.2); color: #dff9ef; font-weight: 700; font-size: 14px; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.noscript { margin: 30px auto; max-width: 760px; padding: 20px; color: white; background: #7a2222; }

@media (max-width: 760px) {
  .brand-bar { padding: 8px 12px; }
  .brand-logo-play { width: 86px; height: 40px; }
  .brand-logo-it { width: 118px; height: 40px; }
  .brand-x { font-size: 18px; }
  .app-shell { width: min(100% - 18px, 1180px); padding: 12px 0 28px; min-height: calc(100vh - 57px); }
  .screen { padding: 22px 16px 26px; border-radius: 18px; }
  .start-grid, .result-grid { grid-template-columns: 1fr; }
  .start-art { min-height: 240px; order: -1; }
  .level-card { width: min(100%, 350px); }
  .start-screen h1 { font-size: clamp(38px, 12vw, 60px); }
  .lead { margin: 20px 0 24px; font-size: 17px; }
  .primary-btn, .secondary-btn { width: 100%; }
  .quiz-topline span:last-child { display: none; }
  .progress { margin-bottom: 30px; }
  .question-wrap h2 { font-size: 27px; margin-bottom: 22px; }
  .answer-btn { min-height: 70px; grid-template-columns: 38px 1fr; padding: 12px; }
  .result-screen .eyebrow { margin-bottom: 12px; }
  .result-hero p { font-size: 16px; }
  .panel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
