:root {
  --bg-0: #07131f;
  --bg-1: #0b2033;
  --surface: rgba(9, 28, 45, 0.82);
  --surface-border: rgba(120, 184, 237, 0.28);
  --text-main: #eaf6ff;
  --text-soft: #b8cfdd;
  --brand: #39c7b0;
  --brand-2: #73e0ff;
  --danger: #f97373;
  --warn: #ffd670;
  --ok: #45df8c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(1200px 500px at 10% -20%, #144065 0%, transparent 65%),
    radial-gradient(800px 420px at 90% 0%, #0e4f4f 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: drift 16s ease-in-out infinite;
}

.bg-shape-a {
  width: 280px;
  height: 280px;
  background: #1db7ff;
  top: 10%;
  left: -60px;
}

.bg-shape-b {
  width: 380px;
  height: 380px;
  background: #27e1a8;
  bottom: -120px;
  right: -80px;
  animation-delay: -5s;
}

.layout {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1rem;
  animation: reveal 0.8s ease forwards;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  padding: 1.4rem 1.4rem 1.1rem;
  border-radius: 18px;
}

.kicker {
  margin: 0;
  color: var(--brand-2);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.77rem;
}

h1 {
  margin: 0.4rem 0 0.7rem;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
}

.hero p {
  margin: 0;
  color: var(--text-soft);
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 1rem 1rem 1.2rem;
  backdrop-filter: blur(12px);
}

h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  letter-spacing: 0.03em;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.full {
  grid-column: 1 / -1;
}

input {
  width: 100%;
  background: rgba(11, 37, 59, 0.8);
  border: 1px solid rgba(125, 183, 233, 0.32);
  border-radius: 11px;
  color: var(--text-main);
  padding: 0.62rem 0.72rem;
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(115, 224, 255, 0.55);
  outline-offset: 1px;
}

.actions {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  border: 1px solid rgba(132, 193, 240, 0.46);
  background: rgba(18, 53, 81, 0.9);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.56rem 0.88rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(27, 75, 112, 0.95);
}

.btn-primary {
  background: linear-gradient(125deg, #1ab899, #2bb9ff);
  color: #031220;
  border-color: transparent;
}

.output pre {
  margin: 0.7rem 0 0;
  padding: 0.8rem;
  border-radius: 12px;
  max-height: 360px;
  overflow: auto;
  background: rgba(2, 12, 20, 0.72);
  border: 1px solid rgba(88, 144, 180, 0.3);
  color: #d7f0ff;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge {
  display: inline-block;
  min-width: 88px;
  text-align: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  background: rgba(86, 136, 174, 0.24);
  border: 1px solid rgba(126, 174, 210, 0.45);
}

.badge.ok {
  color: #032715;
  background: rgba(78, 218, 147, 0.88);
}

.badge.warn {
  color: #332303;
  background: rgba(255, 214, 112, 0.9);
}

.badge.err {
  color: #390707;
  background: rgba(249, 115, 115, 0.92);
}

.timing {
  color: var(--text-soft);
  font-size: 0.85rem;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 720px) {
  .layout {
    width: min(980px, calc(100% - 1rem));
    margin: 1rem auto 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
