/* Quiz components shared by the landing page and the playable pages: gold face frame, answer options,
   buttons, store badges. Needs the tokens below (also in play.css / the landing page). */
:root {
  --line-strong: rgba(255, 255, 255, 0.18);
  --ok: #3ddc84;
  --ok-fill: #26432a;
  --bad: #ff5a4f;
  --bad-fill: #482929;
}

/* Face frame: dark outer ring, gold ring, round photo (like the in-app question) */
.face {
  position: relative;
  width: min(272px, 72vw);
  aspect-ratio: 1;
  margin: 18px auto 0;
  border-radius: 50%;
  padding: 7px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(243, 195, 91, 0.12);
}
.face .ring {
  width: 100%; height: 100%; border-radius: 50%;
  padding: 6px;
  background: linear-gradient(160deg, #ffe08a, var(--gold) 35%, var(--gold-deep) 70%, #9e7e3c);
}
.face .photo {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #1d3556, #0d1b30);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.face img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.face img.ready { opacity: 1; }
.face .placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: rgba(243, 195, 91, 0.55); font-size: 96px; font-weight: 900;
}
.face.loading .photo { animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 50% { filter: brightness(1.35); } }

/* Timer (daily): SVG arc drawn over the gold ring + seconds badge */
.face .arc { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.face .arc circle { fill: none; stroke-width: 7; }
.face .arc .track { stroke: rgba(0, 0, 0, 0.55); }
.face .arc .left { stroke: var(--gold); stroke-linecap: round; transition: stroke 0.3s; }
.face.timed .ring { background: #6b5626; }
.face.hurry .arc .left { stroke: var(--bad); }
.timer-badge {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  min-width: 58px; padding: 4px 10px 3px; border-radius: 999px;
  background: #0b1a2e; border: 2px solid var(--gold);
  text-align: center; line-height: 1; font-weight: 900; font-size: 22px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.timer-badge small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); margin-top: 2px; text-transform: uppercase; }
.face.hurry .timer-badge { border-color: var(--bad); }

/* Question */
.who {
  text-align: center;
  font-size: clamp(24px, 6.4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 18px 0 14px;
}
.who:focus { outline: none; }

.options { display: grid; gap: 10px; }
.opt {
  appearance: none;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 54px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: linear-gradient(180deg, #16294a, #0f1f3a);
  color: var(--text);
  font: inherit; font-size: 17px; font-weight: 800; text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.opt .key {
  flex: none; display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(180deg, #f1dfb8, #cbb48a);
  color: #2a1b00; font-size: 14px; font-weight: 900;
}
.opt .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt .mark { flex: none; font-size: 18px; font-weight: 900; }
@media (hover: hover) {
  .opt:not([aria-disabled="true"]):hover { border-color: rgba(243, 195, 91, 0.6); }
}
.opt:not([aria-disabled="true"]):active { transform: scale(0.98); }
.opt[aria-disabled="true"] { cursor: default; }
.opt.is-correct { border-color: var(--ok); background: var(--ok-fill); }
.opt.is-correct .key { background: var(--ok); color: #062512; }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-fill); }
.opt.is-wrong .key { background: var(--bad); color: #2b0606; }
.opt.is-dim { opacity: 0.45; }
.opt.skeleton { color: transparent; cursor: default; }
.opt.skeleton .name { height: 14px; max-width: 60%; border-radius: 7px; background: rgba(255, 255, 255, 0.08); }
.opt.pop { animation: pop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.opt.shake { animation: shake 0.4s ease; }
@keyframes pop { 40% { transform: scale(1.04); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 12px;
}

.result {
  min-height: 26px; margin: 14px 0 0; text-align: center;
  font-size: 18px; font-weight: 800;
}
.result.ok { color: var(--ok); }
.result.bad { color: var(--bad); }

/* Buttons and links */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px; border: 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #2a1b00; font: inherit; font-size: 18px; font-weight: 900; text-decoration: none;
  box-shadow: 0 10px 26px rgba(217, 162, 58, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer; transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn.wide { width: 100%; }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold); font-weight: 800; text-decoration: none;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.badges a { display: inline-block; border-radius: 10px; transition: transform 0.15s ease; }
.badges a:hover { transform: translateY(-2px); }
.badges img { height: 50px; width: auto; }

/* Phones: a slim store bar pinned to the bottom (Thoth.mountGetbar), hidden while store badges are on screen */
.getbar {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
  display: none; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 17, 31, 0.92); border-top: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform 0.25s ease;
}
.getbar img { width: 42px; height: 42px; border-radius: 10px; flex: none; }
.getbar .txt { flex: 1; min-width: 0; line-height: 1.25; text-align: left; }
.getbar b { display: block; font-size: 16px; font-weight: 900; }
.getbar span { font-size: 13px; color: var(--muted); }
.getbar .btn { min-height: 40px; padding: 8px 20px; font-size: 16px; box-shadow: none; }
.getbar.away { transform: translateY(110%); }
@media (max-width: 860px) {
  .getbar { display: flex; }
  body.has-getbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Two actions after an answer: another face, today's five */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.actions .btn { min-height: 48px; padding: 10px 14px; font-size: 16px; }
.btn.ghost {
  background: transparent; color: var(--text); box-shadow: none;
  border: 1.5px solid var(--line-strong);
}
.btn.ghost:hover { border-color: rgba(243, 195, 91, 0.6); }
