:root {
  --bg: #090b0f;
  --bg-soft: #11151c;
  --panel: rgba(12, 16, 22, 0.82);
  --panel-strong: rgba(18, 23, 31, 0.94);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f4efe6;
  --muted: #a8b3c2;
  --accent: #ff8a3d;
  --accent-strong: #ff6122;
  --signal: #8ef9a4;
  --signal-soft: rgba(142, 249, 164, 0.14);
  --cyan: #74d8ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 97, 34, 0.2), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(116, 216, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #090b0f 0%, #0d1117 38%, #0a0d12 100%);
}

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.7;
}

.glow-a {
  top: -120px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: rgba(255, 97, 34, 0.14);
}

.glow-b {
  right: -120px;
  bottom: -40px;
  width: 360px;
  height: 360px;
  background: rgba(116, 216, 255, 0.12);
}

.mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%), var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-hero {
  padding: 28px;
  display: grid;
  gap: 28px;
  min-height: calc(100vh - 80px);
}

.hero-topline,
.console-head,
.status-head,
.status-tools,
.hero-strip,
.actions,
.console-badges {
  display: flex;
  align-items: center;
}

.hero-topline,
.status-head {
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.hero-label,
.console-kicker,
.fact-kicker,
.status-kicker {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow,
.console-kicker,
.status-kicker {
  color: var(--accent);
}

.hero-tag,
.console-badge,
.status-indicator {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  line-height: 1;
}

.hero-tag {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-label {
  color: var(--cyan);
}

.panel-hero h1,
.console-head h2,
.status-head h3 {
  margin: 0;
}

.panel-hero h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(3.3rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 640px;
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.9;
  color: var(--muted);
}

.hero-orbit {
  position: relative;
  min-height: 290px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 97, 34, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(116, 216, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-orbit::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 95%);
}

.hero-orbit::after {
  background: radial-gradient(circle at center, transparent 36%, rgba(9, 11, 15, 0.8) 100%);
}

.orbit-ring,
.orbit-core,
.orbit-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-ring {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
}

.orbit-ring-lg {
  width: 248px;
  height: 248px;
}

.orbit-ring-md {
  width: 168px;
  height: 168px;
}

.orbit-ring-sm {
  width: 96px;
  height: 96px;
}

.orbit-core {
  z-index: 1;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff9d5a, #ff6122 68%, #b53d15);
  box-shadow:
    0 0 0 12px rgba(255, 97, 34, 0.08),
    0 26px 50px rgba(255, 97, 34, 0.24);
}

.orbit-core-label,
.orbit-core-meta,
.fact-card strong,
.signal-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.orbit-core-label {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.orbit-core-meta {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.88;
}

.orbit-node {
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 10px rgba(142, 249, 164, 0.12);
}

.orbit-node-a {
  margin-left: 122px;
  margin-top: -78px;
}

.orbit-node-b {
  margin-left: -118px;
  margin-top: -24px;
}

.orbit-node-c {
  margin-left: 44px;
  margin-top: 115px;
}

.hero-facts,
.signal-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact-card,
.signal-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.fact-card strong,
.signal-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.02rem;
}

.fact-card p,
.signal-card span,
.signal-card strong {
  margin: 0;
}

.fact-card p,
.signal-card span {
  color: var(--muted);
  line-height: 1.7;
}

.hero-strip {
  flex-wrap: wrap;
  gap: 10px;
}

.hero-strip span {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.panel-console {
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%), var(--panel-strong);
}

.console-head {
  justify-content: space-between;
  gap: 18px;
}

.console-head h2 {
  margin-top: 8px;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
}

.console-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.console-badge {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

#wake-form {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: span 2;
}

.field span {
  font-weight: 700;
  font-size: 0.94rem;
}

.field small {
  color: var(--muted);
  line-height: 1.5;
}

.field input {
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  font: inherit;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.field input::placeholder {
  color: rgba(244, 239, 230, 0.38);
}

.field input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(255, 138, 61, 0.8);
  box-shadow:
    0 0 0 4px rgba(255, 138, 61, 0.12),
    0 18px 32px rgba(0, 0, 0, 0.22);
}

.actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.link-button {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.button {
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 32px rgba(255, 97, 34, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px rgba(255, 97, 34, 0.28);
}

.button:disabled {
  opacity: 0.64;
  cursor: wait;
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signal-card {
  min-height: 112px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(116, 216, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.025);
}

.status-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    rgba(6, 9, 13, 0.82);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.status-card.is-busy {
  border-color: rgba(116, 216, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(116, 216, 255, 0.1);
}

.status-card.is-success {
  border-color: rgba(142, 249, 164, 0.3);
  box-shadow: 0 0 0 1px rgba(142, 249, 164, 0.12);
}

.status-card.is-error {
  border-color: rgba(255, 97, 34, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 97, 34, 0.12);
}

.status-tools {
  gap: 12px;
}

.status-head h3 {
  margin-top: 6px;
  font-family: "Syne", sans-serif;
  font-size: 1.55rem;
}

.status-indicator {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.status-card.is-busy .status-indicator {
  color: var(--cyan);
  border-color: rgba(116, 216, 255, 0.26);
  background: rgba(116, 216, 255, 0.08);
}

.status-card.is-success .status-indicator {
  color: var(--signal);
  border-color: rgba(142, 249, 164, 0.24);
  background: var(--signal-soft);
}

.status-card.is-error .status-indicator {
  color: #ffb08d;
  border-color: rgba(255, 97, 34, 0.26);
  background: rgba(255, 97, 34, 0.1);
}

.link-button {
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  background: transparent;
}

#result {
  margin: 0;
  min-height: 260px;
  padding: 18px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #dce6f2;
  background:
    linear-gradient(180deg, rgba(116, 216, 255, 0.05), transparent),
    #0b1118;
  font-family: "Space Grotesk", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
}

@keyframes float {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.orbit-ring-lg {
  animation: float 24s linear infinite;
}

.orbit-ring-md {
  animation: float 16s linear infinite reverse;
}

.orbit-ring-sm {
  animation: float 12s linear infinite;
}

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

  .panel-hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 100%);
    padding: 16px 0 24px;
  }

  .panel-hero,
  .panel-console {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-topline,
  .console-head,
  .status-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-facts,
  .signal-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: span 1;
  }

  .console-badges,
  .status-tools,
  .actions {
    width: 100%;
  }

  .console-badges,
  .actions {
    justify-content: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-orbit {
    min-height: 240px;
  }

  .orbit-ring-lg {
    width: 210px;
    height: 210px;
  }

  .orbit-ring-md {
    width: 142px;
    height: 142px;
  }
}
