:root {
  --bg: #07111f;
  --bg-soft: rgba(13, 24, 40, 0.92);
  --panel: rgba(8, 18, 33, 0.82);
  --panel-strong: rgba(10, 22, 39, 0.95);
  --line: rgba(123, 160, 208, 0.24);
  --line-strong: rgba(129, 171, 228, 0.36);
  --text: #eff6ff;
  --muted: #9fb5d1;
  --accent: #5eead4;
  --accent-strong: #22d3ee;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(94, 234, 212, 0.08), transparent 34%),
    linear-gradient(180deg, #08111c 0%, #050913 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(8, 18, 33, 0.96), rgba(10, 22, 39, 0.85)),
    rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -30px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 70%);
}

.hero__eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 999px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__content {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: end;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 8vw, 64px);
  line-height: 0.96;
}

.hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero__badge {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero__badge span,
.status-badge {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.workspace {
  display: grid;
  gap: 16px;
}

.tabs {
  display: inline-flex;
  gap: 10px;
}

.tab,
.button,
.quick-action {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.tab {
  padding: 14px 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.tab:hover,
.button:hover,
.quick-action:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.42);
}

.tab.is-active {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(34, 211, 238, 0.12));
  border-color: rgba(94, 234, 212, 0.5);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.14);
}

.panel {
  display: none;
  gap: 16px;
}

.panel.is-active {
  display: grid;
}

.panel__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), rgba(8, 18, 32, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card__header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card__header h2 {
  margin: 0;
  font-size: 18px;
}

.card__hint,
.result-meta {
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(129, 171, 228, 0.18);
  border-radius: 18px;
  outline: none;
  background: rgba(3, 9, 19, 0.76);
  color: var(--text);
  font: inherit;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

input {
  padding: 16px 18px;
}

textarea {
  min-height: 260px;
  padding: 18px;
  resize: vertical;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
}

input:focus,
textarea:focus {
  border-color: rgba(94, 234, 212, 0.52);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.08);
  background: rgba(6, 13, 25, 0.98);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.quick-action {
  padding: 14px;
  text-align: left;
}

.quick-action strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.quick-action span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.card--editor {
  background: linear-gradient(180deg, var(--panel-strong), rgba(6, 15, 29, 0.92));
}

.editor-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.button {
  padding: 14px 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.button--primary {
  border-color: rgba(94, 234, 212, 0.44);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(34, 211, 238, 0.1));
}

.card--result {
  min-height: 280px;
}

.result-meta {
  margin-bottom: 14px;
}

.result-output {
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(3, 9, 19, 0.8);
  border: 1px solid rgba(129, 171, 228, 0.14);
  color: #c8f9ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-badge.is-success {
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.34);
}

.status-badge.is-error {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.34);
}

@media (max-width: 900px) {
  .hero__content,
  .panel__grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero__badge {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    margin: 20px auto;
  }

  .hero,
  .card {
    padding: 16px;
    border-radius: 22px;
  }

  .editor-actions,
  .tabs {
    flex-wrap: wrap;
  }

  .tab,
  .button {
    width: 100%;
  }
}
