/* QuizFire game engine styles. Same look as /games/guess-flags-1, scoped under .qf-root so
   many games can live on one page. Width-based sizes use container units (the feed column is
   narrower than the viewport on desktop). */
.qf-root {
  --orange: #ffb46e;
  --mint: #81eed0;
  container-type: inline-size;
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  color: #f7f8ff;
  font-synthesis: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.qf-root * { box-sizing: border-box; }
.qf-root button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.qf-root button:focus-visible, .qf-root a:focus-visible { outline: 3px solid #ffc467; outline-offset: 4px; }
.qf-emo { height: 1em; width: auto; vertical-align: -0.12em; display: inline-block; margin: 0 .03em; }

.qf-panel { width: 100%; text-align: center; animation: qf-enter .3s ease-out both; }
.qf-title { font-size: clamp(2.4rem, 11cqi, 4.3rem); line-height: 1.01; letter-spacing: -.05em; margin: 8px 0 14px; font-weight: 900; }
.qf-title em { color: #ffbd73; font-style: normal; }
.qf-title--result { font-size: clamp(2.2rem, 10cqi, 3.6rem); margin: 6px 0 10px; }
.qf-sub { color: #d2deec; font-size: 1.15rem; line-height: 1.4; margin: 0 auto; max-width: 30ch; }

/* Home hero: the flags game's globe, or an emoji orb in the game's colours. */
.qf-hero { position: relative; width: 260px; height: 224px; margin: 10px auto 18px; display: grid; place-items: center; }
.qf-orb { position: relative; width: 156px; height: 156px; border-radius: 50%; display: grid; place-items: center; font-size: 84px; line-height: 1;
  background: radial-gradient(circle at 30% 26%, #ffffff3d, transparent 46%), linear-gradient(150deg, var(--h1), var(--h2));
  box-shadow: 0 0 0 1px #ffffff22, 0 0 46px color-mix(in srgb, var(--h1) 40%, transparent), 0 18px 30px #0004, inset -10px -8px 22px #0003;
  animation: qf-hover 4s ease-in-out infinite; }
.qf-orb .qf-emo { height: 84px; }
.qf-globe { position: relative; width: 164px; height: 164px; border-radius: 50%; overflow: hidden; background: #258ddd; box-shadow: 0 0 0 1px #72d8f044, 0 0 45px #399ee933, 0 18px 30px #0004; animation: qf-hover 4s ease-in-out infinite; }
.qf-globe-map { position: absolute; inset: 0; background: url("/games/guess-flags-1/world.svg") repeat-x; background-size: 328px 164px; animation: qf-revolve 16s linear infinite; }
.qf-globe::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 28% 25%, #ffffff40, transparent 47%, #02152944 74%, #031126c9 100%); box-shadow: inset -12px -4px 22px #031b3266, inset 5px 4px 10px #c7f6ff55; }
.qf-orbit { position: absolute; width: 252px; height: 92px; border: 1px solid #6facc43b; border-radius: 50%; transform: rotate(-24deg); }
.qf-orbit-two { width: 206px; height: 204px; transform: rotate(20deg); border-style: dashed; opacity: .45; animation: qf-orbit 40s linear infinite; }
.qf-sat { position: absolute; font-size: 28px; color: #ffc47e; animation: qf-twinkle 3s ease-in-out infinite; }
.qf-star-one { top: 22px; right: 22px; }
.qf-star-two { left: 13px; bottom: 30px; font-size: 23px; color: #a1e7e7; animation-delay: -1.5s; }

.qf-primary { display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; border: 0; background: var(--orange); color: #172035; border-radius: 18px; padding: 16px 30px; font-size: 1.25rem; font-weight: 900; box-shadow: 0 5px 0 #c87945, 0 8px 30px #ffad6517; min-width: min(100%, 260px); min-height: 60px; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.qf-primary:hover { background: #ffc58f; transform: translateY(-2px); }
.qf-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #c87945; }
.qf-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 22px; border-radius: 16px; border: 1px solid #667c95; background: #ffffff0d; color: #f7f8ff; font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.qf-secondary:hover { background: #ffffff1a; border-color: #9bbfd3; }

.qf-topline { display: flex; justify-content: space-between; color: #dce7f3; font-size: 1.125rem; font-weight: 800; }
.qf-topline b { color: #ffd29c; }
.qf-progress { height: 8px; border-radius: 20px; background: #35465e; margin: 10px 0 15px; overflow: hidden; }
.qf-progress i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #ffae69, #ffd9a3); transition: width .3s; }

.qf-card { position: relative; background: linear-gradient(145deg, #e3f7ff, #f7fcff); color: #142239; border: 1px solid #b7d9ee; border-radius: 26px; padding: 12px 16px 17px; box-shadow: 0 9px 28px #020b1b26; }
.qf-card h2 { font-size: clamp(1.45rem, 7cqi, 2.125rem); letter-spacing: -.035em; margin: 0; line-height: 1.1; }
.qf-cue { font-size: clamp(3.6rem, 17cqi, 6.2rem); line-height: 1.3; letter-spacing: .04em; filter: drop-shadow(0 6px 5px #25354a20); animation: qf-cue-in .4s cubic-bezier(.16,1.4,.4,1) both; white-space: nowrap; }
.qf-cue--sm { font-size: clamp(3rem, 13cqi, 4.4rem); }
.qf-badge { font-size: 2.4rem; line-height: 1.2; animation: qf-cue-in .4s cubic-bezier(.16,1.4,.4,1) both; }
.qf-q { font-size: clamp(1.3rem, 6cqi, 1.75rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.22; margin: 2px 4px 6px; text-wrap: balance; }
.qf-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 0 10px; animation: qf-cue-in .4s cubic-bezier(.16,1.4,.4,1) both; }
.qf-pair > div { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.qf-pair b { font-size: clamp(1.05rem, 5cqi, 1.35rem); line-height: 1.15; overflow-wrap: anywhere; }
.qf-pair-flag { font-size: clamp(3.4rem, 15cqi, 4.8rem); line-height: 1; filter: drop-shadow(0 6px 5px #25354a20); }
.qf-vs { font-weight: 900; color: #d07a3a; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .06em; }

.qf-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.qf-choices--stack { grid-template-columns: 1fr; gap: 8px; }
.qf-choices--stack .qf-choice { min-height: 56px; }
.qf-choice { position: relative; min-height: 76px; border: 1px solid #667c95; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #2d4662, #24364e); padding: 12px 10px; font-weight: 800; font-size: clamp(1.05rem, 4.5cqi, 1.4rem); line-height: 1.15; overflow-wrap: anywhere; animation: qf-choice-in .28s ease-out calc(var(--order) * 35ms) backwards; transition: background .18s, border-color .18s, transform .15s; }
.qf-choices--two .qf-choice { min-height: 84px; }
.qf-choice:not(:disabled):hover { background: #38536b; border-color: #9bbfd3; }
.qf-choice:not(:disabled):active { transform: scale(.97); }
.qf-choice:disabled { cursor: default; opacity: .58; }
.qf-choice.correct { background: #22634f; border: 2px solid #91ffd4; opacity: 1; animation: qf-correct-pop .4s ease-out; padding-right: 28px; }
.qf-choice.wrong { background: #813443; border: 2px solid #ffb2b8; opacity: 1; padding-right: 28px; }
.qf-answer-icon { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 19px; }
.qf-card.won { animation: qf-glow .7s ease-out; }
.qf-sparkles { position: absolute; left: 50%; top: 40%; pointer-events: none; }
.qf-sparkles i { position: absolute; width: 7px; height: 10px; border-radius: 2px; background: var(--color); animation: qf-burst .7s ease-out both; }

.qf-feedback { min-height: 124px; padding: 12px 2px 0; font-size: 1.25rem; font-weight: 900; }
.qf-feedback-copy { animation: qf-enter .22s ease-out both; }
.qf-feedback-copy.success { color: #9ff2d8; }
.qf-explain { font-size: 1.04rem; color: #cfdeeb; font-weight: 500; margin-top: 4px; line-height: 1.3; }
.qf-advance { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px auto 0; color: #c5d5e6; font-size: 1rem; font-weight: 600; background: none; border: 0; padding: 6px 10px; border-radius: 12px; }
button.qf-advance:hover { color: #fff; background: #ffffff0d; }
.qf-advance-track { width: 88px; height: 6px; background: #526079; border-radius: 10px; overflow: hidden; display: block; }
.qf-advance-track i { display: block; width: 100%; height: 100%; background: #ffc27e; transform: scaleX(0); transform-origin: left; border-radius: inherit; animation: qf-advance linear forwards; }
.qf-advance--home { margin-top: 14px; }
.qf-score-pop { animation: qf-score-pop .35s ease-out; }

.qf-result-card { background: linear-gradient(145deg, #293f59, #263449); border: 1px solid #526a83; border-radius: 24px; padding: 18px 20px; margin: 12px 0 16px; }
.qf-result-card p { font-size: 1.1rem; color: #d1ddeb; margin: 8px 0 0; }
.qf-result-name { font-size: .95rem; font-weight: 800; color: #9fb4ca; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.qf-result-score { font-size: clamp(4rem, 19cqi, 5.6rem); font-weight: 900; letter-spacing: -.06em; color: #ffbd73; line-height: 1; }
.qf-result-score span { font-size: 2.1rem; color: #c7d6e6; }
.qf-result-star { font-size: 3.4rem; line-height: 1; color: #ffd198; text-shadow: 0 0 34px #ffb36566; animation: qf-correct-pop .6s ease-out; }
.qf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.qf-next-fill { position: absolute; inset: auto 0 0 0; height: 5px; background: #c8794566; transform: scaleX(0); transform-origin: left; animation: qf-advance 9s linear forwards; }
.qf-next span:first-child { position: relative; }
.qf-next--held .qf-next-fill { animation: none; transform: scaleX(0); }

/* Cross-promotion: subscribe + watch. Never shown inside YouTube Playables. */
.qf-cta { display: grid; gap: 8px; margin-top: 16px; }
.qf-yt { display: flex; align-items: center; gap: 12px; text-align: left; text-decoration: none; color: #fff; background: #ff00331f; border: 1px solid #ff4d6d66; border-radius: 16px; padding: 10px 14px; transition: background .15s, transform .15s; }
.qf-yt:hover { background: #ff003333; transform: translateY(-1px); }
.qf-yt b { display: block; font-size: 1.05rem; }
.qf-yt small { display: block; color: #ffd0d8; font-size: .9rem; font-weight: 600; }
.qf-yt-icon { width: 34px; height: 24px; flex: none; }
.qf-watch { color: #d2deec; font-weight: 700; font-size: .98rem; text-decoration: none; padding: 8px; border-radius: 10px; }
.qf-watch:hover { color: #fff; text-decoration: underline; }
.qf-watch span { color: #ff5c7a; }

@keyframes qf-revolve { to { background-position-x: -328px; } }
@keyframes qf-hover { 50% { transform: translateY(-7px); } }
@keyframes qf-orbit { to { transform: rotate(380deg); } }
@keyframes qf-twinkle { 50% { opacity: .55; transform: scale(.8) rotate(15deg); } }
@keyframes qf-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes qf-choice-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes qf-cue-in { from { opacity: 0; transform: scale(.86) rotate(-4deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes qf-correct-pop { 45% { transform: scale(1.04); } }
@keyframes qf-glow { 35% { box-shadow: 0 0 0 5px #84edcd40, 0 0 32px #84edcd20; } }
@keyframes qf-score-pop { 50% { transform: translateY(-3px) scale(1.08); } }
@keyframes qf-advance { to { transform: scaleX(1); } }
@keyframes qf-burst { from { opacity: 1; transform: rotate(var(--angle)) translateY(0) scale(.5); } to { opacity: 0; transform: rotate(var(--angle)) translateY(calc(-1 * var(--distance))) rotate(70deg) scale(1); } }
.qf-paused *, .qf-paused *::before, .qf-paused *::after { animation-play-state: paused !important; }

@media (max-height: 740px) {
  .qf-hero { height: 170px; margin: 4px auto 10px; }
  .qf-orb { width: 124px; height: 124px; font-size: 66px; }
  .qf-orb .qf-emo { height: 66px; }
  .qf-globe { width: 132px; height: 132px; }
  .qf-globe-map { background-size: 328px 132px; }
  .qf-orbit-one { width: 220px; height: 76px; }
  .qf-orbit-two { width: 172px; height: 166px; }
  .qf-card { padding: 8px 12px 12px; }
  .qf-cue { font-size: clamp(3rem, 14cqi, 4.6rem); }
  .qf-choice { min-height: 60px; }
  .qf-choices--stack .qf-choice { min-height: 48px; padding: 9px 10px; }
  .qf-feedback { padding-top: 8px; min-height: 110px; }
  .qf-result-card { padding: 12px 16px; margin: 8px 0 12px; }
  .qf-cta { margin-top: 10px; }
}
@container (max-width: 350px) {
  .qf-choice { font-size: 1rem; }
  .qf-explain { font-size: .98rem; }
}
@media (prefers-reduced-motion: reduce) {
  .qf-panel, .qf-cue, .qf-badge, .qf-pair, .qf-choice, .qf-card.won, .qf-score-pop, .qf-result-star, .qf-sparkles i, .qf-globe, .qf-globe-map, .qf-orbit, .qf-sat, .qf-orb { animation: none !important; }
  .qf-primary, .qf-choice, .qf-progress i { transition: none; }
}
