/* FloorDash — host HUD + phone controller styles. */

/* ---------- host ---------- */
.game-floordash { position: relative; }
.fd-stage { position: absolute; inset: 0; }
.fd-stage canvas { display: block; }
.fd-brief {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 30px;
}
.fd-brief-title { font-family: var(--display); font-size: clamp(38px, 7vw, 70px); color: var(--orange); }
.fd-brief-line { font-size: 20px; font-weight: 700; color: var(--ink-dim); }
.fd-brief-line.is-hot { color: var(--yellow); font-weight: 900; animation: fadePulse 1s infinite; }

.fd-hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.fd-hud-top {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
}
.fd-round {
  background: rgba(18, 4, 31, 0.85);
  border: 2px solid var(--orange);
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 900; font-size: 15px;
}
.fd-timer {
  background: rgba(18, 4, 31, 0.85);
  border: 2px solid var(--cyan);
  border-radius: var(--r-md);
  font-family: var(--display);
  font-size: 34px;
  padding: 4px 20px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.fd-timer.is-low { color: var(--red); border-color: var(--red); animation: timerPulse 0.7s infinite; }

.fd-scores {
  position: absolute; left: 12px; top: 12px;
  display: flex; flex-direction: column; gap: 6px; width: 240px;
}
.fd-scorerow {
  display: flex; align-items: center; gap: 7px;
  background: rgba(18, 4, 31, 0.82);
  border-left: 4px solid hsl(var(--hue, 280) 85% 60%);
  border-radius: var(--r-sm);
  padding: 5px 9px;
  font-size: 12.5px;
}
.fd-sr-name { font-weight: 900; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-sr-del { color: var(--ink-dim); }
.fd-sr-dmg { color: var(--orange); }
.fd-sr-pts { font-weight: 900; color: var(--cyan); font-size: 14px; }

.fd-ticker {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.fd-tickline {
  background: rgba(18, 4, 31, 0.85);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  font-weight: 700; font-size: 13px;
  animation: tickIn 0.3s ease;
}
@keyframes tickIn { from { opacity: 0; transform: translateX(-20px); } }
.fd-tickline.is-bad { color: var(--orange); }
.fd-tickline.is-good { color: var(--green); }

.fd-banner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 2, 20, 0.35);
}
.fd-banner.is-hidden { display: none; }
.fd-count {
  font-family: var(--display);
  font-size: clamp(90px, 20vw, 200px);
  color: var(--yellow);
  text-shadow: 0 10px 0 rgba(0, 0, 0, 0.4);
  animation: countPop 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes countPop { from { transform: scale(2.4); opacity: 0; } }
.fd-count.is-go { color: var(--green); }
.fd-reelbanner {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  text-align: center;
  background: rgba(18, 4, 31, 0.9);
  border: 3px solid var(--yellow);
  border-radius: var(--r-lg);
  padding: 14px 34px;
  animation: tilePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fd-reelbanner-kicker { font-weight: 900; letter-spacing: 0.25em; font-size: 12px; color: var(--ink-dim); }
.fd-reelbanner-title { font-family: var(--display); font-size: clamp(22px, 4vw, 40px); color: var(--yellow); }
.fd-reelbanner-who { font-weight: 900; font-size: 17px; color: hsl(var(--hue, 280) 90% 65%); }
.fd-standings {
  background: rgba(18, 4, 31, 0.94);
  border-radius: var(--r-lg);
  padding: 26px 30px;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
  max-height: 86%; overflow: auto;
}
.fd-standings-head { font-family: var(--display); font-size: 30px; color: var(--orange); }

/* ---------- phone ---------- */
.fdp { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
.fdp-req {
  border-radius: var(--r-md);
  padding: 10px 12px;
  border: 3px solid var(--green);
  background: var(--card);
  transition: border-color 0.3s ease;
}
.fdp-req.is-drop { border-color: var(--pink); }
.fdp-req-row { display: flex; align-items: center; gap: 12px; }
.fdp-compass { display: flex; flex-direction: column; align-items: center; width: 64px; flex: 0 0 auto; }
.fdp-arrow {
  font-size: 40px; line-height: 1;
  color: var(--yellow);
  transition: transform 0.25s ease;
  transform-origin: 50% 50%;
}
.fdp-dist { font-weight: 900; font-size: 12px; color: var(--ink-dim); }
.fdp-req-mid { flex: 1; min-width: 0; }
.fdp-req-title { font-weight: 900; font-size: 16px; line-height: 1.2; }
.fdp-req-sub { color: var(--ink-dim); font-size: 12.5px; }
.fdp-req-timer {
  font-family: var(--display); font-size: 26px; color: var(--cyan);
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.fdp-req-timer.is-low { color: var(--red); animation: timerPulse 0.7s infinite; }

.fdp-stats { display: flex; gap: 10px; align-items: center; font-weight: 900; font-size: 13px; }
.fdp-stat { background: var(--card); border-radius: 999px; padding: 4px 12px; }
.fdp-stat.is-dmg { color: var(--orange); }
.fdp-stat.is-hit { animation: dmgHit 0.5s ease; }
@keyframes dmgHit { 30% { transform: scale(1.35); background: var(--red); color: #fff; } }
.fdp-roundtag { margin-left: auto; color: var(--yellow); font-size: 12px; }

.fdp-controls { flex: 1; min-height: 0; display: flex; gap: 12px; }
.fdp-left { flex: 1.3; display: flex; flex-direction: column; gap: 10px; }
.fdp-steer {
  flex: 1;
  position: relative;
  background: var(--card);
  border-radius: var(--r-lg);
  touch-action: none;
  overflow: hidden;
}
.fdp-steer-track {
  position: absolute; left: 8%; right: 8%; top: 50%;
  height: 8px; margin-top: -4px;
  background: var(--card2);
  border-radius: 999px;
}
.fdp-thumb {
  position: absolute; top: 50%; left: 50%;
  width: 74px; height: 74px;
  margin: -37px 0 0 -37px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--cyan), #0b6f85);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4);
  transition: left 0.06s linear;
  display: flex; align-items: center; justify-content: center;
}
.fdp-thumb::after { content: "◀ ▶"; font-weight: 900; color: rgba(255,255,255,0.85); font-size: 15px; }
.fdp-thumb.is-active { background: radial-gradient(circle at 35% 30%, var(--yellow), #a86a00); }
.fdp-honk {
  height: 54px; border: 0; border-radius: var(--r-md);
  background: var(--card); font-size: 24px;
  box-shadow: var(--shadow-pop); cursor: pointer;
}
.fdp-honk:active { transform: translateY(3px); }
.fdp-right { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.fdp-pedal {
  border: 0; border-radius: var(--r-lg);
  font-family: var(--body); font-weight: 900; font-size: 24px;
  color: #fff;
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  touch-action: none;
  transition: transform 0.06s ease, filter 0.1s ease;
}
.fdp-pedal.is-gas { flex: 2.2; background: linear-gradient(160deg, #23f0a0, #128a5c); }
.fdp-pedal.is-brake { flex: 1; background: linear-gradient(160deg, #ff3b3b, #a01f1f); }
.fdp-pedal.is-down { transform: translateY(4px); filter: brightness(1.3); box-shadow: 0 2px 0 rgba(0,0,0,0.4); }

.fdp-brief, .fdp-rest {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 26px;
}
.fdp-brief-emoji { font-size: 60px; }
.fdp-brief-title { font-family: var(--display); font-size: 26px; color: var(--orange); }
.fdp-brief-line { font-weight: 700; color: var(--ink-dim); }
.fdp-brief-fine { font-size: 11px; color: rgba(185, 168, 216, 0.5); }
.fdp-rest-head { font-family: var(--display); font-size: 26px; color: var(--orange); }
.fdp-rest-rank { font-size: 24px; font-weight: 900; }
.fdp-rest-delta { font-weight: 900; color: var(--green); }
.fdp-rest-delta.is-neg { color: var(--red); }
.fdp-rest-note { color: var(--ink-dim); font-weight: 700; }
.fdp-rest-next { color: var(--yellow); font-weight: 900; animation: fadePulse 1.2s infinite; }
