/* feud.css — shared look for the three Party Family Feud pages
   (entry wizard, audience game view, host controller).
   Palette lifted from the original game so the big screen is unchanged. */

:root {
  --bg1: #16002f; --bg2: #32004f; --gold: #ffd166; --gold2: #f7b801;
  --panel: #071a3d; --panel2: #0b2a66; --white: #fff8e7;
  --red: #ff3b3b; --green: #4ade80; --cyan: #67e8f9; --muted: rgba(255,255,255,0.72);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--white);
  background: radial-gradient(circle at top, var(--bg2), var(--bg1));
  min-height: 100vh;
}
button {
  border: none; border-radius: 12px; padding: 10px; margin: 4px 0;
  font-weight: 900; cursor: pointer; background: var(--gold); color: #16002f;
  font-size: 14px; font-family: inherit;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: 0.42; cursor: not-allowed; filter: grayscale(0.5); }
.green { background: var(--green); color: #06220f; }
.cyan  { background: var(--cyan);  color: #06202b; }
.red   { background: #ff8a8a;      color: #370202; }
.ghost { background: transparent; color: var(--gold); border: 2px solid var(--gold); }

/* ---- centered card layout, used by the wizard + gate screens ---- */
.wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card {
  width: min(720px, 96vw); border: 6px solid var(--gold); border-radius: 30px;
  padding: 34px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.35));
  box-shadow: 0 24px 70px rgba(0,0,0,0.48);
}
.card h1 {
  font-size: clamp(28px, 4.6vw, 46px); color: var(--gold); font-weight: 1000;
  text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 10px;
}
.card p.lede { font-size: 19px; font-weight: 700; color: var(--white); margin: 0 0 24px; line-height: 1.45; }
.card p.note { font-size: 15px; color: var(--muted); line-height: 1.5; margin: 14px 0 0; }

/* Two-screen explainer on the first page. */
.two-screens { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 22px; }
.scr-explain {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  border: 2px solid rgba(255,255,255,0.16); border-radius: 16px; padding: 14px;
  background: rgba(0,0,0,0.22); text-align: left; font-size: 14px; line-height: 1.45; color: var(--muted);
}
.scr-explain strong { color: var(--white); }
.scr-ico { font-size: 30px; text-align: center; }
@media (max-width: 640px) { .two-screens { grid-template-columns: 1fr; } }

.choices { display: grid; gap: 14px; margin-top: 8px; }
.choice {
  border: 3px solid rgba(255,209,102,0.75); border-radius: 20px; padding: 20px;
  background: rgba(0,0,0,0.26); cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center;
  color: var(--white); font-family: inherit; font-size: inherit; margin: 0;
}
.choice:hover { background: rgba(255,209,102,0.14); border-color: var(--gold); }
.choice .ico { font-size: 38px; text-align: center; }
/* Both are <span>s inside a wrapper span, so they need to be blocks or the
   description runs on after the title instead of sitting under it. */
.choice .t { display: block; font-size: 21px; font-weight: 900; color: var(--gold); }
.choice .d { display: block; font-size: 15px; color: var(--muted); margin-top: 5px; line-height: 1.4; }

/* The primary path is the loud one; the secondary path stays available but quiet,
   so the eye lands on "start a new game" without the other becoming hard to find. */
.choice.primary {
  border-width: 4px; border-color: var(--gold); padding: 26px 22px;
  background: linear-gradient(135deg, rgba(255,209,102,0.24), rgba(247,184,1,0.10));
  box-shadow: 0 0 30px rgba(255,209,102,0.28), inset 0 0 24px rgba(255,209,102,0.07);
  grid-template-columns: 68px 1fr;
}
.choice.primary:hover { background: linear-gradient(135deg, rgba(255,209,102,0.34), rgba(247,184,1,0.16)); transform: translateY(-2px); }
.choice.primary .ico { font-size: 52px; }
.choice.primary .t { font-size: 28px; letter-spacing: .4px; }
.choice.primary .d { font-size: 16px; color: rgba(255,255,255,0.86); }

.choice.subtle {
  border-width: 2px; border-color: rgba(255,255,255,0.22); padding: 15px 18px;
  background: rgba(0,0,0,0.22); grid-template-columns: 40px 1fr;
}
.choice.subtle:hover { border-color: rgba(255,209,102,0.7); background: rgba(255,209,102,0.08); }
.choice.subtle .ico { font-size: 26px; }
.choice.subtle .t { font-size: 17px; color: rgba(255,255,255,0.9); }
.choice.subtle .d { font-size: 13.5px; }

/* "or" divider between the two paths */
.choice-sep { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px;
  font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin: 2px 0; }
.choice-sep::before, .choice-sep::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.16); }

