/* ═══════════════════════════════════════════════════════
   OYUN LOBISI — Premium Glassmorphism UI
   Designed from scratch. Zero legacy.
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  color-scheme: dark;
  /* TG fallbacks */
  --tg-theme-bg-color: #0a0a1a;
  --tg-theme-text-color: #f0f0f5;
  --tg-theme-hint-color: rgba(255,255,255,0.45);
  --tg-theme-link-color: #818cf8;
  --tg-theme-button-color: #818cf8;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-secondary-bg-color: rgba(255,255,255,0.06);

  /* Surfaces */
  --surface-soft: rgba(255,255,255,0.04);
  --border-soft: rgba(255,255,255,0.08);

  /* Glass System */
  --glass: rgba(255,255,255,0.05);
  --glass-mid: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.1);
  --glass-glow: rgba(255,255,255,0.04);

  /* Brand Gradients */
  --grad-brand: #6366f1;
  --grad-warm: #f97316;
  --grad-cool: #06b6d4;
  --grad-surface: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);

  /* Semantic Colors */
  --accent: #6366f1;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.5s;
  --dur-fast: 0.25s;

  /* Telegram safe area (runtime override) */
  --tg-safe-top: env(safe-area-inset-top, 0px);
  --tg-safe-right: env(safe-area-inset-right, 0px);
  --tg-safe-bottom: env(safe-area-inset-bottom, 0px);
  --tg-safe-left: env(safe-area-inset-left, 0px);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background-color: #0a0a1a; color-scheme: dark; }
input, textarea, select, button {
  color-scheme: dark;
  color: var(--tg-theme-text-color);
}

/* ── Body — Immersive Dark Canvas ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--tg-theme-bg-color);
  color: var(--tg-theme-text-color);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--sp-md);
  padding-top: calc(var(--sp-md) + var(--tg-safe-top, env(safe-area-inset-top, 0px)));
  padding-right: calc(var(--sp-md) + var(--tg-safe-right, env(safe-area-inset-right, 0px)));
  padding-bottom: calc(80px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px)));
  padding-left: calc(var(--sp-md) + var(--tg-safe-left, env(safe-area-inset-left, 0px)));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--tg-theme-text-color);
  -webkit-box-shadow: 0 0 0px 1000px #0a0a1a inset;
  box-shadow: 0 0 0px 1000px #0a0a1a inset;
}

/* Animated mesh gradient background */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(168,85,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 60% 30%, rgba(236,72,153,0.08) 0%, transparent 50%);
  animation: meshShift 12s ease-in-out infinite alternate;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 100% 100% at 50% 0%, transparent 40%, var(--tg-theme-bg-color) 80%);
}
@keyframes meshShift {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.15) rotate(3deg); }
}

/* ── Keyframes ── */
@keyframes fadeUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* ── Faz 1: New Keyframes ── */
@keyframes listSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes countUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes ringDraw {
  from { stroke-dashoffset: var(--ring-circumference, 339.292); }
  to { stroke-dashoffset: var(--ring-target, 0); }
}
@keyframes avatarGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(129,140,248,0.3), 0 0 0 3px rgba(129,140,248,0.15); }
  50% { box-shadow: 0 0 32px rgba(129,140,248,0.5), 0 0 0 4px rgba(129,140,248,0.25); }
}
@keyframes skeletonShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes podiumRise {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}
@keyframes trophyBounce {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes pageSlideIn {
  from { transform: translateX(12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes goldSpin {
  to { --gold-angle: 360deg; }
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skeleton-circle {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 50%;
}
.skeleton-text {
  height: 14px; border-radius: 6px; width: 60%;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}
.skeleton-text.sm { height: 10px; width: 40%; }
.skeleton-text.lg { height: 20px; width: 80%; }

/* ── Stagger List ── */
.stagger-list > * {
  opacity: 0;
  animation: listSlideUp 0.35s var(--ease-out) forwards;
}
.stagger-list > *:nth-child(1) { animation-delay: 0s; }
.stagger-list > *:nth-child(2) { animation-delay: 0.03s; }
.stagger-list > *:nth-child(3) { animation-delay: 0.06s; }
.stagger-list > *:nth-child(4) { animation-delay: 0.09s; }
.stagger-list > *:nth-child(5) { animation-delay: 0.12s; }
.stagger-list > *:nth-child(6) { animation-delay: 0.15s; }
.stagger-list > *:nth-child(7) { animation-delay: 0.18s; }
.stagger-list > *:nth-child(8) { animation-delay: 0.21s; }
.stagger-list > *:nth-child(9) { animation-delay: 0.24s; }
.stagger-list > *:nth-child(10) { animation-delay: 0.27s; }
.stagger-list > *:nth-child(n+11) { animation-delay: 0.3s; }

/* ── Micro-interaction ── */
.press-scale { transition: transform 0.15s var(--ease-out); -webkit-tap-highlight-color: transparent; }
.press-scale:active { transform: scale(0.95); }

/* ── Page System ── */
.page { display: none; padding-bottom: calc(80px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px))); }
.page.active { display: block; animation: pageSlideIn 0.3s var(--ease-out); }
body.keyboard-open .page {
  padding-bottom: calc(18px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px)));
}

/* ══════════════════════════════════════
   LOBBY HEADER
   ══════════════════════════════════════ */
.lobby-header {
  text-align: left;
  padding: var(--sp-xs) 0 var(--sp-md);
  animation: fadeUp 0.6s var(--ease-out);
}
.lobby-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--tg-theme-text-color);
}
.lobby-header p {
  color: var(--tg-theme-hint-color);
  font-size: 13px;
}

