:root {
  --bg: #07080d;
  --bg-elevated: #12151c;
  --card: rgba(20, 24, 34, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f3f5fa;
  --muted: #8b93a7;
  --purple: #7c5cff;
  --purple-2: #b06bff;
  --cyan: #4facfe;
  --green: #3ecf8e;
  --gold: #f5c451;
  --orange: #ff9f43;
  --red: #ff6b7a;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 54px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  background:
    radial-gradient(900px 480px at 10% -8%, rgba(124, 92, 255, 0.28), transparent 58%),
    radial-gradient(700px 420px at 95% 5%, rgba(79, 172, 254, 0.12), transparent 52%),
    radial-gradient(600px 360px at 50% 100%, rgba(62, 207, 142, 0.08), transparent 55%),
    var(--bg);
}

.shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 4px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.topbar-title { flex: 1; min-width: 0; }
.brand { display: block; font-weight: 650; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.chat-pill {
  max-width: 42%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 11px;
}

.screens { padding: 8px 12px 6px; }
.screen { display: none; animation: fade 0.2s ease; }
.screen.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.screen-title {
  margin: 2px 0 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.games-hint {
  margin: -4px 0 8px;
  font-size: 12px;
  line-height: 1.35;
}

.network-banner {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 107, 122, 0.45);
  background: linear-gradient(135deg, rgba(255, 107, 122, 0.15), rgba(20, 24, 34, 0.95));
  font-size: 12px;
  line-height: 1.4;
}
.network-banner strong { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.network-banner p { margin: 0 0 8px; color: var(--muted); }
.network-banner code { font-size: 11px; }
.network-banner button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #8f6bff, #6240e8);
  cursor: pointer;
}

.penalty-banner {
  margin: 0 12px 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 159, 67, 0.45);
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.16), rgba(20, 24, 34, 0.95));
  font-size: 12px;
}
.penalty-banner strong { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 600; }
.penalty-banner p { margin: 0 0 6px; color: var(--text); line-height: 1.35; }
.penalty-banner button {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 159, 67, 0.25);
  color: var(--text);
  cursor: pointer;
}

.penalty-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}
.penalty-item:last-child { border-bottom: 0; }
.penalty-item strong { display: block; font-size: 14px; margin-bottom: 4px; }
.penalty-item span { font-size: 12px; color: var(--muted); }

.list-item.clickable { cursor: pointer; }
.list-item.clickable:active { transform: scale(0.99); }

.card {
  background: linear-gradient(160deg, rgba(28, 32, 46, 0.95), rgba(16, 18, 28, 0.92));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.profile-hero--glow {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(20, 24, 34, 0.95) 45%),
    linear-gradient(160deg, rgba(28, 32, 46, 0.95), rgba(16, 18, 28, 0.92));
}
.profile-hero--glow::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%);
  pointer-events: none;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.name-row h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.online-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  background: rgba(62, 207, 142, 0.14);
  border: 1px solid rgba(62, 207, 142, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

.profile-hero {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.profile-hero--lg { align-items: flex-start; }

.avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.avatar--lg { width: 60px; height: 60px; border-radius: 18px; }
.avatar--xl { width: 72px; height: 72px; border-radius: 20px; }

.avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 18px;
  color: #fff;
  background: var(--avatar-gradient, linear-gradient(135deg, var(--purple), var(--purple-2)));
}

.avatar--lg .avatar-fallback { font-size: 22px; }
.avatar--xl .avatar-fallback { font-size: 26px; }

.avatar.has-photo .avatar-fallback { opacity: 0; }
.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(124, 92, 255, 0.55);
  pointer-events: none;
  box-shadow: 0 0 18px rgba(124, 92, 255, 0.35);
}

.profile-hero h1 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
}
.profile-hero-body { min-width: 0; flex: 1; position: relative; z-index: 1; }

.pill-level { background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(176, 107, 255, 0.12)); color: #dccfff; border-color: rgba(124, 92, 255, 0.35); }
.pill-karma { background: linear-gradient(135deg, rgba(62, 207, 142, 0.2), rgba(62, 207, 142, 0.08)); color: var(--green); border-color: rgba(62, 207, 142, 0.3); }
.pill-chips { background: linear-gradient(135deg, rgba(245, 196, 81, 0.22), rgba(255, 159, 67, 0.1)); color: var(--gold); border-color: rgba(245, 196, 81, 0.35); }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 64px;
  margin-bottom: 10px;
  padding-top: 2px;
}

