/* Daily Quiz: the lobby, the stage and the report card. */

.daily-quiz-page {
  padding-top: 24px;
  padding-bottom: 64px;
}
.dq-back { display: inline-block; font-size: 13px; margin-bottom: 4px; }
.dq-stage { max-width: 960px; margin: 0 auto; }
.dq-loading { padding: 48px 20px; text-align: center; color: var(--text-muted); }

/* Tier colours: Easy teal, Difficult blue, Ultra amber. */
.tier-easy { --tier: var(--success); }
.tier-difficult { --tier: var(--unique); }
.tier-ultra { --tier: var(--accent); }

.dq-tier {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--tier, var(--unique));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  flex: none;
}
.dq-tier-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; }

/* ----- The card on the Academy page ----- */
.academy-card-daily { border-top: 4px solid var(--unique); }
.ac-daily-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.academy-card-daily .dq-live { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.ac-daily-shows { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ac-daily-show {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--tier) 10%, transparent);
  font-size: 13px; font-weight: 600;
}
.ac-daily-show .dq-tier { width: 24px; height: 24px; border-radius: 8px; font-size: 12px; }
.ac-daily-show-state { color: var(--text-muted); font-weight: 500; }

/* ----- Error ----- */
.dq-error { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dq-error-emoji { font-size: 36px; }
.dq-error-text { font-weight: 600; }

/* ----- Lobby ----- */
.dq-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 300px at 15% -40%, color-mix(in srgb, var(--unique) 32%, transparent), transparent 60%),
    radial-gradient(600px 260px at 95% 120%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    var(--brand-deep);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  margin-bottom: 16px;
}
@media (prefers-color-scheme: dark) {
  .dq-hero { background-color: var(--surface-raised); }
}
.dq-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dq-live {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
}
.dq-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #FF4D6D; box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.6); animation: dq-pulse 1.6s infinite; }
.dq-live.is-preparing .dq-live-dot { background: var(--accent); animation: none; }
@keyframes dq-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 77, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}
.dq-hero-date { font-size: 13px; opacity: 0.75; font-weight: 500; }
.dq-hero-title { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 8px; max-width: 640px; }
.dq-hero-hype { color: #fff; font-size: 15px; opacity: 0.85; margin: 0 0 18px; max-width: 640px; line-height: 1.5; }
.dq-next { display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 14px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.1); }
.dq-next-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.dq-next-clock { font-family: var(--font-mono); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

.dq-shows { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.dq-show {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--tier);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.dq-show-head { display: flex; align-items: center; gap: 12px; }
.dq-show-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.dq-show-sub { font-size: 13px; color: var(--text-muted); }
.dq-show-teaser { font-size: 15px; line-height: 1.5; margin: 0; min-height: 3em; }
.dq-show-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.dq-show-meta span { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--tier) 12%, transparent); color: color-mix(in srgb, var(--tier) 70%, var(--text)); }
.dq-show-stats { font-size: 13px; color: var(--text-muted); }
.dq-show-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dq-show-foot .dq-play { flex: 1; }
.dq-show-result { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.dq-score-chip { font-weight: 800; font-size: 16px; padding: 4px 10px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--tier) 16%, transparent); color: color-mix(in srgb, var(--tier) 70%, var(--text)); }

