:root {
  color-scheme: dark;
  --bg: #05070d;
  --panel: rgba(9, 18, 32, 0.78);
  --panel-strong: rgba(12, 27, 47, 0.92);
  --line: rgba(94, 213, 255, 0.24);
  --line-hot: rgba(91, 255, 191, 0.55);
  --text: #eef8ff;
  --muted: #91a8ba;
  --cyan: #39d8ff;
  --green: #5bffbf;
  --amber: #ffd166;
  --red: #ff6f91;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 5%, rgba(91, 255, 191, 0.14), transparent 30rem),
    radial-gradient(circle at 8% 20%, rgba(57, 216, 255, 0.14), transparent 34rem),
    linear-gradient(135deg, #05070d 0%, #091326 48%, #05070d 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(57, 216, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 216, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

#mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.48;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.sidebar,
.hero,
.toolbar,
.console,
.section-title {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 44px);
  padding: 18px;
}

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

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(91, 255, 191, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(91, 255, 191, 0.34), rgba(35, 182, 119, 0.12)),
    rgba(6, 35, 26, 0.8);
  box-shadow:
    0 0 0 1px rgba(91, 255, 191, 0.16) inset,
    0 0 28px rgba(91, 255, 191, 0.32);
}

.brand-mark::before {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 10px var(--green),
    0 0 24px rgba(91, 255, 191, 0.82);
  content: "";
  animation: pulse-light 2.2s ease-in-out infinite;
}

.brand-mark::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(91, 255, 191, 0.22);
  border-radius: 5px;
  content: "";
}

.brand strong,
.brand small {
  display: block;
}

.brand sup,
h1 sup {
  position: relative;
  top: -0.45em;
  margin-left: 2px;
  color: var(--green);
  font-size: 0.34em;
  font-weight: 800;
}

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

.nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.nav button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: 0.18s ease;
}

.nav button::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 12px 1px 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.nav button:hover,
.nav button.active {
  border-color: rgba(57, 216, 255, 0.36);
  background: rgba(57, 216, 255, 0.08);
  color: var(--cyan);
}

.compute-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(91, 255, 191, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(91, 255, 191, 0.1), rgba(57, 216, 255, 0.05)),
    rgba(4, 18, 28, 0.72);
}

.compute-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
}

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

.compute-head strong {
  grid-column: 2;
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: 20px;
}

