/* Impostor-only styles. The theme and the shared controls are in ../shared/base.css. */

/* Players */
.players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.players li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 8px 8px 12px;
}
.players .pname { flex: 1; font-weight: 600; }
.players .pscore { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.players .remove { background: none; border: 0; color: var(--muted); font-size: 20px; padding: 0 6px; }

.rules summary { font-weight: 700; cursor: pointer; }
.rules ol { margin: 8px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.5; }

/* Reveal: the card sits behind a door that slides up while held */
.name { font-size: 32px; }

.vault {
  position: relative;
  height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: #0d0f1f;
  border: 3px solid var(--line);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.card .label { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 13px; }
.card .word { font-size: 40px; font-weight: 800; line-height: 1.1; word-break: break-word; }
.card .tag { font-size: 15px; color: var(--muted); }
.card .tag b { color: var(--text); }
.card.impostor .word { color: var(--red); font-size: 34px; }

.door {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(0, 0, 0, 0.18) 34px 38px),
    linear-gradient(180deg, #ffd85c, #f2b705);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.2, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.vault.open .door { transform: translateY(-100%); }

.door-label {
  color: #3a2c00;
  font-weight: 800;
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.door-handle {
  position: absolute;
  bottom: 22px;
  width: 90px;
  height: 14px;
  border-radius: 8px;
  background: #3a2c00;
  opacity: 0.6;
}

/* Clue order */
.order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: n; }
.order li {
  counter-increment: n;
  background: var(--panel);
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.order li::before {
  content: counter(n);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--line);
  display: grid;
  place-items: center;
  font-size: 14px;
}
.order li:first-child::before { background: var(--accent); color: #1b1b1b; }

/* Votes */
.group-pick { justify-content: center; }
.group-pick .chip { padding: 12px 18px; font-size: 16px; }
.votes { display: flex; flex-direction: column; gap: 8px; }
.votes .vrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
}

/* Result */
.reveal-line { margin: 0; font-size: 17px; line-height: 1.5; }
.reveal-line .imp { color: var(--red); font-weight: 800; }
.reveal-line .w { color: var(--accent); font-weight: 800; }

.scores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.scores li { display: flex; justify-content: space-between; font-size: 16px; }
.scores .delta { color: var(--green); font-weight: 700; margin-right: 8px; }
.scores .total { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Each on own phone (online.js) ---------- */
.group { display: flex; flex-direction: column; gap: 16px; }
code { font-size: 13px; color: var(--text); }
.pill {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.code-input { text-transform: uppercase; letter-spacing: 6px; font-weight: 800; font-size: 20px; text-align: center; }
.wait { align-items: center; padding: 32px 16px; }
.spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Lobby */
.room { align-items: center; text-align: center; }
.room-code { font-size: 44px; font-weight: 900; letter-spacing: 8px; color: var(--accent); }
.link-text { word-break: break-all; }
/* White behind the QR code so every phone camera reads it. */
.qr { width: 168px; max-width: 100%; margin: 6px auto; padding: 6px; background: #fff; border-radius: 10px; }
.qr svg { display: block; width: 100%; height: auto; }
.notice { margin: 0; color: var(--text); border: 1px solid var(--accent); line-height: 1.4; }
.players .tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--accent); color: #1b1b1b; }
.players .tag.you { background: var(--line); color: var(--text); }
.players li.away { opacity: 0.5; }
.chip:disabled { cursor: default; }
#o-settings.readonly .seg button:not(.on), #o-settings.readonly .chip:not(.on) { opacity: 0.6; }

/* Who has seen their card / who has voted */
.players.marks li { padding: 8px 12px; }
.players .mark { font-weight: 800; color: var(--muted); }
.players .mark.done { color: var(--green); }
.vault.waiting { cursor: default; }
.vault.waiting .door { filter: grayscale(0.7); }

.icon-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  width: 36px; height: 36px;
  font-size: 16px;
  flex: none;
}
#screen-o-game > .row.between > .pill { margin-left: auto; margin-right: 8px; }

/* Leave, resume and "forgot your word" sheets */
.o-sheet .stack { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.o-sheet .btn { width: 100%; }
.o-sheet .vault { height: 300px; margin-top: 8px; }