.chart .bar {
  flex: 1;
  min-height: 6px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #b06bff 0%, #7c5cff 55%, #5a3fd6 100%);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
  opacity: 0.95;
}

.metric--bad span { color: #ff8a96; }
.metric--msg span { color: #7ecbff; }
.metric--rank span { color: #c4b5ff; }

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.metric span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
}

.metric span small.trend {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.trend--up { color: var(--green); background: rgba(62, 207, 142, 0.12); }
.trend--down { color: var(--red); background: rgba(255, 107, 122, 0.12); }
.trend--flat { color: var(--muted); }

.metric-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.metric label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(79, 172, 254, 0.1));
  border: 1px solid rgba(124, 92, 255, 0.28);
  font-size: 13px;
  font-weight: 600;
}

.cta {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-top: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #8f6bff 0%, #7c5cff 45%, #6240e8 100%);
  box-shadow: 0 14px 36px rgba(124, 92, 255, 0.42);
  cursor: pointer;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.menu-card {
  border: 1px solid var(--card-border);
  background: linear-gradient(155deg, rgba(26, 30, 44, 0.98), rgba(14, 16, 24, 0.95));
  border-radius: var(--radius);
  padding: 14px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  min-height: 118px;
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.menu-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--menu-accent, linear-gradient(90deg, var(--purple), var(--purple-2)));
  opacity: 0.85;
}
.menu-card:active { transform: scale(0.98); }
.menu-card .ico-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 10px;
  background: var(--menu-accent, linear-gradient(135deg, var(--purple), var(--purple-2)));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.menu-card h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.menu-card p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.3; }

