/* ============================================================
   玩偶哥哥 · 动漫库 复刻版
   视觉基线取自 wogg.net DYXS2 模板（浅灰底 / 白卡 / #ff2a14 主色）
   ============================================================ */
:root {
  --accent: #ff2a14;
  --accent-soft: #fdece6;
  --ink: #282828;
  --ink-soft: rgba(7, 7, 10, .62);
  --muted: #aaadb5;
  --line: #eaedf1;
  --panel: #fff;
  --bg: #dddddd;
  --header-bg: rgba(7, 7, 10, .92);
  --radius: 5px;
  --shadow-card: 0 7px 21px rgba(149, 157, 165, .22);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, .3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
img { border: none; display: block; }
ul, li { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; border: none; outline: none; background: none; color: inherit; }

.wrap { width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 15px; }

/* ---------------- header ---------------- */
#header {
  background: var(--header-bg);
  margin-bottom: 26px;
  position: relative;
  z-index: 50;
}

#header .nav {
  display: flex;
  align-items: center;
  height: 70px;
  gap: 20px;
}

.brand { flex: none; }
.logo img { height: 30px; width: auto; }

.nav-search { flex: 1 1 auto; max-width: 470px; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  background: rgba(255, 255, 255, .1);
  border-radius: 10px;
  overflow: hidden;
}
.search-box:focus-within { background: rgba(255, 255, 255, .16); }

.search-input {
  flex: 1;
  height: 100%;
  padding: 0 12px 0 18px;
  font-size: 14px;
  color: #fff;
}
.search-input::placeholder { color: rgba(255, 255, 255, .55); }

.search-btn {
  flex: none;
  width: 52px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.search-btn svg { width: 18px; height: 18px; }

.nav-menu { margin-left: auto; }
.nav-menu ul { display: flex; align-items: center; gap: 4px; }

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 40px;
  font-size: 15px;
  color: #fff;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-menu a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-menu a svg { width: 16px; height: 16px; opacity: .95; }
.nav-menu li.active a { color: var(--accent); font-weight: 600; }

.nav-tools { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .8); }
.nav-tools span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; }
.nav-tools svg { width: 17px; height: 17px; }

/* ---------------- page head ---------------- */
.page-head { padding: 6px 0 18px; }
.page-head h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(7, 7, 10, .92);
}

/* ---------------- filter panel ---------------- */
.library-panel {
  background: var(--panel);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 20px 34px 16px;
  margin-bottom: 26px;
}

.library-tabs {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding-bottom: 14px;
  border-bottom: 1px solid transparent;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.library-tabs a {
  font-size: 16px;
  font-weight: 700;
  line-height: 28px;
  padding-bottom: 8px;
  border-bottom: 3px solid transparent;
  color: var(--ink);
}
.library-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

.library-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 7px 0;
}
.library-row:first-of-type { border-top: 1px solid var(--line); padding-top: 12px; }

.row-label {
  flex: none;
  min-width: 64px;
  padding: 3px 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  text-align: center;
}

.row-items {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  padding-top: 2px;
}
.row-items a {
  font-size: 14px;
  line-height: 22px;
  padding: 0 10px;
  margin-right: 4px;
  color: #505050;
  border-radius: 4px;
}
.row-items a:hover { color: var(--accent); }
.row-items a.active { color: #fff; background: var(--accent); }

.library-stat {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: rgba(0, 0, 0, .62);
}
.library-stat b { color: var(--accent); font-weight: 600; }

/* ---------------- card grid ---------------- */
.module-items {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 22px 18px;
}

.module-item { min-width: 0; position: relative; }

.module-item-cover {
  position: relative;
  aspect-ratio: 1 / 1.4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e6e8ec;
  transition: box-shadow .2s ease;
}
.module-item-cover:hover { box-shadow: var(--shadow-hover); }

.module-item-pic { position: absolute; inset: 0; }
.module-item-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.module-item-pic a {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .16);
  opacity: 0;
  transition: opacity .2s ease;
}
.module-item-cover:hover .module-item-pic a { opacity: 1; }
.module-item-pic a svg { width: 42px; height: 42px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.module-item-cover:hover .module-item-pic img { transform: scale(1.04); }

.module-item-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 44px;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, .68), transparent);
  z-index: 1;
  pointer-events: none;
}
.module-item-caption .video-class { color: var(--accent); font-weight: 600; }
html.no-hover .module-item-caption { display: none; }

.module-item-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 15px;
  background: #fff;
  font-size: 12px;
  z-index: 3;
  transform: translate3d(0, 101%, 0);
  transition: transform .3s ease;
  max-height: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}
.module-item-cover:hover .module-item-content { transform: translate3d(0, 0, 0); }