/* Main Lobby Header — Hero Style */
.lobby-header-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-end;
  column-gap: var(--sp-md);
  row-gap: 8px;
  padding: var(--sp-sm) 0 var(--sp-lg);
}
.lobby-header-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  justify-self: end;
  align-self: end;
  min-width: max-content;
  gap: 10px;
}
.lobby-header-actions .live-players-trigger {
  width: fit-content;
  flex: 0 0 auto;
}
.lobby-greeting h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: #c7d2fe;
}
.lobby-subtitle {
  color: var(--tg-theme-hint-color);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

/* Live Players Trigger (count + entry in one button) */
.live-players-trigger {
  min-width: 176px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(52,211,153,0.34);
  background: linear-gradient(145deg, rgba(10,34,35,0.95), rgba(11,22,38,0.93));
  color: #e7fff8;
  display: inline-flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2, 10, 18, 0.45);
  transition: transform 0.18s var(--ease-out), border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.live-players-trigger:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.68);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.32), 0 12px 28px rgba(2, 10, 18, 0.45);
}
.live-players-trigger:active {
  opacity: 0.9;
  transform: translateY(1px) scale(0.995);
}
.live-trigger-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: auto;
  flex: 1 1 auto;
  min-width: 0;
}
.online-text {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: #e7fff8 !important;
  white-space: nowrap;
}
.live-count-value {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.live-trigger-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex: 0 0 auto;
}
.live-trigger-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #f2fffb;
  line-height: 1;
}
.live-trigger-chevron {
  font-size: 14px;
  line-height: 1;
  opacity: 0.74;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.live-players-trigger:hover .live-trigger-chevron,
.live-players-trigger:focus-visible .live-trigger-chevron {
  transform: translateX(2px);
  opacity: 0.95;
}
.live-updated-text {
  display: none;
}
.online-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.6);
  animation: pulseGlow 2s ease-in-out infinite;
  flex-shrink: 0;
}
.live-players-trigger.level-empty {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(145deg, rgba(44, 27, 8, 0.95), rgba(28, 20, 15, 0.95));
}
.live-players-trigger.level-empty .online-pulse {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.56);
  animation: none;
}
.live-players-trigger.level-low { border-color: rgba(52, 211, 153, 0.34); }
.live-players-trigger.level-medium {
  border-color: rgba(34, 211, 238, 0.44);
  background: linear-gradient(145deg, rgba(7, 35, 44, 0.95), rgba(8, 24, 37, 0.95));
}
.live-players-trigger.level-high {
  border-color: rgba(99, 102, 241, 0.48);
  background: linear-gradient(145deg, rgba(19, 30, 56, 0.95), rgba(11, 24, 47, 0.95));
}
.live-players-trigger.is-stale {
  border-color: rgba(248, 113, 113, 0.44);
}
.live-players-trigger.is-stale .online-pulse {
  background: #f87171;
  box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.56);
  animation: none;
}

/* ══════════════════════════════════════
   ACTION PILLS
   ══════════════════════════════════════ */
.action-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.pill-primary, .pill-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  min-height: 48px;
  min-width: 48px;
  border: none;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.pill-primary {
  background: var(--accent);
  color: #fff;
}
.pill-ghost {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.12);
}
.pill-primary:active, .pill-ghost:active { opacity: 0.7; }

/* Legacy */
.btn-quick-match, .btn-invite-header { display: none; }

