:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --card: #1e293b;
  --card-2: #0b1220;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --danger: #ef4444;
  --danger-soft: #7f1d1d;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, #1e293b 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  min-height: 100%;
}

body {
  min-height: 100vh;
}

.app {
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.screen {
  width: 100%;
  max-width: 720px;
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(11, 18, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.center {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  color: #93c5fd;
  font-weight: bold;
}

h1, h2 {
  margin: 0 0 14px;
  line-height: 1.15;
}

.subtitle {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.mini-preview {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 100px;
}

.worker {
  font-size: 64px;
}

.spark {
  font-size: 38px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.hud-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.hud-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.lives {
  font-size: 22px;
  letter-spacing: 3px;
}

.scene {
  position: relative;
  min-height: 96px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.worker-avatar {
  font-size: 62px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.worker-avatar.hit {
  transform: scale(1.08) rotate(-6deg);
  filter: brightness(1.2);
}

.worker-avatar.win {
  transform: scale(1.06);
}

.event-effect {
  position: absolute;
  bottom: 10px;
  right: 16px;
  font-size: 28px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s ease;
}

.event-effect.show {
  opacity: 1;
  transform: scale(1);
}

.question-tag {
  margin: 0;
  font-size: 12px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.question-text {
  margin-top: 8px;
  margin-bottom: 18px;
  font-size: 24px;
}

.options {
  display: grid;
  gap: 12px;
}

.option-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 16px;
  border-radius: 14px;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.option-btn:hover {
  background: rgba(255,255,255,0.09);
  transform: translateY(-1px);
}

.option-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.option-btn.correct {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.55);
}

.option-btn.wrong {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.55);
}

.feedback {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}

.feedback.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.feedback.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.hidden {
  display: none;
}

.result-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin: 20px 0;
  text-align: left;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
}

@media (max-width: 640px) {
  .app {
    padding: 14px;
    align-items: flex-start;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .hud {
    grid-template-columns: 1fr;
  }

  .question-text {
    font-size: 21px;
  }

  .worker-avatar {
    font-size: 52px;
  }

  .mini-preview {
    min-height: 88px;
  }
}