:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --bg-glow-1: #1c2f52;
  --bg-glow-2: #2a1a4a;
  --panel: #141b2b;
  --panel-2: #1b2436;
  --panel-3: #202b41;
  --border: #2a3652;
  --border-soft: #212c42;
  --text: #eef2fb;
  --muted: #93a2bd;
  --muted-soft: #6b7a97;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-2: #38bdf8;
  --accent-2-strong: #0ea5e9;
  --warning: #fbbf24;
  --danger: #fb7185;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 20px 40px -20px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 24px 48px -18px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

::selection { background: rgba(52, 211, 153, .28); color: var(--text); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(680px circle at 8% -10%, rgba(56, 189, 248, .16), transparent 55%),
    radial-gradient(720px circle at 100% 0%, rgba(129, 89, 217, .16), transparent 50%),
    radial-gradient(900px circle at 50% 100%, rgba(52, 211, 153, .07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.page-header,
.section-heading,
.actions-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-header {
  padding-bottom: 28px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}

.eyebrow {
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .18);
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #b9c6e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtitle, .muted { color: var(--muted); }
.subtitle { margin-bottom: 0; max-width: 62ch; line-height: 1.6; }
.muted { font-size: 13px; margin-top: 6px; margin-bottom: 14px; }

.badge {
  border: 1px solid rgba(56, 189, 248, .4);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(129, 89, 217, .12));
  color: #bfe4fd;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .06) inset;
}

.card {
  margin-top: 20px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.card:hover {
  border-color: var(--border-soft);
  box-shadow: var(--shadow-card-hover);
}

.notice {
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  line-height: 1.6;
  font-size: 14px;
}

.warning {
  border: 1px solid rgba(251, 191, 36, .35);
  background: linear-gradient(135deg, rgba(120, 78, 7, .28), rgba(120, 78, 7, .12));
  color: #fde68a;
}

code, pre, textarea, input {
  font-family: "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

code {
  color: #8be9fd;
  background: rgba(56, 189, 248, .1);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

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

label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(8, 12, 22, .65);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input::placeholder, textarea::placeholder { color: var(--muted-soft); }

input { min-height: 44px; padding: 11px 14px; }

input:hover, textarea:hover { border-color: #3a4967; }

input:focus, textarea:focus {
  border-color: var(--accent-2);
  background: rgba(8, 12, 22, .9);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .14);
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 20px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.check:hover { border-color: var(--border); color: var(--text); background: rgba(255, 255, 255, .04); }
.check input { width: auto; min-height: auto; accent-color: var(--accent); cursor: pointer; }

.code-editor {
  min-height: 330px;
  padding: 16px;
  resize: vertical;
  line-height: 1.6;
  font-size: 12.5px;
  tab-size: 2;
}

.button {
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .01em;
  transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
}

.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .5; transform: none; }

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #052e16;
  box-shadow: 0 8px 20px -8px rgba(52, 211, 153, .6);
}

.button.secondary {
  border-color: var(--border);
  background: var(--panel-3);
  color: var(--text);
}

.button:hover:not(:disabled) { filter: brightness(1.1); }
.button.primary:hover:not(:disabled) { box-shadow: 0 10px 26px -8px rgba(52, 211, 153, .75); }
.button.secondary:hover:not(:disabled) { border-color: var(--muted-soft); }

.actions-card { justify-content: flex-start; flex-wrap: wrap; gap: 14px; }

.status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-soft);
}

.status.ok { color: var(--accent); }
.status.ok::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
.status.error { color: var(--danger); }
.status.error::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(251, 113, 133, .18); }

.output {
  min-height: 180px;
  max-height: 540px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #080b14;
  color: #c7d2fe;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 12.5px;
}

.output::-webkit-scrollbar, .code-editor::-webkit-scrollbar { width: 10px; height: 10px; }
.output::-webkit-scrollbar-track, .code-editor::-webkit-scrollbar-track { background: transparent; }
.output::-webkit-scrollbar-thumb, .code-editor::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.output::-webkit-scrollbar-thumb:hover, .code-editor::-webkit-scrollbar-thumb:hover { background: var(--border-soft); }

.footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted-soft);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 20px, 1180px); padding-top: 28px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .grid.two { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .section-heading { flex-direction: column; align-items: flex-start; }
}
