/* Game Night — shared page furniture for every game: home page, games list, lobby, buttons, pop-up windows,
   history, toasts, the top bar. Loaded before each game's own stylesheet, which can override anything here.
   Each game sets its colours in :root (--felt, --felt-dark, --felt-glow, --panel, --sheet, --text, --muted, --gold…).
   The table itself (cards, piles, seats, chips) stays in each game's stylesheet. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--felt-dark);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.screen { position: fixed; inset: 0; }
#home, #lobby { overflow-y: auto; background: radial-gradient(ellipse at 50% 20%, var(--felt-glow) 0%, var(--felt) 40%, var(--felt-dark) 100%); }
.home-wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 48px; }
.brand { text-align: center; margin: 4px 0 18px; }
.brand h1 { font-family: Georgia, "Times New Roman", serif; font-size: 42px; margin: 6px 0 0; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.brand h1 em { color: var(--gold); font-style: normal; }
.brand.small h1 { font-size: 30px; }
.brand .tag { margin: 4px 0 0; color: var(--muted); font-style: italic; }
.panel { background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 16px; margin: 14px 0; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.hint { color: var(--muted); margin: 6px 0; }
.hint.small { font-size: 13px; }
.field input:focus { border-color: var(--gold); }
.row.center { justify-content: center; }
.center { text-align: center; }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(#ffd24a, var(--gold) 50%, var(--gold-deep)); color: #3a2800; box-shadow: 0 3px 0 #8a5d00; }
.btn.big { width: 100%; font-size: 20px; padding: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--win); box-shadow: 0 0 8px var(--win); animation: pulse 1.6s infinite; }
.game-item .gi-main { flex: 1; min-width: 0; }
.game-item .gi-title { font-weight: 700; font-size: 17px; }
.game-item .gi-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-list .avatar { width: 34px; height: 34px; font-size: 16px; }
.seat-list .nm { flex: 1; font-weight: 700; font-size: 17px; }
.seat-list .mini-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); font-size: 16px; }
.seat-list .mini-btn:disabled { opacity: .25; }
.offline .avatar { filter: grayscale(1) brightness(.7); }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.fly { position: fixed; left: 0; top: 0; will-change: transform; perspective: 600px; }
.fly .flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.fly .flip > .card { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fly .flip > .card.face { transform: rotateY(180deg); }
.sheet { position: relative; background: var(--sheet); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 16px 18px; max-width: 94vw; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: rise .25s ease-out; }
.sheet.narrow { width: 440px; }
.sheet .close { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); font-size: 16px; }
.rules { margin-top: 14px; font-size: 13px; color: var(--muted); }
.toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 90; background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 20px rgba(0,0,0,.5); max-width: 90vw; }
.toast.err { background: #a3242f; }
.win-chip { background: rgba(245,183,0,.15); border: 1px solid rgba(245,183,0,.5); border-radius: 999px; padding: 4px 12px; font-size: 14px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 3px var(--gold), 0 0 10px 3px rgba(245,183,0,.6); } 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 24px 9px rgba(245,183,0,.95); } }
@keyframes float { 0%,100% { transform: none; } 50% { transform: translateY(-8px); } }
@keyframes zoomIn { from { transform: translate(-50%, -50%) scale(0); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes turn { 0%,20% { transform: rotate(0); } 50%,80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
