@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Sora:wght@300;400;500;600;700&display=swap");

:root {
  --bg-0: #0a0f17;
  --bg-1: #0e1522;
  --bg-2: #121a2a;
  --card: rgba(16, 21, 34, 0.75);
  --stroke: rgba(255, 255, 255, 0.08);
  --ink: #f4f1ea;
  --muted: #aeb6cb;
  --accent: #d6b36a;
  --accent-2: #66d1c3;
  --accent-3: #f08a5d;
  --success: #7ee081;
  --danger: #ff7a7a;
  --shadow: 0 30px 60px rgba(7, 10, 17, 0.6);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --glow: 0 0 60px rgba(214, 179, 106, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px circle at 10% 10%, #1c273b 0, transparent 55%),
    radial-gradient(900px circle at 92% 2%, #18313a 0, transparent 45%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-0) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0) 55%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 9px
    );
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.3;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  z-index: 1;
}

.glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite;
}

.glow.one {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(214, 179, 106, 0.6), transparent 65%);
  left: -80px;
  top: 120px;
  animation-delay: 0s;
}

.glow.two {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(102, 209, 195, 0.55), transparent 70%);
  right: -140px;
  top: 40px;
  animation-delay: 4s;
}

.glow.three {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(240, 138, 93, 0.55), transparent 70%);
  right: 10%;
  bottom: -120px;
  animation-delay: 8s;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(-20px) translateX(10px);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 15, 23, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav a.active,
.nav a:hover {
  color: var(--ink);
  border-color: rgba(214, 179, 106, 0.4);
  box-shadow: var(--glow);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  margin-bottom: 28px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 0.6s ease-out both;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 179, 106, 0.4);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 38px;
  margin: 0 0 12px;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

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

.hero-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

.meta-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(14, 19, 30, 0.7);
  border: 1px solid var(--stroke);
}

.meta-card ol {
  margin: 10px 0 0;
  padding-left: 18px;
}

.meta-card li {
  margin: 6px 0;
}

.meta-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 18px;
  margin-top: 6px;
}

.grid {
  display: grid;
  gap: 22px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

label span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.95em;
  color: rgba(245, 220, 170, 0.95);
}

pre {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(6, 9, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(214, 179, 106, 0.08);
}

pre code {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(245, 241, 234, 0.9);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent-3) 100%);
  color: #1a1206;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 30px rgba(240, 138, 93, 0.35);
}

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

.btn.secondary {
  background: rgba(20, 28, 43, 0.8);
  color: var(--ink);
  border: 1px solid var(--stroke);
  box-shadow: none;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tab {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(12, 16, 24, 0.7);
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  color: var(--ink);
  border-color: rgba(102, 209, 195, 0.5);
  box-shadow: 0 0 25px rgba(102, 209, 195, 0.2);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 18, 28, 0.8);
  color: var(--muted);
  font-size: 13px;
}

.status.is-error {
  color: var(--danger);
  border: 1px solid rgba(255, 122, 122, 0.4);
}

.status.is-ok {
  color: var(--success);
  border: 1px solid rgba(126, 224, 129, 0.4);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(12, 16, 24, 0.8);
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.pill.clickable {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pill.clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 209, 195, 0.5);
  box-shadow: 0 0 22px rgba(102, 209, 195, 0.18);
}

.pill.clickable.active {
  border-color: rgba(214, 179, 106, 0.5);
  box-shadow: 0 0 30px rgba(214, 179, 106, 0.18);
  color: var(--ink);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pill strong {
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

tr.group-header td {
  padding-top: 18px;
  padding-bottom: 10px;
  font-weight: 600;
  color: rgba(214, 179, 106, 0.95);
  letter-spacing: 0.04em;
  background: linear-gradient(
    90deg,
    rgba(214, 179, 106, 0.12) 0%,
    rgba(214, 179, 106, 0) 60%
  );
  border-bottom: 1px solid rgba(214, 179, 106, 0.18);
}

tr.row-high td {
  background: rgba(255, 122, 122, 0.06);
}

tr.row-review td {
  background: rgba(245, 194, 107, 0.06);
}

tr.row-high td:first-child {
  box-shadow: inset 4px 0 0 rgba(255, 122, 122, 0.55);
}

tr.row-review td:first-child {
  box-shadow: inset 4px 0 0 rgba(245, 194, 107, 0.45);
}

th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--stroke);
  display: inline-flex;
  align-items: center;
}

.tag.high {
  color: var(--danger);
  border-color: rgba(255, 122, 122, 0.4);
}

.tag.medium {
  color: #f5c26b;
  border-color: rgba(245, 194, 107, 0.4);
}

.tag.low {
  color: var(--success);
  border-color: rgba(126, 224, 129, 0.4);
}

.footer {
  margin-top: 40px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--stroke);
  padding-top: 16px;
}

.metric-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 8px;
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.chart-card {
  min-height: 220px;
}

canvas {
  width: 100%;
  height: 180px;
}

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

  .two-col {
    grid-template-columns: 1fr;
  }

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

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