.menu-card--purple { --menu-accent: linear-gradient(135deg, #8f6bff, #6240e8); }
.menu-card--cyan { --menu-accent: linear-gradient(135deg, #4facfe, #00c6fb); }
.menu-card--gold { --menu-accent: linear-gradient(135deg, #f5c451, #ff9f43); }
.menu-card--green { --menu-accent: linear-gradient(135deg, #3ecf8e, #2eb872); }
.menu-card--emerald { --menu-accent: linear-gradient(135deg, #43e97b, #38f9d7); }
.menu-card--amber { --menu-accent: linear-gradient(135deg, #ffb347, #ffcc33); }
.menu-card--orange { --menu-accent: linear-gradient(135deg, #ff9a56, #ff6a88); }
.menu-card--slate { --menu-accent: linear-gradient(135deg, #667eea, #764ba2); }

.seg-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.seg-tabs::-webkit-scrollbar { display: none; }

.seg-tabs button {
  flex: 0 0 auto;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.seg-tabs button.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  border-color: transparent;
  color: #fff;
}

.seg-tabs--sm button { font-size: 12px; padding: 6px 12px; }

.list { display: flex; flex-direction: column; gap: 6px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--card-border);
}

.list-item.me {
  border-color: rgba(124, 92, 255, 0.45);
  background: rgba(124, 92, 255, 0.1);
}

.list-item .rank {
  width: 28px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}

.mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.mini-avatar .avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
}

.mini-avatar .avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-avatar.has-photo .avatar-fallback {
  opacity: 0;
}

.list-item.rank-1 { border-color: rgba(245, 196, 81, 0.45); background: linear-gradient(90deg, rgba(245, 196, 81, 0.12), rgba(20, 24, 34, 0.92)); }
.list-item.rank-2 { border-color: rgba(192, 192, 210, 0.35); }
.list-item.rank-3 { border-color: rgba(205, 127, 50, 0.35); }
.list-item .rank.gold { color: var(--gold); }
.list-item .rank.silver { color: #c8c8d8; }
.list-item .rank.bronze { color: #cd7f32; }

.list-item .info { flex: 1; min-width: 0; }
.list-item .info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item .info span { font-size: 11px; color: var(--muted); line-height: 1.3; }
.list-item .score { font-weight: 650; font-size: 13px; color: var(--purple-2); }

.btn-play {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #0a1a12;
  background: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-play--muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
}

.blitz-ai-card { margin-bottom: 12px; }

.blitz-ai-avatar {
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(79, 172, 254, 0.2));
}

.blitz-members-empty {
  margin: 0;
  padding: 8px 4px 4px;
  text-align: center;
}

.xp-block { margin-top: 12px; }
.xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.xp-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.xp-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--purple-2));
}

.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ach {
  font-size: 12px;
  color: var(--text);
}
.ach-label {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.25);
}
.ach .bubble {
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(79, 172, 254, 0.12));
  border: 2px solid rgba(124, 92, 255, 0.35);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.2);
}

.game-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(176, 107, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.game-icon--blitz { background: linear-gradient(135deg, rgba(255, 159, 67, 0.35), rgba(255, 107, 122, 0.15)); }
.game-icon--role { background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(98, 64, 232, 0.2)); }
.game-icon--fun { background: linear-gradient(135deg, rgba(62, 207, 142, 0.3), rgba(79, 172, 254, 0.15)); }

.stat-lines { display: flex; flex-direction: column; gap: 10px; }
.stat-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.stat-line:last-child { border-bottom: 0; }
.stat-line .ico { width: 28px; text-align: center; }
.stat-line .label { flex: 1; font-size: 14px; }
.stat-line .val { font-weight: 800; }

.balance-card {
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(62, 207, 142, 0.1));
  border: 1px solid var(--card-border);
  font-weight: 700;
}

.shop-cat { margin-bottom: 16px; }
.shop-cat h3 { margin: 0 0 8px; font-size: 15px; }

.shop-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.shop-item.disabled { opacity: 0.55; }
.shop-item .title { font-weight: 700; margin-bottom: 4px; }
.shop-item .desc { font-size: 12px; color: var(--muted); line-height: 1.35; }

.buy-btn {
  align-self: center;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 84px;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.buy-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.placeholder {
  text-align: center;
  padding: 32px 20px;
}
.placeholder .big { font-size: 48px; margin-bottom: 12px; }
.placeholder h2 { margin: 0 0 8px; }
.placeholder p { color: var(--muted); line-height: 1.5; }

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 6px 8px calc(6px + var(--safe-b));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: rgba(12, 14, 20, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  z-index: 30;
}

.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
}
.nav-item .nav-ico {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s, box-shadow 0.15s;
}
.nav-item.active .nav-ico {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(176, 107, 255, 0.2));
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.25);
}
.nav-item.active { color: #dccfff; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(18, 21, 28, 0.96);
  border: 1px solid var(--card-border);
  z-index: 40;
  font-size: 14px;
  font-weight: 600;
}

.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 14, 0.55);
  z-index: 50;
}
.loader[hidden] {
  display: none !important;
}
.toast[hidden] {
  display: none !important;
}
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--purple);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.menu-text-lines p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.menu-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-field:last-child { border-bottom: 0; }
.admin-field-label { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.admin-field-val { font-size: 15px; font-weight: 600; }
.admin-step-row { display: flex; gap: 6px; }
.admin-step, .admin-toggle {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.blitz-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
  font: inherit;
}
.blitz-member--ai {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(79, 172, 254, 0.08));
  border-color: rgba(124, 92, 255, 0.35);
}
.blitz-member:active { transform: scale(0.99); }
.blitz-member .info { flex: 1; min-width: 0; }
.blitz-member .info strong { display: block; font-size: 14px; }
.blitz-member .info span { font-size: 12px; color: var(--muted); }
.blitz-member .chev { color: var(--muted); font-size: 20px; line-height: 1; }

.blitz-duel-players .mini-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.blitz-duel-players .mini-avatar .avatar-fallback {
  font-size: 18px;
}

.blitz-play-root { display: flex; flex-direction: column; gap: 12px; }
.blitz-duel-players > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  text-align: center;
}
.blitz-duel-players > div strong { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blitz-duel-card { margin-bottom: 0; }
.blitz-duel-players {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  padding: 8px 0 16px;
}
.blitz-vs { font-weight: 800; color: var(--muted); font-size: 14px; }
.blitz-dice {
  font-size: 56px;
  line-height: 1;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.15), rgba(20, 24, 34, 0.9));
  border: 1px solid var(--card-border);
}
.blitz-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.blitz-actions button {
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
  border: 0;
  border-radius: 12px;
  padding: 14px 10px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #8f6bff, #6240e8);
  cursor: pointer;
}
.blitz-actions button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--card-border);
}
.blitz-phrase {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(124, 92, 255, 0.35);
  word-break: break-word;
}
.blitz-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}
.blitz-status { text-align: center; color: var(--muted); font-size: 13px; padding: 8px; }
.blitz-result {
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(62, 207, 142, 0.15), rgba(124, 92, 255, 0.12));
}

