:root {
  --bg: #0b1020;
  --bg-2: #0f172a;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #e8edf7;
  --muted: #8b96ad;
  --muted-2: #5c6a85;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 背景装饰 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(34, 211, 238, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 16s ease-in-out infinite alternate;
}

.bg-glow-1 {
  top: -220px;
  left: -160px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
}

.bg-glow-2 {
  bottom: -260px;
  right: -180px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.24), transparent 70%);
  animation-delay: -8s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  justify-self: start;
}

.brand-mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.topbar-title {
  text-align: center;
  line-height: 1.2;
}

.topbar-title h1 {
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: 2px;
}

.topbar-title p {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: end;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 5px 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
}

.status-dot.on {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.status-dot.busy {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  animation: pulse 1s ease-in-out infinite;
}

.status-dot.err {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

/* ---------- 主区域 ---------- */
.wrap {
  width: min(980px, 100% - clamp(28px, 7vw, 64px));
  margin: 0 auto;
  padding: clamp(28px, 6vh, 56px) 0 60px;
}

.hero {
  text-align: center;
  margin-bottom: clamp(26px, 5vh, 46px);
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(13px, 1.8vw, 15px);
  margin-bottom: 22px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 230px;
  padding: 15px 38px;
  font-size: 17px;
  font-weight: 700;
  color: #06121f;
  background: linear-gradient(120deg, var(--accent), #4cc9f0 55%, var(--accent-2));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(34, 211, 238, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.38);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  cursor: not-allowed;
  filter: saturate(0.5) brightness(0.85);
  transform: none;
}

.btn-icon {
  display: inline-flex;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(6, 18, 31, 0.25);
  border-top-color: #06121f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-text {
  min-height: 22px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(20px, 3.6vw, 30px);
  margin-bottom: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeUp 0.55s ease both;
}

.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

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

.card h3 {
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 700;
}

.card h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 20px 0 10px;
}

.card-badge {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- 结论卡 ---------- */
.result-main {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 36px);
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.nat-badge {
  --nat-color: #94a3b8;
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 22vw, 190px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--nat-color) 26%, transparent), transparent 60%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid color-mix(in srgb, var(--nat-color) 45%, transparent);
  box-shadow: 0 0 34px color-mix(in srgb, var(--nat-color) 22%, transparent);
}

.nat-badge::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 26px;
  background: conic-gradient(from 210deg, transparent 0 55%, var(--nat-color) 78%, transparent 88%);
  opacity: 0.5;
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63% 68%, transparent 69%);
  mask: radial-gradient(circle, transparent 62%, #000 63% 68%, transparent 69%);
}

.nat-badge-num {
  font-size: clamp(38px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--nat-color);
  line-height: 1;
  text-shadow: 0 0 24px color-mix(in srgb, var(--nat-color) 45%, transparent);
}

.nat-badge-en {
  font-size: clamp(12px, 1.8vw, 14px);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}

.nat-badge-zh {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}

.result-summary {
  flex: 1 1 320px;
  min-width: 0;
}

.result-summary h2 {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  margin-bottom: 10px;
}

.hl {
  color: var(--nat-color, var(--accent));
}

.summary-desc {
  color: var(--muted);
  font-size: clamp(13.5px, 2vw, 15px);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  font-size: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--card-border);
  padding: 4px 12px;
  border-radius: 999px;
}

.tag.tag-warn {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.tag.tag-good {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
}

/* ---------- 信息网格 ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 20px;
}

.info-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 0;
}

.info-label {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.info-value {
  display: block;
  font-size: clamp(13.5px, 2vw, 15.5px);
  font-weight: 700;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- 四维评估圆环 ---------- */
.rings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2.6vw, 26px);
}

.ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ring-wrap {
  position: relative;
  width: clamp(104px, 14vw, 138px);
  aspect-ratio: 1;
}

.ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 11;
}

.ring-fg {
  fill: none;
  stroke: var(--ring-color, var(--accent));
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ring-color) 55%, transparent));
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.ring-status {
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 800;
  color: var(--ring-color);
}

.ring-pct {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ring-label {
  font-size: 14px;
  font-weight: 700;
}

.ring-en {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- 类型详解 ---------- */
.detail-en {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 8px;
}

.detail-text {
  font-size: clamp(14px, 2vw, 15.5px);
  color: #cdd6e6;
}

.pros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pros li,
.tips li {
  list-style: none;
}

.pros .chip {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
}

.tips {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tips li {
  position: relative;
  padding-left: 22px;
  font-size: clamp(13.5px, 2vw, 14.5px);
  color: #cdd6e6;
}

.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: rotate(45deg);
}

.tips li b {
  color: var(--text);
}

details {
  margin-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 14px;
}

summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

details p {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 22px 16px 34px;
  font-size: 12.5px;
  color: var(--muted);
}

.footer p {
  display: block;
}

.footer-sep {
  opacity: 0.5;
}

.footer-icp {
  margin-top: 8px;
  font-size: 12px;
}

.footer-icp a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-icp a:hover {
  color: var(--accent);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .topbar-title h1 {
    letter-spacing: 1px;
  }

  .topbar-status {
    padding: 4px 10px;
    font-size: 12px;
  }

  .rings {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
  }

  .result-main {
    justify-content: center;
  }

  .nat-badge {
    width: 150px;
  }

  .result-summary {
    text-align: center;
    flex-basis: 100%;
  }

  .tag-row {
    justify-content: center;
  }
}

@media (max-width: 440px) {
  .brand-mark {
    font-size: 17px;
  }

  .topbar-title p {
    display: none;
  }

  .btn-primary {
    width: 100%;
    min-width: 0;
  }

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

  .card-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
