:root {
  color: #211f1c;
  background: #f6f0e8;
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial,
    sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.9), rgba(241, 232, 220, 0.96)),
    #f6f0e8;
}

button,
input,
select {
  font: inherit;
}

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

svg {
  display: block;
}

main {
  min-height: 100vh;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(33, 31, 28, 0.94), rgba(69, 23, 20, 0.84)),
    url("./brand-atmosphere.png") center / cover;
  color: #fff8ea;
}

.auth-shell {
  display: grid;
  width: min(100%, 940px);
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 42px;
  align-items: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand .brand-mark {
  border-color: rgba(245, 231, 208, 0.42);
  background: #f5e7d0;
  color: #211f1c;
}

.auth-brand strong {
  display: block;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.auth-brand small {
  display: block;
  margin-top: 8px;
  color: #e1c9a5;
  font-size: 16px;
}

.auth-card {
  padding: 24px;
  border: 1px solid rgba(245, 231, 208, 0.2);
  border-radius: 8px;
  background: rgba(33, 31, 28, 0.82);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-tabs button,
.auth-submit,
.session-bar button {
  min-height: 42px;
  border: 1px solid rgba(245, 231, 208, 0.18);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs button {
  background: rgba(255, 255, 255, 0.06);
  color: #d8cab6;
}

.auth-tabs button.active {
  border-color: rgba(194, 145, 72, 0.7);
  background: rgba(194, 145, 72, 0.22);
  color: #fff8ea;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: #d8cab6;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(245, 231, 208, 0.18);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.07);
  color: #fff8ea;
}

.auth-form input::placeholder {
  color: #8d8277;
}

.auth-form input:focus {
  border-color: rgba(194, 145, 72, 0.78);
}

.auth-submit {
  margin-top: 8px;
  border-color: #8b201b;
  background: #8b201b;
  color: #fff8ea;
}

.auth-submit:disabled,
.session-bar button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: #d8cab6;
  font-size: 13px;
}

.auth-message.error {
  color: #ffb9ae;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 18px 64px;
  border-bottom: 1px solid rgba(33, 31, 28, 0.1);
  background: rgba(246, 240, 232, 0.88);
  backdrop-filter: blur(18px);
}

.session-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #645b52;
  font-size: 13px;
}

.session-bar span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-bar button {
  min-height: 36px;
  padding: 0 12px;
  background: #211f1c;
  color: #f5e7d0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(136, 30, 26, 0.42);
  border-radius: 8px;
  background: #211f1c;
  color: #f5e7d0;
  font-size: 20px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: #7d7166;
  font-size: 12px;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #645b52;
  font-size: 14px;
}

nav a:hover {
  color: #8b201b;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 72px;
  align-items: center;
  min-height: 520px;
  padding: 86px 64px 38px;
  overflow: hidden;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #8b201b;
  font-size: 14px;
  font-weight: 700;
}

.spark-icon,
.filter-icon,
.shield-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.spark-icon::before,
.spark-icon::after {
  position: absolute;
  content: "";
  background: currentColor;
  transform: rotate(45deg);
}

.spark-icon::before {
  top: 1px;
  left: 6px;
  width: 4px;
  height: 14px;
}

.spark-icon::after {
  top: 6px;
  left: 1px;
  width: 14px;
  height: 4px;
}

.filter-icon {
  border: 2px solid currentColor;
  border-top: 0;
  transform: skewX(-12deg);
}

.shield-icon {
  border: 2px solid currentColor;
  border-radius: 8px 8px 10px 10px;
}

h1 {
  max-width: 780px;
  margin: 0 0 26px;
  color: #1d1a17;
  font-size: 104px;
  line-height: 0.92;
  letter-spacing: 0;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 760px);
  min-height: 64px;
  padding: 0 20px;
  border: 1px solid rgba(33, 31, 28, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.92);
  box-shadow: 0 22px 60px rgba(58, 35, 25, 0.12);
}

.search-shell svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #8b201b;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #211f1c;
  font-size: 18px;
}

.search-shell input::placeholder {
  color: #9a8c7e;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 760px);
  margin-top: 18px;
}

.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  align-items: center;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(33, 31, 28, 0.1);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.62);
}

.stat-icon {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #211f1c;
}

.stat-icon::before {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  content: "";
}

.stat-icon.database::before {
  border: 2px solid #f5e7d0;
}

