:root {
  --bg: #050914;
  --panel: rgba(16, 27, 42, 0.88);
  --border: rgba(126, 168, 211, 0.18);
  --text: #eef6ff;
  --muted: #93a9c2;
  --blue: #1d8fff;
  --cyan: #45d7ff;
  --red: #ff4d4d;
  --amber: #ffb12d;
  --green: #49d16f;
  --purple: #895cff;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  overscroll-behavior: none;
}
body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background-image:
    radial-gradient(
      circle at 15% 0%,
      rgba(29, 143, 255, 0.24),
      transparent 32%
    ),
    radial-gradient(
      circle at 82% 10%,
      rgba(58, 78, 255, 0.14),
      transparent 36%
    ),
    linear-gradient(135deg, #08111f 0%, #07101d 45%, #050914 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 78%);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
.shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: rgba(5, 13, 25, 0.8);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--cyan);
  border: 1px solid rgba(69, 215, 255, 0.25);
  box-shadow: 0 0 24px rgba(69, 215, 255, 0.12);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-section {
  margin: 14px 8px 4px;
  color: #7088a4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #c9d7e8;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(29, 143, 255, 0.84),
    rgba(22, 83, 176, 0.65)
  );
  border-color: rgba(125, 200, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 77, 176, 0.22);
}
.nav-item.disabled {
  pointer-events: none;
  opacity: 0.42;
}
.plan-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 31, 48, 0.72);
  filter: grayscale(0.45);
  opacity: 0.72;
}
.plan-header,
.plan-row,
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.soon {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  color: #a8d8ff;
  background: rgba(29, 143, 255, 0.12);
  border: 1px solid rgba(29, 143, 255, 0.18);
}
.plan-row {
  margin-top: 18px;
  color: #b5c3d6;
  font-size: 0.86rem;
}
.bar {
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.45s;
}
.user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #2bd063, #7ee86e);
  color: #072414;
  font-weight: 900;
}
.user small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 36px 56px;
  min-width: 0;
}
.view {
  display: none;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.view.active {
  display: flex;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 8px;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.14rem;
  margin-bottom: 14px;
}
h3 {
  font-size: 1rem;
  margin-bottom: 11px;
}
.top {
  align-items: flex-start;
}
.top p,
.summary p,
.empty,
.muted {
  color: var(--muted);
  line-height: 1.55;
}
.status {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}
.idle {
  color: #9ed4ff;
  background: rgba(29, 143, 255, 0.12);
}
.processing {
  color: #ffd992;
  background: rgba(255, 177, 45, 0.14);
}
.completed {
  color: #94f3ae;
  background: rgba(73, 209, 111, 0.16);
}
.failed {
  color: #ffb2b2;
  background: rgba(255, 77, 77, 0.16);
}
.summary,
.panel,
.progress-panel,
.api-card {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  padding: 22px;
  min-width: 0;
}
.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.progress-title {
  font-weight: 800;
}
.progress-meta {
  color: #9fb2ca;
  font-size: 0.86rem;
}
.progress-track {
  height: 9px;
  margin: 16px 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.35s;
}
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.step {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #8ea3bc;
  font-size: 0.78rem;
  text-align: center;
}
.step.active {
  color: #fff;
  border-color: rgba(69, 215, 255, 0.38);
  background: rgba(29, 143, 255, 0.12);
}
.step.done {
  color: #9ef0b7;
  border-color: rgba(73, 209, 111, 0.26);
  background: rgba(73, 209, 111, 0.1);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.metric {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 16px;
  border-right: 1px solid var(--border);
}
.metric:last-child {
  border-right: 0;
}
.icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}
.sev .icon,
.crit .icon {
  color: var(--red);
  background: rgba(255, 77, 77, 0.16);
}
.warn .icon {
  color: var(--amber);
  background: rgba(255, 177, 45, 0.16);
}
.conf .icon {
  color: var(--green);
  background: rgba(73, 209, 111, 0.16);
}
.metric strong {
  display: block;
  font-size: 1.24rem;
  margin-bottom: 4px;
}
.metric small {
  color: #aab9cc;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
}
.protocol-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 24px;
}
.donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--donut, conic-gradient(#1d8fff 0 100%));
  position: relative;
  box-shadow: 0 0 42px rgba(29, 143, 255, 0.14);
}
.donut:after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: inherit;
  background: #0c1725;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.legend,
.talkers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.legend-row,
.talker-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(80px, auto) 60px;
  gap: 12px;
  align-items: center;
}
.left {
  display: flex;
  align-items: center;
  gap: 9px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}
.legend-row span:last-child,
.talker-row span:last-child {
  text-align: right;
  color: #dcecff;
}
.talker-bar {
  grid-column: 1/-1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: -6px;
}
.talker-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: inherit;
}
.finding-grid,
.api-grid,
.help-grid,
.layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.finding {
  padding: 0 14px;
  border-right: 1px solid var(--border);
}
.finding:nth-child(even) {
  border-right: 0;
}
.tcp h3 {
  color: var(--red);
}
.dns h3 {
  color: var(--amber);
}
.tls h3 {
  color: #ffd951;
}
.flow h3 {
  color: var(--green);
}
ul {
  margin: 0;
  padding-left: 18px;
}
li {
  margin: 9px 0;
  color: #c9d7e8;
  line-height: 1.42;
}
.layer-card {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}
.layer-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--layer-color, var(--blue));
}
.layer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.layer-title {
  font-weight: 900;
}
.layer-badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  color: #d9ecff;
}
.layer-detail {
  color: #b6c8dc;
  font-size: 0.86rem;
  line-height: 1.45;
}
.layer-cause {
  color: #8da4bd;
  font-size: 0.8rem;
  margin-top: 6px;
}
.layer-evidence {
  margin-top: 8px;
  color: #9ed4ff;
  font-size: 0.76rem;
  line-height: 1.35;
}
.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.timeline-legend {
  display: flex;
  gap: 18px;
  color: #a8b8cc;
  font-size: 0.85rem;
}
.timeline-legend span:first-child {
  color: #8bc8ff;
}
.timeline-legend span:last-child {
  color: #ff8e8e;
}
.chart {
  width: 100%;
  height: 250px;
  display: block;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.01)
  );
}
.key-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.api-key {
  flex: 1;
  min-width: 260px;
  padding: 12px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: #d9ecff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.btn {
  border: 1px solid rgba(69, 215, 255, 0.25);
  border-radius: 9px;
  padding: 10px 12px;
  background: rgba(29, 143, 255, 0.14);
  color: #dcf5ff;
  cursor: pointer;
  font-weight: 800;
}
.btn:hover {
  background: rgba(29, 143, 255, 0.24);
}
.endpoint {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}
.endpoint small {
  display: block;
  color: #8da4bd;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.endpoint code {
  display: block;
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}
.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: #dcecff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.45;
}
.note {
  padding: 12px 14px;
  border-left: 3px solid var(--cyan);
  background: rgba(69, 215, 255, 0.08);
  border-radius: 10px;
  color: #cfe2f5;
}
@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
  .plan-card {
    margin-top: 10px;
  }
}
@media (max-width: 900px) {
  .main {
    padding: 28px 18px 42px;
  }
  .top,
  .timeline-head,
  .progress-head {
    flex-direction: column;
    align-items: stretch;
  }
  .steps,
  .metrics,
  .grid,
  .finding-grid,
  .api-grid,
  .help-grid,
  .layer-grid {
    grid-template-columns: 1fr;
  }
  .metric,
  .finding {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }
  .finding:last-child {
    border-bottom: 0;
  }
  .protocol-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
