/* =========================================================
   效实中学媒体中心
   ========================================================= */

:root {
  --paper: #f4f0e6;
  --paper-2: #faf7ef;
  --card: #fffdf8;
  --ink: #18241d;
  --ink-soft: #3c4a40;
  --muted: #6e7a70;
  --line: #ddd7c7;
  --line-strong: #c9c1ad;
  --primary: #1f5a44;
  --primary-dark: #154432;
  --primary-soft: #e3ede6;
  --accent: #c05a32;
  --shadow-soft: 0 8px 22px rgba(29, 45, 34, 0.08);
  --shadow-lift: 0 18px 38px rgba(29, 45, 34, 0.16);
  --radius: 16px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(192, 90, 50, 0.065), transparent 62%),
    radial-gradient(900px 520px at -8% 8%, rgba(31, 90, 68, 0.075), transparent 60%),
    var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

::selection {
  background: rgba(31, 90, 68, 0.2);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:disabled,
.btn.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: #fffdf8;
  box-shadow: 0 9px 22px rgba(31, 90, 68, 0.18);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-quiet:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(31, 90, 68, 0.04);
}

.btn-danger {
  background: #fbe9e4;
  color: #9c3218;
  border-color: #f0c9bd;
}

.btn-danger:hover {
  background: #f6d9d1;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13.5px;
}

.btn-block {
  width: 100%;
}

/* ---------- 顶部 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px clamp(18px, 4.5vw, 58px);
  background: rgba(244, 240, 230, 0.82);
  border-bottom: 1px solid rgba(201, 193, 173, 0.55);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, #2a7056, #174534);
  color: #fffdf8;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(21, 68, 50, 0.24);
}

.brand-text {
  min-width: 0;
}

.brand-text strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.19em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ghost-link {
  color: var(--ink-soft);
  font-size: 13.5px;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.ghost-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.user-area {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.user-chip:hover {
  border-color: var(--line-strong);
  box-shadow: 0 3px 10px rgba(29, 45, 34, 0.08);
}

.user-chip .avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.user-chip .name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(29, 45, 34, 0.18);
}

.dropdown-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.dropdown-head strong {
  display: block;
  font-size: 13.5px;
}

.dropdown-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffdf8;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  align-items: end;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 28px clamp(42px, 5vw, 64px);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.eyebrow span {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(42px, 6.2vw, 80px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(192, 90, 50, 0.32);
  text-decoration-thickness: 7px;
  text-underline-offset: 9px;
}

.lede {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.stat-label {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.hero-watermark {
  position: absolute;
  right: -26px;
  bottom: -66px;
  z-index: 0;
  color: rgba(31, 90, 68, 0.038);
  font-family: var(--serif);
  font-size: clamp(180px, 24vw, 300px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- 影像库 ---------- */

.library {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 28px 84px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
}

.section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  max-width: 100%;
  height: 44px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 90, 68, 0.08);
}

.search-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #98a099;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 13px 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
}

.sort-box select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

/* ---------- 分类 ---------- */

.category-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s,
    box-shadow 0.2s;
}

.category-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.category-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.category-chip:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.category-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fffdf8;
  box-shadow: 0 6px 16px rgba(31, 90, 68, 0.16);
}

.category-chip.is-active span {
  color: rgba(255, 253, 248, 0.7);
}

.category-chip.is-active::before {
  background: #fffdf8;
  opacity: 0.9;
}

