/* ==========================================================================
   Knowledge Challenges (Figma: Dashboard / Knowledge Challenges — Option B)
   ========================================================================== */

/* ---------- Daily challenge hero ---------- */
.daily-hero {
  height: 346px; padding: 0 24px; border-radius: 32px; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-panel);
}
.daily-hero__copy { position: relative; z-index: 2; width: 470px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.daily-hero__text { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

/* Dial illustration — 549×344 artboard */
.dial { position: relative; flex: none; width: 549px; height: 344px; }
.dial > * { position: absolute; }
.dial__glow { pointer-events: none; animation: breathe 5s ease-in-out infinite; }
.dial__glow--1 { left: 29.4px;  top: -84.6px; width: 529.4px; height: 490.2px; }
.dial__glow--2 { left: 156.9px; top: 150.7px; width: 411.7px; height: 274.5px; animation-delay: -2.5s; }
.dial__base { left: 0; top: -16px; width: 549px; height: 392.1px; transform-origin: 50% 4%; animation: spot 5s ease-in-out infinite alternate; }
.dial__ring { left: 0; top: -16px; width: 549px; height: 392.1px; }
.dial__core { left: 190.75px; top: 28.1px; width: 227.9px; height: 249px; animation: corePulse 4s ease-in-out infinite; }
@keyframes corePulse { 50% { filter: brightness(1.2); } }
.dial__knob { left: 183px; top: 189.4px; width: 51px; height: 51px; animation: knob 2s ease-in-out infinite; }
@keyframes knob { 50% { transform: scale(1.25); filter: drop-shadow(0 0 8px rgba(255,255,255,.8)); } }

.dial__trophy { left: 268.6px; top: 91.8px; width: 51px; height: 51px; --amp: -6px; animation: float 4s ease-in-out infinite; }
.dial__trophy img { position: absolute; left: -11px; top: -11px; width: 73px; height: 75.1px; animation: trophyGlow 4s ease-in-out infinite; }
@keyframes trophyGlow { 50% { filter: drop-shadow(0 0 10px rgba(255,214,102,.55)); } }

.dial__prize-label {
  left: 294px; top: 156.5px; transform: translateX(-50%);
  font-family: var(--f-mono); font-weight: 500; font-size: 9.8px; letter-spacing: 1.57px; color: var(--muted); white-space: nowrap;
}
.dial__prize { left: 294px; top: 172.2px; transform: translateX(-50%); font-family: var(--f-display); font-weight: 700; font-size: 25.5px; white-space: nowrap; }

.dial-tag {
  display: flex; align-items: center; gap: 7.8px; padding: 7.8px 11.8px; border-radius: 11.8px;
  background: var(--bg-subtle); border: 1px solid rgba(129,140,248,.45); box-shadow: 0 9.8px 23.5px rgba(5,23,30,.6);
  backdrop-filter: blur(6px);
  font-family: var(--f-mono); font-weight: 500; font-size: 10.8px; letter-spacing: 1.08px; white-space: nowrap;
  --amp: -6px; animation: float 5s ease-in-out infinite;
}
.dial-tag b { font-weight: 500; color: var(--text); }
.dial-tag em { font-style: normal; color: var(--muted); }
.dial-tag em.is-correct { color: #5ee0a8; }
.dial-tag em.is-live { color: var(--accent); animation: dotPulse 1.6s ease-in-out infinite; }
.dial-tag--q1    { left: 29.4px;  top: 46.7px; }
.dial-tag--q2    { left: 396.1px; top: 74.2px;  animation-delay: -1.25s; }
.dial-tag--count { left: 23.5px;  top: 215.4px; animation-delay: -2.5s; }
.dial-tag--q3    { left: 409.8px; top: 215.4px; animation-delay: -3.75s; }

/* ---------- Mode cards ---------- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; container: modes / inline-size; }
/* Cards grow taller on wide screens (300px at the 1068px design width, up to 400px);
   the art panel scales with the card height via --art-s set in challenges.js. */
.mode {
  height: clamp(300px, 24cqw, 420px); padding: clamp(32px, 2.4cqw, 48px) clamp(24px, 2.2cqw, 44px); border-radius: 28px; overflow: hidden;
  transition: transform .25s var(--ease-out), border-color .25s;
}
a.mode:hover { transform: translateY(-4px); border-color: rgba(129,140,248,.9); }
.mode--multi { cursor: default; }

.mode__copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: clamp(270px, 20cqw, 380px); }
.mode__title { margin-top: 8px; font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 1.7cqw, 38px); white-space: nowrap; }
.mode__desc { font-size: clamp(14px, .8cqw, 16px); }
.mode__desc + .btn-primary { margin-top: 16px; }
.mode--multi .mode__desc + .mode__desc { margin-top: 12px; }

.status {
  display: inline-flex; padding: 6px 12px; border-radius: var(--radius-md); border: 1px solid;
  font-family: var(--f-label); font-size: 12px; line-height: 1.2; letter-spacing: .18em; text-transform: uppercase;
}
.status--available { color: #5ee0a8; border-color: #5ee0a8; background: #0d2e25; }
.status--soon { color: var(--muted); border-color: rgba(239,240,254,.38); background: rgba(10,37,48,.45); }

/* Art panel — 240×300, sits on the card's right edge */
.mode__art {
  position: absolute; right: -1px; top: -1px; width: 240px; height: 300px;
  transform: scale(var(--art-s, 1)); transform-origin: right top;
}
.mode__art > * { position: absolute; }
.mode__art-bg { inset: 0; width: 240px; height: 300px; }

/* Solo: logo floats, topic tiles orbit around it */
/* positions are measured from the card's right edge, as in the design */
.solo-logo { right: 74.9px; top: 51.4px; width: 90.2px; height: 101.2px; animation: soloLogo 4s ease-in-out infinite; }
@keyframes soloLogo { 50% { transform: translateY(-8px); filter: drop-shadow(0 0 10px rgba(103,232,249,.6)); } }
.solo-tile {
  width: 33.6px; height: 33.6px; border-radius: 8.4px; background: var(--grad); box-shadow: 0 4px 14px rgba(99,102,241,.55);
  display: grid; place-items: center; --amp: -7px; animation: float 3.6s ease-in-out infinite;
}
.solo-tile img { width: 16.8px; height: 16.8px; }
.solo-tile--crypto   { right: 183.2px; top: 133.2px; }
.solo-tile--ai       { right: 13.2px;  top: 95.2px;  animation-delay: -1.2s; }
.solo-tile--football { right: 19.2px;  top: 189.2px; animation-delay: -2.4s; }
a.mode--solo:hover .solo-tile { animation-duration: 1.8s; }

/* Multiplayer: two avatars face off */
.duel-avatar {
  top: 108px; width: 48px; height: 48px; border-radius: 24px; overflow: hidden; border: .8px solid var(--accent);
  --amp: -6px; animation: float 3s ease-in-out infinite;
}
.duel-avatar img { width: 48px; height: 48px; }
.duel-avatar--left  { right: 157px; top: 109px; }
.duel-avatar--right { right: 37px;  animation-delay: -1.5s; }
/* centred between the two avatars (centres at x 59 and 179, y ≈ 133 in the art panel) */
.duel-vs {
  left: 119px; top: 133px; transform: translate(-50%, -50%);
  font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1;
  filter: drop-shadow(0 0 18px rgba(99,102,241,.8)); animation: vsPulse 2s ease-in-out infinite;
}
@keyframes vsPulse { 50% { transform: translate(-50%, -50%) scale(1.12); filter: drop-shadow(0 0 26px rgba(103,232,249,.9)); } }

/* ---------- Responsive ---------- */
@container content (min-width: 1180px) {
  .daily-hero { padding-inline: clamp(24px, 4cqw, 64px); }
}

@container content (max-width: 1020px) {
  .dial { transform: scale(.82); transform-origin: right center; margin-left: -99px; }
}

@container content (max-width: 900px) {
  .daily-hero { height: auto; flex-direction: column; align-items: stretch; padding: 40px 32px 0; }
  .daily-hero__copy { width: 100%; }
  .dial { align-self: center; transform: none; margin: 0; }
  .modes { grid-template-columns: 1fr; }
}

@container content (max-width: 600px) {
  .daily-hero { padding: 32px 20px 0; }
  .dial { transform: scale(.62); transform-origin: top center; margin: 0 -104px -130px; }
  .mode { height: auto; min-height: 300px; padding-bottom: 300px; }
  .mode__art { top: auto; bottom: -1px; right: 50%; margin-right: -120px; transform: none; }
  .mode__copy { max-width: none; }
}