/* ══════════════════════════════════════
   GAME CARDS — Compact Grid
   ══════════════════════════════════════ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
/* 4. kart varsa ikinci satırda ortada dursun */
.game-grid .game-card:nth-child(4):last-child {
  grid-column: 2 / span 1;
}
.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 10px 7px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  aspect-ratio: 1.08;
  border: 1px solid var(--glass-border);
  background: var(--grad-surface);
  background-clip: padding-box;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  box-shadow:
    0 7px 16px rgba(2, 6, 23, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
  opacity: 0;
  animation: scaleIn var(--dur) var(--ease-out) forwards;
}
.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:nth-child(7) { animation-delay: 0.35s; }
.game-card:active {
  transform: scale(0.95);
  box-shadow:
    0 4px 9px rgba(2, 6, 23, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.game-card:active .game-card-icon { transform: scale(1.12); }

/* Per-game gradient glow */
.game-card-glow {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}
.game-card:active .game-card-glow { opacity: 0.25; }
.game-card-glow-rps { background: var(--grad-warm); }
.game-card-glow-dice { background: var(--grad-cool); }
.game-card-glow-closest { background: linear-gradient(135deg, #22c55e, #10b981); }
.game-card-glow-highlow { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.game-card-glow-oddeven { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.game-card-glow-mines { background: linear-gradient(135deg, #ef4444, #f59e0b); }
.game-card-glow-riskbank { background: linear-gradient(135deg, #14b8a6, #f59e0b); }

.game-card-soon {
  opacity: 0.35;
  pointer-events: none;
  border-style: dashed;
}

/* Top-shine on cards */
.game-card::before {
  content: '';
  position: absolute;
  top: -38%;
  left: 50%;
  transform: translateX(-50%);
  width: 84%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0) 65%);
  z-index: 2;
  pointer-events: none;
}

.game-card-icon {
  font-size: 28px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  position: relative;
  z-index: 1;
  transition: transform 0.3s var(--ease-spring);
  animation: float 4s ease-in-out infinite;
}
.game-card:nth-child(2) .game-card-icon { animation-delay: -1s; }
.game-card:nth-child(3) .game-card-icon { animation-delay: -2s; }
.game-card:nth-child(4) .game-card-icon { animation-delay: -3s; }
.game-card:nth-child(5) .game-card-icon { animation-delay: -4s; }
.game-card:nth-child(6) .game-card-icon { animation-delay: -5s; }
.game-card:nth-child(7) .game-card-icon { animation-delay: -6s; }

.game-card-info { position: relative; z-index: 1; }
.game-card-info h3 {
  font-size: 11px; font-weight: 700;
  margin-bottom: 4px;
  color: #f0f0f5 !important;
  line-height: 1.2;
}
.game-card-info p {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
}
.game-card-stats {
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid rgba(148,163,184,0.26);
  background: rgba(15,23,42,0.45);
  color: #d5deeb;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.game-card-stats.is-hidden {
  display: none;
}
.game-card-stats::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 0 rgba(148,163,184,0.36);
}
.game-card-stats.state-empty {
  border-color: rgba(148,163,184,0.2);
  background: rgba(15,23,42,0.24);
  color: rgba(203,213,225,0.7);
}
.game-card-stats.state-empty::before {
  background: rgba(148,163,184,0.7);
  box-shadow: none;
}
.game-card-stats.state-low {
  border-color: rgba(52,211,153,0.34);
  background: rgba(6,78,59,0.25);
  color: #6ee7b7;
}
.game-card-stats.state-low::before {
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.42);
}
.game-card-stats.state-mid {
  border-color: rgba(34,211,238,0.36);
  background: rgba(8,51,68,0.28);
  color: #67e8f9;
}
.game-card-stats.state-mid::before {
  background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34,211,238,0.4);
}
.game-card-stats.state-high {
  border-color: rgba(248,113,113,0.4);
  background: rgba(127,29,29,0.25);
  color: #fca5a5;
}
.game-card-stats.state-high::before {
  background: #f87171;
  box-shadow: 0 0 0 0 rgba(248,113,113,0.44);
}

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { opacity: 0.75; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }
.btn + .btn { margin-top: var(--sp-sm); }

/* Loading + disabled distinction */
.btn.is-loading,
.pill-primary.is-loading,
.pill-ghost.is-loading,
.match-opt.is-loading,
.friend-challenge-btn.is-loading,
.search-result-btn.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
  opacity: 0.72 !important;
}
.btn.is-loading::after,
.pill-primary.is-loading::after,
.pill-ghost.is-loading::after,
.match-opt.is-loading::after,
.friend-challenge-btn.is-loading::after,
.search-result-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.34);
  border-top-color: rgba(255,255,255,0.95);
  animation: spin 0.8s linear infinite;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-sm { padding: 0 16px; font-size: 13px; width: auto; height: 36px; }

/* ══════════════════════════════════════
   MATCH OPTIONS, SEARCHING, INVITE
   ══════════════════════════════════════ */
.match-options {
  display: none;
  padding: var(--sp-md);
  animation: fadeUp var(--dur) var(--ease-out);
}
.match-options.active { display: block; }

/* Header — game icon + name */
.match-options-header {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-bottom: var(--sp-lg);
}
.match-options-icon {
  width: 72px; height: 72px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: var(--glass-mid); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
}
.match-options-icon::before {
  content: ''; position: absolute; inset: -50%;
  border-radius: 50%; filter: blur(30px); opacity: 0.2;
  pointer-events: none;
}
.match-options-icon.glow-warm::before { background: var(--grad-warm); }
.match-options-icon.glow-cool::before { background: var(--grad-cool); }
.match-options h2 {
  text-align: center; font-size: 22px; font-weight: 800; margin: 0;
}
.match-options-subtitle {
  font-size: 13px; color: rgba(255,255,255,0.4); text-align: center; margin-top: -4px;
}

/* How To Play tooltip */
.howto-tip {
  position: relative;
  margin: 0 0 var(--sp-md);
  padding: 12px 12px 11px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: left;
}
.howto-tip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.05);
  border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
  transform: rotate(45deg);
}
.howto-tip-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
}
.howto-tip-text {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,0.72);
}

/* Option cards — glass buttons with icons */
.match-option-btns {
  display: flex; flex-direction: column; gap: 10px;
}
.match-opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; height: auto; padding: 16px 18px;
  border-radius: var(--r-md); border: 1px solid var(--glass-border);
  background: var(--glass-mid);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  cursor: pointer; text-align: left;
  transition: all 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.match-opt:active { transform: scale(0.97); opacity: 0.8; }
.match-opt-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.match-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.match-opt-title {
  font-size: 15px; font-weight: 700; color: #fff;
}
.match-opt-desc {
  font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.3;
}
.match-opt-arrow {
  font-size: 16px; color: rgba(255,255,255,0.2); flex-shrink: 0;
}

/* Primary option — accent glow */
.match-opt-primary {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(99,102,241,0.08));
  border-color: rgba(99,102,241,0.3);
}
.match-opt-primary .match-opt-icon {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
/* Secondary options */
.match-opt-secondary .match-opt-icon {
  background: var(--glass-strong); color: rgba(255,255,255,0.7);
}
/* Back button — compact */
.match-opt-back {
  justify-content: center; gap: 8px;
  padding: 12px 18px; margin-top: 4px;
  background: transparent; border-color: rgba(255,255,255,0.06);
}
.match-opt-back .match-opt-title { color: rgba(255,255,255,0.4); font-size: 14px; font-weight: 600; margin: 0; }

.match-screen { display: none; text-align: center; padding: var(--sp-xl); }
.match-screen.active { display: block; }
.match-screen h2 { font-size: 22px; font-weight: 800; margin-bottom: var(--sp-sm); }
.match-screen p { color: var(--tg-theme-hint-color); font-size: 14px; margin-bottom: var(--sp-lg); }

/* Legacy spinner — challenge overlay uses it */
.match-spinner {
  width: 56px; height: 56px;
  border: 3px solid var(--glass-mid);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: var(--sp-lg) auto;
}

/* Orbiting Dots Spinner */
.match-spinner-container {
  display: flex;
  justify-content: center;
  margin: var(--sp-xl) 0;
}
.spinner-orbit {
  position: relative;
  width: 64px; height: 64px;
  animation: orbitSpin 2s linear infinite;
}
.spinner-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(129,140,248,0.5);
}
.spinner-dot:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.spinner-dot:nth-child(2) { bottom: 4px; left: 4px; opacity: 0.6; width: 11px; height: 11px; }
.spinner-dot:nth-child(3) { bottom: 4px; right: 4px; opacity: 0.3; width: 8px; height: 8px; }

