/* Arcade Mode styles. The setup scenes (START/ROOM/PROFILE/AVATAR/PACK) stay in the
   site's clean pastel language (tokens + base classes from client/ui/app.css); the
   PLAY cabinet goes full arcade — deep navy night, neon glows, scanlines — matching
   the in-canvas art the games paint. Near-sharp corners, minimal words, the two
   cursor colors as identity. */

/* ============ START ============ */
.start-tagline { color: var(--ink-soft); font-size: 15px; text-align: center; max-width: 36ch; }
.presence-text { color: var(--ink-soft); font-size: 14px; }

/* The marquee hero: Higgsfield-generated pastel-neon arcade night (arcade/assets/
   arcade-bg.webp, 30KB) with the ten game emoji bobbing over it. */
.arc-marquee {
  display: flex; gap: 12px; justify-content: center; align-items: flex-end; flex-wrap: wrap;
  width: min(560px, 92vw);
  min-height: 130px;
  padding: 56px 18px 16px;
  background: #131527 url('/arcade/assets/arcade-bg.webp') center / cover no-repeat;
  border-radius: var(--r-card);
  box-shadow: inset 0 0 40px rgba(19, 21, 39, 0.55), var(--shadow-soft);
}
.arc-marquee-emoji {
  font-size: 22px; line-height: 1;
  animation: arc-bob 1.6s ease-in-out infinite;
}
@keyframes arc-bob { 50% { transform: translateY(-5px); } }

