/* Merry Quizmas – & Co. */
@font-face {
  font-family: 'Nokia Cellphone FC';
  src: url('fonts/nokiafc22.ttf') format('truetype');
  font-display: block;
}

/* Self-hosted fonts (no calls to Google – GDPR-friendly). Licenses in fonts/ */
@font-face { font-family: 'Agbalumo'; src: url('fonts/agbalumo-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Anton'; src: url('fonts/anton-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Asimovian'; src: url('fonts/asimovian-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Asset'; src: url('fonts/asset-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Barlow Condensed'; src: url('fonts/barlow-condensed-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Barlow Condensed'; src: url('fonts/barlow-condensed-700.woff2') format('woff2'); font-weight: 700; font-display: block; }
@font-face { font-family: 'Imbue'; src: url('fonts/imbue-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-900.woff2') format('woff2'); font-weight: 900; font-display: block; }
@font-face { font-family: 'Just Another Hand'; src: url('fonts/just-another-hand-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Matemasie'; src: url('fonts/matemasie-400.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Roboto'; src: url('fonts/roboto-400.woff2') format('woff2'); font-weight: 400; font-display: block; }

:root {
  --nokia: 'Nokia Cellphone FC', 'Silkscreen', monospace;
  --impact: Impact, 'Anton', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  --interstate: 'Interstate', 'Interstate Compressed', 'Barlow Condensed', sans-serif;
  --gill: 'Gill Sans', 'Gill Sans MT', 'Lato', sans-serif;
  --yellow: #ffea00;
  --lime: #e4fb00;
  --magenta: #ee00ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--nokia); -webkit-font-smoothing: antialiased; user-select: none; }
button { font: inherit; color: inherit; }

/* ---------- Stage (1920×1080, scaled to the window) ---------- */
#viewport { position: fixed; inset: 0; }
#stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform-origin: 0 0; overflow: hidden; background: #2e9ef2;
}
.screen { position: absolute; inset: 0; overflow: hidden; animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.abs { position: absolute; }
.abs > img, img.abs { display: block; }
.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Backgrounds */
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bg-sky { background-image: url('img/bg-sky.webp'); }
.bg-yellow { background-image: url('img/bg-yellow.webp'); background-color: #fff; }
.bg-movies { background-image: url('img/bg-movies.webp'); }
.bg-landscape { background-image: url('img/bg-landscape.webp'); background-position: center 30%; }
.bg-pinksky { background-image: url('img/bg-pinksky.webp'); }
.bg-tunnel { background-image: url('img/bg-tunnel.webp'); }
.bg-none { background: #fff; }

/* ---------- Text styles ---------- */
.t { position: absolute; margin: 0; white-space: pre-line; word-break: break-word; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.nokia { font-family: var(--nokia); color: #000; }
.impact { font-family: var(--impact); color: #000; }
.gill { font-family: var(--gill); color: #000; }

/* Text with an "outside" stroke: a stroked copy (.sl) sits behind the fill copy (.fl) */
.sl { -webkit-text-stroke: var(--sw, 0) var(--sc, #000); color: var(--sc, #000) !important; background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; filter: none !important; }
.fl { -webkit-text-stroke: 0; }

.gradient-title {
  font-family: var(--nokia); text-align: center; line-height: normal;
  background: linear-gradient(to bottom, var(--magenta) 0%, #fff 40%, var(--lime) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  --sw: 3.6px; --sc: #000;
}
.gradient-title-wrap { position: absolute; filter: drop-shadow(7.1px 12.4px 0 #000); }
.gradient-title-wrap.small { filter: drop-shadow(3.2px 5.6px 0 #000); }
.gradient-title-wrap.small .gradient-title { --sw: 1.6px; }
.gradient-title-wrap.mid { filter: drop-shadow(4.2px 7.4px 0 #000); }
.gradient-title-wrap.mid .gradient-title { --sw: 2.2px; }

.impact-yellow { font-family: var(--impact); color: var(--yellow); --sw: 18px; --sc: #000; }
.emoji-q { color: #000; text-align: center; white-space: nowrap; }
.emoji-q.nokia { font-family: var(--nokia); }
.emoji-q.impact { font-family: var(--impact); }
.act-fade {
  background: linear-gradient(to bottom, #000, #666); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lookback { font-family: var(--impact); color: #fff; --sw: 10px; --sc: #1f0074; }
.dk { font-family: var(--impact); color: #000; }
.matemasie {
  font-family: 'Matemasie', var(--impact);
  background: linear-gradient(to bottom, #5e00ff, #ff7a7d); -webkit-background-clip: text; background-clip: text; color: transparent;
  --sw: 18px; --sc: #000;
}
.agbalumo-green { font-family: 'Agbalumo', cursive; color: #00ff6f; --sw: 50px; --sc: #6e3864; }
.agbalumo-purple { font-family: 'Agbalumo', cursive; color: #6e3864; --sw: 50px; --sc: #00ff6f; }
.asset-wrap { position: absolute; filter: drop-shadow(-4.1px 29.9px 30px #ff15f7); }
.asset {
  font-family: 'Asset', var(--impact);
  background: linear-gradient(to bottom, #00ffff, #120099); -webkit-background-clip: text; background-clip: text; color: transparent;
  --sw: 16.4px; --sc: #fff;
}

/* Bonus ribbon */
.ribbon { position: absolute; transform-origin: 0 0; }
.ribbon.pink { background: #ff4b9c; }
.ribbon.grey { background: #d9d9d9; }
.ribbon-text { position: absolute; transform-origin: 0 0; font-family: 'Imbue', serif; text-align: center; white-space: nowrap; }
.ribbon-text.pink { color: #fff; }
.ribbon-text.grey { color: #000; }

/* Movies */
.pill { position: absolute; background: #fff; border-radius: 90px; }
.movies-title-wrap {
  position: absolute; left: 1049px; top: 129px; width: 1500px; height: 821px; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
}
.movies-title {
  transform: rotate(-12.13deg); width: 1420px; text-align: center; white-space: pre-line;
  font-family: 'Just Another Hand', cursive; font-size: 343px; line-height: 193px; color: #ff00b2;
  --sw: 31px; --sc: #3f68ff;
}
.projector { position: absolute; left: -203px; top: 285px; width: 915px; height: 915px; display: flex; align-items: center; justify-content: center; }
.projector img { width: 847px; height: 847px; transform: rotate(-4.8deg); }

/* More or Less title */
.mol-more { font-family: 'Asimovian', var(--impact); color: #b7ff00; --sw: 47px; --sc: #fff; filter: drop-shadow(-11.9px 87.3px 0 #ff8a8c); }
.mol-or { font-family: 'Asimovian', var(--impact); color: #ffc9fc; filter: drop-shadow(2px 15px 0 #5b15ff); }
.mol-less { font-family: 'Asimovian', var(--impact); color: #ff4b9c; filter: drop-shadow(2px 15px 0 #5b15ff); }

/* Lyrics */
.lyric-box {
  position: absolute; left: 160px; right: 160px; top: 50%; transform: translateY(-50%);
  background: #fafafa; border-radius: 6px; padding: 40px 70px; text-align: center;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif; font-size: 64px; line-height: 1.25; color: #000;
}
.lyric-box .song { display: block; margin-top: 14px; font-size: 56px; }
.lyric-box .word {
  font-family: 'Agbalumo', cursive; color: #ff4000; font-size: 1.35em; line-height: 1;
  display: inline-block; animation: pop .45s cubic-bezier(.3,1.6,.5,1);
}
@keyframes pop { from { transform: scale(.2) rotate(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Puzzle helpers */
.dashbox { position: absolute; border: 14px solid #001eff; }

/* ---------- Tiles (home / quizmaster) ---------- */
.tile {
  position: absolute; width: 479px; height: 202px; border: 0; border-radius: 59.5px; background: #fff;
  cursor: pointer; overflow: hidden; padding: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover, .tile:focus-visible { transform: translateY(-6px); box-shadow: 8px 12px 0 #000; outline: none; }
.tile:active { transform: translateY(-2px); box-shadow: 3px 5px 0 #000; }
.tile[disabled] { cursor: default; }
.tile[disabled]:hover { transform: none; box-shadow: none; }
.tile .inner { position: absolute; inset: 0; }
.tile .soon {
  position: absolute; right: 22px; top: 18px; font-family: var(--nokia); font-size: 20px;
  background: #000; color: var(--lime); padding: 6px 10px; border-radius: 8px;
}
.tile-label { position: absolute; left: 20px; right: 20px; top: 50%; transform: translateY(-50%); text-align: center; margin: 0; white-space: pre-line; }
.badge { position: absolute; font-size: 68px; line-height: 1; pointer-events: none; }

/* Big choice buttons (intro) */
.choice {
  position: absolute; width: 440px; height: 220px; border: 0; border-radius: 60px; background: #fff; cursor: pointer;
  font-family: var(--nokia); font-size: 46px; line-height: 1.15; color: #000; padding: 20px 30px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.choice small { display: block; margin-top: 14px; font-size: 22px; color: #444; }
.choice:hover, .choice:focus-visible { transform: translateY(-8px) rotate(-1deg); box-shadow: 10px 14px 0 #000; outline: none; }
.choice.alt { background: var(--lime); }

/* Answer pages */
.answer-pill { position: absolute; top: 94px; height: 139px; background: #fff; border-radius: 59.5px; left: 50%; transform: translateX(-50%); padding: 0 60px;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  font-family: var(--interstate); font-weight: 700; font-size: 69px; font-stretch: condensed; }
.answer-box { position: absolute; left: 133px; top: 260px; width: 1653px; height: 778px; background: #fff; border-radius: 59.5px; padding: 56px 64px; overflow: hidden; }
.answer-list { margin: 0; padding: 0; list-style: none; font-family: var(--interstate); font-size: 60px; line-height: 1.16; }
.answer-list li { margin-bottom: .16em; }
.answer-list b { font-weight: 700; }
.answer-list .empty { color: #666; }

/* How to play */
.howto-rules { position: absolute; left: 120px; top: 520px; width: 760px; font-family: 'Inter', sans-serif; font-weight: 900; font-size: 44px; line-height: 1.2; color: #000; text-align: center; white-space: pre-line; }
.howto-rules.wide { left: 260px; width: 1400px; top: 560px; font-size: 52px; }
.ex-caption { position: absolute; font-family: 'Inter', sans-serif; font-size: 34px; color: #000; text-align: center; }

/* End screen + controls */
.end-buttons { position: absolute; left: 0; right: 0; top: 640px; display: flex; gap: 40px; justify-content: center; }
.end-buttons .choice { position: relative; height: 150px; width: 520px; font-size: 40px; }

#controls {
  position: fixed; right: 18px; bottom: 18px; display: flex; gap: 10px; align-items: center; z-index: 20;
  transition: opacity .3s;
}
#controls.hidden { opacity: 0; pointer-events: none; }
#controls button, #controls .progress {
  font: 15px/1 var(--nokia); padding: 11px 14px; border: 2px solid #000; border-radius: 12px;
  background: #fff; color: #000; box-shadow: 3px 4px 0 #000;
}
#controls button { cursor: pointer; }
#controls button.primary { background: var(--lime); }
#controls button:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 #000; }
#controls .progress { box-shadow: none; background: rgba(255,255,255,.85); border-color: transparent; }
#controls .sep { width: 6px; }

/* Loading bar */
.loadbar { position: absolute; left: 660px; top: 960px; width: 600px; height: 34px; border: 5px solid #000; background: #fff; border-radius: 6px; overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--magenta) 0 24px, var(--lime) 24px 48px); transition: width .3s steps(8); }
.hint { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--nokia); font-size: 26px; color: #fff; text-shadow: 2px 3px 0 #000; }

/* Rotate hint on small portrait screens */
#rotate { display: none; }
@media (orientation: portrait) and (max-width: 820px) {
  #rotate { display: flex; position: fixed; inset: auto 12px 12px 12px; z-index: 30; padding: 12px 14px; border-radius: 12px;
    background: #fff; border: 2px solid #000; font: 13px/1.3 var(--nokia); align-items: center; gap: 10px; }
}
.tile .mol-more.fl { filter: drop-shadow(-2px 14px 0 #ff8a8c); }
.tile .mol-or.fl, .tile .mol-less.fl { filter: drop-shadow(1px 4px 0 #5b15ff); }
.tile .asset-wrap { filter: drop-shadow(-1px 6px 8px #ff15f7); }