.invite-section { display: none; text-align: center; padding: var(--sp-md); animation: fadeUp var(--dur-fast) var(--ease-out); }
.invite-section.active { display: block; }
.invite-link {
  background: var(--glass-mid);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 14px;
  font-size: 13px;
  word-break: break-all;
  margin: var(--sp-md) 0;
  color: var(--accent);
  user-select: all;
}
.invite-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-md); }

/* Mode Selector */
.mode-selector { display: flex; gap: 8px; justify-content: center; margin: var(--sp-sm) 0 var(--sp-md); }
.mode-btn {
  padding: 8px 20px;
  min-height: 48px;
  min-width: 48px;
  border-radius: var(--r-full);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--tg-theme-hint-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.mode-btn.active {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 14px rgba(99,102,241,0.3);
}

/* ══════════════════════════════════════
   LOBBY FEED / CHAT — Modern Design
   ══════════════════════════════════════ */
.lobby-feed-section {
  margin-top: 12px;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 14px;
  padding: 10px;
  background: rgba(15,23,42,0.64);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.lobby-feed-section::before {
  content: none;
}
.lobby-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.lobby-feed-section h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: rgba(226,232,240,0.95);
}
.feed-toggle-btn {
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(148,163,184,0.24);
  cursor: pointer;
  color: rgba(203,213,225,0.9);
  font-size: 16px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  min-width: 36px;
  border-radius: 10px;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feed-toggle-btn:active { opacity: 0.72; }
.feed-toggle-icon {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.feed-toggle-btn.collapsed .feed-toggle-icon { transform: rotate(180deg); }
.lobby-feed-body {
  overflow: hidden;
  transition: max-height 0.26s var(--ease-out), opacity 0.2s;
  max-height: 260px;
  opacity: 1;
}
.lobby-feed-body.hidden {
  max-height: 0;
  opacity: 0;
}

/* Feed List */
.feed-list {
  max-height: 170px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(15,23,42,0.5);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  border: 1px solid rgba(148,163,184,0.14);
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.22) transparent;
}
.feed-item {
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 9px;
  border-radius: var(--r-sm);
  background: rgba(30,41,59,0.44);
  border: 1px solid rgba(148,163,184,0.12);
  animation: fadeUp 0.3s var(--ease-out);
}
.feed-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}
.feed-item-name {
  font-weight: 700;
  color: rgba(226,232,240,0.95);
  font-size: 12px;
}
.feed-item-time {
  font-size: 10px;
  font-weight: 600;
  color: rgba(148,163,184,0.8);
}
.feed-item-body {
  color: rgba(226,232,240,0.88);
  word-break: break-word;
}
.feed-item-chat {
  border-left: 2px solid rgba(34,197,94,0.62);
}
.feed-item-empty {
  color: rgba(148,163,184,0.75);
  text-align: center;
  border-style: dashed;
}

/* Feed Input */
.feed-input-wrap { display: flex; gap: 8px; }
body.keyboard-open .feed-list {
  max-height: 120px;
}
.feed-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 11px;
  font-size: 13px;
  background: rgba(15,23,42,0.65);
  color: #f0f0f5 !important;
  caret-color: #f0f0f5;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.feed-input::placeholder { color: var(--tg-theme-hint-color); }
.feed-input:focus {
  border-color: rgba(56,189,248,0.65);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.2);
}
.feed-send-btn {
  padding: 0 12px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  border: none;
  border-radius: 11px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.feed-send-btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.online-text { color: #e7fff8 !important; }
.feed-send-btn:active { opacity: 0.7; }

@keyframes floatEmoji {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-90px) scale(1.6); opacity: 0; }
}
.floating-emoji {
  position: fixed;
  font-size: 28px;
  pointer-events: none;
  z-index: 500;
  animation: floatEmoji 1.2s ease-out forwards;
}

/* ══════════════════════════════════════
   BOTTOM NAVIGATION — Floating Glass
   ══════════════════════════════════════ */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,30,0.85);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  border-top: 1px solid var(--glass-border);
  border-radius: 0;
  padding: 6px 4px;
  padding-bottom: calc(6px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px)));
  z-index: 50;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
body.keyboard-open .bottom-nav {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  cursor: pointer;
  position: relative;
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: var(--r-md);
  transition: color 0.25s, background 0.25s;
}
.nav-item.active {
  color: #fff;
  background: rgba(129,140,248,0.12);
}
.nav-item-icon { font-size: 22px; }
.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 16px);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  display: none;
  box-shadow: 0 0 8px rgba(248,113,113,0.6);
}
.nav-badge.visible { display: block; }

/* ══════════════════════════════════════
   LEADERBOARD
   ══════════════════════════════════════ */
/* Podium */
.lb-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 8px; margin-bottom: var(--sp-md); padding: 0 8px;
}
.lb-podium-col {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex: 1; max-width: 110px;
}
.lb-podium-col.lb-open-profile,
.lb-item.lb-open-profile {
  cursor: pointer;
}
.lb-podium-col.lb-open-profile:active,
.lb-item.lb-open-profile:active {
  transform: scale(0.985);
}
.lb-podium-col.lb-open-profile.is-loading,
.lb-item.lb-open-profile.is-loading {
  pointer-events: none;
  opacity: 0.68;
}
.lb-podium-col.lb-open-profile.is-added .lb-podium-score,
.lb-item.lb-open-profile.is-added .lb-score {
  color: var(--success);
}
.lb-podium-medal { font-size: 24px; animation: trophyBounce 0.6s var(--ease-spring) backwards; }
.lb-podium-col:nth-child(1) .lb-podium-medal { animation-delay: 0.3s; }
.lb-podium-col:nth-child(2) .lb-podium-medal { animation-delay: 0.1s; }
.lb-podium-col:nth-child(3) .lb-podium-medal { animation-delay: 0.5s; }
.lb-podium-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--glass-mid); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  border: 2px solid var(--glass-border);
}
.lb-podium-col:nth-child(2) .lb-podium-avatar {
  width: 56px; height: 56px; font-size: 18px;
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251,191,36,0.3);
}
.lb-podium-name {
  font-size: 11px; font-weight: 700;
  text-align: center; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-podium-score { font-size: 12px; font-weight: 800; color: var(--accent); }
.lb-podium-bar {
  width: 100%; border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--grad-surface); border: 1px solid var(--glass-border);
  border-bottom: none;
  transform-origin: bottom;
  animation: podiumRise 0.6s var(--ease-out) backwards;
}
.lb-podium-col:nth-child(1) .lb-podium-bar { height: 70px; animation-delay: 0.3s; }
.lb-podium-col:nth-child(2) .lb-podium-bar { height: 90px; animation-delay: 0.1s; }
.lb-podium-col:nth-child(3) .lb-podium-bar { height: 55px; animation-delay: 0.5s; }

