:root {
  --bg-a: #eaf5ef;
  --bg-b: #e8eef8;
  --bg-c: #f5efe7;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(16, 58, 84, 0.16);
  --text: #102634;
  --muted: #4e6777;
  --accent: #038f7c;
  --accent-2: #e77031;
  --accent-3: #1978d0;
  --ok: #0ba774;
  --warn: #d54d34;
  --shadow: 0 24px 52px rgba(25, 58, 82, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft Yahei", sans-serif;
  background:
    radial-gradient(900px 520px at 8% 12%, rgba(3, 143, 124, 0.25), transparent 62%),
    radial-gradient(860px 520px at 92% 15%, rgba(231, 112, 49, 0.2), transparent 64%),
    linear-gradient(140deg, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(15, 60, 88, 0.045) 0,
      rgba(15, 60, 88, 0.045) 1px,
      transparent 1px,
      transparent 42px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(15, 60, 88, 0.03) 0,
      rgba(15, 60, 88, 0.03) 1px,
      transparent 1px,
      transparent 42px
    );
}

.glow,
.grain {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
}

.glow {
  filter: blur(40px);
  animation: floatGlow 13s ease-in-out infinite alternate;
}

.glow-a {
  background: radial-gradient(circle at 20% 30%, rgba(8, 168, 142, 0.28), transparent 55%);
}

.glow-b {
  background: radial-gradient(circle at 80% 32%, rgba(230, 114, 52, 0.24), transparent 55%);
  animation-duration: 16s;
  animation-direction: alternate-reverse;
}

.grain {
  opacity: 0.08;
  background-image: radial-gradient(circle, rgba(2, 31, 51, 0.4) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 18px 34px;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: cardIn 0.58s ease-out both;
}

.shell {
  position: relative;
  overflow: hidden;
  border-color: rgba(18, 72, 102, 0.22);
}

.shell::after {
  content: "";
  position: absolute;
  inset: auto -24px 0;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(3, 143, 124, 0), rgba(3, 143, 124, 0.6), rgba(231, 112, 49, 0.55), rgba(231, 112, 49, 0));
  filter: blur(2px);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.hero {
  padding: 22px 22px 18px;
  border-bottom-color: rgba(21, 87, 121, 0.2);
  background: linear-gradient(118deg, rgba(4, 136, 116, 0.14), rgba(231, 112, 49, 0.11));
}

.eyebrow {
  margin: 0 0 2px;
  font-family: "Rajdhani", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: rgba(16, 56, 79, 0.72);
}

.title {
  margin: 0;
  line-height: 1.1;
  font-family: "Rajdhani", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.title.mega {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.hero-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(11, 167, 116, 0.35);
  background: rgba(11, 167, 116, 0.12);
  padding: 7px 12px;
  color: #096f50;
  font-family: "Rajdhani", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(26, 120, 171, 0.35);
  padding: 7px 12px;
  font-family: "Rajdhani", "Noto Sans SC", sans-serif;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #0d4e79;
  background: rgba(28, 132, 193, 0.12);
  transition: transform 0.14s ease, background 0.18s ease;
}

.hero-link:hover {
  transform: translateY(-1px);
  background: rgba(28, 132, 193, 0.2);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 rgba(11, 167, 116, 0.42);
  animation: pulse 1.6s ease-in-out infinite;
}

.grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  padding: 16px;
}

.stack {
  display: grid;
  gap: 16px;
}

.body {
  padding: 14px 16px 16px;
}

.result {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.6;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(25, 121, 182, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 252, 249, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.links {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.links code {
  border-radius: 7px;
  background: rgba(15, 110, 172, 0.14);
  color: #0e4e78;
  padding: 2px 6px;
}

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

.metric {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(20, 87, 121, 0.2);
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.9), rgba(242, 248, 255, 0.82));
  padding: 9px 10px 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
}

.metric:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(16, 58, 84, 0.12);
}

.metric .k {
  color: var(--muted);
  font-size: 0.76rem;
}

.metric .v {
  margin-top: 3px;
  font-family: "Rajdhani", "Noto Sans SC", sans-serif;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stream {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 230px;
  border-radius: 14px;
  border: 1px solid rgba(18, 74, 109, 0.24);
  background: #0f171d;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -40px 90px rgba(0, 0, 0, 0.3);
}

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
}

.event {
  border-radius: 11px;
  border: 1px solid rgba(19, 82, 116, 0.2);
  background: var(--panel-strong);
  padding: 7px 9px;
  font-size: 0.85rem;
}

.event small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.evidence-item {
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(19, 82, 116, 0.22);
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.evidence-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(16, 58, 84, 0.14);
}

.evidence-thumb {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  background: #101417;
}

.evidence-meta {
  padding: 7px 8px 8px;
  display: grid;
  gap: 2px;
}

.evidence-meta b {
  font-size: 0.84rem;
}

.evidence-meta small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.rank {
  display: grid;
  gap: 7px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 100, 149, 0.16);
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.cfg {
  display: grid;
  gap: 11px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.row.block {
  display: block;
}

input[type='number'],
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(20, 88, 122, 0.24);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input[type='number']:focus,
textarea:focus {
  outline: none;
  border-color: rgba(4, 131, 112, 0.5);
  box-shadow: 0 0 0 3px rgba(4, 131, 112, 0.14);
}

input[type='checkbox'] {
  accent-color: var(--accent);
}

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

.btn {
  border: 0;
  border-radius: 12px;
  padding: 9px 14px;
  font-family: "Rajdhani", "Noto Sans SC", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #082737;
  cursor: pointer;
  background: linear-gradient(100deg, #17bda5, #f08a4a);
  transition: transform 0.14s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.status {
  color: var(--muted);
  font-size: 0.85rem;
}

.status.warn {
  color: var(--warn);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(18, 98, 145, 0.34);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(11, 167, 116, 0.38);
  }
  50% {
    transform: scale(1.28);
    box-shadow: 0 0 0 6px rgba(11, 167, 116, 0);
  }
}

@keyframes floatGlow {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(2%, -2%, 0);
  }
}

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

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

@media (max-width: 760px) {
  .wrap {
    padding: 14px 10px 22px;
  }

  .hero {
    padding: 16px 14px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-tools {
    width: 100%;
    justify-content: space-between;
  }

  .header,
  .body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .grid {
    padding: 12px;
    gap: 12px;
  }

  .stack {
    gap: 12px;
  }

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

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

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

  .badge {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .dot,
  .glow {
    animation: none !important;
  }
}
