:root {
  --bg: #0f1117;
  --surface: #1a1f2e;
  --border: #2a3348;
  --text: #e8ecf4;
  --muted: #9aa8c7;
  --accent: #5b8cff;
  --accent-hover: #7aa0ff;
  --success: #3dd68c;
  --error: #ff6b7a;
  --radius: 12px;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 23, 0.9);
}

.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); }

.site-header nav { display: flex; gap: 1rem; align-items: center; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }

.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 1.5rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.features article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.auth-card { max-width: 420px; margin: 2rem auto; }

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

input, textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #12151f;
  color: var(--text);
  font: inherit;
}

textarea { resize: vertical; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-left: 0.5rem;
}

.btn-small { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

.row { display: flex; gap: 0.5rem; }
.row input { flex: 1; }

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .dashboard-grid { grid-template-columns: 1fr 1.4fr; }
}

.platform-list { list-style: none; padding: 0; margin: 0; }
.platform-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #2a3348;
  color: var(--muted);
}

.badge-ok { background: rgba(61, 214, 140, 0.15); color: var(--success); }

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-success { background: rgba(61, 214, 140, 0.12); color: var(--success); }
.alert-error { background: rgba(255, 107, 122, 0.12); color: var(--error); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.link-preview {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #12151f;
}

.link-preview img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
}

.hidden { display: none !important; }

.post-results { margin-top: 1rem; }
.post-results li { margin: 0.35rem 0; }

.post-history { list-style: none; padding: 0; }
.post-history li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