/* ---- boxed code entry (session code + passcode) ---- */
.boxes { display: flex; gap: 12px; justify-content: center; margin: 26px 0 8px; }
.boxes input {
  width: 68px; height: 84px; text-align: center; font-size: 40px; font-weight: 900;
  border-radius: 16px; border: 3px solid var(--gold2); background: rgba(0,0,0,0.42);
  color: var(--white); font-family: inherit; caret-color: var(--gold);
}
.boxes input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 18px rgba(74,222,128,0.5); }
.boxes.err input { border-color: var(--red); animation: shake 0.25s linear; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.msg { min-height: 24px; font-size: 16px; font-weight: 800; margin-top: 10px; }
.msg.bad { color: #ff8a8a; }
.msg.good { color: var(--green); }

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.actions button { padding: 14px 30px; font-size: 17px; border-radius: 999px; }

/* ---- QR / pairing panel ---- */
/* Loud reminder that the QR is the host's, not the players' (this game has no player devices). */
.host-only {
  display: inline-block; margin-bottom: 12px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,59,59,0.16); border: 2px solid var(--red); color: #ffb3b3;
  font-weight: 900; font-size: 14px; text-transform: uppercase; letter-spacing: .5px;
}
.pair { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center; text-align: left; margin-top: 8px; }
.pair img { width: 100%; border-radius: 18px; border: 5px solid var(--gold); background: #fff; display: block; }
.pair ol { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.65; }
.pair ol li { margin-bottom: 8px; }
.url {
  display: block; margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(0,0,0,0.42); border: 2px dashed var(--gold2);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px;
  color: var(--cyan); word-break: break-all;
}
.bigcode {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(38px, 7vw, 68px); font-weight: 900; color: var(--gold);
  letter-spacing: 10px; text-shadow: 0 0 20px rgba(255,209,102,0.45); margin: 6px 0;
}
.codelabel { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); font-weight: 900; }
@media (max-width: 720px) { .pair { grid-template-columns: 1fr; } }

.hidden { display: none !important; }

/* ---- final leaderboard (shared by the audience screen and the host) ---- */
.podium { display: grid; gap: 12px; margin: 22px 0 6px; }
.prow {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 16px;
  border: 3px solid rgba(255,209,102,0.5); border-radius: 18px; padding: 14px 18px;
  background: rgba(0,0,0,0.3); font-size: 22px; font-weight: 900; text-align: left;
}
.prow .rank { font-size: 26px; color: var(--muted); text-align: center; }
.prow .pts { color: var(--gold); font-size: 28px; }
.prow.win {
  border-color: var(--gold); background: linear-gradient(90deg, rgba(255,209,102,0.26), rgba(0,0,0,0.3));
  box-shadow: 0 0 28px rgba(255,209,102,0.4);
}
.prow.win .rank { color: var(--gold); }
.no-scores {
  border: 3px dashed rgba(255,255,255,0.28); border-radius: 18px; padding: 26px 18px;
  color: var(--muted); font-size: 18px; font-weight: 800;
}

/* A real anchor, so the leaderboard's way out works even if scripting fails. */
.btn-link {
  display: inline-block; text-decoration: none; padding: 14px 30px; border-radius: 999px;
  background: var(--green); color: #06220f; font-weight: 900; font-size: 17px;
}
.btn-link:hover { filter: brightness(1.08); }

/* ---- connection pill ---- */
.conn {
  position: fixed; bottom: 12px; left: 12px; z-index: 9999;
  font-size: 12px; font-weight: 900; padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
}
.conn.on { color: var(--green); } .conn.off { color: var(--red); }