.category-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.93);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cat-military { color: #6b5a1f; }
.cat-sports { color: #a94d22; }
.cat-performance { color: #a03a4c; }
.cat-campus { color: #1f5a44; }
.cat-trip { color: #2f6180; }
.cat-campus-film { color: #2f6f69; }
.cat-student-work { color: #65528a; }
.cat-other { color: #5f6b61; }

/* ---------- 标签 ---------- */

.tag-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tag-bar::-webkit-scrollbar {
  display: none;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tag-chip span {
  color: var(--muted);
  font-size: 11px;
}

.tag-chip:hover {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.65);
}

.tag-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fffdf8;
}

.tag-chip.is-active span {
  color: rgba(255, 253, 248, 0.7);
}

/* ---------- 网格 ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px 22px;
}

.video-card {
  position: relative;
  min-width: 0;
}

.cover-link {
  display: block;
  text-decoration: none;
}

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8e2d3, #d6d0bf);
  box-shadow: var(--shadow-soft);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(14, 25, 19, 0.3));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.video-card:hover .cover,
.video-card:focus-within .cover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.video-card:hover .cover img {
  transform: scale(1.035);
}

.video-card:hover .cover::after {
  opacity: 1;
}

.cover .duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(14, 25, 19, 0.78);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(14, 25, 19, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.play-orb svg {
  width: 21px;
  height: 21px;
  margin-left: 3px;
  fill: currentColor;
}

.video-card:hover .play-orb,
.video-card:focus-within .play-orb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cover.is-broken img {
  opacity: 0;
}

.cover.is-broken::before {
  content: "效实";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(31, 90, 68, 0.32);
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.08em;
}

.card-body {
  padding: 12px 2px 0;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--primary);
}

.card-menu {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-card:hover .card-menu,
.video-card:focus-within .card-menu {
  opacity: 1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-btn.is-danger:hover {
  background: #fbe9e4;
  color: #9c3218;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 7px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.card-owner {
  color: var(--ink-soft);
  text-decoration: none;
}

.card-owner:hover {
  color: var(--primary);
}

.card-meta .dot {
  opacity: 0.48;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mini-tag {
  padding: 2px 7px;
  border: 0;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.mini-tag:hover {
  background: #d3e4d9;
}

.card-note {
  margin: 7px 0 0;
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---------- 空状态 / 加载更多 ---------- */

.empty-state {
  display: grid;
  justify-items: center;
  padding: 72px 20px 64px;
  text-align: center;
}

.empty-state svg {
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}

.search-thumb.is-broken img,
.preview-cover-wrap.is-broken img {
  opacity: 0;
}

/* ---------- 骨架屏 ---------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background: #e6e0d1;
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 253, 248, 0.65), transparent);
  animation: shimmer 1.4s infinite;
}

.skeleton-cover {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}

.skeleton-line {
  height: 13px;
  margin-top: 13px;
}

.skeleton-line.short {
  width: 58%;
  margin-top: 9px;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ---------- 页脚 ---------- */

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 28px 52px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer p {
  margin: 0;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fffdf8;
  font-family: var(--serif);
  font-size: 14px;
}

.footer-note {
  max-width: 430px;
  text-align: right;
}

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 30, 23, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.2s ease;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: 90vh;
  padding: 30px;
  overflow: auto;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(15, 26, 20, 0.35);
  animation: pop-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.modal-wide {
  width: min(720px, 100%);
}

.modal-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.modal-eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.modal-card h2 {
  margin: 6px 0 20px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Tabs ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tab {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tab.is-active {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(29, 45, 34, 0.1);
}

/* ---------- 表单 ---------- */

.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.field small {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea,
.admin-import textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #fffefb;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder,
.admin-import textarea::placeholder {
  color: #a0a79f;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.admin-import textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 90, 68, 0.08);
}

.form-error {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #f1cec2;
  border-radius: 9px;
  background: #fbeae4;
  color: #a3371c;
  font-size: 13px;
  line-height: 1.55;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.upload-hint {
  margin: -10px 0 20px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.field-grow {
  flex: 1;
  min-width: 0;
}

/* ---------- 投稿预览 ---------- */

.resolve-preview {
  display: flex;
  gap: 16px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}

.preview-cover-wrap {
  position: relative;
  width: 190px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #e2ddce;
}

.preview-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-cover-wrap .duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(14, 25, 19, 0.78);
  color: #fff;
  font-size: 11px;
}

.preview-body {
  min-width: 0;
}

.preview-body h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.preview-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.preview-desc {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-note {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.6;
}

.add-fields {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

/* ---------- 搜索结果 ---------- */

.search-results {
  display: grid;
  gap: 10px;
  max-height: 390px;
  margin-top: 18px;
  overflow: auto;
  padding-right: 2px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}

.search-thumb {
  width: 118px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #e2ddce;
}

.search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-info {
  flex: 1;
  min-width: 0;
}

.search-info h4 {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-info p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.search-cat {
  font-weight: 600;
}

.search-item .btn {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 12.5px;
}

/* ---------- 管理导入 ---------- */

.admin-import {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-import summary {
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.admin-import textarea {
  margin: 12px 0;
  resize: vertical;
}

.import-result {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 编辑 ---------- */

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 4px;
}

/* ---------- 审核队列 ---------- */

.review-list {
  display: grid;
  gap: 12px;
  max-height: 62vh;
  margin-top: 20px;
  overflow: auto;
  padding-right: 2px;
}

.review-item {
  display: flex;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}

.review-thumb {
  width: 150px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 9px;
  background: #e2ddce;
}

.review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-body {
  flex: 1;
  min-width: 0;
}

.review-body h3 {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.review-body h3 a {
  color: inherit;
  text-decoration: none;
}

.review-body h3 a:hover {
  color: var(--primary);
}

.review-meta {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.review-note {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.review-tag {
  cursor: default;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.review-actions select {
  min-width: 110px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffefb;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  outline: 0;
}

.review-actions select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 90, 68, 0.08);
}

.review-actions .btn {
  padding: 7px 14px;
  font-size: 12.5px;
}

.review-empty {
  padding: 46px 20px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

@media (max-width: 640px) {
  .review-item {
    flex-direction: column;
  }

  .review-thumb {
    width: 100%;
  }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: calc(100% - 40px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf8;
  font-size: 13.5px;
  box-shadow: 0 14px 34px rgba(15, 26, 20, 0.3);
  transform: translateX(-50%);
  animation: toast-in 0.22s ease;
}

.toast.is-error {
  background: #8f2f19;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
  }

  .hero-stats {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 34px;
    padding-left: 0;
    border-left: 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
  }

  .hero-watermark {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
  }

  .search-box {
    flex: 1;
    width: auto;
    min-width: 220px;
  }
}

@media (max-width: 760px) {
  .ghost-link {
    display: none;
  }

  .brand-text small {
    display: none;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 26px 16px;
  }

  .site-footer {
    flex-direction: column;
    gap: 14px;
  }

  .footer-note {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 11px 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 21px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .header-actions {
    gap: 9px;
  }

  .hero {
    padding: 42px 18px 38px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .hero-stats {
    gap: 22px;
  }

  .stat-num {
    font-size: 30px;
  }

  .library {
    padding: 8px 18px 64px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 13px;
  }

  .card-menu {
    opacity: 1;
  }

  .card-title {
    font-size: 14px;
  }

  .card-meta {
    font-size: 11.5px;
    gap: 2px 5px;
  }

  .site-footer {
    padding: 28px 18px 44px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    padding: 24px 20px;
    border-radius: 18px;
    max-height: 94vh;
  }

  .modal-card h2 {
    font-size: 26px;
  }

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

  .resolve-preview {
    flex-direction: column;
  }

  .preview-cover-wrap {
    width: 100%;
  }

  .search-thumb {
    width: 92px;
  }

  .search-item {
    align-items: flex-start;
  }

  .search-item .btn {
    padding: 6px 11px;
  }

  .user-chip .name {
    display: none;
  }

  .user-chip {
    padding: 4px;
  }
}

@media (max-width: 430px) {
  .hero h1 {
    font-size: clamp(33px, 9.4vw, 46px);
  }

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

  .card-title {
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .search-box {
    min-width: 0;
  }

  .sort-box span {
    display: none;
  }
}

@media (hover: none) {
  .card-menu {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
