:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #e4e7ec;
  --text: #16181d;
  --muted: #6b7280;
  --accent: #2f6bff;
  --accent-weak: #eaf0ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── 顶栏 ─────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.brand strong { font-size: 16px; letter-spacing: .2px; }
.brand span { font-size: 11.5px; color: var(--muted); }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.topnav a.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.account-chip {
  font-size: 12px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
}

/* ── 主体 ─────────────────────────────── */
.page { max-width: 1320px; margin: 0 auto; padding: 22px 22px 60px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.tabs button {
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: .15s;
}
.tabs button:hover { border-color: #c9d2e3; }
.tabs button.on {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-weight: 600;
}
.tabs button span { opacity: .6; margin-left: 5px; font-size: 12.5px; }

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 7px 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.search-field span { font-size: 13px; color: var(--muted); }
.search-field input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  width: 200px;
  color: var(--text);
}

.status-line { margin: 0 0 14px; font-size: 13px; color: var(--muted); }

/* ── 网格与卡片 ───────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(16,24,40,.08), 0 16px 36px rgba(16,24,40,.10); }

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #eceff4;
  cursor: pointer;
  overflow: hidden;
}
.thumb img, .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb .badge {
  position: absolute;
  left: 9px;
  top: 9px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  backdrop-filter: blur(4px);
}
.thumb .play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  backdrop-filter: blur(4px);
}

.card-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 9px; }
.card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  align-self: flex-start;
  padding: 6px 13px;
  font-size: 12.5px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--text);
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn[disabled] { opacity: .5; cursor: not-allowed; }
.copy-btn[disabled]:hover { border-color: var(--line); color: var(--text); }

/* ── 分页 ─────────────────────────────── */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; margin-top: 26px; }
.pager button {
  min-width: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 9px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text);
}
.pager button.on { background: var(--text); color: #fff; border-color: var(--text); font-weight: 600; }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }
.pager .gap { color: var(--muted); padding: 0 4px; }

/* ── 弹窗 ─────────────────────────────── */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 1000px;
  width: min(94vw, 1000px);
}
.modal::backdrop { background: rgba(12, 16, 24, .55); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .28);
}
.modal-preview { background: #0f1218; display: grid; place-items: center; min-height: 320px; }
.modal-preview img, .modal-preview video { max-width: 100%; max-height: 74vh; display: block; }
.modal-side { padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-side h2 { margin: 0; font-size: 17px; }
.modal-cat { margin: 0; font-size: 12.5px; color: var(--muted); }
.modal-side .copy-btn { padding: 9px 16px; font-size: 13.5px; }
.modal-status { margin: 0; font-size: 12.5px; color: var(--muted); min-height: 18px; }
.modal-note { margin: auto 0 0; font-size: 11.5px; color: var(--muted); }
.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .9);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

/* ── toast ────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  background: #16181d;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

@media (max-width: 760px) {
  .modal-card { grid-template-columns: 1fr; }
  .modal-side { padding: 16px; }
  .search-field { margin-left: 0; width: 100%; }
  .search-field input { width: 100%; }
}
