﻿:root {
  --bg: #06080d;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.74);
  --line: rgba(255, 255, 255, 0.14);
  --primary: #22d3ee;
  --primary-dark: #0ea5e9;
  --primary-soft: rgba(34, 211, 238, 0.16);
  --ok: #22c55e;
  --bad: #ef4444;
  --radius: 14px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 10% 0%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(900px 520px at 90% 12%, rgba(14, 165, 233, 0.12), transparent 55%),
    linear-gradient(180deg, #05060a 0%, #070b13 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 8, 13, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.headerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brandLogo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.brandKicker {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.brandTitle {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.healthPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.healthPill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #facc15;
}

.healthPill.ok .dot {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3);
  animation: pulse 1.5s ease-in-out infinite;
}

.healthPill.bad .dot {
  background: var(--bad);
}

.healthPill.navBtn {
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.healthPill.navBtn:hover {
  background: var(--primary-soft);
  border-color: rgba(34, 211, 238, 0.24);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

main.container {
  padding-top: 18px;
  padding-bottom: 28px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.heroStat {
  min-width: 210px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

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

.heroStatV {
  margin-top: 2px;
  font-weight: 800;
  color: var(--text);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.cardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cardHead h2 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}

textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

textarea:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.rowActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.08s ease;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: rgba(34, 211, 238, 0.3);
  color: #041018;
}

.resultBox {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
}

.resultTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.badge.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.badge.ok {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.badge.err {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.iconBtn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.iconBtn:hover {
  filter: brightness(1.08);
}

.result {
  margin: 0;
  min-height: 86px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  overflow: auto;
  font-size: 13px;
  line-height: 1.35;
  font-family: Consolas, "Courier New", monospace;
}

.meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.metaRow {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metaK {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metaV {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
}

.muted {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  width: min(560px, calc(100% - 28px));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 12, 18, 0.7);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toastIcon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.toastTitle {
  font-weight: 800;
}

.toastMsg {
  color: var(--muted);
  font-size: 13px;
}

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

  .hero {
    flex-direction: column;
  }

  .heroRight {
    justify-content: flex-start;
    width: 100%;
  }

  .heroStat {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 14px;
  }

  .brandKicker {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .brandTitle {
    font-size: 18px;
  }

  #healthPill {
    padding: 10px;
    gap: 0;
  }

  #healthPill #healthText {
    display: none;
  }

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