/* THE ABDUCTED — specimen archive gallery. Dark sci-fi bureau theme. */
:root {
  --bg: #05070f;
  --bg2: #0a0e1c;
  --panel: #0d1326;
  --line: #1c2547;
  --txt: #dfe6ff;
  --dim: #8b94b8;
  --acc: #7c5cff;
  --acc2: #37e6c8;
  --gold: #ffce4a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #131a38 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--txt);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 100vh;
}
a { color: var(--acc2); }

header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5,7,15,.92);
  border-bottom: 1px solid var(--line);
  padding: 10px 18px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  backdrop-filter: blur(6px);
}
.logo { font-size: 20px; letter-spacing: 3px; font-weight: bold; color: var(--gold); text-shadow: 0 0 12px rgba(255,206,74,.5); white-space: nowrap; }
.sub { color: var(--dim); font-size: 12px; letter-spacing: 1px; }
.spacer { flex: 1; }
#status { font-size: 12px; color: var(--dim); }
#idsearch {
  background: var(--panel); border: 1px solid var(--line); color: var(--txt);
  padding: 7px 10px; border-radius: 6px; width: 170px; font-family: inherit;
}
button, select {
  background: var(--panel); border: 1px solid var(--line); color: var(--txt);
  padding: 7px 10px; border-radius: 6px; font-family: inherit; cursor: pointer;
}
button:hover, select:hover { border-color: var(--acc); }
button.active { background: var(--acc); border-color: var(--acc); color: #fff; }

.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: end;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(10,14,28,.6);
}
.fgroup { display: flex; flex-direction: column; gap: 4px; }
.fgroup label { font-size: 10px; letter-spacing: 2px; color: var(--dim); text-transform: uppercase; }
.fgroup select { min-width: 150px; max-width: 220px; }
#clear { align-self: end; }

main { padding: 16px 18px 60px; max-width: 1500px; margin: 0 auto; }
#count { color: var(--dim); font-size: 13px; margin-bottom: 12px; letter-spacing: 1px; }
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.card:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: 0 6px 24px rgba(124,92,255,.25); }
.card img { width: 100%; aspect-ratio: 1; display: block; image-rendering: pixelated; background: #000; }
.card .meta { padding: 8px 10px; }
.card .nm { font-size: 13px; font-weight: bold; }
.card .cls { font-size: 11px; color: var(--acc2); letter-spacing: 1px; margin-top: 2px; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 26px 0 10px; flex-wrap: wrap; }
.pager .info { color: var(--dim); font-size: 13px; min-width: 200px; text-align: center; }

/* detail modal */
.overlay {
  position: fixed; inset: 0; background: rgba(2,4,10,.86); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; }
.detail {
  background: var(--bg2); border: 1px solid var(--acc); border-radius: 12px;
  max-width: 920px; width: 100%; max-height: 92vh; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  box-shadow: 0 0 60px rgba(124,92,255,.3);
}
.detail .imgwrap { background: #000; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.detail img { width: 100%; image-rendering: pixelated; display: block; }
.detail .info { padding: 22px; }
.detail h2 { margin: 0 0 4px; color: var(--gold); letter-spacing: 2px; }
.detail .nav { display: flex; gap: 8px; margin: 10px 0 16px; }
.trait { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.trait .k { color: var(--dim); letter-spacing: 1px; text-transform: uppercase; font-size: 11px; }
.trait .v { text-align: right; }
.trait .rare { color: var(--acc2); font-size: 11px; display: block; }
.closebtn { float: right; }
.rawlink { font-size: 11px; color: var(--dim); margin-top: 14px; display: inline-block; }
@media (max-width: 700px) { .detail { grid-template-columns: 1fr; } .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } }

footer { text-align: center; color: var(--dim); font-size: 11px; padding: 24px; letter-spacing: 1px; border-top: 1px solid var(--line); }
.loading { text-align: center; padding: 60px 20px; color: var(--dim); font-size: 15px; letter-spacing: 2px; }
