:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #162033;
  --muted: #5d697c;
  --line: #dbe2ee;
  --primary: #fe2c55;
  --secondary: #25f4ee;
  --dark: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(12px);
}

.header-row,
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

.hero {
  padding: 80px 0 64px;
}

.hero-grid,
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2 {
  line-height: 1.08;
  margin: 0 0 18px;
}

h1 {
  font-size: clamp(38px, 6vw, 68px);
}

h2 {
  font-size: 28px;
}

.lead {
  color: var(--muted);
  font-size: 20px;
  max-width: 680px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 800;
}

.button.secondary {
  background: var(--dark);
}

.status-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(22, 32, 51, 0.09);
}

.status-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.status-item:last-child {
  border-bottom: 0;
}

.status-item span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 900;
}

.status-item p {
  margin: 0;
  color: var(--muted);
}

.section {
  padding: 56px 0;
}

.section.muted {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section p,
.legal p {
  color: var(--muted);
}

.legal {
  max-width: 860px;
  padding: 56px 0 72px;
}

.legal h1 {
  font-size: 48px;
}

.legal h2 {
  margin-top: 32px;
}

.updated {
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}

.callback {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.callback-card {
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 18px 50px rgba(22, 32, 51, 0.09);
}

.oauth-form {
  display: grid;
  gap: 18px;
  margin: 28px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.oauth-form label,
.oauth-form legend {
  color: var(--ink);
  font-weight: 800;
}

.oauth-form input[type="text"],
.oauth-form input[type="url"] {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.oauth-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650 !important;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.form-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.oauth-preview {
  margin-top: 24px;
}

.state-result {
  font-weight: 800;
}

.demo-shell {
  padding: 54px 0 74px;
}

.demo-head {
  margin-bottom: 28px;
}

.demo-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 18px;
}

.demo-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 34px rgba(22, 32, 51, 0.07);
}

.demo-steps {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  color: var(--muted);
  font-weight: 750;
}

.demo-steps li {
  padding: 8px 0;
}

.demo-steps li.active {
  color: var(--primary);
}

.demo-steps li.done {
  color: #148f68;
}

.main-demo {
  display: grid;
  gap: 18px;
}

.demo-status,
.source-form,
.progress-area,
.publish-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fbfcff;
}

.demo-status {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: center;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.source-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.source-form label {
  font-weight: 800;
}

.source-form input,
.publish-card textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
}

.progress-area {
  display: grid;
  gap: 12px;
}

.progress-row {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.progress-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef7;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  align-items: start;
}

.phone-preview {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 10px solid #111827;
  border-radius: 24px;
  background: #101827;
  color: white;
  box-shadow: 0 18px 50px rgba(22, 32, 51, 0.18);
}

.preview-top,
.preview-bottom {
  display: grid;
  place-items: center;
  height: 28%;
  padding: 14px;
  text-align: center;
  background:
    radial-gradient(circle at 30% 40%, rgba(254, 44, 85, 0.4), transparent 32%),
    linear-gradient(135deg, #1e293b, #020617);
}

.preview-title {
  font-weight: 950;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.02;
  text-shadow:
    3px 3px 0 #000,
    -3px 3px 0 #000,
    3px -3px 0 #000,
    -3px -3px 0 #000;
}

.preview-video {
  position: relative;
  height: 44%;
  overflow: hidden;
  background: #79b9ff;
}

.block-sky {
  position: absolute;
  inset: 0 0 45%;
  background: linear-gradient(#77b7ff, #bfe4ff);
}

.block-ground {
  position: absolute;
  inset: 45% 0 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 25%, transparent 25%) 0 0 / 34px 34px,
    linear-gradient(#4caf50, #7a5638);
}

.block-character {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 62px;
  height: 112px;
  transform: translateX(-50%);
  background:
    linear-gradient(#00d3ff 0 22%, #00a6d6 22% 42%, #25f4ee 42% 75%, #0f9eb8 75%);
  border: 4px solid rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
}

.preview-bottom span {
  font-weight: 900;
  text-shadow: 3px 3px 0 #000;
}

.preview-bottom strong {
  display: block;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  text-shadow:
    4px 4px 0 #000,
    -4px 4px 0 #000,
    4px -4px 0 #000,
    -4px -4px 0 #000;
}

.publish-card {
  display: grid;
  gap: 12px;
}

@media (max-width: 900px) {
  .demo-grid,
  .result-grid,
  .source-form {
    grid-template-columns: 1fr;
  }
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0f172a;
  color: #dbeafe;
  padding: 16px;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .header-row,
  .footer-row {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .hero {
    padding-top: 48px;
  }
}