/* ============ AVATAR (face snap) ============ */
.arc-avatar { gap: var(--s2); }
.arc-av-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);
  width: 100%; max-width: 640px;
}
.arc-av-panel {
  display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  padding: var(--s3);
  background: var(--paper-raised);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
}
.arc-stage {
  position: relative;
  width: 260px; height: 300px; max-width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.arc-cam {
  width: 220px; height: 220px;
  object-fit: cover;
  border-radius: 50%;
  transform: scaleX(-1); /* mirror-preview, matches the mirrored capture */
  border: 4px solid var(--line);
  background: #101322;
}
.arc-av-preview { width: 260px; height: 300px; }
.arc-snap-count {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 90px;
  color: #fff; text-shadow: 0 0 24px rgba(255, 123, 163, 0.9);
  pointer-events: none;
}
.arc-snap-count.is-on { display: flex; }
.arc-av-actions { display: flex; gap: var(--s1); flex-wrap: wrap; justify-content: center; }
.arc-skip { color: var(--ink-soft); font-size: 13px; }
.arc-cam-note { color: var(--ink-soft); font-size: 13px; text-align: center; margin: 0; min-height: 1em; }
.arc-av-status { color: var(--ink-soft); font-size: 14px; font-family: var(--font-mono); }

/* ============ PACK (mode + game picker) ============ */
.arc-pack { gap: var(--s2); }
.arc-mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); width: 100%; max-width: 560px; }
.arc-mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: var(--s2) var(--s3);
  background: var(--paper-raised);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease;
}
.arc-mode-card:hover { transform: translateY(-2px); }
.arc-mode-card.is-selected { border-color: var(--ink); }
.arc-mode-emoji { font-size: 28px; line-height: 1; }
.arc-mode-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.arc-mode-sub { color: var(--ink-soft); font-size: 13px; }
.arc-count-row { display: flex; gap: 8px; margin-top: 6px; }
.arc-count-pill {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
}
.arc-count-pill.is-selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.arc-game-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px;
  width: 100%; max-width: 720px;
  transition: opacity 160ms ease;
}
.arc-game-grid.is-dimmed { opacity: 0.35; }
.arc-game-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 14px 14px 10px;
  min-height: 118px;
  background: var(--paper-raised);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease;
}
.arc-game-card:hover { transform: translateY(-2px); }
.arc-game-card.is-selected { border-color: var(--pink); box-shadow: 0 6px 18px rgba(255, 123, 163, 0.18); }
.arc-game-order {
  position: absolute; top: 8px; right: 8px;
  min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: #fff; background: var(--pink);
  border-radius: 999px;
}
.arc-game-order:empty { display: none; }
.arc-game-emoji { font-size: 24px; line-height: 1; }
.arc-game-title { font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.arc-game-blurb { color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.arc-game-secs { margin-top: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); letter-spacing: 0.05em; }
.pack-note { color: var(--ink-soft); font-size: 13px; text-align: center; margin: var(--s1) 0 0; font-family: var(--font-mono); letter-spacing: 0.02em; }
.arc-coin-btn { min-width: 240px; }

/* ============ PLAY (the cabinet) ============ */
.scene.arc-play {
  gap: var(--s2);
  width: 100%;
  max-width: 720px;
  align-items: stretch;
}
.arc-hud {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s1);
}
.arc-hud-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--paper-raised);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  min-width: 118px;
}
.arc-hud-chip[data-color="pink"] { border-color: var(--pink); }
.arc-hud-chip[data-color="blue"] { border-color: var(--blue); }
.arc-hud-face { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: var(--paper); }
.arc-hud-face img { width: 100%; height: 100%; object-fit: cover; }
.arc-hud-emoji { font-size: 20px; }
.arc-hud-name { font-size: 12px; font-weight: 700; max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-hud-score {
  margin-left: auto;
  font-family: var(--font-mono); font-weight: 700; font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.arc-hud-mid { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.arc-hud-game { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.arc-hud-timer {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  font-variant-numeric: tabular-nums; color: var(--ink-soft);
}
.arc-hud-timer.is-urgent { color: var(--pink); animation: arc-pulse 0.9s ease-in-out infinite; }
@keyframes arc-pulse { 50% { opacity: 0.35; } }
.arc-hud-round { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); letter-spacing: 0.08em; }

.arc-cabinet {
  position: relative;
  width: 100%;
  height: min(62vh, 560px);
  background: #131527 url('/arcade/assets/arcade-bg.webp') center / cover no-repeat;
  border: 3px solid #2A2D45;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 123, 163, 0.35), 0 0 34px rgba(111, 168, 255, 0.22), var(--shadow-soft);
  overflow: hidden;
}
.arc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.arc-scanlines {
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.arc-play-status {
  min-height: 20px;
  text-align: center;
  color: var(--ink-soft); font-size: 14px; font-family: var(--font-mono);
}

/* ============ SCORE (round scoreboard) ============ */
.arc-score { gap: var(--s2); }
.arc-vs {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2);
  width: 100%; max-width: 560px;
  position: relative;
}
.arc-vs-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--s2);
  background: var(--paper-raised);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  animation: arc-pop 420ms cubic-bezier(.2, 1, .4, 1) both;
}
@keyframes arc-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.arc-vs-card[data-color="pink"] { border-color: var(--pink-tint); }
.arc-vs-card[data-color="blue"] { border-color: var(--blue-tint); }
.arc-vs-card.is-winner[data-color="pink"] { border-color: var(--pink); }
.arc-vs-card.is-winner[data-color="blue"] { border-color: var(--blue); }
.arc-vs-card.is-winner { box-shadow: 0 8px 26px rgba(255, 123, 163, 0.2); }
.arc-vs-crown { position: absolute; top: -18px; font-size: 30px; animation: arc-pop 500ms cubic-bezier(.2, 1.4, .4, 1) both; }
.arc-vs-canvas { width: 150px; height: 145px; }
.arc-vs-name { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.arc-vs-score { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.arc-vs-points { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.arc-vs-band {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
}

/* ============ shared totals / results (quiz-fashion pattern, local copy) ============ */
.fa-totals { display: flex; gap: var(--s2); justify-content: center; }
.fa-total { display: flex; flex-direction: column; align-items: center; padding: 8px 18px; border-radius: var(--r-ctrl); border: 1px solid var(--line); background: var(--paper-raised); }
.fa-total[data-color="pink"] { border-bottom: 3px solid var(--pink); }
.fa-total[data-color="blue"] { border-bottom: 3px solid var(--blue); }
.fa-total-name { font-size: 12px; color: var(--ink-soft); }
.fa-total-score { font-family: var(--font-display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }

.arc-result { gap: var(--s1); }
.arc-champ-canvas { width: 300px; height: 260px; max-width: 90vw; }
.fa-crown-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 8vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0;
}
.fa-crown-name[data-color="pink"] { color: var(--pink); }
.fa-crown-name[data-color="blue"] { color: var(--blue); }
.fa-result-headline { font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 3vw, 22px); text-align: center; color: var(--ink-soft); margin: 0; }

.fa-result-totals { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; margin-top: var(--s2); }
.pp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.pp-row[data-color="pink"] { border-left: 4px solid var(--pink); }
.pp-row[data-color="blue"] { border-left: 4px solid var(--blue); }
.pp-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.pp-score { font-family: var(--font-mono); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }

.result-breakdown { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 480px; }
.fa-breakdown-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.breakdown-idx { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); width: 28px; flex: none; }
.breakdown-q { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-breakdown-scores { display: flex; gap: 6px; flex: none; }
.fa-breakdown-score {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  min-width: 30px; text-align: center;
  padding: 2px 6px; border-radius: var(--r-ctrl);
  background: var(--paper-raised); border: 1px solid var(--line);
}
.fa-breakdown-score[data-color="pink"] { border-bottom: 2px solid var(--pink); }
.fa-breakdown-score[data-color="blue"] { border-bottom: 2px solid var(--blue); }
.fa-breakdown-score.is-win { background: var(--ink); color: var(--paper); }

.result-actions { display: flex; gap: var(--s1); flex-wrap: wrap; justify-content: center; margin-top: var(--s2); }

/* ============ responsive ============ */
@media (max-width: 560px) {
  .arc-av-grid { grid-template-columns: 1fr; }
  .arc-mode-row { grid-template-columns: 1fr; }
  .arc-vs { grid-template-columns: 1fr 1fr; }
  .arc-hud-chip { min-width: 0; }
  .arc-hud-name { display: none; }
  .arc-cabinet { height: min(58vh, 480px); }
}
