:root {
  --lg-bg: #0d0f14;
  --lg-cyan: #4be6ff;
  --lg-cyan-soft: rgba(75, 230, 255, 0.16);
  --lg-violet: #9a6bff;
  --lg-violet-soft: rgba(154, 107, 255, 0.16);
  --lg-glass: rgba(255, 255, 255, 0.03);
  --lg-glass-strong: rgba(255, 255, 255, 0.07);
  --lg-border: rgba(255, 255, 255, 0.08);
  --lg-border-strong: rgba(255, 255, 255, 0.16);
  --lg-text: #f3f7fb;
  --lg-muted: #93a1b3;
  --lg-muted-dim: #66727f;
  --lg-radius: 18px;
  --lg-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--lg-bg);
}

html, body.landing-page {
  overflow-x: hidden;
  overflow-y: auto !important;
  min-height: 100vh;
  height: auto;
}

body.landing-page {
  margin: 0;
  position: relative;
  background: var(--lg-bg);
  color: var(--lg-text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-user-select: text;
  user-select: text;
  isolation: isolate;
}

.ambient-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  pointer-events: none;
}

.glow-cyan {
  top: -12%;
  left: -8%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, var(--lg-cyan) 0%, transparent 70%);
}

.glow-violet {
  bottom: -18%;
  right: -10%;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, var(--lg-violet) 0%, transparent 70%);
}

body.landing-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}

.section-kicker,
.api-badge,
.live-status,
.endpoint-label,
.url-examples span,
.url-preview {
  font-family: 'DM Mono', monospace;
}

.landing-header,
.landing-main,
.landing-footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.glass-card {
  position: relative;
  background: var(--lg-glass);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  padding: 32px clamp(20px, 4vw, 40px) 36px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s var(--lg-ease), box-shadow 0.3s var(--lg-ease);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-card:hover {
  border-color: var(--lg-border-strong);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 14px 22px;
  background: var(--lg-glass-strong);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--lg-border);
  border-radius: 999px;
  position: sticky;
  top: 16px;
  z-index: 40;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--lg-text);
  text-decoration: none;
  font-size: 1.02rem;
  letter-spacing: 0.1px;
}

.brand-mark strong {
  color: var(--lg-cyan);
  font-weight: 500;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--lg-cyan-soft), var(--lg-violet-soft));
  border: 1px solid var(--lg-border-strong);
  color: var(--lg-cyan);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(75, 230, 255, 0.18);
}

.api-badge {
  color: var(--lg-cyan);
  background: var(--lg-cyan-soft);
  border: 1px solid rgba(75, 230, 255, 0.35);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.landing-main {
  padding: 84px 0 70px;
}

.landing-intro {
  max-width: 680px;
  margin-bottom: 64px;
}

.section-kicker {
  color: var(--lg-cyan);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
}

.landing-intro h1 {
  margin: 18px 0 20px;
  font-size: clamp(2.8rem, 6.6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 600;
}

.landing-intro h1 span {
  background: linear-gradient(120deg, var(--lg-cyan), var(--lg-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(75, 230, 255, 0.18));
}

.intro-copy {
  max-width: 540px;
  color: var(--lg-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.tester-section,
.demo-section,
.docs-section {
  margin-bottom: 34px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-top: 7px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.endpoint-label {
  color: var(--lg-muted);
  font-size: 0.72rem;
}

.tester-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
}

.tester-form > label {
  flex: 1 1 160px;
  display: grid;
  gap: 8px;
  color: var(--lg-muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.tester-form > .primary-button {
  flex: 1 1 100%;
}

.series-fields {
  flex: 1 1 100%;
  display: flex;
  gap: 14px;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.4s var(--lg-ease), opacity 0.3s ease, transform 0.35s var(--lg-ease);
}

.series-fields .series-field {
  flex: 1 1 140px;
  display: grid;
  gap: 8px;
  color: var(--lg-muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.series-fields.is-visible {
  max-height: 110px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.series-fields .series-field input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tester-form input,
.tester-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--lg-border-strong);
  outline: 0;
  border-radius: var(--lg-radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--lg-text);
  font: inherit;
  font-size: 0.9rem;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tester-form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%234be6ff' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 10px;
  padding-right: 36px;
}

.tester-form input:hover,
.tester-form select:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.tester-form input:focus,
.tester-form select:focus {
  border-color: var(--lg-cyan);
  box-shadow: 0 0 0 4px var(--lg-cyan-soft);
}

.primary-button,
.copy-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--lg-radius);
  padding: 0 22px;
  font: 600 0.82rem 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: transform 0.25s var(--lg-ease), box-shadow 0.25s var(--lg-ease), background 0.25s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--lg-cyan), var(--lg-violet));
  color: #051019;
  box-shadow: 0 8px 24px rgba(75, 230, 255, 0.18);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 12px 32px rgba(75, 230, 255, 0.3);
}

.primary-button:active {
  transform: translateY(0) scale(0.98);
}

.primary-button span {
  margin-left: 7px;
  font-size: 1rem;
}

.url-preview {
  margin-top: 20px;
  color: var(--lg-muted-dim);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lg-border);
  border-radius: 999px;
  padding: 10px 18px;
  display: inline-block;
}

.live-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.live-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.live-status.is-waiting {
  color: #ffc978;
  background: rgba(255, 201, 120, 0.1);
  border: 1px solid rgba(255, 201, 120, 0.28);
}

.live-status.is-waiting i {
  background: #ffc978;
  box-shadow: 0 0 10px rgba(255, 201, 120, 0.6);
}

.live-status.is-ready {
  color: #82f5b6;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.live-status.is-ready i {
  background: #82f5b6;
  box-shadow: 0 0 10px #82f5b6;
}

.demo-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--lg-radius);
  border: 1px solid var(--lg-border-strong);
  background: #05070a;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(75, 230, 255, 0.08);
}

.demo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.6s var(--lg-ease);
}