/* —— Game landing (Мафия / Крокодил) —— */
.game-landing { padding-bottom: 12px; }
.game-landing-hero {
  text-align: center;
  padding: 8px 0 16px;
}
.game-landing-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
}
.game-landing-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}
.game-landing-subtitle {
  font-size: 13px;
  margin: 0 0 6px;
  line-height: 1.4;
}
.game-landing-status {
  margin: 0;
  color: var(--muted);
}
.game-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.game-stat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}
.game-stat-ico { font-size: 18px; flex-shrink: 0; }
.game-landing-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.game-landing--purple .game-landing-create {
  background: linear-gradient(135deg, #7c5cff, #b06bff);
  border: none;
}
.game-landing--green .game-landing-create {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border: none;
}
.game-landing-join,
.game-landing-start {
  width: 100%;
}
.game-room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}
.game-room-row:last-child { border-bottom: 0; }
.game-room-info strong { display: block; font-size: 14px; }
.game-steps { display: flex; flex-direction: column; gap: 10px; }
.game-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.game-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
}
.game-landing--purple .game-step-num {
  background: rgba(124, 92, 255, 0.25);
  color: #dccfff;
}
.game-landing--green .game-step-num {
  background: rgba(46, 204, 113, 0.22);
  color: #b8f5d0;
}
.game-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

/* —— In-game play screens —— */
.game-play { padding-bottom: 16px; }
.gp-header {
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
}
.gp-header--purple { border-color: rgba(124, 92, 255, 0.35); }
.gp-header--green { border-color: rgba(46, 204, 113, 0.35); }
.gp-header-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gp-game-icon { font-size: 36px; line-height: 1; }
.gp-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.gp-meta { margin: 2px 0 0; }
.gp-timer {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.gp-timer--green { color: #6ee7a8; }
.gp-phase { margin-bottom: 12px; }
.gp-phase-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.gp-player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gp-player-card {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}
.gp-player-card--me { border-color: rgba(124, 92, 255, 0.45); }
.game-play--green .gp-player-card--me { border-color: rgba(46, 204, 113, 0.45); }
.gp-player-card--dead { opacity: 0.45; }
.gp-player-info { min-width: 0; }
.gp-player-info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gp-player-num {
  font-size: 11px;
  color: var(--muted);
}
.gp-online, .gp-status {
  display: block;
  font-size: 11px;
  color: #6ee7a8;
}
.gp-status--lead { color: #fbbf24; }
.gp-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(124, 92, 255, 0.25);
  color: #dccfff;
  margin-top: 2px;
}
.gp-role-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.gp-role-icon { font-size: 32px; }
.gp-stats-card .gp-stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.gp-vote-label {
  display: block;
  font-size: 13px;
  margin: 8px 0 6px;
  color: var(--muted);
}
.gp-select, .gp-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  margin-bottom: 8px;
}
.gp-guess-row {
  display: flex;
  gap: 8px;
}
.gp-guess-row .gp-input { margin-bottom: 0; flex: 1; }
.gp-guess-submit { flex-shrink: 0; padding-inline: 16px; }
.gp-guess-submit--green {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border: none;
}
.gp-vote-submit { width: 100%; margin-top: 8px; }
.game-play--purple .gp-vote-submit {
  background: linear-gradient(135deg, #7c5cff, #b06bff);
  border: none;
}
.link-btn {
  background: none;
  border: none;
  color: #b06bff;
  font: inherit;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}
.gp-word-card { text-align: center; margin-bottom: 12px; }
.gp-word-card--green { border-color: rgba(46, 204, 113, 0.35); }
.gp-word {
  font-size: 28px;
  font-weight: 800;
  color: #6ee7a8;
  margin: 8px 0;
}
.gp-word-hint { font-size: 13px; color: var(--muted); }
.gp-leader-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
