/* 01-51cg · 对齐源站大封面卡气质 · 去广告纯净壳 */
:root {
  --bg: #1a1a1a;
  --bg-elev: #242424;
  --ink: #ffffff;
  --muted: #a8a8a8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff4d8d;
  --accent-2: #ff6b9d;
  --radius: 14px;
  --pad: 16px;
  --max: 920px;
  --font-brand: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

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

/* 正文锚文本：源站 Mirages 青绿，便于发现可点链接 */
.article__content a {
  color: #1abc9c;
  text-decoration: none;
  word-break: break-all;
}

.article__content a:hover {
  color: #16a085;
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

/* Header / H5 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(26, 26, 26, 0.94);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.h5-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 0 10px;
  gap: 8px;
}

.nav-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #2a2a2a;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-toggle__icon {
  width: 16px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}

.brand {
  justify-self: center;
  font-family: var(--font-brand);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand span {
  color: var(--accent);
}

.h5-bar__spacer {
  justify-self: end;
  width: 72px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  padding: 0 4px 0 16px;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  padding: 12px 0;
  outline: none;
}

.search-bar input::placeholder {
  color: #888;
}

.search-bar__btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-bar--page {
  margin-bottom: 16px;
}

.search-status {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 12px;
}

/* 导航抽屉 */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: min(86vw, 320px);
  height: 100vh;
  background: #161616;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.28s ease;
}

.nav-drawer[hidden] {
  display: none !important;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.nav-drawer__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #2a2a2a;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.nav-drawer__body {
  overflow: auto;
  padding: 8px 0 24px;
  overscroll-behavior: contain;
}

.nav-drawer__link,
.nav-drawer__group summary,
.nav-drawer__sub {
  display: block;
  padding: 12px 18px;
  color: var(--ink);
  font-size: 0.95rem;
}

.nav-drawer__link:hover,
.nav-drawer__sub:hover {
  background: rgba(255, 77, 141, 0.1);
  color: var(--accent-2);
}

.nav-drawer__group summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.nav-drawer__group summary::-webkit-details-marker {
  display: none;
}

.nav-drawer__group summary::after {
  content: "▾";
  float: right;
  opacity: 0.55;
}

.nav-drawer__group[open] summary::after {
  content: "▴";
}

.nav-drawer__kids {
  padding: 0 0 6px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-drawer__sub {
  padding-left: 28px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
}

body.nav-open {
  overflow: hidden;
}

/* Hero */
.hero {
  padding: 22px 0 16px;
  text-align: center;
}

.hero__brand {
  font-family: var(--font-brand);
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 700;
}

.hero__brand span {
  color: var(--accent);
}

.hero__lead {
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 36em;
  line-height: 1.55;
}

/* Feed — 源站式大封面卡 */
.feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 40px;
}

.feed-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  isolation: isolate;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.feed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.feed-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.feed-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.feed-card:hover .feed-card__media img {
  transform: scale(1.04);
}

.feed-card__mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 28px 18px 22px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.55) 62%, rgba(0, 0, 0, 0.82) 100%);
  pointer-events: none;
}

.feed-card__title {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 36em;
}

.feed-card__meta {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 40px;
}

.pager a,
.pager span {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.pager a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.pager .is-current {
  background: rgba(255, 77, 141, 0.18);
  border-color: rgba(255, 77, 141, 0.45);
  color: var(--ink);
}

/* Article */
.article {
  padding: 20px 0 48px;
}

.article__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 77, 141, 0.14);
  color: var(--accent-2);
}

.article h1 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.3;
  font-weight: 700;
}

.article__meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.player {
  margin: 1rem 0 1.25rem;
  background: #0d0d0d;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.article__videos {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.article__videos .player:first-child {
  margin-top: 0;
}

.player__label {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #ccc;
}

.player__err {
  margin: 0;
  padding: 0.65rem 0.75rem 0.9rem;
  font-size: 0.85rem;
  color: #ff8fab;
}

.player video {
  display: block;
  width: 100%;
  max-height: 70vh;
  aspect-ratio: 16 / 9;
  background: #000;
}

.article__content {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.article__content p {
  margin: 0 0 1em;
}

.article__content img {
  border-radius: var(--radius);
  margin: 12px 0;
}

/* Category head */
.cat-head {
  padding: 24px 0 12px;
  text-align: center;
}

.cat-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-brand);
  font-size: 1.85rem;
}

.cat-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 10px;
}

.site-footer__links a:hover {
  color: var(--ink);
}

/* 404 */
.err {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
  padding: 40px var(--pad);
}

.err h1 {
  font-family: var(--font-brand);
  font-size: 3rem;
  margin: 0;
  color: var(--accent);
}

@media (min-width: 720px) {
  .feed {
    gap: 22px;
  }

  .feed-card__media {
    aspect-ratio: 2 / 1;
  }

  .feed-card__mask {
    padding: 36px 28px 26px;
  }
}
