:root {
  color-scheme: light;
  --ink: #18231f;
  --muted: #64716b;
  --soft: #eef4f0;
  --line: #d7e2dc;
  --paper: #f7faf5;
  --surface: #ffffff;
  --green: #15724a;
  --green-dark: #0f5136;
  --blue: #2563a8;
  --amber: #b76512;
  --shadow: 0 18px 46px rgba(24, 35, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    linear-gradient(180deg, rgba(226, 239, 230, 0.9), rgba(247, 250, 245, 0) 360px),
    var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

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

a:hover {
  color: var(--green);
}

.site-header,
.site-footer,
main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.nav,
.eyebrow,
.card-meta,
.site-footer {
  color: var(--muted);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
}

.nav a:hover {
  background: rgba(21, 114, 74, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: stretch;
  padding: 28px 0 22px;
}

.hero-copy {
  padding: 18px 0;
}

.hero-copy h1,
.page-title h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy p,
.page-title p,
.section-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
}

.eyebrow {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--green-dark);
}

.hero-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(21, 114, 74, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-panel div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hero-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hero-panel strong {
  color: var(--green-dark);
  font-size: 26px;
  line-height: 1;
}

.hero-panel span {
  color: var(--muted);
}

.search-box {
  display: flex;
  width: min(660px, 100%);
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 26px rgba(24, 35, 31, 0.07);
}

.search-box input,
.search-box button {
  min-height: 50px;
  border: 0;
  font: inherit;
}

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  outline: none;
}

.search-box input:focus {
  box-shadow: inset 0 0 0 2px rgba(21, 114, 74, 0.22);
}

.search-box button,
.download-button,
.card-link {
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.search-box button {
  padding: 0 24px;
}

.category-strip,
.category-grid,
.resource-grid {
  display: grid;
  gap: 16px;
}

.category-strip {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 8px 0 42px;
}

.category-strip a,
.category-card,
.resource-card,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.category-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(24, 35, 31, 0.05);
}

.category-strip strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-dark);
}

.section-head,
.page-title {
  margin: 36px 0 18px;
}

.compact-title {
  padding: 36px 0 8px;
}

.section-head h2,
.page-title h1,
.detail-header h1 {
  margin-top: 0;
}

.section-head h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.12;
}

.search-status {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--green-dark);
  font-weight: 700;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.search-result-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(24, 35, 31, 0.06);
}

.search-result-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.28;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
}

.resource-grid[data-empty]::after {
  content: "暂无匹配资源";
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(24, 35, 31, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.resource-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.28;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-meta a {
  color: var(--green-dark);
  font-weight: 800;
}

.mini-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-tags span,
.tag-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.spec-list,
.fact-sheet {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
}

.spec-list div,
.fact-sheet div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.card-link,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
}

.card-link {
  margin-top: 4px;
  background: var(--ink);
  align-self: flex-start;
  min-width: 108px;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.category-card {
  padding: 24px;
  min-height: 190px;
  box-shadow: 0 10px 28px rgba(24, 35, 31, 0.06);
}

.category-card span,
.category-card strong,
.category-card small {
  display: block;
}

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  margin: 8px 0;
  color: var(--amber);
  font-size: 46px;
  line-height: 1;
}

.category-card small {
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-header h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
}

.detail-header p {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
}

.resource-overview {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.resource-overview--text {
  grid-template-columns: 1fr;
}

.resource-summary {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.resource-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 16px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.96), rgba(17, 17, 17, 0.9));
  text-align: center;
}

.resource-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--resource-image);
  background-size: cover;
  background-position: center;
  filter: blur(12px);
  transform: scale(1.04);
  opacity: 0.22;
}

.resource-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
}

.resource-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: min(100%, 520px);
  height: auto;
  max-height: 420px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 6px;
}

.resource-summary h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.resource-summary p {
  margin: 0;
}

.detail-layout {
  margin-top: 26px;
}

.detail-main {
  display: grid;
  gap: 18px;
}

.detail-main section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.detail-main h2,
.related h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.check-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.highlight-panel {
  margin-top: 18px;
}

.highlight-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.highlight-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight-list li {
  position: relative;
  padding: 12px 12px 12px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.highlight-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.cast-panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.cast-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.cast-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.cast-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.cast-card h3 span {
  margin-left: 8px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.cast-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cast-card .cast-works {
  margin-top: 8px;
  color: var(--ink);
}

.detail-side {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.download-button {
  min-height: 50px;
}

.follow-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.follow-card h2 {
  margin: 0;
  font-size: 18px;
}

.follow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.follow-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.related {
  margin: 42px 0 0;
}

.related h2 {
  margin-bottom: 16px;
}

.related-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.related-grid .resource-card {
  min-height: 250px;
  padding: 18px;
}

.related-grid .resource-card h2 {
  font-size: 18px;
}

.related-grid .resource-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-grid .mini-tags {
  display: none;
}

.related-grid .spec-list {
  gap: 8px;
}

.related-grid .spec-list div {
  padding-top: 8px;
}

.related-grid .card-link {
  min-height: 38px;
  min-width: 92px;
  padding: 0 14px;
  font-size: 14px;
}

.site-footer {
  margin-top: 50px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .site-header,
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .brand small {
    display: none;
  }

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

  .hero,
  .detail-header {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-copy {
    padding: 20px 0 0;
  }

  .detail-header {
    padding: 22px;
  }

  .resource-overview {
    grid-template-columns: 1fr;
  }

  .resource-image {
    width: 100%;
    padding: 12px;
  }
}
