/* Lupus — stili pagine index + play (telefono) */

/* tabs */
.tabs { display: flex; gap: 6px; margin: 10px 0 14px; background: rgba(0,0,0,0.25); padding: 5px; border-radius: 14px; }
.tab { flex: 1; padding: 10px; border: none; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.tab.active { background: var(--panel-2); color: var(--text); }

/* scelta ospite */
.preview-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: 1.15rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.emoji-grid button { font-size: 24px; padding: 8px 0; border-radius: 12px; border: 2px solid transparent; background: var(--panel-2); cursor: pointer; }
.emoji-grid button.selected { border-color: var(--accent); background: rgba(255,207,92,0.15); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.4); }

.links-row { display: flex; gap: 18px; justify-content: center; margin: 18px 0 8px; font-size: 0.95rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; }
.seat-avatars { display: inline-flex; }
.seat-avatars .avatar { margin-right: -8px; border: 2px solid var(--bg-2); }
.hero h2 { margin-bottom: 6px; }

/* ── lobby ── */
.code-banner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0 2px; }
.code-banner .code { font-size: 2.4rem; font-weight: 700; letter-spacing: 8px; color: var(--accent); }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; }
.qr-box canvas, .qr-box img { border-radius: 12px; background: #fff; padding: 8px; }
.comp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.host-star { color: var(--accent); }

/* ── fase di gioco (telefono) ── */
.phase-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px 10px; }
.phase-head .ph-emoji { font-size: 2rem; }
.phase-head .ph-label { font-size: 1.2rem; font-weight: 700; }
.phase-head .ph-sub { color: var(--muted); font-size: 0.85rem; }
.phase-head .timer { margin-left: auto; font-size: 1.3rem; }

/* schermo "dormi" */
.sleep-screen { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 40px 16px; }
.sleep-screen .big-moon { font-size: 74px; animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.sleep-screen h2 { margin: 0; }
.sleep-screen .zzz { color: var(--muted); letter-spacing: 3px; }

/* carta ruolo con flip */
.flip-wrap { perspective: 1000px; max-width: 340px; margin: 0 auto; }
.flip { position: relative; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1); min-height: 340px; }
.flip.revealed { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .face.back { transform: rotateY(180deg); }
.card-back {
  height: 100%; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(45deg, #2a3468 0 14px, #232b5e 14px 28px);
  border: 2px solid var(--border); box-shadow: var(--shadow); cursor: pointer; font-size: 1.05rem; font-weight: 600;
}
.card-back .cb-logo { font-size: 64px; }

/* griglia bersagli */
.target-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.target-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; border: 2px solid var(--border);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 1rem; cursor: pointer; text-align: left;
  transition: transform 0.08s, border-color 0.15s;
}
.target-btn:active { transform: scale(0.96); }
.target-btn.selected { border-color: var(--accent); background: rgba(255,207,92,0.14); }
.target-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.target-btn .tb-count { margin-left: auto; font-size: 0.85rem; color: var(--muted); display: flex; }
.target-btn .tb-count .avatar { margin-right: -7px; border: 2px solid var(--bg-2); }

/* compagni di branco */
.wolf-box { border: 1px solid rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }

/* elenco giocatori (giorno / morti) */
.pl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; background: rgba(0,0,0,0.18); }
.pl-row.dead { opacity: 0.55; }
.pl-row .pr-name { font-weight: 600; }
.pl-row .pr-role { margin-left: auto; font-size: 0.85rem; color: var(--muted); }

/* banner morte / risultato */
.big-banner { text-align: center; padding: 22px 14px; border-radius: 20px; }
.big-banner .bb-emoji { font-size: 64px; display: block; margin-bottom: 8px; }
.big-banner.ghost { background: rgba(176, 190, 197, 0.12); border: 1px solid rgba(176,190,197,0.3); }
.big-banner.win-villaggio { background: rgba(126, 212, 145, 0.14); border: 1px solid rgba(126,212,145,0.4); }
.big-banner.win-lupi { background: rgba(255, 107, 107, 0.14); border: 1px solid rgba(255,107,107,0.4); }
.big-banner.win-criceto { background: rgba(255, 171, 145, 0.14); border: 1px solid rgba(255,171,145,0.45); }
.big-banner.win-giullare { background: rgba(240, 98, 146, 0.14); border: 1px solid rgba(240,98,146,0.45); }

/* rivelazione privata (veggente / medium) */
.secret-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(179, 157, 219, 0.12); border: 1px solid rgba(179,157,219,0.35); font-size: 0.92rem; }
.secret-note.wolf-yes { background: rgba(255,107,107,0.13); border-color: rgba(255,107,107,0.4); }

/* barra emoji reazioni */
.react-bar { display: flex; gap: 8px; justify-content: center; padding: 6px 0; }
.react-bar button { font-size: 22px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 50%; width: 44px; height: 44px; cursor: pointer; }
.float-emoji { position: fixed; font-size: 34px; z-index: 8000; pointer-events: none; animation: float-up 1.6s ease-out forwards; }
@keyframes float-up { 0% { transform: translateY(0) scale(0.8); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-140px) scale(1.25); opacity: 0; } }

/* footer bottoni fissi */
.sticky-actions { position: sticky; bottom: 0; padding: 10px 0 14px; background: linear-gradient(transparent, var(--bg) 40%); display: flex; gap: 8px; z-index: 50; }
.sticky-actions .btn { flex: 1; }