/* Segmented Controls */
.lb-seg-row {
  display: flex; gap: 8px; margin-bottom: 10px; justify-content: center; flex-wrap: wrap;
}
.lb-seg {
  display: inline-flex; position: relative;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--r-full); padding: 3px;
}
.lb-seg-btn {
  padding: 8px 14px; border: none; border-radius: var(--r-full);
  min-height: 44px;
  min-width: 44px;
  background: transparent; color: var(--tg-theme-hint-color);
  font-size: 12px; font-weight: 700; cursor: pointer;
  position: relative; z-index: 1;
  transition: color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.lb-seg-btn.active { color: #fff; }
.lb-seg-indicator {
  position: absolute; top: 3px; height: calc(100% - 6px);
  background: var(--accent); border-radius: var(--r-full);
  transition: left 0.3s var(--ease-out), width 0.3s var(--ease-out);
  z-index: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* List */
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-item {
  display: flex; align-items: center;
  padding: 12px 14px;
  background: var(--grad-surface);
  border-radius: var(--r-md);
  gap: 10px;
  border: 1px solid var(--glass-border);
}
.lb-item.lb-open-profile {
  border-color: rgba(129,140,248,0.24);
}
.lb-item-self {
  background: rgba(129,140,248,0.1);
  border-color: rgba(129,140,248,0.25);
}
.lb-rank { font-weight: 800; font-size: 14px; width: 24px; text-align: center; }
.lb-rank-medal { font-size: 18px; width: 24px; text-align: center; }
.lb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--glass-mid); color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.lb-name { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 700; color: var(--accent); font-size: 14px; flex-shrink: 0; }
.lb-user-rank {
  margin-top: var(--sp-md); padding: 12px;
  background: rgba(129,140,248,0.1);
  border: 1px solid rgba(129,140,248,0.15);
  border-radius: var(--r-md);
  text-align: center; font-size: 14px;
}

/* LB skeleton */
.lb-skeleton-item {
  display: flex; gap: 10px; padding: 12px 14px; align-items: center;
  background: var(--grad-surface); border-radius: var(--r-md); border: 1px solid var(--glass-border);
}

/* ══════════════════════════════════════
   PROFILE — Hero + Stats + Achievements + History
   ══════════════════════════════════════ */
/* Hero Section */
.profile-hero { text-align: center; padding: var(--sp-lg) 0 var(--sp-md); }
.profile-avatar-wrap { position: relative; width: 92px; height: 92px; margin: 0 auto var(--sp-sm); }
.profile-avatar-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  position: absolute; top: 6px; left: 6px;
  overflow: hidden;
  animation: avatarGlow 3s ease-in-out infinite;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-level-badge {
  position: absolute; bottom: -2px; right: -2px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: var(--r-full);
  border: 2px solid var(--tg-theme-bg-color);
  z-index: 2;
}
.profile-name { font-size: 24px; font-weight: 800; margin-bottom: 2px; }
.profile-subtitle { font-size: 13px; color: var(--tg-theme-hint-color); font-weight: 500; }
/* Win Rate Ring */
.winrate-section { display: flex; justify-content: center; margin: var(--sp-md) 0; }
.winrate-ring-wrap { position: relative; width: 120px; height: 120px; }
.winrate-ring { transform: rotate(-90deg); width: 120px; height: 120px; }
.winrate-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 8; }
.winrate-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1.5s var(--ease-out); }
.winrate-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.winrate-value { font-size: 28px; font-weight: 800; line-height: 1; }
.winrate-label { font-size: 11px; color: var(--tg-theme-hint-color); margin-top: 2px; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-sm); margin: var(--sp-md) 0; }
.stat-card {
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  text-align: center;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.stat-icon { font-size: 18px; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 800; }
.stat-value.wins { color: var(--success); }
.stat-value.losses { color: var(--danger); }
.stat-value.draws { color: var(--accent); }
.stat-value.played { color: #c7d2fe; }
.stat-label {
  font-size: 11px; color: var(--tg-theme-hint-color);
  margin-top: 4px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Game Breakdown */
.game-breakdown { display: flex; flex-direction: column; gap: var(--sp-sm); margin-bottom: var(--sp-md); }
.game-breakdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
}
.game-breakdown-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.game-breakdown-icon.rps { background: rgba(249,115,22,0.15); }
.game-breakdown-icon.dice { background: rgba(6,182,212,0.15); }
.game-breakdown-icon.closest { background: rgba(16,185,129,0.15); }
.game-breakdown-icon.highlow { background: rgba(245,158,11,0.16); }
.game-breakdown-icon.oddeven { background: rgba(14,165,233,0.16); }
.game-breakdown-icon.mines { background: rgba(239,68,68,0.16); }
.game-breakdown-icon.riskbank { background: rgba(20,184,166,0.16); }
.game-breakdown-info { flex: 1; min-width: 0; }
.game-breakdown-name { font-size: 14px; font-weight: 700; }
.game-breakdown-detail { font-size: 12px; color: var(--tg-theme-hint-color); }
.game-breakdown-wr { font-size: 14px; font-weight: 800; flex-shrink: 0; }

/* Section Title */
.section-title { font-size: 16px; font-weight: 700; margin: var(--sp-lg) 0 var(--sp-sm); }

/* Achievements */
.achievements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-sm); margin-bottom: var(--sp-md); }
.achievement-card {
  background: var(--grad-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 12px 8px; text-align: center;
  transition: transform 0.2s;
  position: relative; overflow: hidden;
}
.achievement-card:active { transform: scale(0.95); }
.achievement-card.locked { opacity: 0.3; filter: grayscale(0.8); }
.achievement-card.bronze { border-color: #d97706; box-shadow: 0 0 12px rgba(217,119,6,0.15); }
.achievement-card.silver { border-color: #9ca3af; box-shadow: 0 0 12px rgba(156,163,175,0.15); }
.achievement-card.gold {
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251,191,36,0.25);
  background: conic-gradient(from var(--gold-angle, 0deg), rgba(251,191,36,0.08), rgba(255,255,255,0.02), rgba(251,191,36,0.08));
  animation: goldSpin 8s linear infinite;
}
@property --gold-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.achievement-icon { font-size: 28px; margin-bottom: 4px; }
.achievement-name { font-size: 11px; font-weight: 600; }
.achievement-desc { font-size: 9px; color: var(--tg-theme-hint-color); margin-top: 2px; line-height: 1.2; }
.achievement-progress {
  margin-top: 6px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.achievement-progress-fill {
  height: 100%; border-radius: 2px;
  background: var(--accent); transition: width 0.8s var(--ease-out);
}

/* History */
.history-list { display: flex; flex-direction: column; gap: var(--sp-sm); }
.history-item {
  display: flex; padding: 12px 14px;
  border-radius: var(--r-md); gap: 12px;
  background: var(--grad-surface);
  align-items: center;
  border: 1px solid var(--glass-border);
}
.history-item.win { border-left: 3px solid var(--success); }
.history-item.loss { border-left: 3px solid var(--danger); }
.history-item.draw { border-left: 3px solid var(--accent); }
.history-game-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--glass-mid);
}
.history-info { flex: 1; min-width: 0; }
.history-opponent { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-score { font-size: 13px; color: var(--tg-theme-hint-color); }
.history-meta { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; }
.history-date { font-size: 11px; color: var(--tg-theme-hint-color); }
.history-result-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: var(--r-full);
}
.history-result-badge.win { background: rgba(52,211,153,0.15); color: var(--success); }
.history-result-badge.loss { background: rgba(248,113,113,0.15); color: var(--danger); }
.history-result-badge.draw { background: rgba(129,140,248,0.15); color: var(--accent); }

/* History skeleton */
.history-skeleton {
  display: flex; gap: 12px; padding: 12px 14px; align-items: center;
  background: var(--grad-surface); border-radius: var(--r-md); border: 1px solid var(--glass-border);
}

/* Friends */
.friends-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-xs) 0 var(--sp-md);
}
.friends-header h1 { font-size: 20px; font-weight: 700; }
.friends-count-pill {
  padding: 4px 12px; border-radius: var(--r-full);
  background: var(--glass-mid); border: 1px solid var(--glass-border);
  font-size: 12px; font-weight: 700; color: var(--tg-theme-hint-color);
}
.friends-group-title {
  font-size: 12px; font-weight: 700; color: var(--tg-theme-hint-color);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: var(--sp-md) 0 var(--sp-sm); display: flex; align-items: center; gap: 6px;
}
.friends-group-dot { width: 6px; height: 6px; border-radius: 50%; }
.friends-group-dot.in-game {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(129,140,248,0.55);
}
.friends-group-dot.online { background: var(--success); }
.friends-group-dot.recently { background: rgba(251,191,36,0.9); }
.friends-group-dot.offline { background: rgba(255,255,255,0.2); }
.friend-item {
  display: flex; align-items: center;
  padding: 12px 14px; gap: 12px;
  background: var(--grad-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
  transition: transform 0.15s var(--ease-out);
}
.friend-item:active { transform: scale(0.98); }
.friend-item.friend-in-game { border-color: rgba(129,140,248,0.38); }
.friend-item.friend-online { border-color: rgba(52,211,153,0.2); }
.friend-item.friend-recent { border-color: rgba(251,191,36,0.25); }
.friend-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
  overflow: hidden; position: relative;
  box-shadow: 0 0 12px rgba(129,140,248,0.2);
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-avatar-online::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--tg-theme-bg-color);
  box-shadow: 0 0 6px rgba(52,211,153,0.5);
}
.friend-avatar-in-game::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--tg-theme-bg-color);
  box-shadow: 0 0 6px rgba(129,140,248,0.55);
}
.friend-info { flex: 1; min-width: 0; }
.friend-name { font-size: 15px; font-weight: 600; }
.friend-status { font-size: 12px; color: var(--tg-theme-hint-color); }
.friend-status.in-game { color: var(--accent); }
.friend-status.online { color: var(--success); }
.friend-status.recently { color: #f59e0b; }
.friend-status.offline { color: var(--tg-theme-hint-color); }
.friend-challenge-btn {
  padding: 10px 14px; border-radius: var(--r-sm);
  min-height: 44px;
  min-width: 44px;
  border: none;
  background: var(--grad-brand); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 10px rgba(99,102,241,0.25);
  transition: transform 0.2s var(--ease-spring);
  display: flex; align-items: center; gap: 4px;
}
.friend-challenge-btn:active { transform: scale(0.94); }
.friends-list { display: flex; flex-direction: column; gap: var(--sp-sm); }

/* Friends Empty State */
.friends-empty { text-align: center; padding: 48px 16px; }
.friends-empty-icon { font-size: 56px; animation: float 3s ease-in-out infinite; margin-bottom: var(--sp-md); }
.friends-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.friends-empty p { font-size: 13px; color: var(--tg-theme-hint-color); margin-bottom: var(--sp-lg); }

/* Search */
.search-section { margin-bottom: var(--sp-md); }
.search-input-wrap { position: relative; margin-bottom: var(--sp-sm); }
.search-input {
  width: 100%; padding: 11px 14px 11px 38px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--glass);
  color: var(--tg-theme-text-color);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--tg-theme-hint-color); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(129,140,248,0.15); }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: var(--tg-theme-hint-color); pointer-events: none;
}
.search-results { display: flex; flex-direction: column; gap: 6px; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--grad-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
}
.search-result-name { flex: 1; font-size: 14px; font-weight: 500; }
.search-result-btn {
  padding: 8px 14px; border-radius: var(--r-sm);
  min-height: 44px;
  min-width: 44px;
  border: none;
  background: var(--success); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ══════════════════════════════════════
   OVERLAYS & TOAST
   ══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--sp-md) + var(--tg-safe-top, env(safe-area-inset-top, 0px)));
  left: var(--sp-md); right: var(--sp-md);
  z-index: 300;
  display: flex; flex-direction: column;
  gap: var(--sp-sm);
  pointer-events: none;
}
.toast {
  background: rgba(15,15,30,0.85);
  color: #fff;
  padding: 12px var(--sp-md);
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  text-align: center;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: toastIn 0.3s var(--ease-out);
}
.toast.error { background: rgba(239,68,68,0.85); border-color: rgba(248,113,113,0.3); }
.toast.success { background: rgba(16,185,129,0.85); border-color: rgba(52,211,153,0.3); }
@keyframes toastIn { from { transform: translateY(-20px) scale(0.95); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-20px); opacity: 0; } }

