:root {
  --bg: #14141f;
  --bg-card: #1c1c2a;
  --bg-panel: #232334;
  --text: #dee8ff;
  --text-muted: #8b96b8;
  --accent: #6490fa;
  --accent-soft: #d6e2ff;
  --primary: #6d45de;
  --primary-hover: #5834c4;
  --ok: #22c55e;
  --ok-bg: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --err: #ef4444;
  --err-bg: rgba(239, 68, 68, 0.12);
  --border: rgba(100, 144, 250, 0.18);
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 120% at 50% -40%, rgba(100, 144, 250, 0.16), transparent 60%),
    rgba(20, 20, 31, 0.94);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header__wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 28px 0 18px;
}

.header__brand {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: translateY(-1px);
}

.logo__mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
}

.logo__mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(109, 69, 222, 0.45) 0%, rgba(100, 144, 250, 0.08) 55%, transparent 72%);
  filter: blur(6px);
}

.logo__mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(100, 144, 250, 0.22);
  pointer-events: none;
}

.logo__icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 10px 24px rgba(109, 69, 222, 0.35));
}

.logo__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.logo__name {
  font-weight: 700;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  background: linear-gradient(135deg, #6490fa 0%, #dee8ff 42%, #6d45de 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo__tagline {
  font-weight: 400;
  font-size: 13px;
  line-height: 1;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-indent: 0.22em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid rgba(100, 144, 250, 0.12);
}

.nav__link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover,
.nav__link.is-active {
  color: #fff;
  background: rgba(109, 69, 222, 0.18);
}

.main {
  padding: 36px 0 72px;
}

.ua-note,
.request-info {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.request-info {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(100, 144, 250, 0.05);
}

.request-info__row {
  margin: 0;
}

.ua-note code,
.request-info code {
  color: var(--accent-soft);
  font-size: 12px;
  word-break: break-all;
}

.tool__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  color: var(--accent);
}

.tool__lead {
  margin: 0 0 28px;
  max-width: 760px;
  color: var(--accent-soft);
  font-weight: 300;
}

.tool__note {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-soft);
}

.field__textarea,
.field__input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: #14141f;
  border-radius: var(--radius);
  padding: 14px 16px;
  font: inherit;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.field__textarea {
  min-height: 180px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.field__textarea:focus,
.field__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(100, 144, 250, 0.25);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  border: none;
  border-radius: 9px;
  padding: 14px 28px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

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

.btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-soft);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.tool__results {
  margin-top: 36px;
}

.tool__results.is-hidden {
  display: none;
}

.results__title,
.panel__title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-soft);
}

.panel__title--ok {
  color: var(--ok);
}

.panel__title--warn {
  color: var(--warn);
}

.panel__title--err {
  color: var(--err);
}

.schema-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.schema-list__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.status-icon--ok {
  background: var(--ok);
}

.status-icon--missing {
  background: var(--err);
}

.status-icon--warning {
  background: var(--warn);
}

.schema-list__label {
  font-weight: 600;
}

.schema-list__pages {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.notice {
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  border: 1px solid rgba(100, 144, 250, 0.35);
  background: rgba(100, 144, 250, 0.1);
}

.notice--info {
  border-color: rgba(100, 144, 250, 0.35);
  background: rgba(100, 144, 250, 0.1);
}

.notice__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-soft);
}

.notice__text {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
}

.notice__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.notice__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}

.notice__item strong {
  color: #fff;
}

.notice__meta {
  color: var(--text-muted);
  font-size: 13px;
}

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

.report__empty {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--ok-bg);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.report__item {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.report__item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.report__type {
  font-weight: 700;
  color: var(--warn);
}

.report__format {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.report__url {
  color: var(--accent);
  word-break: break-all;
  font-size: 14px;
}

.report__message {
  margin: 0;
  color: var(--text);
}

.report__block {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-soft);
}

.report__hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.report__hint strong {
  color: var(--accent);
  font-weight: 600;
}

.report__snippet {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #0f0f18;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #dbeafe;
  white-space: pre-wrap;
  word-break: break-word;
}

.response-head {
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--accent-soft);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.metric {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.metric:not(:last-child) {
  border-right: 1px solid var(--border);
}

.metric__label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric__value {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__head .panel__title {
  margin: 0;
}

.panel__meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.code-block {
  margin: 0;
  padding: 16px;
  background: #0f0f18;
  border-radius: 8px;
  overflow: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #dbeafe;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block .hl {
  background: rgba(34, 197, 94, 0.28);
  display: inline-block;
  width: 100%;
}

.seo-grid {
  display: grid;
  gap: 14px;
}

.seo-row {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.seo-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.seo-row__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.seo-row__value {
  color: var(--text);
  word-break: break-word;
}

.seo-row__value.is-missing {
  color: var(--warn);
  font-style: italic;
}

.seo-row__meta {
  margin-top: 4px;
  font-size: 12px;
}

.seo-row__meta--ok {
  color: var(--ok);
}

.seo-row__meta--warn {
  color: var(--warn);
}

.seo-row__meta--bad {
  color: var(--err);
}

.seo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.seo-stat {
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(100, 144, 250, 0.08);
  border: 1px solid var(--border);
  text-align: center;
}

.seo-stat strong {
  display: block;
  font-size: 18px;
  color: var(--accent);
}

.seo-stat span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.seo-files {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  font-size: 14px;
}

.seo-files a {
  color: var(--accent);
}

.seo-files .is-bad {
  color: var(--err);
}

.panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.verdict {
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid;
}

.verdict--excellent {
  background: var(--ok-bg);
  border-color: rgba(34, 197, 94, 0.45);
}

.verdict--warning {
  background: var(--warn-bg);
  border-color: rgba(245, 158, 11, 0.45);
}

.verdict--error,
.verdict--no_last_modified {
  background: var(--err-bg);
  border-color: rgba(239, 68, 68, 0.45);
}

.verdict__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.verdict--excellent .verdict__title {
  color: var(--ok);
}

.verdict--warning .verdict__title {
  color: var(--warn);
}

.verdict--error .verdict__title,
.verdict--no_last_modified .verdict__title {
  color: var(--err);
}

.verdict__text {
  margin: 0;
  color: var(--text);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  background: #101018;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 100;
}

.toast.is-hidden {
  display: none;
}

.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .panels-grid {
    grid-template-columns: 1fr;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .schema-list__pages {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }

  .schema-list__item {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .header__wrap {
    padding: 22px 0 14px;
  }

  .header__brand {
    margin-bottom: 18px;
  }

  .logo__mark {
    width: 64px;
    height: 64px;
  }

  .logo__icon {
    width: 48px;
    height: 48px;
  }

  .logo__name {
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .logo__tagline {
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    font-size: 11px;
  }

  .nav {
    padding-top: 14px;
  }

  .nav__link {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 10px;
    font-size: 11px;
  }
}
