@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg0: #0c0f14;
  --bg1: #0a1422;
  --card: rgba(255, 255, 255, 0.07);
  --card2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --good: #2de2a6;
  --warn: #ffcc66;
  --bad: #ff4d6d;
  --ink: rgba(0, 0, 0, 0.55);

  --r: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 800px at 14% 18%, #152949 0%, transparent 60%),
              radial-gradient(900px 640px at 82% 20%, #2a1644 0%, transparent 55%),
              radial-gradient(700px 520px at 70% 92%, #143933 0%, transparent 60%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: "Space Grotesk", ui-sans-serif, system-ui;
  overflow-x: hidden;
}

.bg::before, .bg::after {
  content: "";
  position: fixed;
  inset: -30vh -20vw;
  pointer-events: none;
  filter: blur(45px);
  opacity: 0.55;
  transform: translateZ(0);
}
.bg::before {
  background: conic-gradient(from 200deg, rgba(45, 226, 166, 0.0), rgba(45, 226, 166, 0.24), rgba(255, 204, 102, 0.22), rgba(255, 77, 109, 0.18), rgba(45, 226, 166, 0.0));
  animation: drift 16s ease-in-out infinite;
}
.bg::after {
  background: radial-gradient(circle at 30% 40%, rgba(255, 204, 102, 0.22), transparent 58%),
              radial-gradient(circle at 78% 24%, rgba(45, 226, 166, 0.18), transparent 55%),
              radial-gradient(circle at 62% 78%, rgba(255, 77, 109, 0.16), transparent 55%);
  animation: drift2 22s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(-1.5%, -1.2%) rotate(-2deg); }
  50% { transform: translate(1.2%, 1.4%) rotate(3deg); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(1.0%, -1.0%) rotate(1deg); }
  50% { transform: translate(-1.2%, 1.4%) rotate(-2deg); }
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 28px auto 42px;
  position: relative;
  animation: rise 520ms ease-out both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.hero__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(45, 226, 166, 0.85), rgba(255, 204, 102, 0.65));
  box-shadow: 0 10px 40px rgba(45, 226, 166, 0.12);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: 26px;
  line-height: 1.05;
  margin: 0;
}
.hero p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 6;
  background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card--wide { grid-column: span 12; }
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.row--tight {
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: end;
}

.field { display: grid; gap: 6px; }
.field--inline {
  grid-template-columns: auto 90px;
  align-items: center;
  gap: 10px;
}
.field span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
  letter-spacing: 0.2px;
}

input, select, textarea {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 10px 10px;
  outline: none;
  transition: border-color 140ms ease, transform 140ms ease;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(45, 226, 166, 0.55);
  transform: translateY(-1px);
}

.btn {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(45, 226, 166, 0.85), rgba(255, 204, 102, 0.72));
  color: rgba(0, 0, 0, 0.72);
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 110ms ease, filter 110ms ease, opacity 110ms ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
}

.details {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
  padding: 10px 10px;
}
.details summary {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}
.details__body {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  overflow: auto;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
}
.status__dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.status__dot[data-state="ok"] {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(45, 226, 166, 0.18);
}
.status__dot[data-state="warn"] {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(255, 204, 102, 0.18);
}
.status__dot[data-state="bad"] {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.18);
}
.status__line { font-size: 13px; }
.status__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.meter {
  height: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}
.meter__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(45, 226, 166, 0.8), rgba(255, 204, 102, 0.7), rgba(255, 77, 109, 0.7));
  transition: width 120ms ease;
}

.live {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  margin: 6px 0 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.14);
}
.live__label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  padding-top: 2px;
}
.live__text {
  min-height: 1.2em;
  font-size: 14px;
  line-height: 1.35;
}

.turns {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.turns li {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
  padding: 10px 12px;
  animation: pop 260ms ease-out both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.turns .t-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}
.turns .t-text {
  font-size: 14px;
  line-height: 1.4;
}

.foot {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  padding: 4px 2px;
}

@media (max-width: 900px) {
  .card { grid-column: span 12; }
  .row { grid-template-columns: 1fr; }
  .row--tight { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .field--inline { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}