.empty-state { text-align: center; padding: 48px 16px; color: var(--tg-theme-hint-color); }
.empty-state-icon { font-size: 48px; margin-bottom: var(--sp-md); }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--sp-lg); color: var(--tg-theme-hint-color); }

/* Challenge Overlay */
.challenge-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 400;
  align-items: center; justify-content: center;
  padding: var(--sp-md);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.challenge-overlay.active { display: flex; }
.challenge-modal {
  background: rgba(20,20,40,0.95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-radius: var(--r-xl);
  padding: var(--sp-lg);
  text-align: center;
  width: 100%; max-width: 320px;
  animation: challengeIn 0.35s var(--ease-out);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.challenge-modal h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.challenge-modal p { color: var(--tg-theme-hint-color); font-size: 14px; }
.challenge-icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}
.challenge-single-action {
  margin-top: 16px;
}
.challenge-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.challenge-actions .btn {
  width: 100%;
  height: 48px;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
}
.challenge-actions .btn + .btn {
  margin-top: 0;
}
.challenge-btn-accept {
  box-shadow: 0 6px 18px rgba(99,102,241,0.32);
}
.challenge-btn-reject {
  box-shadow: 0 6px 18px rgba(220,38,38,0.28);
}
@keyframes challengeIn { from { transform: scale(0.88) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* Player Profile Overlay */
.player-profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 420;
  background: rgba(3, 8, 22, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: var(--sp-md);
  padding-top: calc(var(--sp-md) + var(--tg-safe-top, env(safe-area-inset-top, 0px)));
  padding-bottom: calc(var(--sp-md) + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px)));
  align-items: center;
  justify-content: center;
}
.player-profile-overlay.active {
  display: flex;
}
.player-profile-sheet {
  width: min(100%, 380px);
  border-radius: 22px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background:
    radial-gradient(circle at 12% -2%, rgba(34, 211, 238, 0.2), transparent 42%),
    radial-gradient(circle at 90% 4%, rgba(129, 140, 248, 0.24), transparent 44%),
    rgba(15, 23, 42, 0.92);
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.55);
  padding: 16px;
  position: relative;
  animation: challengeIn 0.24s var(--ease-out);
}
.player-profile-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.62);
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
}
.player-profile-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 54px;
}
.player-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(129, 140, 248, 0.55);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.94), rgba(30, 64, 175, 0.9));
  box-shadow: 0 10px 22px rgba(30, 64, 175, 0.35);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.player-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-profile-name {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}
