:root {
  --bg: #12141f;
  --card: #1c2033;
  --card2: #262b45;
  --text: #f1f3fb;
  --muted: #9aa3c7;
  --accent: #ffb703;
  --ok: #06d6a0;
  --bad: #ef476f;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 20% 0%, #232850, var(--bg) 60%); color: var(--text); min-height: 100vh; }
body.offline::before { content: "Reconectando…"; position: fixed; top: 0; left: 0; right: 0; background: var(--bad); text-align: center; padding: 6px; z-index: 10; }
.wrap { max-width: 880px; margin: 0 auto; padding: 16px 14px 110px; display: grid; gap: 14px; }
.wrap.narrow { max-width: 420px; padding-top: 12vh; }
.top { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 800; font-size: 1.1rem; }
.me { background: var(--card); padding: 6px 12px; border-radius: 99px; font-weight: 600; }
.card { background: var(--card); border-radius: 18px; padding: 18px; box-shadow: 0 6px 24px #0005; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.tiny { font-size: .82rem; color: var(--muted); margin: 4px 0; }
h1, h2, h3 { margin: .2em 0 .4em; }
.big-icon { font-size: 4rem; line-height: 1.1; }
.bounce { animation: bounce 1.6s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-10px); } }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.game-card { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.game-card .btn { margin-top: auto; }
.btn { background: var(--card2); color: var(--text); border: 0; border-radius: 12px; padding: 12px 18px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.btn:hover { filter: brightness(1.2); }
.btn.primary { background: var(--accent); color: #222; }
.btn.danger { background: var(--bad); }
.btn.vote { width: 100%; text-align: left; }
.btn.vote.chosen { outline: 3px solid var(--ok); }
input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--card2); background: #0e1020; color: var(--text); font-size: 1.05rem; }
.join { display: grid; gap: 12px; text-align: center; }
.error { color: var(--bad); min-height: 1.2em; margin: 0; }
.check { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.check input { width: auto; }
.steps { padding-left: 1.3em; line-height: 1.5; font-size: 1.1rem; }
.steps li { margin-bottom: 8px; }
.materials { background: #3a2f10; border: 2px dashed var(--accent); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-weight: 600; }
.notice { background: #2b2250; border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.role-card { display: flex; align-items: center; gap: 16px; background: var(--role, #444); color: #111; border-radius: 20px; padding: 14px 18px; box-shadow: 0 6px 24px #0006; }
.role-card.big { flex-direction: column; text-align: center; padding: 28px 20px; animation: pop .5s ease; }
.role-icon { font-size: 2.6rem; }
.role-card.big .role-icon { font-size: 7rem; line-height: 1; }
.role-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.role-name { font-size: 1.5rem; font-weight: 900; }
.role-card.big .role-name { font-size: 2.6rem; }
.role-desc { font-size: 1.1rem; margin: 8px 0 0; max-width: 34em; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.countdown { margin: 10px 0; }
.cd-text { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.6rem; }
.countdown.big .cd-text { font-size: 3rem; }
.countdown.urgent .cd-text { color: var(--bad); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.bar { height: 8px; background: #0e1020; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar-fill { height: 100%; width: 100%; background: var(--accent); transition: width .25s linear; }
.turn.mine { outline: 4px solid var(--ok); background: #14352f; }
.turn-name { font-size: 2.2rem; font-weight: 900; }
.letter { font-size: 6rem; font-weight: 900; color: var(--accent); line-height: 1; }
.secret { border: 2px dashed var(--accent); }
.secret.impostor { border-color: #9d4edd; background: #2a1646; }
.secret-word { font-size: 2.6rem; font-weight: 900; color: var(--accent); }
.order { padding-left: 1.4em; margin: 0; columns: 2; }
.order .now { color: var(--ok); font-weight: 800; }
.order .done { color: var(--muted); text-decoration: line-through; }
.vote-list { display: grid; gap: 8px; margin: 12px 0; }
.tally { list-style: none; padding: 0; text-align: left; display: inline-block; }
.tally li { margin: 6px 0; }
.tally small { color: var(--muted); }
.game-img { max-width: 100%; width: 520px; border-radius: 14px; background: #fff; margin-top: 10px; }
.word-form { display: flex; gap: 8px; margin-top: 10px; }
.chain { display: flex; flex-wrap: wrap; gap: 8px; }
.link { background: var(--card2); border-radius: 99px; padding: 6px 14px; font-weight: 700; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.link small { font-weight: 400; color: var(--muted); font-size: .65rem; }
.result .detail { font-size: 1.2rem; }
.roster { list-style: none; padding: 0; margin: 0; columns: 2; }
.players ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.players li { display: flex; align-items: center; gap: 6px; background: var(--card2); padding: 5px 12px; border-radius: 99px; font-size: .92rem; }
.players li.off { opacity: .45; }
.players li.me { outline: 2px solid var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.off .dot { background: var(--muted); }
.x { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.admin-bar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 10px; justify-content: center; align-items: center; background: #0b0d18ee; padding: 10px; z-index: 5; }
.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); background: var(--bad); padding: 10px 18px; border-radius: 12px; z-index: 20; max-width: 90vw; }
@media (max-width: 560px) { .order, .roster { columns: 1; } .turn-name { font-size: 1.7rem; } }
.btn.wide { width: 100%; margin: 10px 0; font-size: 1.2rem; }
.btn:disabled { opacity: .6; cursor: default; }
.link.now { outline: 3px solid var(--ok); }
.ranking { text-align: left; display: inline-block; font-size: 1.1rem; }

.notice.out { background: #4a1d2c; }
.result-banner.out { outline: 4px solid var(--bad); }
.result-banner.tie { outline: 4px solid var(--accent); }
.outcome { font-size: 1.25rem; font-weight: 700; }
.pop { animation: pop .5s ease; }

.admin-box { display: grid; gap: 8px; }
.admin-box[hidden] { display: none; }
