/* 遗漏王网页版 — 墨色台面风格 */
:root {
  --bg: #e8e4db;
  --bg-deep: #d9d3c7;
  --ink: #1a2332;
  --ink-soft: #3d4a5c;
  --muted: #6b7585;
  --panel: rgba(255, 252, 247, 0.92);
  --line: rgba(26, 35, 50, 0.12);
  --accent: #b33a2b;
  --accent-soft: #d4654a;
  --ok: #1f6b4a;
  --warn: #9a6b12;
  --shadow: 0 18px 50px rgba(26, 35, 50, 0.12);
  --radius: 14px;
  --font-display: "ZCOOL XiaoWei", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(179, 58, 43, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(26, 35, 50, 0.08), transparent 50%),
    linear-gradient(165deg, var(--bg), var(--bg-deep));
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(26, 35, 50, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 35, 50, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

.app {
  position: relative;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  animation: rise 0.55s ease both;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--ink);
}
.brand-sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: var(--ink);
  color: #f7f3ea;
  border-color: transparent;
}
.btn-accent {
  background: var(--accent);
  color: #fff7f2;
  border-color: transparent;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  animation: rise 0.6s 0.05s ease both;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}
.tab.active {
  background: var(--ink);
  color: #f7f3ea;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1.3rem;
  animation: rise 0.65s 0.08s ease both;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 800px) {
  .toolbar { grid-template-columns: 1fr 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .toolbar { grid-template-columns: 1fr; }
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }

.view { display: none; }
.view.active { display: block; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 700px) {
  .hero-stats { grid-template-columns: 1fr; }
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, #fff, #f6f1e8);
}
.stat .k { color: var(--muted); font-size: 0.8rem; }
.stat .v {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.04em;
}
.stat .v.num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.85rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 700px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #fff;
}
.card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.card .row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
}
.card .row:first-of-type { border-top: 0; }
.omit {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.stats-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.5;
}
.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0.2rem;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}
.ball.blue {
  background: #2a5f9e;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #f3eee4;
  color: var(--ink-soft);
  font-weight: 600;
}
tr:hover td { background: rgba(179, 58, 43, 0.04); }

.muted { color: var(--muted); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.err { color: var(--accent); }

.status-bar {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip-list-scroll {
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.55);
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.recommend-filters {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.recommend-filter-row {
  display: grid;
  grid-template-columns: 11.5rem 1fr 1fr;
  gap: 0.45rem 0.65rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.45);
}
.recommend-filter-row.off {
  opacity: 0.55;
}
.recommend-filter-row .filter-name {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.recommend-filter-row .filter-name label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.recommend-filter-row .filter-tip {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}
.recommend-filter-row .field {
  margin: 0;
}
@media (max-width: 720px) {
  .recommend-filter-row {
    grid-template-columns: 1fr 1fr;
  }
  .recommend-filter-row .filter-name {
    grid-column: 1 / -1;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 30, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: min(460px, 100%);
  background: #fffaf3;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.modal h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.modal p { color: var(--muted); margin: 0 0 0.9rem; line-height: 1.5; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-check {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin: 0.4rem 0 0.8rem;
}
.form-check label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.4em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -0.05em;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.seo-block {
  margin-top: 1.75rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.7s ease both;
  animation-delay: 0.08s;
}
.seo-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.35;
}
.seo-lead {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}
.seo-features {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.7;
}
.seo-features li { margin-bottom: 0.35rem; }
.seo-features strong { color: var(--ink); font-weight: 600; }
.seo-keywords {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.contact-block {
  margin-top: 1.1rem;
  padding: 1.15rem 1.25rem 1.2rem;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.7s ease both;
  animation-delay: 0.12s;
}
.contact-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.contact-list {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.contact-row {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--line);
}
.contact-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.contact-row dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.contact-row dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.contact-row a {
  color: var(--ink);
  text-decoration-thickness: 1px;
}
.contact-row a:hover { color: var(--accent); }
.contact-note {
  margin: 0.95rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.55;
}
.footer p { margin: 0 0 0.35rem; }
.footer p:last-child { margin-bottom: 0; }
.footer a { color: var(--ink-soft); text-decoration-thickness: 1px; }
.footer a:hover { color: var(--accent); }
.footer-brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.footer-copy {
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.footer-note {
  font-size: 0.75rem;
  opacity: 0.9;
}