.player-profile-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #cbd5e1;
}
.player-profile-highlights {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pp-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.56);
  color: #dbe8fb;
  font-size: 12px;
  font-weight: 700;
}
.pp-highlight strong {
  color: #fff;
  font-weight: 800;
}
.player-profile-stats-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.player-profile-stat {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.66);
  padding: 10px 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pps-label {
  font-size: 11px;
  color: #94a3b8;
}
.player-profile-stat strong {
  font-size: 18px;
  color: #f8fafc;
  font-weight: 800;
}
.player-profile-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.player-profile-actions .btn {
  min-height: 48px;
  height: 48px;
}
.player-profile-actions .btn + .btn {
  margin-top: 0;
}

/* Live Players Dropdown */
.live-players-overlay {
  display: none;
  position: fixed;
  z-index: 350;
  --live-bg: rgba(8, 19, 24, 0.97);
  --live-border: rgba(45, 212, 191, 0.26);
  --live-muted-border: rgba(148, 163, 184, 0.26);
  --live-text: #e6fffb;
  --live-hint: #9cc7c1;
  --live-accent: #2dd4bf;
  --live-accent-ink: #c6fff6;
  --live-accent-bg: rgba(45, 212, 191, 0.2);
}
.live-players-overlay.active { display: block; }
.live-players-sheet {
  width: 100%;
  max-height: 100%;
  background: var(--live-bg);
  border-radius: 16px;
  border: 1px solid var(--live-border);
  padding: 10px 12px 12px;
  box-shadow: 0 18px 36px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  animation: liveDropdownIn 0.16s ease-out;
}
.live-players-handle {
  display: none;
}
.live-players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.live-players-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--live-text);
}
.live-players-head p {
  font-size: 12px;
  color: var(--live-hint);
  margin-top: 2px;
}
.live-players-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--live-muted-border);
  background: rgba(14, 34, 42, 0.8);
  color: #b8dcd7;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.live-players-close:active { opacity: 0.75; }