.stat-icon.quark::before {
  background: #31b088;
}

.stat-icon.baidu::before {
  background: #70a1ff;
}

.stat-value {
  color: #211f1c;
  font-size: 21px;
  font-weight: 800;
}

.stat-label {
  color: #786c60;
  font-size: 13px;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(30, 24, 20, 0.2);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.library {
  padding: 34px 64px 64px;
  background: #211f1c;
  color: #fbf7ef;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  color: #f2dfc1;
  font-weight: 800;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(245, 231, 208, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d8cab6;
  font-size: 13px;
}

.filters select {
  min-width: 104px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fbf7ef;
  cursor: pointer;
}

.filters option {
  color: #211f1c;
}

.state-panel {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px solid rgba(245, 231, 208, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #d8cab6;
}

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

.result-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  padding: 18px;
  border: 1px solid rgba(245, 231, 208, 0.14);
  border-radius: 8px;
  background: #2b2824;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.result-card h2 {
  display: -webkit-box;
  min-height: 60px;
  margin: 0;
  overflow: hidden;
  color: #fff8ea;
  font-size: 20px;
  line-height: 1.32;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 10px 0 0;
  overflow: hidden;
  color: #bfb2a1;
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-card p.empty-copy {
  visibility: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(194, 145, 72, 0.34);
  border-radius: 8px;
  background: rgba(194, 145, 72, 0.12);
  color: #f1d29b;
  font-size: 12px;
  font-weight: 700;
}

.tag.ai {
  border-color: rgba(178, 41, 34, 0.46);
  background: rgba(178, 41, 34, 0.16);
  color: #ffb9ae;
}

.tag.heat {
  border-color: rgba(212, 127, 52, 0.48);
  background: rgba(212, 127, 52, 0.16);
  color: #ffc27b;
}

.tag.category {
  border-color: rgba(88, 139, 115, 0.5);
  background: rgba(88, 139, 115, 0.16);
  color: #bde7d2;
}

.tag.category-ai_short {
  border-color: rgba(178, 41, 34, 0.46);
  background: rgba(178, 41, 34, 0.16);
  color: #ffb9ae;
}

.tag.category-animation {
  border-color: rgba(91, 142, 214, 0.5);
  background: rgba(91, 142, 214, 0.16);
  color: #c7ddff;
}

.tag.category-tv {
  border-color: rgba(176, 128, 205, 0.5);
  background: rgba(176, 128, 205, 0.16);
  color: #e6cbf5;
}

.tag.muted {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #bfb2a1;
}

.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.disk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.disk-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.disk-button:hover {
  transform: translateY(-1px);
}

.disk-button.quark {
  background: #176b55;
}

.disk-button.baidu {
  background: #255fba;
}

.disk-button:disabled {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #8d8277;
  cursor: not-allowed;
}

.disk-button:disabled:hover {
  transform: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  color: #d8cab6;
}

.pagination button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(245, 231, 208, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fbf7ef;
  cursor: pointer;
}

.pagination button:disabled {
  color: #746b61;
  cursor: not-allowed;
}

footer {
  display: grid;
  grid-template-columns: auto minmax(0, 760px);
  gap: 24px;
  padding: 30px 64px 46px;
  border-top: 1px solid rgba(33, 31, 28, 0.1);
  background: #f6f0e8;
  color: #645b52;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8b201b;
  font-weight: 800;
}

footer p {
  max-width: 780px;
  margin: 0;
  font-size: 13px;
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand strong {
    font-size: 42px;
  }

  .site-header,
  .hero,
  .library,
  footer {
    padding-right: 28px;
    padding-left: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 54px;
  }

  h1 {
    font-size: 72px;
  }

  .hero-visual {
    min-height: 220px;
  }

  .hero-visual img {
    min-height: 220px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 18px;
  }

  .auth-shell {
    gap: 22px;
  }

  .auth-brand strong {
    font-size: 34px;
  }

  .auth-card {
    padding: 18px;
  }

  .site-header,
  .hero,
  .library,
  footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 32px;
  }

  h1 {
    font-size: 54px;
  }

  .search-shell {
    min-height: 58px;
  }

  .search-shell input {
    font-size: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .filters,
  .filters label {
    width: 100%;
  }

  .filters select {
    flex: 1;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination button {
    justify-content: center;
  }

  footer {
    grid-template-columns: 1fr;
  }
}
