:root {
  --bg: #082f49;
  --bg-2: #0f172a;
  --surface: rgba(15, 23, 42, 0.88);
  --surface-2: #0b1f33;
  --surface-3: #12324f;
  --text: #f0f9ff;
  --muted: #cbd5e1;
  --primary: #facc15;
  --secondary: #67e8f9;
  --success: #86efac;
  --error: #fca5a5;
  --accent: #f9a8d4;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(2, 8, 23, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 25%),
    linear-gradient(165deg, #0b3350 0%, #082f49 45%, #0f172a 100%);
}

.app {
  width: min(980px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 12px;
}

.app-header,
.screen,
.app-footer {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-header {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #a5f3fc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 800;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.subtitle {
  margin: 8px 0 14px;
  color: var(--muted);
}

.progress-wrap {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #fb7185);
  transition: width 0.3s ease;
}

.screen {
  padding: 16px;
}

.app-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
}

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

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

.card {
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 35, 58, 0.95), rgba(11, 31, 51, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px;
}

.hero-card {
  background:
    radial-gradient(circle at top, rgba(103, 232, 249, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(17, 35, 58, 0.95), rgba(11, 31, 51, 0.96));
}

.word-card {
  text-align: center;
  cursor: pointer;
}

.word-emoji {
  font-size: clamp(2.8rem, 7vw, 4.3rem);
  margin-bottom: 8px;
}

.word-label {
  font-size: 1.3rem;
  font-weight: 800;
}

.category-pill,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.14);
  color: #cffafe;
  font-size: 0.85rem;
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.hint {
  color: var(--muted);
  font-size: 0.96rem;
}

.btn {
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #fb7185);
  color: #111827;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #93c5fd);
  color: #082f49;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #4ade80);
  color: #052e16;
}

.btn-error {
  background: linear-gradient(135deg, var(--error), #f87171);
  color: #450a0a;
}

.btn-block {
  width: 100%;
}

.choice-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.center {
  text-align: center;
}

.score {
  font-size: 2rem;
  font-weight: 800;
  color: #fde68a;
}

.question-title {
  font-size: 1.25rem;
  margin: 8px 0 10px;
}

.tip-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(14, 116, 144, 0.72);
  color: #ecfeff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tip-content {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.tip-btn {
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  background: #ccfbf1;
  color: #115e59;
}

.is-hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 90vw;
  text-align: center;
  background: #0f172a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.show {
  opacity: 1;
}

.dialogue-line {
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.9), rgba(14, 116, 144, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.dialogue-row-top {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.dialogue-speaker {
  font-weight: 800;
  color: #fde68a;
}

.dialogue-text {
  font-weight: 700;
}

.dialogue-tip-text {
  margin: 8px 0 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  color: #d1fae5;
  font-size: 0.93rem;
  line-height: 1.4;
}

.dialogue-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.scene-card {
  position: relative;
  overflow: hidden;
}

.pool-stage {
  display: grid;
  gap: 12px;
}

.pool-water {
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.25), transparent 35%),
    linear-gradient(180deg, #38bdf8, #0284c7);
  color: #082f49;
  font-weight: 800;
}

.pool-swimmers {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 2rem;
}

.pool-laps {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lap-badge {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.cushion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.cushion-btn {
  min-height: 92px;
  border-radius: 16px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, #fbcfe8, #f9a8d4);
  color: #701a75;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.cushion-btn.found {
  background: linear-gradient(180deg, #fef08a, #facc15);
  color: #713f12;
}

.counter-visual {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 8px;
}

.counter-item {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.7rem;
}

.mini-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(249, 168, 212, 0.12);
  color: #fce7f3;
}

.success-banner {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(134, 239, 172, 0.14);
  border: 1px solid rgba(134, 239, 172, 0.4);
  color: #dcfce7;
}

.input {
  width: 100%;
  margin-top: 6px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0f172a;
  color: #f0f9ff;
  font: inherit;
}

.field {
  display: grid;
  gap: 4px;
}

.field span {
  font-weight: 800;
}

.field-wide {
  grid-column: 1 / -1;
}

.exam-meta-grid {
  display: grid;
  gap: 12px;
}

.lock-banner {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: #fde68a;
}

.assessment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 14px;
}

.assessment-nav {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 14px;
}

.assessment-nav .btn {
  flex: 1 1 220px;
}

.option-selected {
  outline: 3px solid rgba(250, 204, 21, 0.35);
  background: linear-gradient(135deg, #facc15, #fb7185);
  color: #0f172a;
}

.review-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.review-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .screen {
    padding: 22px;
  }

  .grid-2 {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .exam-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}
