/* =========================================================
   Styles for games 4–8
   Don't Look Away · Frog Tax · Wrong Answers Only ·
   Snail Racing Inc. · Potato Panic
   ========================================================= */

/* =========================================================
   GAME 4 — DON'T LOOK AWAY
   ========================================================= */
.dla-wrap { flex: 1; display: flex; flex-direction: column; }

.dla-theme {
  text-align: center; margin: 0 0 6px;
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: bold;
}

.dla-prompt {
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(17px, 4vw, 26px);
  margin: 0 0 10px;
  min-height: 1.6em;
}
.dla-prompt.ask  { color: var(--cyan); }
.dla-prompt.good { color: var(--lime); }
.dla-prompt.bad  { color: var(--red); text-transform: none; font-size: clamp(15px, 3.4vw, 21px); }

.dla-bar {
  height: 8px; background: #0c0c12;
  border: 2px solid var(--line); border-radius: 999px;
  overflow: hidden; margin: 0 auto 16px; max-width: 420px;
}
.dla-bar-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.dla-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 16px;
  width: 100%;
}
.dla-grid.cols-4 { grid-template-columns: repeat(4, 1fr); max-width: 560px; }
.dla-grid.blinking .dla-cell { color: var(--ink-dim); border-style: dashed; }

.dla-cell {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  font-size: clamp(24px, 7vw, 38px);
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease, border-color .12s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.dla-cell:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.dla-cell:disabled { cursor: default; }
.dla-cell.was  { border-color: var(--lime); background: #223018; }
.dla-cell.miss { border-color: var(--red); background: #33191a; }

.dla-specials { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dla-specials.dim { opacity: .4; }

/* =========================================================
   GAME 5 — FROG TAX
   ========================================================= */
.ft-wrap { flex: 1; display: flex; flex-direction: column; }

.ft-rank {
  text-align: center; margin: 0 0 12px;
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: bold;
}

.ft-stats {
  display: grid; gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}
.ft-stat, .sr-stat {
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 10px 6px;
  text-align: center;
}
.ft-stat.low { border-color: var(--red); }
.ft-stat-em, .sr-stat-em { display: block; font-size: 18px; line-height: 1; }
.ft-stat b, .sr-stat b {
  display: block; font-family: var(--font-display);
  font-size: 20px; line-height: 1.2; margin-top: 4px;
}
.ft-stat-label, .sr-stat-label {
  display: block; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-dim);
}

.ft-stage {
  text-align: center;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(14px, 3vw, 24px);
  margin-bottom: 16px;
}
.ft-frog { font-size: clamp(44px, 12vw, 66px); line-height: 1; }
.ft-demand {
  font-size: clamp(15px, 3.4vw, 22px);
  margin: 10px 0 8px;
  color: var(--accent);
}
.ft-say {
  margin: 0 auto;
  max-width: 46ch;
  color: var(--ink);
  font-size: 15px;
  min-height: 3em;
}
.ft-say.rare { color: var(--grape); font-weight: bold; }

.ft-options { display: grid; gap: 10px; }
.ft-options .btn { justify-content: flex-start; text-align: left; }

/* =========================================================
   GAME 6 — WRONG ANSWERS ONLY
   ========================================================= */
.wa-wrap { flex: 1; display: flex; flex-direction: column; }

.wa-card {
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-left: 8px solid var(--pink);
  border-radius: var(--r);
  padding: clamp(14px, 3vw, 22px);
  margin-bottom: 14px;
}
.wa-cat {
  margin: 0 0 8px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: bold;
}
.wa-question {
  font-size: clamp(18px, 4.2vw, 27px);
  margin: 0; text-transform: none;
  font-family: var(--font-display);
}

.wa-answers { display: grid; gap: 10px; grid-template-columns: 1fr; }
.wa-answers .btn {
  justify-content: flex-start; text-align: left;
  text-transform: none; font-size: 15px;
  letter-spacing: 0;
}
@media (min-width: 640px) {
  .wa-answers { grid-template-columns: 1fr 1fr; }
}

.wa-react {
  text-align: center; min-height: 2.4em;
  margin: 14px 0 0; font-weight: bold;
}
.wa-react.good { color: var(--lime); }
.wa-react.bad  { color: var(--red); }
.wa-react.meh  { color: var(--ink-dim); }

/* How much of the 127-question bank is currently unlocked. */
.wa-pool {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--ink-dim);
}

/* =========================================================
   GAME 7 — SNAIL RACING INC.
   ========================================================= */
.sr-wrap { flex: 1; display: flex; flex-direction: column; }

.sr-stats {
  display: grid; gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 12px;
}

.sr-lineup {
  text-align: center; margin: 0 0 12px;
  font-size: 13px; color: var(--ink-dim); font-weight: bold;
}

.sr-track {
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 14px;
}
.sr-track.live { border-color: var(--gold); }

.sr-lane-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sr-tag {
  width: 54px; flex: none;
  font-size: 10px; letter-spacing: .08em;
  color: var(--ink-dim); font-weight: bold;
}
.sr-lane {
  position: relative;
  flex: 1;
  height: 40px;
  border-bottom: 3px dashed #3a3a48;
}
.sr-racer {
  position: absolute; left: 0; bottom: 2px;
  font-size: 26px; line-height: 1;
  transition: left .09s linear;
  transform: translateX(-50%);
  white-space: nowrap;
}
.sr-finish {
  text-align: right;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: .1em;
  color: var(--gold);
}

.sr-result {
  text-align: center; min-height: 2.6em;
  margin: 0 0 14px; font-size: 14.5px;
  color: var(--ink-dim);
}
.sr-result.good { color: var(--lime); font-weight: bold; }
.sr-result.bad  { color: var(--gold); }

.sr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sr-actions .btn { flex: 1 1 140px; }

.sr-upgrades { margin-top: 16px; display: grid; gap: 8px; }
.sr-up {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
}
.sr-up.owned { border-color: var(--lime); opacity: .75; }
.sr-up-em { font-size: 24px; line-height: 1; }
.sr-up-body { flex: 1; min-width: 0; }
.sr-up-body b { display: block; font-size: 14.5px; }
.sr-up-body span { font-size: 12.5px; color: var(--ink-dim); }
.sr-note { font-size: 12.5px; color: var(--ink-dim); margin: 10px 0 0; }

/* =========================================================
   GAME 8 — POTATO PANIC
   ========================================================= */
.pp-wrap { flex: 1; display: flex; flex-direction: column; }

.pp-field {
  position: relative;
  height: clamp(300px, 52vh, 520px);
  background:
    radial-gradient(600px 200px at 50% 0%, #221c2e 0%, transparent 70%),
    var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
}
.pp-field.hurt { border-color: var(--red); background: #2a1418; }

.pp-basket {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  font-size: 44px; line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.5));
}

.pp-item {
  position: absolute;
  top: 0; left: 0;
  font-size: 30px; line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.pp-flash {
  position: absolute;
  bottom: 60px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 18px;
  pointer-events: none;
  animation: pp-rise .8s ease-out forwards;
  color: var(--lime);
}
.pp-flash.bad   { color: var(--red); }
.pp-flash.power { color: var(--grape); }
@keyframes pp-rise {
  from { opacity: 1; transform: translate(-50%, 0) scale(.9); }
  to   { opacity: 0; transform: translate(-50%, -60px) scale(1.1); }
}

.pp-banner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(10,10,16,.72);
  text-align: center;
  padding: 20px;
}
.pp-banner-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 7vw, 40px);
  margin: 0; color: var(--accent);
}
.pp-banner-sub { margin: 0 0 6px; color: var(--ink-dim); font-size: 14px; }

.pp-hint {
  text-align: center; margin: 12px 0 0;
  font-size: 12px; color: var(--ink-dim);
}

/* shared: selectable unlock chips (basket picker) */
.unlock.picked { border-color: var(--gold); color: var(--gold); }
button.unlock { cursor: pointer; text-align: left; font-family: var(--font); }
button.unlock:disabled { cursor: not-allowed; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 560px) {
  .ft-stats, .sr-stats { grid-template-columns: repeat(2, 1fr); }
  .sr-actions .btn { flex: 1 1 100%; }
  .dla-grid { gap: 8px; }
  .pp-basket { font-size: 38px; }
  .pp-item { font-size: 26px; }
}
