/* Styles only this game uses. The arcade's look lives in shared/arcade.css; the home, results and pause
   screens in shared/home.css (sizes there and here are in --hu: one logical px of the 288-wide frame). */


/* ---------- the home showcase: SCAM OR REAL? ----------
   Five things in a row, scams and real tools mixed. The crosshair (drawn on the canvas over the row) busts the
   scams and spares the real tools. The little labels are tinted here to teach: red = scam, green = real. */
.sh-show { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(var(--hu) * 5); }
.sh-row { width: 100%; display: flex; justify-content: space-between; padding: 0 calc(var(--hu) * 2); }
.sh-item { width: calc(var(--hu) * 48); display: flex; flex-direction: column; align-items: center; gap: calc(var(--hu) * 3); }
.sh-item img {
  width: calc(var(--hu) * 27);
  height: calc(var(--hu) * 27);
  image-rendering: pixelated;
  transition: transform 0.14s ease-out, opacity 0.14s ease-out, filter 0.2s ease-out;
  animation: sh-bob 1.6s ease-in-out infinite;
}
.sh-item:nth-child(2n) img { animation-delay: -0.8s; }
.sh-item-label { font-size: calc(var(--hu) * 4.6); line-height: 1.35; text-align: center; white-space: nowrap; }
.sh-item.is-scam .sh-item-label { color: #ff8a80; }
.sh-item.is-real .sh-item-label { color: #ffb24a; }
.sh-item.busted img { transform: scale(1.3) rotate(-12deg); opacity: 0; transition-duration: 0.08s; }
.sh-item.is-real img { filter: drop-shadow(0 0 calc(var(--hu) * 2.5) rgba(255, 150, 30, 0.75)); }
.sh-item.spared img { filter: drop-shadow(0 0 calc(var(--hu) * 4) rgba(255, 160, 40, 0.95)); }
.sh-item.back img { animation: sh-back 0.3s ease-out; }
@keyframes sh-back { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sh-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--hu) * -1.5)); } }
.sh-show-cv {
  position: absolute;
  left: calc(var(--hu) * -7);
  top: calc(var(--hu) * -9);
  width: calc(100% + var(--hu) * 14);
  height: calc(100% + var(--hu) * 9);
  pointer-events: none;
}
.sh-cap { font-size: calc(var(--hu) * 5.6); line-height: 1; color: #9aa3bf; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .sh-item img { animation: none; } }

/* ---------- results: the run in four numbers ---------- */
.sh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--hu) * 4) calc(var(--hu) * 5); line-height: 1; }
.sh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--hu) * 4);
  padding: calc(var(--hu) * 5) 0;
  border: max(1px, calc(var(--hu) * 1)) solid #1f46d8;
  border-radius: calc(var(--hu) * 4);
  background: rgba(4, 8, 30, 0.6);
}
.sh-stat span { font-size: calc(var(--hu) * 5.6); color: #c9d2ff; white-space: nowrap; }
.sh-stat b { font-weight: 400; font-size: calc(var(--hu) * 9); color: #f7931a; white-space: nowrap; }
.sh-stat b.red { color: #ff6b6b; }
.sh-stat b.green { color: #2fd24a; }

/* ---------- the sword on computers: a crosshair to swipe with; no scrolling or zooming on the board ---------- */
.stage { touch-action: none; cursor: crosshair; }

/* ---------- the corner buttons ---------- */
/* Pause (during a game) sits just left of the sound button, like every game in the arcade */
#btn-pause { right: calc(max(10px, env(safe-area-inset-right)) + 54px); }
#btn-pause[hidden] { display: none; }
/* "← ARCADE" (home screen only): back to the arcade's main page. Top-left corner, same blue
   neon style and height as the mute button in the top-right, so the two frame the game. */
#btn-arcade {
  right: auto;
  left: max(10px, env(safe-area-inset-left));
  width: auto;
  gap: 8px;
  padding: 0 12px 0 10px;
  font-family: var(--font-arcade);
  font-size: 10px;
  text-decoration: none;
}
#btn-arcade .px-arrow { width: 14px; height: 14px; shape-rendering: crispEdges; }
#btn-arcade[hidden] { display: none; }
/* Mute icon swap */
#btn-mute .icon-off { display: none; }
#btn-mute.muted .icon-on { display: none; }
#btn-mute.muted .icon-off { display: block; }

/* Phones, while the board shows: the game sits just below the corner buttons, so they never cover SATS SAVED.
   (The home and results use the whole screen, their top band kept clear for the buttons, like the other games.) */
@media (max-width: 599px) {
  .app.sh-board { padding-top: calc(max(10px, env(safe-area-inset-top)) + 54px); }
}

/* Phone held sideways: cover the game with a "turn your phone" message (the game pauses itself) */
.rotate-msg { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate-msg {
    display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; text-align: center;
    background: #05070f; color: var(--btc-orange); font-family: var(--font-arcade); font-size: 16px; line-height: 1.8;
  }
}
/* the way back to the arcade stays on the "turn your phone" screen (same button as the home's top-left corner) */
.rotate-msg p { margin: 0; }
.rotate-msg .rotate-arcade {
  position: absolute; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: auto;
  width: auto; gap: 8px; padding: 0 12px 0 10px; font-family: var(--font-arcade); font-size: 10px; line-height: 1; text-decoration: none;
}
.rotate-msg .rotate-arcade .px-arrow { width: 14px; height: 14px; shape-rendering: crispEdges; }
/* bigger screens shaped like the game (an iPad held upright): the board starts below the corner buttons (main.js decides) */
.app.icons-clear.sh-board .stage-area { height: calc(100% - 50px); margin-top: 50px; }

/* the whole screen ignores pan and zoom gestures (taps on the buttons still work) */
.app { touch-action: none; }

/* ---------- PICK A STAGE: the small button under PLAY, and the list of stages it opens (screens.js) ---------- */
.sh-pick-open {
  box-sizing: border-box;
  margin-top: calc(var(--hu) * 6);
  height: calc(var(--hu) * 17);
  padding: 0 calc(var(--hu) * 8);
  display: inline-flex;
  align-items: center;
  gap: calc(var(--hu) * 4);
  border: max(1px, calc(var(--hu) * 1.2)) solid #2b55ff;
  border-radius: calc(var(--hu) * 9);
  background: #070b22;
  box-shadow: 0 0 calc(var(--hu) * 5) rgba(43, 85, 255, 0.35);
  color: #ffc23a;
  font-family: inherit;
  font-size: calc(var(--hu) * 6);
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sh-pick-open + .ah-controls { margin-top: calc(var(--hu) * 6); }
@media (pointer: coarse) { .sh-pick-open { min-height: 26px; } }
@media (hover: hover) { .sh-pick-open:hover { border-color: #5a7dff; color: #ffd76a; } }
.sh-pick-open:active { transform: translateY(1px); }
.sh-pick-open:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* a tiny 2 x 2 grid of stages */
.sh-pick-ico { display: grid; grid-template-columns: repeat(2, calc(var(--hu) * 3)); gap: calc(var(--hu) * 1); }
.sh-pick-ico i { width: calc(var(--hu) * 3); height: calc(var(--hu) * 3); background: #f7931a; }
.sh-pick-ico i:nth-child(2) { background: #ffc23a; }
.sh-pick-ico i:nth-child(3) { background: #ff6a1a; }
.sh-pick-ico i:nth-child(4) { background: #ff9a5c; }

.sh-pick {
  position: absolute;
  inset: 0;
  z-index: 3;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--hu) * 6);
  padding: calc(var(--ah-band, 0px) + var(--hu) * 6) calc(var(--hu) * 12) calc(var(--hu) * 10);
  background: radial-gradient(ellipse 120% 70% at 50% 28%, #0e1640 0%, #070a1f 55%, #04060f 100%);
}
.sh-pick[hidden] { display: none; }
.ah-clear .sh-pick { padding-top: calc(var(--hu) * 10); }
.sh-pick-title { margin: 0; font-size: calc(var(--hu) * 12); line-height: 1; color: #ffb12a; text-shadow: calc(var(--hu) * 1) calc(var(--hu) * 1) 0 #4a1d00; }
.sh-pick-sub { margin: 0 0 calc(var(--hu) * 2); font-size: calc(var(--hu) * 5); line-height: 1; color: #9aa3bf; white-space: nowrap; }
.sh-pick-list { width: calc(var(--hu) * 264); display: flex; flex-direction: column; gap: calc(var(--hu) * 6); }
.sh-stage {
  display: grid;
  grid-template-columns: calc(var(--hu) * 84) 1fr auto;
  align-items: center;
  gap: calc(var(--hu) * 7);
  padding: calc(var(--hu) * 5);
  border: max(1.5px, calc(var(--hu) * 1.5)) solid #2b55ff;
  border-radius: calc(var(--hu) * 6);
  background: rgba(8, 12, 30, 0.92);
  box-shadow: 0 0 calc(var(--hu) * 8) rgba(43, 85, 255, 0.3);
}
.sh-stage-cv { display: block; width: calc(var(--hu) * 84); height: calc(var(--hu) * 42); border-radius: calc(var(--hu) * 3); image-rendering: pixelated; }
.sh-stage-words { display: flex; flex-direction: column; gap: calc(var(--hu) * 4); min-width: 0; line-height: 1; }
.sh-stage-no { font-size: calc(var(--hu) * 5.5); color: #ffc23a; }
.sh-stage-name { font-size: calc(var(--hu) * 6); color: #fff; white-space: nowrap; }
.sh-stage-boss { font-size: calc(var(--hu) * 4.4); color: #ff8a80; white-space: nowrap; }
.sh-stage-btns { display: flex; flex-direction: column; gap: calc(var(--hu) * 4); }
.sh-stage-btns button {
  box-sizing: border-box;
  width: calc(var(--hu) * 42);
  height: calc(var(--hu) * 17);
  padding: 0;
  border: max(1px, calc(var(--hu) * 1.2)) solid;
  border-radius: calc(var(--hu) * 4);
  font-family: inherit;
  font-size: calc(var(--hu) * 6);
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sh-stage-play { background: #f7931a; border-color: #ffc23a; color: #1a0a00; box-shadow: 0 calc(var(--hu) * 1.5) 0 #8a4a00; }
.sh-stage-bossbtn { background: #2a0a10; border-color: #ff4a3c; color: #ff6b5a; box-shadow: 0 calc(var(--hu) * 1.5) 0 #5a0d08; }
.sh-stage-btns button:active { transform: translateY(1px); box-shadow: none; }
.sh-stage-btns button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) { .sh-stage-play:hover { background: #ffa83a; } .sh-stage-bossbtn:hover { background: #3a1018; } }
.sh-pick-back { margin-top: calc(var(--hu) * 2); }
@media (pointer: coarse) { .sh-stage-btns button { min-height: 28px; } }

/* the FUD OR FACT? labels: a touch smaller so longer Spanish words fit their column */
.sh-item-label { font-size: calc(var(--hu) * 3.9); }

/* ---------- FUD SLAYER: the stage card line, and the results extras (screens.js) ---------- */
.fs-stage-fud { font-size: calc(var(--hu) * 4.4); color: #ffb24a; white-space: nowrap; }

.fs-losses { display: flex; align-items: center; justify-content: center; gap: calc(var(--hu) * 3); margin-top: calc(var(--hu) * 6); line-height: 1; }
.fs-losses span { font-size: calc(var(--hu) * 4.6); color: #9aa3bf; white-space: nowrap; margin-right: calc(var(--hu) * 1); }
.fs-loss { width: calc(var(--hu) * 16); height: calc(var(--hu) * 16); image-rendering: pixelated; border-radius: 50%; background: #10142a; padding: calc(var(--hu) * 1.5); }
.fs-loss.is-fact { filter: drop-shadow(0 0 calc(var(--hu) * 2.5) rgba(255, 150, 30, 0.9)); }

.fs-lesson {
  margin-top: calc(var(--hu) * 7); padding: calc(var(--hu) * 5) calc(var(--hu) * 6);
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--hu) * 4);
  background: rgba(14, 16, 34, 0.75); border: calc(var(--hu) * 1) solid #3a2a6a; border-radius: calc(var(--hu) * 3);
  text-align: center; line-height: 1.35;
}
.fs-lesson.is-fact { border-color: #8a4a00; }
.fs-lesson-head { font-size: calc(var(--hu) * 4.6); color: #9aa3bf; line-height: 1; white-space: nowrap; }
.fs-lesson-row { display: flex; align-items: center; gap: calc(var(--hu) * 4); }
.fs-lesson-row img { width: calc(var(--hu) * 20); height: calc(var(--hu) * 20); image-rendering: pixelated; }
.fs-lesson.is-fact .fs-lesson-row img { filter: drop-shadow(0 0 calc(var(--hu) * 3) rgba(255, 150, 30, 0.9)); }
.fs-lesson-name { font-size: calc(var(--hu) * 5.2); color: #ff8a80; }
.fs-lesson.is-fact .fs-lesson-name { color: #ffb24a; }
.fs-lesson-title { font-weight: 400; font-size: calc(var(--hu) * 5.6); color: #ffd76a; }
.fs-lesson-lines { margin: 0; font-size: calc(var(--hu) * 4.6); line-height: 1.5; color: #d6dcff; }

/* the rank on the results screen, and the "game points" note */
.fs-rank { display: flex; flex-direction: column; align-items: center; gap: calc(var(--hu) * 2.5); margin-bottom: calc(var(--hu) * 6); line-height: 1; }
.fs-rank span { font-size: calc(var(--hu) * 4.4); color: #9aa3bf; }
.fs-rank b { font-weight: 400; font-size: calc(var(--hu) * 9); color: #ffc629; text-shadow: 0 calc(var(--hu) * 1) 0 #8a4a00, 0 0 calc(var(--hu) * 6) rgba(255, 160, 40, 0.45); white-space: nowrap; }
.fs-note { margin: calc(var(--hu) * 5) 0 0; font-size: calc(var(--hu) * 3.6); color: #6a7290; text-align: center; line-height: 1.4; }
