:root {
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #ffffff;
  --panel: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 10px 30px rgba(79, 70, 229, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.1);
  --radius: 16px;
  --grad: linear-gradient(90deg, #4f46e5 0%, #3b82f6 55%, #22d3ee 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand__logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: #eef2ff;
}
.brand__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav__link {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.nav__link:hover {
  color: var(--ink);
}
.nav__button {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, color 0.15s, transform 0.05s;
}
.nav__button:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 46%, #ecfeff 100%);
  padding: 84px 24px 72px;
}
.hero__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hero__title {
  font-size: 60px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero__accent {
  display: block;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 36px;
}

/* Scan form */
.scan-form {
  display: flex;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.scan-form__input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 16px;
  font-size: 17px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.scan-form__input::placeholder {
  color: var(--muted-light);
}
.scan-form__button {
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.32);
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}
.scan-form__button:hover {
  background: var(--indigo-dark);
}
.scan-form__button:active {
  transform: translateY(1px);
}
.scan-form__button:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Examples */
.examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.examples__label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.chip {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 20px;
  padding: 7px 15px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, color 0.15s;
}
.chip:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}
.hero__note {
  margin: 26px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Results */
.results {
  max-width: 720px;
  margin: -28px auto 0;
  padding: 0 24px;
}
.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 44px 36px;
  text-align: center;
  animation: rise 0.25s ease;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.result-card__eyebrow {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 6px;
}
.result-card__eyebrow strong {
  color: var(--ink);
  font-weight: 700;
}
.theme-name {
  display: inline-block;
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin: 6px 0 6px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.15s;
}
.theme-name:hover {
  opacity: 0.82;
}
.theme-name__hint {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 700;
  margin: 6px 4px;
}
.badge--official {
  background: #eef2ff;
  color: var(--indigo-dark);
}
.badge--custom {
  background: #fff7ed;
  color: #c2570c;
}
.renamed-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  display: inline-block;
  margin: 14px 0;
}
.renamed-note code {
  background: #eef2ff;
  color: var(--indigo-dark);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace;
  font-size: 13px;
}
.get-theme {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--indigo);
  color: #fff;
  text-decoration: none;
  padding: 15px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 4px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32);
  transition: background 0.15s, transform 0.05s;
}
.get-theme:hover {
  background: var(--indigo-dark);
}
.get-theme:active {
  transform: translateY(1px);
}
.meta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.meta-pill {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 9px 18px;
  font-size: 14px;
  color: var(--muted);
}
.meta-pill strong {
  color: var(--indigo-dark);
  font-weight: 700;
}
.other-sites {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.other-sites__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.other-sites__list {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.site-chip {
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.site-chip:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.result-error {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.result-error h3 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}

/* Loading */
.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* How it works */
.steps {
  max-width: 1000px;
  margin: 0 auto;
  padding: 88px 24px 96px;
}
.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step {
  text-align: center;
}
.step__num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.3);
}
.step__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}
.step__text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 260px;
}

/* Footer */
.footer {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  padding: 32px 24px 40px;
}
.footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.footer__links a:hover {
  color: var(--ink);
}
.footer__note {
  max-width: 1160px;
  margin: 20px auto 0;
  text-align: center;
  color: var(--muted-light);
  font-size: 13.5px;
}

/* Responsive */
@media (max-width: 820px) {
  .hero {
    padding: 56px 20px 52px;
  }
  .hero__title {
    font-size: 40px;
  }
  .hero__subtitle {
    font-size: 18px;
  }
  .scan-form {
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 12px;
  }
  .scan-form__input {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
  }
  .scan-form__button {
    justify-content: center;
    padding: 16px;
  }
  .steps {
    padding: 56px 24px 64px;
  }
  .steps__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .theme-name {
    font-size: 40px;
  }
  .nav__link {
    display: none;
  }
}
