/* 化石捡漏雷达 · 夜掘/生物荧光 */
:root {
  --bg: #0b0e0c;
  --bg-2: #0f1311;
  --panel: rgba(20, 26, 22, 0.72);
  --panel-2: #141a16;
  --ink: #e9eee8;
  --muted: #8a968c;
  --line: rgba(233, 238, 232, 0.09);
  --amber: #f2b64d;
  --amber-soft: #f7d193;
  --cyan: #57e6c3;
  --red: #ff7a6b;
  --radius: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* 背景：地层等高线 + 荧光噪点 */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(242, 182, 77, 0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, rgba(87, 230, 195, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--amber);
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.hero-title-sub {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--muted);
}

.hero-title-main {
  display: block;
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 800;
  background: linear-gradient(180deg, #fff 0%, #d8d2c2 55%, #b6a083 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(87, 230, 195, 0.6);
  animation: pulse 1.8s infinite;
}

.status-dot.idle {
  background: var(--muted);
  box-shadow: none;
  animation: none;
}

.status-updated {
  color: var(--muted);
  letter-spacing: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 230, 195, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(87, 230, 195, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 230, 195, 0); }
}

/* 雷达扫描线 */
.scan {
  position: absolute;
  right: 0;
  top: 24px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 300deg, rgba(87, 230, 195, 0.35) 360deg);
  mask: radial-gradient(circle, transparent 55%, #000 57%, #000 100%);
  opacity: 0.6;
  animation: sweep 7s linear infinite;
  pointer-events: none;
}

.scan::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(87, 230, 195, 0.25);
}

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

/* ---------- Controls ---------- */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover { color: var(--ink); border-color: rgba(242, 182, 77, 0.4); }
.chip.active {
  color: #111;
  background: var(--amber);
  border-color: var(--amber);
}

.controls-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input, select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
}

input:focus, select:focus { border-color: var(--amber); }
input { width: 200px; }

/* ---------- Radar / Grid ---------- */
.radar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 12px 0 22px;
}

.radar-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0;
}

.radar-title span { color: var(--amber); }
.radar-count { color: var(--muted); font-size: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.5s ease forwards;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 182, 77, 0.5);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(242, 182, 77, 0.12);
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.rarity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid;
}

.rarity .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.rarity-5 { color: #ff7a6b; border-color: rgba(255, 122, 107, 0.5); background: rgba(255, 122, 107, 0.08); }
.rarity-4 { color: var(--cyan); border-color: rgba(87, 230, 195, 0.45); background: rgba(87, 230, 195, 0.08); }
.rarity-3 { color: var(--amber); border-color: rgba(242, 182, 77, 0.45); background: rgba(242, 182, 77, 0.08); }
.rarity-2 { color: var(--muted); border-color: var(--line); background: rgba(255, 255, 255, 0.02); }

.conf {
  font-size: 11px;
  color: var(--muted);
}
.conf.low { color: var(--red); }

.thumb {
  position: relative;
  height: 168px;
  border-radius: 10px;
  margin: 14px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(400px 200px at 50% -20%, rgba(242, 182, 77, 0.18), transparent 60%),
    linear-gradient(160deg, #171d18, #0d100e);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb svg {
  width: 76px;
  height: 76px;
  opacity: 0.7;
  filter: drop-shadow(0 0 14px rgba(242, 182, 77, 0.4));
}

.species {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 2px;
}

.meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.listing-title {
  margin: 10px 0 16px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--amber-soft);
}

.price small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 3px;
}

.go {
  text-decoration: none;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.go:hover { border-color: var(--cyan); }

.when {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty code { color: var(--amber); background: rgba(242, 182, 77, 0.08); padding: 2px 6px; border-radius: 6px; }
.empty-sub { font-size: 12px; }

/* ---------- Footer ---------- */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

@media (max-width: 720px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .status { justify-content: flex-start; margin-top: 6px; }
  .scan { right: -40px; }
  input { width: 100%; }
}
