/* SharpLab HQ — Rock Paper Scissors page.
   Builds on hqstyle.css (shared vars/header/nav/.btn/.card). Only page-specific
   styling here. A free (no-coins) game — best of 5 over WebSockets. */

/* ── Page intro ── */
.rps-head { margin: 4px 0 20px; text-align: center; }
.rps-head h1 { font-size: 26px; margin: 0 0 4px; }
.rps-head p { color: var(--muted); margin: 0; font-size: 14px; }

.rps-wrap { max-width: 460px; margin: 0 auto; }

/* ── Lobby ── */
.rps-lobby { display: flex; flex-direction: column; gap: var(--s-4); }
.rps-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.rps-field label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.rps-input {
  width: 100%; box-sizing: border-box; background: var(--panel2); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 15px;
  transition: border-color var(--t), box-shadow var(--t);
}
.rps-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.rps-input.code { text-transform: uppercase; letter-spacing: 4px; font-weight: 700; font-family: var(--font-mono); }
.rps-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.rps-actions .btn { flex: 1 1 auto; }
.rps-sep { text-align: center; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.rps-joinrow { display: flex; gap: var(--s-2); }
.rps-joinrow .rps-input { flex: 1 1 auto; }

/* ── Room / share ── */
.rps-codebox { text-align: center; }
.rps-codelabel { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.rps-code {
  display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-weight: 800;
  font-size: 34px; letter-spacing: 8px; color: var(--gold);
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 8px 20px 8px 28px; cursor: pointer; transition: border-color var(--t), transform var(--t);
}
.rps-code:hover { border-color: var(--gold); transform: translateY(-1px); }
.rps-copyhint { display: block; margin-top: 6px; font-size: 11px; color: var(--faint); }

/* ── Player chips / scoreboard ── */
.rps-players { display: flex; align-items: center; justify-content: center; gap: var(--s-3); flex-wrap: wrap; }
.rps-pchip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 13px;
}
.rps-pchip.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.rps-pname { font-weight: 700; }
.rps-pyou { color: var(--faint); font-size: 11px; }
.rps-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.rps-dot.on { background: var(--green); }
.rps-score {
  font-family: var(--font-mono); font-weight: 800; font-size: 16px; color: var(--gold);
  min-width: 18px; text-align: center;
}
.rps-vs { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

/* ── Arena (the two thrown hands) ── */
.rps-arena {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3);
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 12px;
}
.rps-side { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.rps-hand {
  display: grid; place-items: center; width: 84px; height: 84px; max-width: 100%;
  font-size: 48px; line-height: 1; user-select: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.rps-hand.reveal { border-color: var(--accent); }
.rps-hand-empty { color: var(--faint); font-size: 28px; }
.rps-hand-hidden { filter: grayscale(1); opacity: .8; }
.rps-hand-in { display: inline-block; animation: rps-pop .22s ease both; }
.rps-side-label {
  font-size: 12px; color: var(--muted); font-weight: 700; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rps-arena-vs { font-size: 24px; user-select: none; }
@keyframes rps-pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* ── Status line ── */
.rps-status { text-align: center; font-size: 15px; font-weight: 700; min-height: 22px; }
.rps-status.wait { color: var(--muted); font-weight: 500; }
.rps-status.yours { color: var(--green); }
.rps-status.shoot { color: var(--accent2); }
.rps-status.win { color: var(--green); }
.rps-status.lose { color: var(--red); }
.rps-status.draw { color: var(--gold); }

/* ── Choice buttons ── */
.rps-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.rps-choice {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px;
  background: var(--panel2); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.rps-choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.rps-choice:disabled { cursor: default; opacity: .55; }
.rps-choice.chosen { border-color: var(--gold); background: var(--accent-soft); opacity: 1; }
.rps-choice-emoji { font-size: 34px; line-height: 1; }
.rps-choice-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ── Banner + rematch ── */
.rps-banner { text-align: center; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .rps-code:hover, .rps-choice:hover:not(:disabled) { transform: none; }
  .rps-hand-in { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Copied verbatim from tictactoe.css / cards.css so the coins hub + toasts are
   styled on this page too. This game is free, but the shared nav chip is kept.
   ═══════════════════════════════════════════════════════════════════════════ */
.coinschip { font-weight: 700; color: var(--gold); background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; white-space: nowrap; cursor: pointer; transition: border-color .15s, transform .15s; }
.coinschip:hover { border-color: var(--gold); transform: translateY(-1px); }

/* Coins hub modal */
.hubov { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 20px; background: rgba(5,7,11,.6); backdrop-filter: blur(3px); animation: cd-scrim-in .18s ease both; }
@keyframes cd-scrim-in { from { opacity: 0; } to { opacity: 1; } }
.hubcard { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; box-shadow: 0 24px 60px -20px #000; }
.hubhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hubhead h3 { margin: 0; font-size: 17px; }
.hubx { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.hubx:hover { color: var(--fg); background: var(--panel2); }
.hubrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.hubrow:first-of-type { border-top: 0; }
.hubicon { font-size: 20px; width: 30px; text-align: center; flex: 0 0 auto; }
.hubt { font-weight: 700; font-size: 14px; }
.hubd { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.hubfoot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: right; }
.hubfoot b { color: var(--gold); }

.cardtoast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300;
  background: var(--panel2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 18px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