.live-players-list {
  overflow-y: auto;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(52dvh, 420px);
}
.live-player-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 31, 38, 0.82);
}
.live-player-card.is-self {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25) inset;
}
.live-player-card.status-in_game { border-color: rgba(251, 191, 36, 0.44); }
.live-player-card.status-online { border-color: rgba(16, 185, 129, 0.46); }
.live-player-card.status-recently { border-color: rgba(34, 211, 238, 0.4); }
.live-player-card.status-offline { border-color: rgba(148, 163, 184, 0.26); }
.live-player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, rgba(16, 185, 129, 0.95), rgba(6, 182, 212, 0.9));
}
.live-player-info { min-width: 0; }
.live-player-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--live-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-player-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  margin-top: 3px;
  color: var(--live-hint);
}
.live-presence-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1px;
  color: #d7e8e5;
  background: rgba(15, 23, 42, 0.6);
}
.live-presence-pill.status-in_game {
  border-color: rgba(251, 191, 36, 0.52);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.36);
}
.live-presence-pill.status-online {
  border-color: rgba(16, 185, 129, 0.52);
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.34);
}
.live-presence-pill.status-recently {
  border-color: rgba(34, 211, 238, 0.5);
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.35);
}
.live-presence-pill.status-offline {
  border-color: rgba(148, 163, 184, 0.42);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.48);
}
.live-last-seen {
  font-size: 11px;
  color: var(--live-hint);
}
.live-player-action {
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 10px;
  padding: 0 10px;
  border: 1px solid var(--live-accent);
  background: var(--live-accent-bg);
  color: var(--live-accent-ink);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.live-player-action:active { opacity: 0.8; }
.live-player-action[disabled] {
  cursor: default;
  opacity: 0.65;
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  background: rgba(79, 70, 229, 0.22);
}
.live-players-empty {
  text-align: center;
  font-size: 13px;
  color: var(--live-hint);
  padding: 28px 8px;
}
.live-error-title {
  display: block;
  font-size: 14px;
  color: var(--live-text);
  margin-bottom: 6px;
}
.live-error-text {
  display: block;
  font-size: 12px;
  margin-bottom: 12px;
  color: var(--live-hint);
}
.live-retry-btn {
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 10px;
  padding: 0 12px;
  border: 1px solid var(--live-accent);
  background: var(--live-accent-bg);
  color: var(--live-accent-ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.live-retry-btn:active { opacity: 0.8; }
@keyframes liveDropdownIn {
  from { transform: translateY(-6px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 720px) {
  .lobby-header-main {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 8px;
    padding: var(--sp-xs) 0 12px;
  }
  .lobby-greeting {
    min-width: 0;
  }
  .lobby-greeting h1 {
    font-size: clamp(20px, 6vw, 24px);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .lobby-subtitle {
    font-size: 12px;
  }
  .lobby-header-actions {
    width: auto !important;
    min-width: max-content;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
  }
  .lobby-header-actions .live-players-trigger {
    width: fit-content !important;
    flex: 0 0 auto;
    min-width: 128px;
    max-width: 176px;
    min-height: 50px;
    margin: 0;
    padding: 7px 9px;
  }
  .action-pills {
    margin-bottom: 10px;
  }
  .game-grid {
    margin-bottom: 10px;
  }
}

@media (max-width: 360px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .game-card { aspect-ratio: 1.06; padding: 9px 6px 7px; gap: 4px; border-radius: 18px; }
  .game-card-icon { font-size: 23px; width: 34px; height: 34px; animation: none; }
  .game-card-info h3 { font-size: 11px; }
  .lobby-feed-section { padding: 10px; }
  .feed-list { max-height: 160px; padding: 8px; }
  .feed-item { padding: 8px 9px; }
  .feed-input { padding: 10px 12px; font-size: 13px; }
  .feed-send-btn { min-width: 44px; padding: 0 12px; font-size: 12px; }
  .top-action-row { grid-template-columns: 1fr; }
  .lobby-header-main { column-gap: 6px; row-gap: 6px; }
  .lobby-header-actions { align-items: center; }
  .lobby-header-actions .live-players-trigger { min-width: 118px; max-width: 156px; padding: 6px 8px; }
  .online-text { font-size: 11px; }
  .live-count-value { font-size: 14px; }
  .live-trigger-bottom { font-size: 10px; }
  .live-players-sheet { padding: 8px 10px 10px; }
  .live-player-card { padding: 9px 10px; gap: 8px; }
  .live-player-avatar { width: 36px; height: 36px; font-size: 13px; }
  .live-player-name { font-size: 13px; }
  .live-player-meta { font-size: 10px; gap: 4px; }
  .live-presence-pill { font-size: 9px; padding: 2px 6px; }
  .live-last-seen { font-size: 10px; }
  .live-player-action { height: 44px; font-size: 11px; padding: 0 11px; }
  .challenge-actions { gap: 8px; }
  .challenge-actions .btn {
    height: 48px;
    font-size: 14px;
  }
  .player-profile-sheet { border-radius: 18px; padding: 14px 12px 12px; }
  .player-profile-avatar { width: 50px; height: 50px; border-radius: 14px; font-size: 18px; }
  .player-profile-name { font-size: 17px; }
  .player-profile-actions { grid-template-columns: 1fr; }
}

/* Reduced-motion profile */
.motion-reduced *,
.motion-reduced *::before,
.motion-reduced *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
