/* IQ Dare live demo and its side panel, drawn in the game's own UI: deep navy screens, Fredoka,
   cyan rims, gold IQ and the glowing constellation of the Game IQ screen */
.iq-play { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 440px); justify-content: center; gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(32px, 4vw, 52px); }
.iq-demo {
  --demo-bg: #080a1c; --demo-fg: #f7f5ff; --demo-soft: rgba(214, 220, 255, 0.78);
  --demo-accent: #ffc94a; --demo-accent-fg: #1b1400; --demo-line: rgba(54, 225, 243, 0.35); --demo-radius: 34px;
  justify-self: center; font-family: Fredoka, "M PLUS Rounded 1c", var(--font);
  box-shadow: inset 0 0 0 3px #1f2550, 0 0 0 8px #0d1029, 0 30px 70px -28px rgba(8, 10, 40, 0.75);
}
html[lang="zh-TW"] .iq-demo, html[lang="zh-TW"] .iq-panel { font-family: Fredoka, Huninn, "M PLUS Rounded 1c", var(--font); }
html[lang="ko"] .iq-demo, html[lang="ko"] .iq-panel { font-family: Fredoka, Jua, "M PLUS Rounded 1c", var(--font); }
/* the game's gold button, with the darker rim along the bottom */
.iq-demo .demo-pill, .iq-demo .demo-again {
  background: linear-gradient(180deg, #ffe08a 0%, #ffc94a 55%, #f5a623 100%); color: #2a1a00; font-weight: 600; letter-spacing: 0.01em;
  box-shadow: inset 0 -4px 0 rgba(170, 90, 0, 0.45), 0 0 22px rgba(255, 201, 74, 0.45), 0 10px 24px -8px rgba(0, 0, 0, 0.6);
}
.iq-demo .demo-badge { background: rgba(12, 24, 52, 0.85); color: #9feef8; box-shadow: inset 0 0 0 2px #36e1f3; top: auto; bottom: 12px; right: 50%; transform: translateX(50%); }
.iq-demo .demo-end { background: rgba(8, 10, 28, 0.86); }
.iq-demo .demo-end-title { color: #ff5fc8; font-weight: 600; text-shadow: 0 0 14px rgba(255, 95, 200, 0.5); }
.iq-demo .demo-end-score b { color: #ffc94a; text-shadow: 0 0 16px rgba(255, 201, 74, 0.55); }
.iq-demo .demo-watch { color: #9aa2cc; }

/* Side panel: the Game IQ screen in miniature */
.iq-panel { --ink: #f7f5ff; display: grid; gap: 14px; font-family: Fredoka, "M PLUS Rounded 1c", var(--font); color: #f7f5ff; }
.iqp-screen {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px 22px 20px; border-radius: 30px;
  background: radial-gradient(120% 80% at 50% 38%, #141a3a 0%, #070b19 70%); box-shadow: inset 0 0 0 3px #1f2550, 0 24px 60px -30px rgba(8, 10, 40, 0.8);
}
.iqp-head { margin: 0; color: #9feef8; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; }
.iqp-core { position: relative; width: 100%; max-width: 360px; aspect-ratio: 760 / 600; }
.iqp-core svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.iqp-aura { transition: opacity 0.6s ease; }
.iqp-core line { stroke: rgba(69, 80, 124, 0.5); stroke-width: 3; transition: stroke 0.4s ease, stroke-width 0.4s ease; }
.iqp-core line.on { stroke: rgba(255, 201, 74, 0.7); stroke-width: 4; }
.iqp-node .g { opacity: 0.08; transition: opacity 0.4s ease; }
.iqp-node .d { fill: #434f79; transform: scale(0.6); transition: fill 0.3s ease, transform 0.3s ease; }
.iqp-node.on .g { opacity: 0.75; }
.iqp-node.on .d { fill: #fff; transform: scale(1); }
.iqp-node.pop .d { animation: iqp-spark 0.6s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes iqp-spark { 0% { transform: scale(0.4); } 45% { transform: scale(2.2); } }
.iqp-iq { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; margin: 0; line-height: 1; }
.iqp-iq span { color: #ffc94a; font-size: 1rem; font-weight: 600; letter-spacing: 0.06em; }
.iqp-iq b { color: #fff6e0; font-size: clamp(3.2rem, 2.2rem + 3vw, 4.4rem); font-weight: 600; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(255, 201, 74, 0.6); }
.iqp-iq b.bump { animation: iqp-bump 0.45s cubic-bezier(0.3, 1.7, 0.5, 1); }
@keyframes iqp-bump { 40% { transform: scale(1.18); color: #ffc94a; } }
.iqp-title { position: relative; display: grid; justify-items: center; gap: 4px; margin: 2px 0 0; }
.iqp-new { color: #7df1c3; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; opacity: 0; transform: translateY(6px); }
.iqp-title.is-new .iqp-new { animation: iqp-new 2.4s ease both; }
@keyframes iqp-new { 12%, 80% { opacity: 1; transform: none; } }
.iqp-name {
  display: inline-block; padding: 7px 18px; border-radius: 99px; background: linear-gradient(180deg, #6d72f0, #5157d8);
  box-shadow: inset 0 0 0 2px #8f95ff, inset 0 -3px 0 rgba(30, 30, 120, 0.35), 0 0 20px rgba(109, 114, 240, 0.35);
  color: #fff; font-size: 1.05rem; font-weight: 600; text-align: center;
}
.iqp-title.is-new .iqp-name { animation: iqp-stamp 0.5s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes iqp-stamp { 0% { transform: scale(1.6); } }
.iqp-bar { width: min(240px, 80%); height: 8px; margin-top: 8px; border-radius: 99px; background: #1b2142; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); overflow: hidden; }
.iqp-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #f5a623, #ffc94a 70%, #fff1c2); box-shadow: 0 0 10px #ffc94a; transition: width 0.5s ease; }
.iqp-next { margin: 0; color: #c9cdf0; font-size: 0.9rem; font-weight: 500; text-align: center; }

/* puzzles solved: round slots with the cyan rim of the game's round buttons */
.iqp-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.iqp-kind { position: relative; margin: 0; aspect-ratio: 1; max-width: 92px; justify-self: center; width: 100%; border-radius: 50%;
  background: #0b1030; box-shadow: inset 0 0 0 3px #2a3160; transition: box-shadow 0.3s ease; }
.iqp-kind canvas { display: block; width: 100%; height: 100%; filter: grayscale(1) brightness(0.45); transition: filter 0.3s ease; }
.iqp-kind.on { box-shadow: inset 0 0 0 3px #36e1f3, 0 0 18px rgba(54, 225, 243, 0.45); }
.iqp-kind.on canvas { filter: none; }
.iqp-kind b { position: absolute; right: -4px; bottom: -2px; min-width: 30px; padding: 2px 7px; border-radius: 99px; background: #ffc94a; color: #2a1a00; font-size: 0.85rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.iqp-kind b:empty { display: none; }
.iqp-mode { margin: 0; color: var(--muted); font-size: 0.9rem; font-weight: 500; line-height: 1.55; text-align: center; text-wrap: pretty; }
.iq-side { display: grid; gap: 14px; }
.iq-side .sig-note { margin: 0; text-align: center; }

@media (max-width: 860px) {
  .iq-play { grid-template-columns: minmax(0, 1fr); }
  .iq-demo { max-width: 360px; }
  .iq-side { width: 100%; max-width: 440px; justify-self: center; }
}
@media (max-width: 520px) { .iqp-screen { padding: 18px 14px 16px; } .iqp-core { max-width: 290px; } .iqp-shelf { gap: 10px; padding: 0 12px; } }
@media (prefers-reduced-motion: reduce) {
  .iqp-node.pop .d, .iqp-iq b.bump, .iqp-title.is-new .iqp-name { animation: none; }
  .iqp-title.is-new .iqp-new { animation: none; opacity: 1; transform: none; }
  .iqp-bar i, .iqp-core line, .iqp-node .g, .iqp-node .d { transition: none; }
}
html[lang="ja"] .iqp-mode { word-break: auto-phrase; }
