* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 35%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.18), transparent 35%),
    #070a12;
  color: #f8fafc;
}

.app {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 22px 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 2px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.score-pill {
  padding: 16px 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  font-size: 27px;
  font-weight: 950;
}

.card {
  min-height: 520px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(15,23,42,0.94), rgba(2,6,23,0.96));
  box-shadow: 0 24px 80px rgba(0,0,0,0.42);
}

.round-label {
  color: #38bdf8;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

.question {
  margin: 0 0 20px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.subtext {
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0 0 18px;
}

.btn-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.button-stack {
  display: grid;
  gap: 12px;
}

button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  background: #f8fafc;
  color: #020617;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

button:hover { transform: translateY(-1px); }

.secondary {
  background: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 23, 0.8);
  color: #f8fafc;
  font-size: 24px;
  font-weight: 900;
  outline: none;
  margin-bottom: 14px;
}

.ladder-item {
  display: grid;
  grid-template-columns: 1fr 98px;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.ladder-name {
  font-size: 18px;
  font-weight: 900;
}

.ladder-actions {
  display: flex;
  gap: 8px;
}

.ladder-actions button {
  padding: 10px 0;
  border-radius: 12px;
}

.scorecard {
  white-space: pre-wrap;
  text-align: left;
  background: #020617;
  color: #e2e8f0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.55;
  margin: 18px 0;
}

.answer-card {
  margin: 14px 0;
  padding: 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.answer-title {
  font-size: 17px;
  font-weight: 950;
  margin-bottom: 8px;
}

.answer-row {
  color: #cbd5e1;
  line-height: 1.45;
  margin: 4px 0;
}

.answer-points {
  margin-top: 10px;
  font-weight: 950;
}

.green-text { color: #22c55e; }
.yellow-text { color: #facc15; }
.red-text { color: #fb7185; }

.flash-green { animation: flashGreen 1.1s ease; }
.flash-yellow { animation: flashYellow 1.1s ease; }
.flash-red { animation: flashRed 1.1s ease; }

@keyframes flashGreen {
  0% { box-shadow: 0 24px 80px rgba(0,0,0,0.42); border-color: rgba(148, 163, 184, 0.25); }
  40% { box-shadow: 0 0 46px rgba(34, 197, 94, 0.85); border-color: #22c55e; transform: scale(1.01); }
  100% { box-shadow: 0 24px 80px rgba(0,0,0,0.42); border-color: rgba(148, 163, 184, 0.25); transform: scale(1); }
}

@keyframes flashYellow {
  0% { box-shadow: 0 24px 80px rgba(0,0,0,0.42); border-color: rgba(148, 163, 184, 0.25); }
  40% { box-shadow: 0 0 46px rgba(250, 204, 21, 0.85); border-color: #facc15; transform: scale(1.01); }
  100% { box-shadow: 0 24px 80px rgba(0,0,0,0.42); border-color: rgba(148, 163, 184, 0.25); transform: scale(1); }
}

@keyframes flashRed {
  0% { box-shadow: 0 24px 80px rgba(0,0,0,0.42); border-color: rgba(148, 163, 184, 0.25); }
  40% { box-shadow: 0 0 46px rgba(251, 113, 133, 0.85); border-color: #fb7185; transform: scale(1.01); }
  100% { box-shadow: 0 24px 80px rgba(0,0,0,0.42); border-color: rgba(148, 163, 184, 0.25); transform: scale(1); }
}