@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/*
 * Оформление сайта повторяет попап расширения: те же переменные, что в
 * src/popup/styles/popup.css. Правите там — переносите сюда, иначе сайт
 * и расширение разъедутся.
 */

:root {
  --background: #191c22;
  --surface: #2a2e35;
  --surface-high: #353941;
  --surface-higher: #40444c;
  --text: #dfe2e9;
  --text-muted: #9da3af;
  --accent: #3879f4;
  --accent-bg: rgba(56, 121, 244, 0.15);
  --accent-contrast: #ffffff;
  --green: #34c759;
  --hairline: rgba(255, 255, 255, 0.07);
  --inner-border: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.24);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --page-width: 880px;
}

/* Светлая тема расширения — включается по настройке системы */
@media (prefers-color-scheme: light) {
  :root {
    --background: #e0e7f5;
    --surface: #f8f9fc;
    --surface-high: #cdd7ef;
    --surface-higher: #d1d6e1;
    --text: #343b4c;
    --text-muted: #5c6370;
    --accent: #3879f4;
    --accent-bg: rgba(56, 121, 244, 0.12);
    --green: #2caa4c;
    --hairline: rgba(0, 0, 0, 0.08);
    --inner-border: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  min-height: 100vh;
  padding: 20px 16px 48px;
  -webkit-font-smoothing: antialiased;
}

/* ── Шапка: слева логотип, справа языки — как в расширении ────────── */

.topbar {
  max-width: var(--page-width);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.language-switcher {
  display: flex;
  gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-pill);
  box-shadow: var(--inner-border);
}

.language-switcher button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.language-switcher button:hover {
  color: var(--text);
}

.language-switcher button.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ── Разделы сайта: та же полоска вкладок, что во «Вкладках» попапа ─ */

.tabs {
  max-width: var(--page-width);
  margin: 0 auto 16px;
  display: flex;
  gap: 4px;
  background: var(--surface);
  padding: 5px;
  border-radius: var(--radius-pill);
  box-shadow: var(--inner-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  flex: 1 0 auto;
  text-align: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.tabs a:hover {
  color: var(--text);
}

.tabs a[aria-current='page'] {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ── Карточка страницы ────────────────────────────────────────────── */

.container {
  max-width: var(--page-width);
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--inner-border);
  padding: 32px;
  overflow: hidden;
}

h1 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

p {
  margin-bottom: 12px;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  margin: 0 0 12px 22px;
}

li {
  margin-bottom: 6px;
}

li > ul {
  margin-top: 6px;
}

strong {
  font-weight: 600;
  color: var(--text);
}

code {
  background: var(--surface-high);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.9em;
}

.last-updated,
.intro {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ── Главная ──────────────────────────────────────────────────────── */

.header {
  text-align: center;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
}

.header p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 14px;
}

/* Селектор с тегом — иначе цвет перебивает более специфичное `.header p` */
p.version-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 auto;
}

.version-line a {
  color: inherit;
  text-decoration: underline;
}

.section {
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.section:last-of-type {
  border-bottom: 0;
}

.section h2 {
  margin-top: 0;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.feature-card {
  background: var(--surface-high);
  border-radius: var(--radius-md);
  padding: 18px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.cta {
  text-align: center;
  padding: 28px 0 8px;
}

.cta a {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  transition: opacity 0.2s;
}

.cta a:hover {
  opacity: 0.88;
  text-decoration: none;
}

/* ── Политика и условия ───────────────────────────────────────────── */

.contact {
  background: var(--surface-high);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 28px;
}

.contact p:last-child {
  margin-bottom: 0;
}

/* ── История изменений ────────────────────────────────────────────── */

.changelog-version {
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.changelog-version:first-of-type {
  padding-top: 0;
}

.changelog-version:last-of-type {
  border-bottom: 0;
}

.changelog-version h2 {
  margin-top: 0;
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-size: 15px;
}

.changelog-version h3 {
  color: var(--text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Подвал ───────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}

.footer a {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

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

@media (max-width: 600px) {
  body {
    padding: 16px 12px 40px;
  }

  .container {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 18px;
  }

  .tabs a {
    flex: 0 0 auto;
    padding: 8px 14px;
  }
}