.demo-frame iframe.is-active {
  opacity: 1;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 22%, rgba(75, 230, 255, 0.14), transparent 55%),
    radial-gradient(circle at 76% 82%, rgba(154, 107, 255, 0.16), transparent 55%),
    rgba(6, 8, 12, 0.6);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  transition: opacity 0.55s var(--lg-ease), transform 0.55s var(--lg-ease), visibility 0.55s;
}

.preview-overlay.is-hidden {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  visibility: hidden;
}

.preview-play-glass {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid var(--lg-border-strong);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: grid;
  place-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  cursor: not-allowed;
  opacity: 0.7;
}

.preview-play-glass svg {
  width: 32px;
  height: 32px;
  fill: var(--lg-muted);
  margin-left: 4px;
}

.preview-label {
  color: var(--lg-muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  font-family: 'DM Mono', monospace;
  max-width: 280px;
}

.code-shell {
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.code-shell textarea {
  display: block;
  width: 100%;
  min-height: 108px;
  padding: 22px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: #a6f2ff;
  font: 0.82rem/1.8 'DM Mono', monospace;
}

.copy-button {
  background: var(--lg-glass-strong);
  color: var(--lg-cyan);
  border: 1px solid var(--lg-border-strong);
  font-size: 0.75rem;
}

.copy-button:hover {
  transform: translateY(-2px);
  background: var(--lg-cyan-soft);
  box-shadow: 0 8px 22px rgba(75, 230, 255, 0.14);
}

.copy-button.is-copied {
  color: #82f5b6;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
}

.url-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.url-examples div {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--lg-radius);
  border: 1px solid var(--lg-border);
  border-left: 2px solid var(--lg-violet);
  background: rgba(255, 255, 255, 0.03);
}

.url-examples span {
  color: var(--lg-muted-dim);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.url-examples code {
  color: #dbe8f2;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.landing-footer {
  padding: 26px 0 40px;
  color: var(--lg-muted-dim);
  font-size: 0.75rem;
  text-align: center;
}

.landing-footer span {
  padding: 0 7px;
  color: var(--lg-cyan);
}

@media (max-width: 760px) {
  .landing-header, .landing-main, .landing-footer { width: min(100% - 26px, 600px); }
  .landing-main { padding-top: 56px; }
  .landing-intro { margin-bottom: 48px; }
  .glass-card { padding: 26px 20px 30px; border-radius: 16px; }
  .url-examples { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .landing-header { padding: 12px 16px; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .landing-intro h1 { font-size: 3rem; }
  .series-fields { flex-wrap: wrap; }
  .preview-play-glass { width: 74px; height: 74px; }
  .preview-play-glass svg { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .glass-card, .primary-button, .copy-button, .series-fields, .preview-overlay, .demo-frame iframe {
    transition: none;
  }
}