.dq-rules { margin-top: 16px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.dq-rules strong { color: var(--text); }

/* ----- Green room ----- */
.dq-ready {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dq-ready-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 0; }
.dq-ready-sub { color: var(--text-muted); font-size: 15px; line-height: 1.5; margin: 0; }
.dq-ready-rules { text-align: left; margin: 12px 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.dq-ready-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; margin-top: 8px; }

/* ----- Countdown ----- */
.dq-countdown { display: grid; place-items: center; gap: 12px; padding: 90px 20px; }
.dq-countdown-num { font-size: 160px; font-weight: 900; line-height: 1; letter-spacing: -0.05em; color: var(--unique); }
.dq-countdown-num.is-pop { animation: dq-pop 0.5s var(--ease); }
@keyframes dq-pop { 0% { transform: scale(1.3); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }
.dq-countdown-label { font-size: 15px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }

/* ----- Stage ----- */
.dq-live-stage {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dq-stage-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; }
.dq-stage-left { display: flex; align-items: center; gap: 10px; }
.dq-stage-counter { font-weight: 700; font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.dq-stage-clock { font-family: var(--font-mono); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); transition: color 0.2s; }
.dq-live-stage.is-urgent .dq-stage-clock { color: var(--danger); animation: dq-tick 1s infinite; }
@keyframes dq-tick { 50% { transform: scale(1.08); } }
.dq-stage-track { height: 6px; background: var(--border); }
.dq-stage-fill { height: 100%; width: 100%; background: var(--tier, var(--unique)); transition: width 0.1s linear; }
.dq-live-stage.is-urgent .dq-stage-fill { background: var(--danger); }
.dq-stage-photo { background: #0d0d0e; height: clamp(220px, 56vw, 440px); overflow: hidden; display: grid; place-items: center; }
.dq-stage-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dq-stage-question { padding: 18px 20px 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.dq-stage-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 20px 20px; }
@media (max-width: 540px) { .dq-stage-answers { grid-template-columns: 1fr; } .dq-stage-question { font-size: 19px; } }
.dq-answer {
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  background: var(--background);
  border: 1px solid var(--border);
  border-bottom-width: 3px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 18px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.1s ease, background 0.1s ease;
}
.dq-answer:hover:not(:disabled) { border-color: var(--tier, var(--unique)); background: color-mix(in srgb, var(--tier, var(--unique)) 7%, var(--background)); }
.dq-answer:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 1px; }
.dq-answer:disabled { cursor: default; opacity: 0.6; }
/* Neutral until the verdict lands: the easy tier's own colour is green */
.dq-answer.is-picked { opacity: 1; border-color: var(--text); background: color-mix(in srgb, var(--text) 8%, var(--background)); }
.dq-answer.is-picked .dq-answer-key { background: var(--text); color: var(--background); }
.dq-answer-key { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--text) 8%, transparent); font-size: 13px; font-weight: 800; flex: none; }
.dq-live-stage.is-flash .dq-stage-photo { animation: dq-in 0.25s var(--ease); }
@keyframes dq-in { from { opacity: 0.3; } to { opacity: 1; } }
.dq-stage-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand-deep) 82%, transparent);
  color: #fff;
  font-size: 96px; font-weight: 900; letter-spacing: -0.03em;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.dq-stage-overlay.is-on { opacity: 1; pointer-events: auto; animation: dq-pop 0.4s var(--ease); }

/* ----- Verdict: the picked answer green or red, a big check or cross over
   the photo; the clock stands still while it shows ----- */
