/* Трендхантер — тёмно-красная тема в стиле Mini App INTEGER */
:root {
  --bg: #0E0E0F;
  --surface: #18181A;
  --surface-2: #1F1F22;
  --border: #2A2A2E;
  --accent: #E5202E;
  --accent-dim: #7a1119;
  --text: #FFFFFF;
  --muted: #9A9AA0;
  --radius: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: 84px; }

/* ── Шапка ── */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  gap: 8px; padding: 14px 16px; background: rgba(14,14,15,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 0; font-size: 15px; letter-spacing: 1.5px; font-weight: 800;
  text-transform: uppercase; }
.back-btn { background: none; border: none; color: var(--text); font-size: 26px;
  line-height: 1; padding: 0 6px; cursor: pointer; }

/* ── Экран ── */
.screen { padding: 14px 14px 0; max-width: 640px; margin: 0 auto; }

.section-label { color: var(--muted); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; margin: 18px 4px 8px; font-weight: 700; }

/* ── Pill-фильтры ── */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; background: var(--surface-2);
  color: var(--text); border: 1px solid var(--border); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; }
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Карточка тренда ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 14px; }
.card-media { width: 100%; background: #000; display: block; }
.card-media img, .card-media video { width: 100%; display: block; max-height: 460px; object-fit: cover; }
.card-body { padding: 12px 14px 14px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-author { font-weight: 700; font-size: 14px; }
.card-time { color: var(--muted); font-size: 12px; margin-left: auto; }
.card-text { font-size: 14px; line-height: 1.45; color: #EDEDED; white-space: pre-wrap;
  word-break: break-word; }
.badge-rising { display: inline-block; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; }
.stats { display: flex; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.stats b { color: var(--text); }
.card-link { display: block; text-align: center; margin-top: 12px; padding: 10px;
  background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-weight: 700;
  text-decoration: none; font-size: 14px; }

/* ── Списки / строки админки ── */
.row { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.row .grow { flex: 1; min-width: 0; }
.row .muted { color: var(--muted); font-size: 12px; }
.btn { padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-danger { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }
input, textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px; margin: 6px 0; }
textarea { min-height: 88px; resize: vertical; }
label { font-size: 12px; color: var(--muted); }

.profile-head { text-align: center; padding: 26px 0 10px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px;
  background: var(--surface-2); display: block; }
.profile-name { font-size: 19px; font-weight: 800; }
.profile-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.empty, .loading { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 50; opacity: 0;
  transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.chip-status { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.chip-status.ok { color: #4ade80; } .chip-status.err { color: var(--accent); }

/* ── Нижняя навигация ── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  align-items: flex-end; justify-content: space-around; background: rgba(20,20,22,.96);
  backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 8px 6px 12px; }
.tab { background: none; border: none; color: var(--muted); font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; flex: 1; }
.tab.active { color: var(--text); }
.tab-ic { font-size: 20px; }
.tab-center { flex: 0 0 auto; }
.tab-center .tab-ic { background: var(--accent); color: #fff; width: 52px; height: 52px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px;
  margin-bottom: 2px; box-shadow: 0 6px 18px rgba(229,32,46,.45); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
