:root {
  --bg-top: #0f1f17;
  --bg-mid: #152820;
  --bg-bottom: #1a3328;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.12);
  --text: #f4f7f5;
  --text-muted: #a8b8af;
  --accent: #25d366;
  --accent-hover: #1ebe57;
  --accent-ink: #062012;
  --danger: #ff8a80;
  --warn: #ffd54f;
  --ok: #69f0ae;
  --mono: "SF Mono", "Fira Code", "Consolas", "Liberation Mono", monospace;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(37, 211, 102, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(120, 200, 160, 0.1), transparent 50%),
    linear-gradient(165deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom));
  line-height: 1.5;
}

.page {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.hero {
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:not(:disabled):hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--surface-border);
}

.btn-secondary:not(:disabled):hover {
  background: var(--surface);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel h2 {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.status.is-ready {
  color: var(--ok);
}

.status.is-busy {
  color: var(--warn);
}

.status.is-error {
  color: var(--danger);
}

.status.is-ok {
  color: var(--ok);
}

.debug {
  margin: 0;
  max-height: min(50vh, 420px);
  overflow: auto;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d7e6dc;
}

@media (max-width: 520px) {
  .page {
    padding-top: 2.25rem;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
