/* ═══════════════════════════════════════════════════════
   DuoPlay – Global Styles
   Mobile-first · Dark Navy + Gold · Premium Animations
════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ──────────────────────────────────────── */
:root {
  --bg0:      #070f1c;
  --bg1:      #0a1628;
  --bg2:      #0f2040;
  --bg3:      #132650;
  --gold-l:   #f0c845;
  --gold-m:   #d4a827;
  --gold-d:   #9a7a18;
  --gold-glow:rgba(212,168,39,.35);
  --text:     #f0f4ff;
  --text-dim: #7a90b0;
  --border:   rgba(212,168,39,.25);
  --glass:    rgba(15,32,64,.7);
  --red:      #e84545;
  --green:    #3ecf78;
  --purple:   #8b5cf6;
  --pink:     #ec4899;
  --radius:   16px;
  --radius-sm:10px;
  --shadow:   0 8px 32px rgba(0,0,0,.4);
  --shadow-gold: 0 0 24px var(--gold-glow);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg0);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: var(--gold-l); text-decoration: none; }
img { max-width: 100%; }
input, select, textarea { font-family: inherit; }

/* ── Animated Background ────────────────────────────── */
.bg-particles {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(15,40,90,.6) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(90,30,15,.3) 0%, transparent 70%),
    var(--bg0);
  pointer-events: none;
}
.bg-particles::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(212,168,39,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(212,168,39,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 20%, rgba(212,168,39,.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(212,168,39,.2) 0%, transparent 100%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0%   { opacity: .4; }
  100% { opacity: 1; }
}

/* ── Layout wrapper ─────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  min-height: 100dvh;
  padding-bottom: 80px; /* space for bottom nav */
}
.container { max-width: 480px; margin: 0 auto; padding: 0 16px; }

/* ── Top Nav ────────────────────────────────────────── */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,15,28,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.top-nav .logo {
  font-size: 1.3rem; font-weight: 800;
  background: linear-gradient(135deg, var(--gold-l), var(--gold-m));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  border: 2px solid var(--border);
  cursor: pointer; transition: border-color .2s;
}
.nav-avatar:hover { border-color: var(--gold-l); }

/* ── Bottom Nav ─────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7,15,28,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
  height: 64px; padding: 0 8px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all .2s;
  text-decoration: none; color: var(--text-dim); font-size: .7rem; font-weight: 500;
  flex: 1;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active, .nav-item:hover { color: var(--gold-l); }
.nav-item.active svg path, .nav-item.active svg rect { fill: var(--gold-l); }

/* ── Cards / Panels ─────────────────────────────────── */
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }

/* ── Section title ──────────────────────────────────── */
.section-title {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold-m);
  margin-bottom: 12px;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
  width: 100%; letter-spacing: .02em;
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.08), transparent);
  pointer-events: none;
}
.btn:active { transform: scale(.97); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-l) 0%, var(--gold-m) 100%);
  color: #1a1200;
  box-shadow: 0 4px 20px var(--gold-glow);
}
.btn-gold:hover { box-shadow: 0 6px 30px var(--gold-glow); filter: brightness(1.08); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold-l); color: var(--gold-l); }

.btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,.10); }

.btn-danger {
  background: linear-gradient(135deg, #e84545 0%, #c03030 100%);
  color: #fff;
}
.btn-sm {
  padding: 10px 18px; font-size: .85rem;
  width: auto;
}
.btn-xs {
  padding: 7px 14px; font-size: .78rem;
  width: auto; border-radius: 8px;
}

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--text-dim); margin-bottom: 6px; letter-spacing: .04em;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 13px 16px;
  font-size: .95rem; font-family: inherit;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--gold-m);
  box-shadow: 0 0 0 3px rgba(212,168,39,.15);
}
.form-input.error { border-color: var(--red); }