.load-meter {
  height: 8px;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid rgba(91, 255, 191, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.load-meter span {
  display: block;
  width: 88%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  box-shadow: 0 0 18px rgba(255, 111, 145, 0.35);
  transition: width 0.5s ease;
}

.load-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.load-grid div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(57, 216, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.load-grid dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.load-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.compute-panel small {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: 11px;
}

.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

@keyframes pulse-light {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.86);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  min-height: 286px;
  padding: 38px 40px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 15, 29, 0.92), rgba(7, 15, 29, 0.5)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1100' height='460' viewBox='0 0 1100 460'%3E%3Crect width='1100' height='460' fill='%23091528'/%3E%3Cg fill='none' stroke='%2339d8ff' stroke-opacity='.22' stroke-width='2'%3E%3Cpath d='M0 250 H180 L230 194 H390 L452 246 H590 L658 160 H790 L846 214 H1100'/%3E%3Cpath d='M80 352 C210 248 268 128 405 188 S604 374 770 218 962 92 1120 130'/%3E%3Cpath d='M0 120 H130 L176 84 H320 L372 128 H520 L580 76 H760 L814 132 H1100'/%3E%3C/g%3E%3Cg fill='%235bffbf' fill-opacity='.68'%3E%3Ccircle cx='230' cy='194' r='5'/%3E%3Ccircle cx='452' cy='246' r='5'/%3E%3Ccircle cx='658' cy='160' r='5'/%3E%3Ccircle cx='846' cy='214' r='5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 16px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: #bed3e5;
  font-size: 18px;
  line-height: 1.75;
}

.radar {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  justify-self: end;
}

.radar span {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(57, 216, 255, 0.34);
  border-radius: 50%;
  animation: spin 14s linear infinite;
}

.radar span:nth-child(2) {
  inset: 48px;
  border-color: rgba(91, 255, 191, 0.42);
  animation-duration: 8s;
  animation-direction: reverse;
}

.radar span::after {
  position: absolute;
  top: 16px;
  left: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  content: "";
}

.radar b {
  color: var(--text);
  font-size: 28px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(57, 216, 255, 0.28);
  border-radius: 8px;
  background: rgba(4, 9, 17, 0.76);
}

.search span {
  color: var(--cyan);
  font-size: 22px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.stat {
  min-width: 112px;
  padding: 8px 12px;
  border-left: 1px solid var(--line);
}

.stat strong,
.stat span {
  display: block;
}

.stat strong {
  color: var(--cyan);
  font-size: 22px;
}

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

.console {
  padding: 22px;
}

.console-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

#activeTag {
  padding: 8px 12px;
  border: 1px solid rgba(91, 255, 191, 0.34);
  border-radius: 8px;
  background: rgba(91, 255, 191, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.option {
  display: grid;
  gap: 6px;
  min-width: 160px;
  color: var(--muted);
  font-size: 12px;
}

.option input,
.option select {
  min-height: 38px;
  border: 1px solid rgba(57, 216, 255, 0.24);
  border-radius: 8px;
  outline: 0;
  padding: 0 11px;
  background: rgba(4, 9, 17, 0.76);
  color: var(--text);
}

.io-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

textarea {
  min-height: 190px;
  resize: vertical;
  border: 1px solid rgba(57, 216, 255, 0.24);
  border-radius: 8px;
  outline: 0;
  padding: 14px;
  background: rgba(4, 9, 17, 0.78);
  color: var(--text);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.actions button {
  min-height: 38px;
  border: 1px solid rgba(57, 216, 255, 0.25);
  border-radius: 8px;
  padding: 0 16px;
  background: linear-gradient(135deg, rgba(57, 216, 255, 0.2), rgba(91, 255, 191, 0.14));
  color: var(--text);
}

.actions .ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.message.error {
  color: var(--red);
}

.message.ok {
  color: var(--green);
}

.pdf-panel {
  display: grid;
  flex-basis: 100%;
  gap: 14px;
}

.pdf-upload {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 96px;
  place-items: center;
  border: 1px dashed rgba(57, 216, 255, 0.34);
  border-radius: 8px;
  background: rgba(4, 9, 17, 0.62);
  color: var(--muted);
}

.pdf-upload span {
  color: var(--cyan);
  font-weight: 800;
}

.pdf-upload input {
  color: var(--muted);
}

.pdf-controls,
.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdf-actions button {
  min-height: 38px;
  border: 1px solid rgba(57, 216, 255, 0.25);
  border-radius: 8px;
  padding: 0 14px;
  background: linear-gradient(135deg, rgba(57, 216, 255, 0.2), rgba(91, 255, 191, 0.14));
  color: var(--text);
}

.pdf-preview {
  display: grid;
  gap: 14px;
  width: 100%;
}

.pdf-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 255, 191, 0.24);
  border-radius: 8px;
  background: rgba(91, 255, 191, 0.07);
}

.pdf-summary span {
  color: var(--muted);
}

.pdf-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pdf-thumbs figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(57, 216, 255, 0.24);
  border-radius: 8px;
  background: rgba(4, 9, 17, 0.76);
}

.pdf-thumbs img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #08111f;
}

.pdf-thumbs figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.pdf-text {
  min-height: 180px;
}

.section-title {
  padding: 18px 20px;
}

.section-title span {
  color: var(--muted);
  font-size: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 154px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 30, 51, 0.82), rgba(7, 13, 23, 0.86));
  color: var(--text);
  text-align: left;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
  transition: 0.18s ease;
}

.tool-card:hover,
.tool-card.active {
  transform: translateY(-3px);
  border-color: var(--line-hot);
}

.tool-card.active {
  background: linear-gradient(180deg, rgba(21, 50, 70, 0.9), rgba(8, 18, 30, 0.9));
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  padding: 18px 12px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer span + span {
  color: #bed3e5;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--green);
}

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

.icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(57, 216, 255, 0.36);
  border-radius: 8px;
  background: rgba(57, 216, 255, 0.1);
  color: var(--cyan);
  font-weight: 850;
}

.tag {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.tool-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.empty {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed rgba(57, 216, 255, 0.3);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1180px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .radar {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 240px;
    padding: 28px;
  }

  .toolbar,
  .io-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .nav,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .console-head,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 40px;
  }
}
