:root {
  --bg: #0b0b0b;
  --card: #171717;
  --card-2: #1f1f1f;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #2f80ed;
  --ok: #09a60d;
  --warn: #fba724;
  --bad: #ff3838;
  --radius: 16px;
  font-family: Montserrat, Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%; }
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 12px 12px calc(84px + env(safe-area-inset-bottom));
}
#view { min-height: 60vh; }

.bottom {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: rgba(15,15,15,.96);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
}
.bottom button {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  min-height: 44px;
  cursor: pointer;
}
.bottom button.active { color: var(--accent); }
.bottom .ico { font-size: 18px; line-height: 1; }

.search {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #1a1a1a;
  color: var(--text);
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 15px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #334, #123);
  display: grid; place-items: center; font-weight: 700;
}
.profile .name { font-weight: 600; }
.profile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.progress-bar {
  height: 6px; background: #2a2a2a; border-radius: 999px; overflow: hidden; margin-top: 8px;
}
.progress-bar > span { display: block; height: 100%; background: var(--ok); }

.block-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120px 80px at 85% 70%, rgba(47,128,237,.18), transparent 70%),
    linear-gradient(135deg, #151515, #0f0f0f 55%, #1a1a1a);
  min-height: 132px;
  padding: 18px 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.block-card .num {
  position: absolute;
  left: 10px; bottom: -8px;
  font-size: 84px; font-weight: 800; color: rgba(255,255,255,.06); line-height: 1;
}
.block-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  max-width: 78%;
  white-space: pre-line;
}
.block-card .meta {
  position: relative; z-index: 1;
  margin-top: 10px; color: var(--muted); font-size: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.space { justify-content: space-between; }
.btn, .chip {
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.btn.primary { background: rgba(47,128,237,.18); border-color: rgba(47,128,237,.45); }
.btn:disabled { opacity: .4; }
.chip.active { background: rgba(47,128,237,.2); border-color: rgba(47,128,237,.5); }
.badge {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
}
.badge.ok { color: #86efac; border-color: rgba(9,166,13,.35); }
.badge.warn { color: #fde68a; border-color: rgba(251,167,36,.35); }
.meta { color: var(--muted); font-size: 13px; line-height: 1.4; }
.note { color: var(--muted); font-size: 14px; line-height: 1.45; }
.h1 { margin: 0 0 8px; font-size: 22px; }
.h2 { margin: 16px 0 10px; font-size: 16px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}
.item .main { min-width: 0; flex: 1; }
.item a { color: var(--text); text-decoration: none; font-weight: 600; }
.item a:active { opacity: .8; }
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 12px;
  min-height: 96px;
  cursor: pointer;
}
.tile .emoji { font-size: 22px; }
.tile h3 { margin: 10px 0 4px; font-size: 15px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.game-card {
  border-color: rgba(47,128,237,.35);
  background: linear-gradient(180deg, rgba(47,128,237,.12), rgba(23,23,23,.95));
}
.video {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 12px; overflow: hidden; background: #000; margin-top: 8px;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.topbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.muted { color: var(--muted); }
.pct-bad { color: var(--bad); }
.pct-mid { color: var(--warn); }
.pct-ok { color: var(--ok); }