.module-item-style { display: flex; flex-wrap: wrap; gap: 6px; }
.video-name a { font-size: 13px; font-weight: 600; color: var(--ink); }
.video-tag a { color: var(--accent); }
.video-text {
  margin-top: 6px;
  color: #8f8f8f;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.module-item-titlebox { margin-top: 11px; }
.module-item-title {
  display: block;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.module-item-text {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------------- pagination ---------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 34px 0 10px;
}
.pagination a, .pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #505050;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.pagination a:hover { color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; }
.pagination .disabled { color: #c2c6d0; cursor: default; }
.pagination .dots { background: none; box-shadow: none; cursor: default; }

/* ---------------- footer ---------------- */
#footer {
  margin-top: 40px;
  padding: 26px 20px 34px;
  background: #f3f5f7;
  font-size: 12px;
  color: rgba(0, 0, 0, .51);
  text-align: center;
  line-height: 2;
}
#footer a { color: rgba(0, 0, 0, .62); }
#footer .sep { margin: 0 8px; color: #d7dae1; }

/* ---------------- detail page ---------------- */
.view-heading {
  display: flex;
  gap: 26px;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 22px;
}

.video-cover {
  flex: none;
  width: 240px;
  aspect-ratio: 1 / 1.4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e6e8ec;
}
.video-cover img { width: 100%; height: 100%; object-fit: cover; }

.video-info { flex: 1; min-width: 0; padding-top: 2px; }

.video-info .page-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(7, 7, 10, .92);
}

.video-info-aux {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
  font-size: 13px;
  color: #8f8f8f;
}
.video-info-aux .tag-link {
  padding: 3px 10px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
}
.video-info-aux .tag-link.plain { color: #505050; background: #f3f5f7; }
.video-info-aux .slash { color: #d7dae1; }

.video-info-items {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 28px;
  color: #333;
}
.video-info-itemtitle { flex: none; color: #8f8f8f; }
.video-info-item { min-width: 0; }
.video-info-item a { color: #505050; }
.video-info-item a:hover { color: var(--accent); }
.video-info-item .slash { color: #d7dae1; margin-right: 4px; }
.video-info-content { color: #505050; line-height: 30px; }

.video-info-footer { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn-aux, .btn-important {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7dae1;
  transition: all .2s ease;
}
.btn-aux:hover { border-color: var(--accent); color: var(--accent); }
.btn-important { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-important:hover { background: #ee2410; color: #fff; }
.btn-aux svg, .btn-important svg { width: 16px; height: 16px; }

.module {
  background: var(--panel);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 22px 24px 26px;
  margin-bottom: 22px;
}
.module-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.module-title { font-size: 22px; font-weight: 500; }
.module-tab {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.module-tab span {
  padding: 5px 14px;
  font-size: 13px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
}
.module-tab span.off { color: #8f8f8f; background: #f3f5f7; }

.module-row-one {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #f7f8f9;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: background .2s ease;
}
.module-row-one:hover { background: #f1f3f6; }
.module-row-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.module-row-info svg { flex: none; width: 20px; height: 20px; color: var(--accent); }
.module-row-title { min-width: 0; }
.module-row-title h4 { font-size: 14px; font-weight: 600; line-height: 22px; }
.module-row-title p {
  font-size: 12px;
  color: #8f8f8f;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-row-shortcuts { display: flex; gap: 10px; flex: none; }

.btn-down, .btn-copyurl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 5px;
  white-space: nowrap;
}
.btn-down { background: var(--accent); color: #fff; }
.btn-down:hover { background: #ee2410; color: #fff; }
.btn-copyurl { background: #fff; color: #505050; border: 1px solid #d7dae1; }
.btn-copyurl:hover { color: var(--accent); border-color: var(--accent); }
.btn-copyurl.copied { color: #34a853; border-color: #34a853; }
.btn-down svg, .btn-copyurl svg { width: 14px; height: 14px; }

.empty-tip {
  padding: 26px;
  text-align: center;
  color: #8f8f8f;
  font-size: 14px;
  background: #f7f8f9;
  border-radius: 8px;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1500px) { .module-items { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1280px) { .module-items { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1080px) {
  .module-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .library-panel { padding: 16px 20px 12px; }
  .library-tabs { gap: 22px; }
}
@media (max-width: 860px) {
  #header .nav { height: 60px; gap: 12px; }
  .nav-search { max-width: none; }
  .nav-menu { display: none; }
  .page-head h1 { font-size: 28px; }
  .module-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .library-tabs { justify-content: flex-start; gap: 18px; }
  .library-tabs a { font-size: 15px; }
  .library-row { gap: 10px; }
  .row-label { min-width: 56px; padding: 3px 8px; font-size: 12px; }
  .row-items a { padding: 0 8px; font-size: 13px; }
  .view-heading { flex-direction: column; padding: 16px; }
  .video-cover { width: 160px; }
  .video-info .page-title { font-size: 24px; }
  .module { padding: 16px; }
  .module-row-one { flex-direction: column; align-items: stretch; gap: 12px; }
  .module-row-shortcuts { justify-content: flex-end; }
}
@media (max-width: 520px) {
  .module-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo img { height: 24px; }
}
