:root {
  --brand-ink: #0b233a;
  --brand-cyan: #3ab8d0;
  --brand-gold: #f6b73c;
  --bg-start: #f4fbff;
  --bg-end: #e8eef8;
  --panel: #ffffff;
  --muted: #5c6d7e;
  --success: #0d683c;
  --danger: #8f1f31;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--brand-ink);
  background: radial-gradient(circle at 12% 10%, #ffffff 0%, var(--bg-start) 32%, var(--bg-end) 100%);
  position: relative;
  overflow-x: hidden;
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, #b4edf8, #e3fdff);
  top: -80px;
  right: -60px;
}

.orb-b {
  width: 220px;
  height: 220px;
  background: linear-gradient(135deg, #ffe6be, #ffd278);
  bottom: -70px;
  left: -50px;
  animation-delay: 1.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.app-card {
  background: color-mix(in srgb, var(--panel) 94%, #f4faff);
  border-radius: 1.1rem;
}

.app-header {
  border-top-left-radius: 1.1rem;
  border-top-right-radius: 1.1rem;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(112deg, #123457 0%, #0b233a 52%, #274f79 100%);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.step-item {
  border: 1px solid #d6e2ee;
  border-radius: 0.8rem;
  padding: 0.55rem 0.65rem;
  background: #f8fbff;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.step-item.active {
  border-color: var(--brand-cyan);
  background: #ecfbff;
  color: #13446b;
  font-weight: 700;
}

.step-item.completed {
  border-color: #a7dfbe;
  background: #edf9f2;
  color: var(--success);
}

.step-number {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600;
  display: inline-block;
  margin-right: 0.25rem;
}

.challenge-box {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  background: #f6f8fc;
  border: 1px solid #dfe7f2;
  border-radius: 0.6rem;
  padding: 0.8rem;
  overflow-wrap: anywhere;
}

.challenge-copyable {
  position: relative;
  padding-right: 3rem;
  min-height: 3rem;
}

.challenge-copyable-value {
  display: block;
}

.copy-icon-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid #c6d7e7;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #325777;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.copy-icon-btn:hover:not(:disabled) {
  background: #ecf7ff;
  border-color: #9dc5e4;
  color: #19466e;
}

.copy-icon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.copy-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.copy-icon-btn.copied {
  background: #e9f8ef;
  border-color: #9ed2b3;
  color: #11663b;
}

.event-log {
  margin: 0;
  min-height: 160px;
  max-height: 220px;
  overflow-y: auto;
  background: #07101b;
  color: #d7edf7;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
}

.mini-note {
  color: var(--muted);
  font-size: 0.93rem;
}

textarea.form-control.output-block {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  min-height: 160px;
}

@media (max-width: 768px) {
  .stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-log {
    max-height: 180px;
  }
}
