:root{
  --bg: #0b0c10;
  --card: #12141b;
  --text: #e8e8ea;
  --muted: #a3a3ad;
  --border: #23263a;
  --accent: #7aa2f7;
  --danger: #ff6b6b;
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{ max-width: 920px; margin: 0 auto; padding: 18px; }
.topbar{ position: sticky; top:0; background: rgba(11,12,16,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); z-index: 10; }
.topbar-inner{ display:flex; align-items:center; justify-content: space-between; gap: 12px; }
.brand{ font-weight: 800; font-size: 18px; letter-spacing: 0.3px; color: var(--text); }
.nav{ display:flex; gap: 12px; flex-wrap: wrap; }
.nav a{ color: var(--muted); font-weight: 600; }
.nav a:hover{ color: var(--text); text-decoration:none; }

h1{ font-size: 26px; margin: 10px 0 14px; }
h2{ font-size: 18px; margin: 0 0 10px; }
.small{ font-size: 12px; }
.muted{ color: var(--muted); }
.hint{ color: var(--muted); font-size: 12px; margin-top: 6px; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.stack{ display:flex; flex-direction: column; gap: 12px; }

.page-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}

.button{
  background: var(--accent);
  color: #0b0c10;
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.button:hover{ filter: brightness(1.05); text-decoration:none; }
.button.secondary{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.button.danger{
  background: var(--danger);
  color: #0b0c10;
}

.form label{ display:block; margin-top: 10px; margin-bottom: 6px; font-weight: 700; }
.input, .textarea{
  width: 100%;
  background: #0f1118;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
}
.textarea{ resize: vertical; }

.row{ display:flex; gap: 10px; align-items:center; margin-top: 12px; flex-wrap: wrap; }
.flashes{ display:flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.flash{ padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: #0f1118; }
.flash-success{ border-color: rgba(122,162,247,0.4); }
.flash-error{ border-color: rgba(255,107,107,0.5); }

.post-header{ display:flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.post-actions{ display:flex; align-items: center; gap: 10px; }
.author{ font-weight: 900; color: var(--text); }
.note{ margin-top: 10px; margin-bottom: 12px; line-height: 1.45; }

.like-btn{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
}
.like-btn:hover{ border-color: rgba(122,162,247,0.5); }

.pill{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 12px;
  color: var(--muted);
}
.pill.danger{ border-color: rgba(255,107,107,0.5); color: rgba(255,107,107,0.9); }

.linkcard{
  display:flex;
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #0f1118;
}
.linkcard:hover{ border-color: rgba(122,162,247,0.5); text-decoration:none; }
.linkcard-body{ padding: 12px; flex: 1; min-width: 0; }
.linkcard-title{ font-weight: 900; margin-bottom: 6px; color: var(--text); overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard-desc{ color: var(--muted); font-size: 13px; line-height: 1.35; max-height: 2.7em; overflow:hidden; }
.linkcard-meta{ margin-top: 10px; }
.linkcard-image{ width: 160px; background: #0b0c10; display:flex; align-items:center; justify-content:center; }
.linkcard-image img{ width: 100%; height: 100%; object-fit: cover; display:block; }
.linkcard-image.placeholder{ color: var(--muted); font-size: 34px; }

.profile-head{ display:flex; justify-content: space-between; align-items: center; gap: 12px; }
.profile-name{ font-size: 18px; font-weight: 900; }
.profile-actions{ display:flex; gap: 10px; flex-wrap: wrap; }

.person-row{ display:flex; justify-content: space-between; align-items: center; gap: 12px; }
.person-row .actions{ display:flex; gap: 10px; }

.table{ width:100%; border-collapse: collapse; }
.table th, .table td{ text-align:left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.table code{ color: var(--text); }

.footer{ padding-top: 24px; padding-bottom: 34px; }
