:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --border: #2a2e38;
  --text: #e8eaed;
  --muted: #9aa0ab;
  --accent: #4f8cff;
  --accent-hover: #3d78f0;
  --ok: #34c77b;
  --warn: #f0b13d;
  --err: #f05d5e;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.logo { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.logo:hover { text-decoration: none; }
.header nav a { margin-left: 16px; color: var(--muted); }
.header nav a:hover { color: var(--text); }

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  flex: 1;
}

.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.2; margin-bottom: 16px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 540px; margin: 0 auto 24px; }
.muted { color: var(--muted); }
.error { color: var(--err); margin-bottom: 12px; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn-sm { padding: 6px 10px; font-size: 0.9rem; }

section { margin-bottom: 40px; }
h2 { margin-bottom: 20px; font-size: 1.5rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-accent { border-color: var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p, .card li { color: var(--muted); font-size: 0.95rem; }
.card-icon { font-size: 1.8rem; margin-bottom: 12px; }
.card ul { list-style: none; margin: 12px 0 20px; }
.card li { padding: 4px 0; }
.card li::before { content: "✓ "; color: var(--ok); }
.price { font-size: 1.8rem; font-weight: 700; margin-top: 8px; }
.price .muted { font-size: 1rem; font-weight: 400; }

.watch-list, .event-list { display: flex; flex-direction: column; gap: 10px; }
.watch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.watch-item.status-paused { opacity: 0.6; }
.watch-item.status-error { border-color: var(--err); }
.watch-info { min-width: 0; overflow-wrap: anywhere; }
.watch-actions { display: flex; gap: 8px; flex-shrink: 0; }
.event-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.95rem;
}

.login-widget { margin: 16px 0 24px; min-height: 40px; }

.event-item ul { margin: 8px 0 4px 18px; }
.diff {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

.admin-form { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-form input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .watch-item { flex-direction: column; align-items: stretch; }
  .watch-actions { justify-content: flex-end; }
}

/* Юридические страницы (оферта, политика) */
.doc { max-width: 760px; }
.doc h2 { margin-top: 1.6rem; font-size: 1.15rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }
.footer a { margin: 0 0.2rem; }
