:root {
  --bg: #f2f4f8;
  --card: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --accent: #d97706;
  --accent-2: #0891b2;
  --line: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, #fde68a 0%, transparent 35%),
    radial-gradient(circle at 90% -20%, #a5f3fc 0%, transparent 30%),
    var(--bg);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #0e7490;
  outline-offset: 3px;
}

.telegram-cta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #229ed9;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.telegram-cta:hover,
.telegram-cta:focus-visible {
  background: #168ac0;
  color: #fff;
}

.article-telegram-cta {
  margin: 2rem 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.article-telegram-cta::before {
  content: "Короткая подборка главных игровых новостей без обязательной регистрации";
  display: block;
  margin-bottom: .75rem;
  color: var(--muted);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.header {
  padding: 24px 0 18px;
}

.title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 18px;
}

.toolbar input,
.toolbar select,
.toolbar button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.toolbar button {
  cursor: pointer;
}

.toolbar button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #fff;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.2;
}

.pipeline-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card p {
  margin: 0;
  line-height: 1.55;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 26px;
  align-items: center;
  flex-wrap: wrap;
}

.pager-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.breadcrumbs {
  margin: 0 0 16px;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 8px;
  color: #94a3b8;
}

.breadcrumbs li:last-child::after {
  content: "";
  margin: 0;
}

.category-links {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 4px 0 14px;
}

.category-links h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.category-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 7px 11px;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 13px;
}

.category-chip span {
  color: var(--muted);
}

.category-chip-active {
  background: #ffedd5;
  border-color: #fdba74;
}

.internal-link-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.internal-link-list li {
  line-height: 1.5;
}

.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(16px, 2.4vw, 28px);
  margin-bottom: 26px;
}

.article h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.article p {
  line-height: 1.65;
  margin: 0 0 12px;
}

.article img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin: 28px 0;
  padding: 22px 0;
  line-height: 1.55;
}

.ad-slot {
  border: 1px dashed #f59e0b;
  background: #fff8eb;
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
}

.ad-slot-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 10px;
}

.ad-slot-body {
  overflow-x: auto;
}

.ad-placeholder {
  border: 1px dashed #fdba74;
  border-radius: 10px;
  background: #fff;
  color: #7c2d12;
  padding: 12px;
  font-size: 13px;
}

.ad-editor {
  display: grid;
  gap: 12px;
}

.ad-editor-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.ad-editor-item h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.ad-editor-item textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: 13px/1.45 Consolas, "Courier New", monospace;
  background: #fff;
  color: var(--ink);
}

.status-pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-right: 6px;
}

.status-ok {
  background: #dcfce7;
}

.status-bad {
  background: #fee2e2;
}

.status-not_found {
  background: #fef3c7;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  letter-spacing: 0.2px;
}

.mode-idle {
  background: #e2e8f0;
  color: #334155;
}

.mode-once {
  background: #ffedd5;
  color: #9a3412;
}

.mode-loop {
  background: #dcfce7;
  color: #166534;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 12px;
  vertical-align: top;
}

th {
  font-size: 13px;
  color: var(--muted);
  background: #f8fafc;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 8px;
}

.actions button {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.danger {
  color: #fff;
  background: #dc2626;
  border: none;
}

.success {
  color: #fff;
  background: #16a34a;
  border: none;
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 24px, 1100px);
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar input,
  .toolbar select,
  .toolbar button {
    width: 100%;
  }

  .card,
  .article {
    overflow-wrap: anywhere;
  }
}
