* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #02030a;
  overflow: hidden;
  color: #e7e2d4;
  font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 22px 28px 10px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(2, 3, 10, 0.72), rgba(2, 3, 10, 0));
}

header .title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.search, .tags, #card, #status { pointer-events: auto; }

.slogan {
  margin: 0;
  color: rgba(230, 215, 176, 0.78);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.08em;
}

.search input {
  width: 280px;
  margin-top: 0;
  padding: 8px 12px;
  border: 1px solid rgba(231, 226, 212, 0.25);
  border-radius: 999px;
  background: rgba(8, 10, 20, 0.45);
  color: #f3efe4;
  font: inherit;
  font-size: 14px;
}

.search input:focus {
  outline: 1px solid rgba(231, 226, 212, 0.55);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 74px;
  overflow: auto;
}

.tags button {
  border: 1px solid rgba(231, 226, 212, 0.18);
  border-radius: 999px;
  background: transparent;
  color: #c9c3b4;
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}

.tags button.active {
  color: #1b1408;
  background: #e6d7b0;
  border-color: #e6d7b0;
}

#card {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 3;
  width: min(360px, calc(100vw - 56px));
  padding: 18px 18px 14px;
  border: 1px solid rgba(231, 226, 212, 0.16);
  border-radius: 16px;
  background: rgba(6, 8, 16, 0.78);
  backdrop-filter: blur(8px);
}

#card p { margin: 0 0 8px; }

#card-title {
  font-size: 22px;
  line-height: 1.35;
}

#card-authors, #card li {
  color: #c9c3b4;
  font-size: 13px;
}

#card-score { font-size: 15px; }

#card ul {
  margin: 12px 0 0;
  padding: 0 8px 0 0;
  list-style: none;
  max-height: 180px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 215, 176, 0.45) transparent;
}

#card ul::-webkit-scrollbar {
  width: 4px;
}

#card ul::-webkit-scrollbar-track {
  background: transparent;
}

#card ul::-webkit-scrollbar-thumb {
  background: rgba(230, 215, 176, 0.42);
  border-radius: 999px;
}

#card ul::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 215, 176, 0.75);
}

#card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  cursor: pointer;
}

#card li.missing { opacity: 0.45; cursor: default; }

footer {
  position: fixed;
  left: 28px;
  right: 28px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin: 0;
  pointer-events: none;
  color: rgba(183, 177, 162, 0.46);
  font-size: 12px;
  letter-spacing: 0.04em;
}

footer a,
footer span,
footer form {
  pointer-events: auto;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  color: rgba(230, 215, 176, 0.82);
}

footer form {
  display: flex;
  align-items: center;
  gap: 6px;
}

footer input {
  width: 168px;
  padding: 3px 10px;
  border: 1px solid rgba(231, 226, 212, 0.16);
  border-radius: 999px;
  background: transparent;
  color: rgba(231, 226, 212, 0.72);
  font: inherit;
  font-size: 12px;
}

footer input::placeholder {
  color: rgba(183, 177, 162, 0.36);
}

footer input:focus {
  outline: 1px solid rgba(231, 226, 212, 0.32);
}

#status {
  margin: 0;
  color: rgba(183, 177, 162, 0.72);
  font-size: 12px;
  letter-spacing: 0.08em;
}
