:root {
  --bg: #060b15;
  --ink: #ebf3ff;
  --muted: #98adc7;
  --line: rgba(164, 193, 229, 0.22);
  --panel: linear-gradient(150deg, rgba(13, 22, 36, 0.86), rgba(7, 13, 25, 0.9));
  --panel-soft: rgba(14, 26, 43, 0.7);
  --accent: #30d0ff;
  --accent-strong: #0aa0da;
  --accent-soft: rgba(48, 208, 255, 0.16);
  --hot: #ff9c57;
  --warning: #ff6c5e;
  --radius: 20px;
  --shadow: 0 28px 55px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 8% 14%, rgba(255, 156, 87, 0.2), transparent 42%),
    radial-gradient(circle at 86% 3%, rgba(48, 208, 255, 0.2), transparent 36%),
    radial-gradient(circle at 50% 102%, rgba(29, 99, 176, 0.32), transparent 48%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.7px, transparent 0.7px);
  background-size: 3px 3px;
  opacity: 0.14;
  z-index: -2;
}

.glow {
  position: fixed;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  filter: blur(88px);
  z-index: -1;
  opacity: 0.33;
}

.glow-a {
  top: -10vw;
  right: -4vw;
  background: #2ec8ef;
}

.glow-b {
  bottom: -16vw;
  left: -10vw;
  background: #ff9c57;
}

.topbar,
main,
.footer {
  width: min(1130px, 92vw);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 16px;
  position: sticky;
  top: 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  background: rgba(8, 16, 29, 0.72);
  box-shadow: 0 16px 30px rgba(2, 6, 14, 0.4);
  z-index: 20;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: "Syne", "Manrope", sans-serif;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  gap: 8px;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.topbar nav a:hover {
  color: #f6fbff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(11, 31, 52, 0.75);
}

main {
  padding: 28px 0 64px;
}

.hero,
.panel,
.result,
.footer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
}

.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  top: -140px;
  right: -90px;
  background: radial-gradient(circle, rgba(48, 208, 255, 0.42), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  color: #7ed8ff;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin: 0 0 14px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1,
h2 {
  font-family: "Syne", "Manrope", sans-serif;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 4rem);
  max-width: 16ch;
}

.subtitle {
  color: var(--muted);
  max-width: 62ch;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  margin: 14px 0 30px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}

.hero-cards article {
  background: linear-gradient(145deg, rgba(12, 25, 42, 0.8), rgba(8, 18, 31, 0.88));
  border: 1px solid rgba(126, 216, 255, 0.25);
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.hero-cards article:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 156, 87, 0.48);
}

.hero-cards h2 {
  font-size: 0.78rem;
  color: #9ec6f1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.hero-cards p,
.hero-cards code {
  color: #e9f5ff;
}

.panel {
  padding: clamp(20px, 2.6vw, 30px);
  margin-top: 22px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.code-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.code-grid article {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

code,
pre,
textarea,
input,
select {
  font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: linear-gradient(140deg, #071325, #091a31);
  color: #d0e8ff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(126, 216, 255, 0.22);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 12px 11px;
  border-bottom: 1px solid rgba(164, 193, 229, 0.16);
}

th {
  color: #a5c4e4;
  font-weight: 700;
  background: rgba(14, 29, 48, 0.8);
}

.tester-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 0.8fr;
}

.tester-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: #abc3dd;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(164, 193, 229, 0.3);
  background: rgba(6, 14, 24, 0.9);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.91rem;
}

input:focus,
textarea:focus,
select:focus,
.btn:focus,
.chip:focus {
  outline: 2px solid rgba(48, 208, 255, 0.5);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
}

.row {
  display: flex;
  gap: 12px;
}

.row-compact > * {
  flex: 0 0 auto;
}

.row-compact .grow {
  flex: 1 1 auto;
}

.quick-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(164, 193, 229, 0.3);
  background: rgba(10, 20, 34, 0.9);
  color: #d4e9ff;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  border-color: rgba(255, 156, 87, 0.56);
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  padding: 11px 16px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-primary {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #031019;
  box-shadow: 0 10px 26px rgba(48, 208, 255, 0.3);
}

.btn-primary:disabled {
  opacity: 0.62;
  cursor: progress;
}

.btn-ghost {
  background: rgba(9, 20, 34, 0.8);
  border-color: rgba(164, 193, 229, 0.3);
  color: #eaf4ff;
}

.tester-side {
  display: grid;
  gap: 12px;
  align-content: flex-start;
}

.meta-card {
  border: 1px solid var(--line);
  background: rgba(8, 17, 30, 0.82);
  border-radius: 12px;
  padding: 14px;
}

.meta-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.result {
  margin-top: 18px;
  overflow: hidden;
}

.result-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 19, 34, 0.84);
}

.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
}

.badge-idle {
  background: rgba(164, 193, 229, 0.16);
  color: #b0c8e1;
}

.badge-ok {
  background: var(--accent-soft);
  color: #86e0ff;
}

.badge-error {
  background: rgba(255, 108, 94, 0.18);
  color: #ff9f96;
}

#resultOutput {
  margin: 0;
  border-radius: 0;
  border: 0;
  min-height: 220px;
}

.footer {
  margin: 24px auto 52px;
  padding: 16px 22px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.992);
}

.reveal.is-visible {
  animation: reveal-in 0.62s cubic-bezier(0.18, 1, 0.35, 1) forwards;
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .tester-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 20px;
    gap: 10px;
  }

  .topbar nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .row {
    flex-direction: column;
  }

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