:root {
  --bg: #061018;
  --panel: rgba(12, 32, 48, 0.72);
  --cyan: #8cefff;
  --cyan-dim: rgba(85, 235, 255, 0.35);
  --ink: #e8f7ff;
  --muted: #8aa8b8;
  --warn: #ffb56b;
  --ok: #5dffc0;
  --bad: #ff7a6e;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 22px;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 20% -10%, #12324a 0%, var(--bg) 55%);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

.glow {
  position: fixed;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
}

.glow-a {
  width: 280px;
  height: 280px;
  background: #1ea0ff;
  top: 10%;
  right: 8%;
}

.glow-b {
  width: 220px;
  height: 220px;
  background: #ff8a3c;
  bottom: 6%;
  left: 10%;
}

.shell {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 28px 72px;
}

.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--cyan);
  margin: 0 0 10px;
}

h1 {
  margin: 0;
  font-weight: 650;
  font-size: clamp(44px, 7vw, 68px);
}

.lede {
  color: var(--muted);
  margin: 14px 0 36px;
  font-size: 1.15rem;
  line-height: 1.45;
  max-width: 42rem;
}

.join {
  background: var(--panel);
  border: 1px solid var(--cyan-dim);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 0 24px rgba(80, 200, 255, 0.08);
}

.join label {
  display: block;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.join-row {
  display: flex;
  gap: 10px;
}

input {
  flex: 1;
  min-width: 0;
  background: #07151f;
  border: 1px solid var(--cyan-dim);
  color: var(--ink);
  font-size: 2rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 16px 18px;
  border-radius: 10px;
  outline: none;
}

input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(140, 239, 255, 0.18);
}

button {
  border: 0;
  border-radius: 10px;
  background: var(--cyan);
  color: #04202c;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 22px;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.ghost {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 1rem;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  min-height: 36px;
}

.pill {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--cyan-dim);
  color: var(--muted);
}

.pill[data-state="live"] {
  color: #04202c;
  background: var(--ok);
  border-color: transparent;
}

.pill[data-state="error"] {
  color: #2a0d0a;
  background: var(--bad);
  border-color: transparent;
}

.pill[data-state="wait"] {
  color: #2a1706;
  background: var(--warn);
  border-color: transparent;
}

.code-chip {
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.2em;
  color: var(--cyan);
  font-size: 1.35rem;
}

.stage {
  position: relative;
  min-height: 52vh;
  background: rgba(4, 14, 22, 0.86);
  border: 1px solid var(--cyan-dim);
  border-radius: 18px;
  padding: 36px 36px 48px;
  box-shadow: inset 0 0 40px rgba(70, 190, 255, 0.06);
}

.output {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.35;
  min-height: 1.35em;
}

.caret {
  display: inline-block;
  width: 0.55rem;
  height: 1.05em;
  margin-left: 4px;
  background: var(--cyan);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 560px) {
  .join-row {
    flex-direction: column;
  }

  button {
    height: 48px;
  }

  .shell {
    padding-top: 28px;
  }
}
