:root {
  color-scheme: dark;
  --bg: #12101a;
  --panel: #1f1a2c;
  --panel-strong: #2a2040;
  --text: #f8f4ff;
  --muted: #c9bedb;
  --line: rgba(255, 255, 255, 0.16);
  --twitch: #9146ff;
  --mint: #56f0c6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(145, 70, 255, 0.24), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(86, 240, 198, 0.18), transparent 28%),
    var(--bg);
}

a {
  color: inherit;
}

.shell {
  width: min(960px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 32px 0;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: rgba(31, 26, 44, 0.88);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-rows: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 5vw, 56px);
  border-radius: 8px;
}

.brand-mark {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--panel-strong);
  border-radius: 8px;
}

.brand-mark img {
  width: 44px;
  height: 44px;
  image-rendering: crisp-edges;
}

.copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lede {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.6;
}

.primary-action,
button,
.secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  width: fit-content;
  background: var(--twitch);
  color: white;
}

.primary-action.disabled {
  pointer-events: none;
  opacity: 0.5;
}

button {
  background: var(--mint);
  color: #101018;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--text);
}

.panel {
  padding: 22px;
  border-radius: 8px;
}

.panel h2 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(86, 240, 198, 0.36);
  border-radius: 8px;
  background: rgba(86, 240, 198, 0.08);
  color: var(--muted);
  line-height: 1.5;
}

.notice strong {
  color: var(--text);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 0.92rem;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font: inherit;
}

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

.mode-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.mode-button.active {
  background: var(--mint);
  color: #101018;
}

dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  align-items: start;
}

dt {
  color: var(--muted);
  font-size: 0.9rem;
}

dd {
  min-width: 0;
  margin: 0;
}

code,
.code-box {
  overflow-wrap: anywhere;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.code-box {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--mint);
}

.error-details {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 110, 110, 0.38);
  border-radius: 8px;
  background: rgba(255, 110, 110, 0.08);
}

.error-details h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 960px);
    padding: 10px 0;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
  }

  .primary-action {
    width: 100%;
  }

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

  dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