.dq-live-stage { --dq-right: #079C2D; --dq-wrong: #E54444; }
.dq-stage-photo { position: relative; }
.dq-answer.is-right,
.dq-answer.is-wrong,
.dq-answer.is-answer { opacity: 1; }
.dq-answer.is-right { border-color: var(--dq-right); background: color-mix(in srgb, var(--dq-right) 16%, var(--background)); }
.dq-answer.is-wrong { border-color: var(--dq-wrong); background: color-mix(in srgb, var(--dq-wrong) 16%, var(--background)); }
.dq-answer.is-answer { border-color: var(--dq-right); }
.dq-answer.is-right .dq-answer-key,
.dq-answer.is-answer .dq-answer-key { background: var(--dq-right); color: #fff; }
.dq-answer.is-wrong .dq-answer-key { background: var(--dq-wrong); color: #fff; }
.dq-verdict {
  position: absolute; left: 50%; top: 50%;
  width: clamp(104px, 26vw, 148px); aspect-ratio: 1;
  border-radius: 50%;
  display: grid; place-items: center;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.92), 0 14px 40px rgba(0, 0, 0, 0.4);
}
.dq-verdict svg { width: 62%; height: 62%; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.dq-verdict.is-right { background: var(--dq-right); }
.dq-verdict.is-wrong { background: var(--dq-wrong); }
.dq-verdict.is-on { opacity: 1; transform: translate(-50%, -50%); animation: dq-verdict-in 0.36s cubic-bezier(0.34, 1.56, 0.64, 1); }
.dq-verdict.is-wrong.is-on { animation: dq-verdict-in 0.36s cubic-bezier(0.34, 1.56, 0.64, 1), dq-verdict-shake 0.36s 0.36s ease-in-out; }
.dq-verdict.is-on path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: dq-verdict-draw 0.3s 0.1s ease-out forwards; }
@keyframes dq-verdict-in { from { transform: translate(-50%, -50%) scale(0.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes dq-verdict-draw { to { stroke-dashoffset: 0; } }
@keyframes dq-verdict-shake {
  20% { transform: translate(calc(-50% - 9px), -50%); }
  40% { transform: translate(calc(-50% + 9px), -50%); }
  60% { transform: translate(calc(-50% - 6px), -50%); }
  80% { transform: translate(calc(-50% + 6px), -50%); }
}
@media (prefers-reduced-motion: reduce) {
  .dq-verdict.is-on, .dq-verdict.is-wrong.is-on { animation: none; }
  .dq-verdict.is-on path { animation: none; stroke-dashoffset: 0; }
}

/* ----- Report card ----- */
.dq-card {
  position: relative;
  overflow: hidden;
  max-width: 440px;
  margin: 0 auto 16px;
  padding: 26px 24px 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFFFFF, #EEF2F8 60%, #F7F9FC);
  color: #0B2545;
  text-align: center;
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 24px 48px -16px rgba(11, 37, 69, 0.35);
}
.dq-card::before {
  content: '';
  position: absolute; inset: -3px;
  z-index: -1;
  border-radius: 22px;
  background: linear-gradient(130deg, #E6E6F2, #B3CCE6, #8099CC, #CCD9E6, #E6E6F2);
  background-size: 300% 300%;
  animation: dq-holo 5s linear infinite;
}
@keyframes dq-holo { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.dq-card-shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: dq-shimmer 3.2s ease-in-out infinite;
}
@keyframes dq-shimmer { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.dq-card-who { display: flex; align-items: center; gap: 10px; text-align: left; margin-bottom: 18px; }
.dq-card-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(11, 37, 69, 0.08); display: grid; place-items: center; overflow: hidden; font-size: 17px; flex: none; }
.dq-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dq-card-name { font-size: 15px; font-weight: 600; }
.dq-card-on { font-size: 13px; color: #2E7BE6; }
.dq-card-show { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(11, 37, 69, 0.55); }
.dq-card-score { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin: 6px 0 2px; }
.dq-card-big { font-size: 96px; font-weight: 900; line-height: 1; letter-spacing: -0.05em; }
.dq-card-of { font-size: 32px; font-weight: 700; color: rgba(11, 37, 69, 0.4); }
.dq-card-verdict { font-size: 15px; margin-bottom: 14px; }
.dq-card-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.dq-dot { width: 12px; height: 12px; border-radius: 50%; }
.dq-dot.is-right { background: #14B8A6; }
.dq-dot.is-wrong { background: #E11D48; }
.dq-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dq-stat-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dq-stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(11, 37, 69, 0.5); }
.dq-card-standing { margin-top: 14px; font-size: 14px; font-weight: 600; color: #2E7BE6; }

.dq-report-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }

.dq-review { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin: 0 auto; }
.dq-review-title { font-size: 18px; font-weight: 700; margin: 8px 0 4px; }
.dq-review-row {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.dq-review-row.is-right { border-left-color: var(--success); }
.dq-review-row.is-wrong { border-left-color: var(--danger); }
.dq-review-row.is-missed { border-left-color: var(--accent); }
.dq-review-row img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: #0d0d0e; flex: none; }
.dq-review-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dq-review-q { font-weight: 600; font-size: 15px; }
.dq-review-a { font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.dq-review-mark { font-weight: 800; }
.is-right .dq-review-mark { color: var(--success); }
.is-wrong .dq-review-mark { color: var(--danger); }
.is-missed .dq-review-mark { color: var(--accent); }
.dq-review-why { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* The show's ranking under the report card. Tabs, rows and the "your rank"
   box come from styles/ranking.css, as on the Ranking page. */
.dq-board { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin: 0 auto 28px; }
.dq-board-body { display: flex; flex-direction: column; gap: 12px; }
.dq-board-summary { font-size: 13px; color: var(--text-muted); }
.dq-board-note {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.dq-my-rank-chase { margin-top: 4px; font-size: 14px; color: var(--text-muted); }
.dq-board .lb-row { text-decoration: none; }
.dq-board .lb-user-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dq-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--background);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 18px;
}
.dq-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dq-board-flag { font-size: 14px; }
.dq-board-pro { color: var(--tier-gold); font-size: 13px; }
.dq-board-you {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--unique);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dq-board-value { text-align: right; }
.dq-board-more { align-self: center; }