/* ── Alerts / Flash messages ────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500;
  border-left: 4px solid;
  animation: slideDown .3s ease;
}
.alert-error { background: rgba(232,69,69,.12); border-color: var(--red); color: #ff9090; }
.alert-success { background: rgba(62,207,120,.12); border-color: var(--green); color: #7fffb4; }
.alert-info { background: rgba(212,168,39,.12); border-color: var(--gold-m); color: var(--gold-l); }

@keyframes slideDown {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Badges / Pills ─────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 9px;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.badge-common   { background: rgba(120,150,200,.2); color: #99b4d8; border: 1px solid rgba(120,150,200,.3); }
.badge-rare     { background: rgba(74,158,255,.2);  color: #7ab8ff; border: 1px solid rgba(74,158,255,.3); }
.badge-legendary{ background: linear-gradient(135deg,rgba(212,168,39,.3),rgba(240,200,69,.15)); color: var(--gold-l); border: 1px solid rgba(212,168,39,.5); animation: shimmer 2s linear infinite; }

@keyframes shimmer {
  0%   { box-shadow: 0 0 0 0 rgba(212,168,39,.3); }
  50%  { box-shadow: 0 0 12px 2px rgba(212,168,39,.4); }
  100% { box-shadow: 0 0 0 0 rgba(212,168,39,.3); }
}

/* ── Avatar ─────────────────────────────────────────── */
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.1);
}
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.4rem; }

/* ── Friend / User row ──────────────────────────────── */
.user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: background .2s;
}
.user-row:hover { background: rgba(255,255,255,.06); }
.user-row + .user-row { margin-top: 8px; }
.user-info { flex: 1; }
.user-name { font-weight: 600; font-size: .95rem; }
.user-sub  { font-size: .78rem; color: var(--text-dim); margin-top: 2px; }
.user-actions { display: flex; gap: 6px; }

/* ── Invite Code display ────────────────────────────── */
.code-display {
  font-size: 2rem; font-weight: 900; letter-spacing: .25em;
  text-align: center; padding: 18px;
  background: linear-gradient(135deg, var(--gold-l), var(--gold-m));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.code-hint { text-align: center; font-size: .8rem; color: var(--text-dim); }

/* ── ══════════════════════════════════════════════════
   GAME CARD FLIP ANIMATION
══════════════════════════════════════════════════ */
.flip-scene {
  perspective: 1200px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  aspect-ratio: 1465/2079;
}
.flip-card-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.175,.885,.32,1.275);
}
.flip-card-inner.flipped { transform: rotateY(180deg); }

.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.6), var(--shadow-gold);
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; }
.flip-face-back { transform: rotateY(180deg); }

