:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #7aa2f7;
  --ok: #9ece6a;
  --pending: #e0af68;
  --failed: #f7768e;
  --border: #2a2e37;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: #12151b;
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { font-weight: 700; color: var(--text); font-size: 1.1rem; }
nav a { margin-left: 16px; color: var(--muted); }
nav a:hover { color: var(--text); }
main { padding: 16px 20px 40px; max-width: 1400px; margin: 0 auto; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
input, select, textarea, button {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
}
button, .btn {
  background: #243049;
  border: 1px solid #3d4f73;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-block;
}
button:hover, .btn:hover { filter: brightness(1.1); text-decoration: none; }
.stats { color: var(--muted); font-size: 13px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: #445; text-decoration: none; }
.cover { position: relative; aspect-ratio: 2/3; background: #0a0c10; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 600; font-size: 14px;
  background: linear-gradient(145deg, #1b2030, #0d1018);
}
.ph.large { min-height: 360px; font-size: 22px; }
.badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; padding: 2px 6px; border-radius: 6px;
  background: #000a; text-transform: uppercase;
}
.badge.ok { color: var(--ok); }
.badge.pending { color: var(--pending); }
.badge.failed { color: var(--failed); }
.meta { padding: 10px; }
.code { font-weight: 700; font-size: 13px; }
.title {
  font-size: 12px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 4px; min-height: 2.4em;
}
.sub { font-size: 11px; color: #6b7280; margin-top: 4px; }
.plot-snip { font-size: 11px; color: #8b95a5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; gap: 16px; justify-content: center; margin-top: 24px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.detail {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 24px;
}
@media (max-width: 720px) {
  .detail { grid-template-columns: 1fr; }
}
.detail-cover img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.detail-body h1 { margin: 0 0 4px; }
.detail-body h2 { margin: 0 0 12px; font-size: 1.1rem; font-weight: 500; color: #c6cad1; }
dl { display: grid; grid-template-columns: 80px 1fr; gap: 6px 12px; }
dt { color: var(--muted); }
dd { margin: 0; }
.links-box {
  margin-top: 20px; padding: 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
}
.links-box h3 { margin-top: 0; }
.links-box small { color: var(--muted); font-weight: 400; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.url { font-size: 12px; word-break: break-all; flex: 1; }
.muted { color: var(--muted); }
.err { color: var(--failed); font-size: 13px; }
.panel { max-width: 720px; }
textarea { width: 100%; margin: 12px 0; }
.result {
  margin-top: 16px; padding: 12px; border-radius: 8px;
  background: #152018; border: 1px solid #2d4a34;
}
.check-list { list-style: none; padding: 0; max-height: 60vh; overflow: auto; }
.check-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions form { display: inline; }
.plot {
  line-height: 1.55; color: #c9cdd4; margin: 16px 0;
  padding: 12px; background: var(--card); border-radius: 8px; border: 1px solid var(--border);
}
.jp-title { font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; }
.jp-plot { opacity: 0.7; font-size: 0.9rem; }
.previews, .actress-pics { margin-top: 20px; }
.pgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px;
}
.pgrid img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.apics { display: flex; flex-wrap: wrap; gap: 12px; }
.apics figure { margin: 0; text-align: center; width: 72px; }
.apics img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; border: 1px solid var(--border); }
.apics figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; }
.preview-vid { margin-top: 10px; }
.magnet code { font-size: 11px; word-break: break-all; display: block; margin-bottom: 8px; }