/* After Dark text card face */
.after-dark-face {
  background: linear-gradient(160deg, #1a0a2e 0%, #2d0a1e 50%, #0a1a2e 100%);
  border: 2px solid rgba(200,80,200,.4);
  box-shadow: 0 0 40px rgba(150,50,200,.3), inset 0 0 40px rgba(150,50,200,.08);
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 20px;
  text-align: center;
}
.after-dark-rarity {
  font-size: .7rem; font-weight: 800; letter-spacing: .15em;
  text-transform: uppercase; color: #d080ff;
}
.after-dark-icon { font-size: 2.5rem; }
.after-dark-title { font-size: 1.3rem; font-weight: 800; color: #e8aaff; line-height: 1.2; }
.after-dark-desc {
  font-size: .85rem; color: rgba(232,170,255,.8); line-height: 1.5;
}

/* ── Game Controls ──────────────────────────────────── */
.game-header {
  padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.turn-indicator {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--radius);
  background: rgba(212,168,39,.1); border: 1px solid var(--border);
}
.your-turn-badge {
  background: linear-gradient(135deg, var(--gold-l), var(--gold-m));
  color: #1a1200; font-size: .75rem; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  animation: pulse-gold 1.5s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%,100% { box-shadow: 0 0 0 0 rgba(212,168,39,.5); }
  50%      { box-shadow: 0 0 0 8px rgba(212,168,39,0); }
}
.deck-count {
  font-size: .8rem; color: var(--text-dim);
  text-align: right; line-height: 1.4;
}
.deck-count strong { color: var(--gold-l); font-size: 1.1rem; display: block; }

/* ── Players strip ──────────────────────────────────── */
.players-strip {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 12px 16px; scrollbar-width: none;
}
.players-strip::-webkit-scrollbar { display: none; }
.player-chip {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; opacity: .6; transition: all .2s;
  padding: 8px; border-radius: var(--radius-sm);
  border: 2px solid transparent;
  min-width: 70px;
}
.player-chip:hover { opacity: 1; border-color: var(--border); }
.player-chip.active-turn { opacity: 1; border-color: var(--gold-l); background: rgba(212,168,39,.08); }
.player-chip.selected { opacity: 1; border-color: var(--green); background: rgba(62,207,120,.08); }
.player-chip.is-you { opacity: 1; }
.player-chip-name { font-size: .72rem; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68px; }
.player-chip-sub  { font-size: .65rem; color: var(--text-dim); }

/* ── Hand area ───────────────────────────────────────── */
.hand-container {
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hand-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.hand-scroller::-webkit-scrollbar {
  height: 6px;
}
.hand-scroller::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.hand-card {
  flex-shrink: 0;
  width: 90px;
  height: 128px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  text-align: center;
  position: relative;
}
.hand-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hand-card.selected {
  border-color: var(--gold-l);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 20px var(--gold-glow);
}
.hand-card:hover {
  border-color: var(--gold-m);
  transform: translateY(-4px);
}
.hand-card-text-container {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.hand-card-title {
  font-size: .62rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.hand-card-rarity {
  font-size: .5rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-dim);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ── Target selector ────────────────────────────────── */
.target-selector {
  background: rgba(62,207,120,.08);
  border: 1px solid rgba(62,207,120,.3);
  border-radius: var(--radius);
  padding: 16px;
  animation: slideUp .35s ease;
}
.target-title {
  font-size: .82rem; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.target-list { display: flex; flex-wrap: wrap; gap: 8px; }
.target-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  cursor: pointer; transition: all .2s;
  font-size: .88rem; font-weight: 500; color: var(--text);
  font-family: inherit;
}
.target-btn:hover { border-color: var(--green); background: rgba(62,207,120,.1); color: var(--green); }

/* ── Revealed card area ─────────────────────────────── */
.revealed-card-area {
  padding: 0 16px;
  animation: zoomIn .4s ease;
}
@keyframes zoomIn {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.revealed-meta {
  margin-top: 14px;
  text-align: center;
}
.revealed-played-by {
  font-size: .82rem; color: var(--text-dim); margin-bottom: 4px;
}
.revealed-player { font-weight: 700; color: var(--gold-l); }
.revealed-target  { font-weight: 700; color: var(--green); }

/* ── Activity Feed ──────────────────────────────────── */
.activity-feed {
  padding: 0 16px 16px;
}
.activity-feed-inner {
  max-height: 280px; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  display: flex; flex-direction: column; gap: 8px;
}
.activity-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  border-left: 3px solid var(--border);
  animation: slideInLeft .4s ease;
}
.activity-item.type-card    { border-color: var(--gold-m); }
.activity-item.type-join    { border-color: var(--green); }
.activity-item.type-start   { border-color: var(--purple); }
.activity-item.type-end     { border-color: var(--red); }
.activity-item.type-after_dark { border-color: #d080ff; }
.activity-item.is-new { animation: slideInLeft .4s ease, highlightFade 2s ease 0.4s forwards; }

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes highlightFade {
  from { background: rgba(212,168,39,.12); }
  to   { background: rgba(255,255,255,.03); }
}

.activity-thumb {
  width: 36px; height: 50px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border);
}
.activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
.activity-thumb.no-img {
  background: linear-gradient(160deg, #1a0a2e, #2d0a1e);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.activity-content { flex: 1; }
.activity-text { font-size: .84rem; line-height: 1.45; }
.activity-text strong { color: var(--gold-l); }
.activity-text .target { color: var(--green); font-weight: 600; }
.activity-text .card-name { color: var(--text); font-style: italic; }
.activity-time { font-size: .7rem; color: var(--text-dim); margin-top: 3px; }

/* ── Lobby / Waiting room ───────────────────────────── */
.waiting-room {
  text-align: center; padding: 32px 16px;
}
.waiting-dots span {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-m); margin: 0 3px;
  animation: bounce-dot .9s ease-in-out infinite;
}
.waiting-dots span:nth-child(2) { animation-delay: .15s; }
.waiting-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce-dot {
  0%,100% { transform: translateY(0); opacity: .4; }
  50%      { transform: translateY(-8px); opacity: 1; }
}
.game-join-code {
  font-size: 2.4rem; font-weight: 900; letter-spacing: .3em;
  background: linear-gradient(135deg, var(--gold-l), var(--gold-m));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin: 12px 0;
}
.players-waiting { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0; }
.player-waiting-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  font-size: .88rem; font-weight: 500;
}

/* ── Mode select cards ──────────────────────────────── */
.mode-grid { display: flex; flex-direction: column; gap: 12px; }
.mode-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer; transition: all .25s;
  background: rgba(255,255,255,.03);
}
.mode-card:hover, .mode-card.selected {
  border-color: var(--gold-l);
  background: rgba(212,168,39,.08);
  box-shadow: var(--shadow-gold);
}
.mode-icon { font-size: 2.2rem; flex-shrink: 0; }
.mode-info h3 { font-size: 1rem; font-weight: 700; }
.mode-info p  { font-size: .8rem; color: var(--text-dim); margin-top: 3px; line-height: 1.4; }
.mode-tag { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.mode-tag-original   { background: rgba(74,158,255,.2); color: #7ab8ff; }
.mode-tag-funny      { background: rgba(62,207,120,.2); color: #7fffb4; }
.mode-tag-after_dark { background: rgba(200,80,200,.2); color: #e0a0ff; }

/* ── Dashboard stats ────────────────────────────────── */
.stat-row {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.stat-box {
  flex: 1; text-align: center; padding: 16px 8px;
  border-radius: var(--radius-sm); background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
}
.stat-num  { font-size: 1.6rem; font-weight: 900; color: var(--gold-l); line-height: 1; }
.stat-label{ font-size: .72rem; color: var(--text-dim); margin-top: 4px; letter-spacing: .04em; }

/* ── Big game cards on dashboard ────────────────────── */
.game-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  cursor: pointer; transition: all .2s;
}
.game-entry:hover { border-color: var(--gold-l); background: rgba(212,168,39,.06); }
.game-entry + .game-entry { margin-top: 8px; }
.game-mode-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.gmi-original   { background: rgba(74,158,255,.15); }
.gmi-funny      { background: rgba(62,207,120,.15); }
.gmi-after_dark { background: rgba(200,80,200,.15); }
.game-entry-info h4 { font-size: .95rem; font-weight: 600; }
.game-entry-info p  { font-size: .76rem; color: var(--text-dim); margin-top: 2px; }
.game-status {
  margin-left: auto; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.gs-waiting { background: rgba(212,168,39,.15); color: var(--gold-l); }
.gs-active  { background: rgba(62,207,120,.15); color: var(--green); }
.gs-ended   { background: rgba(255,255,255,.06); color: var(--text-dim); }

/* ── Login / Register page ──────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
}
.auth-logo-text {
  font-size: 2.5rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold-l), var(--gold-m));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo-sub { font-size: .85rem; color: var(--text-dim); margin-top: 4px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow), var(--shadow-gold);
}
.auth-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: rgba(0,0,0,.3); border-radius: var(--radius-sm); padding: 4px; }
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  font-family: inherit; font-size: .9rem; font-weight: 600;
  background: transparent; border: none; color: var(--text-dim);
  border-radius: 8px; cursor: pointer; transition: all .2s;
}
.auth-tab.active { background: rgba(212,168,39,.15); color: var(--gold-l); }

/* ── Misc ───────────────────────────────────────────── */
.divider {
  height: 1px; background: var(--border);
  margin: 16px 0;
}
.text-center { text-align: center; }
.text-dim    { color: var(--text-dim); }
.text-gold   { color: var(--gold-l); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.mt-8  { margin-top:  8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.fw-700 { font-weight: 700; }
.fs-lg  { font-size: 1.1rem; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── No games / empty states ────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-dim);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; line-height: 1.5; }

/* ── Notification badge ─────────────────────────────── */
.notif-dot {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg0);
}

/* ── Toast notification ─────────────────────────────── */
#toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 18px;
  font-size: .88rem; font-weight: 500; color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards;
  white-space: nowrap;
}
.toast.success { border-color: var(--green); color: #7fffb4; }
.toast.error   { border-color: var(--red);   color: #ff9090; }
@keyframes toastIn  { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateY(-10px); } }

/* ── Spinner ────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid rgba(212,168,39,.2);
  border-top-color: var(--gold-l);
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal overlay ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.modal-sheet {
  width: 100%; max-width: 480px;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 36px;
  animation: slideUp .3s ease;
}
.modal-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 20px;
}
.modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }

/* ── Confetti burst on legendary ────────────────────── */
@keyframes confettiFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100px) rotate(720deg); opacity: 0; }
}
.confetti-piece {
  position: absolute; width: 8px; height: 8px;
  border-radius: 2px; pointer-events: none;
  animation: confettiFall .8s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
