.tpl-dlchayishi {
  min-height: 100dvh;
  background: transparent;
}

.tpl-dlchayishi main {
  padding-bottom: 28px;
}

/* 移动端导航 */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 24, 0.72);
  z-index: 998;
}

.mobile-backdrop.open { display: block; }

.mobile-panel {
  display: none;
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  background: var(--ink);
  border-bottom: 3px solid var(--theme);
  z-index: 999;
  padding: 8px 4% 20px;
  flex-direction: column;
  gap: 0;
}

.mobile-panel.open { display: flex; }

.mobile-panel a {
  font-size: 15px;
  font-weight: 600;
  padding: 14px 2px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.mobile-panel a.active {
  color: #fff;
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--theme);
  padding-left: 10px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.mobile-panel .search-input { flex: 1; }

.mobile-panel button[type='submit'] {
  padding: 0 16px;
  height: 40px;
  background: var(--theme);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

body.nav-open { overflow: hidden; }

/* 子页头：银幕条 */
.page-head {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--theme);
  border-radius: 6px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 800;
  padding-left: 0;
  border-left: none;
  margin-bottom: 6px;
}

.page-head p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.filter-bar input,
.filter-bar select {
  height: 40px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid rgba(244, 239, 230, 0.12);
  background: #0e161e;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--theme);
}

.filter-bar input { flex: 1; min-width: 160px; }
.filter-bar select { min-width: 100px; }

.filter-bar button {
  height: 40px;
  padding: 0 20px;
  border-radius: 4px;
  background: var(--theme);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.filter-bar button:hover {
  background: var(--theme-dark);
}

.ch-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 32px 0 12px;
}

.ch-pagination a,
.ch-pagination span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.ch-pagination a:hover {
  border-color: var(--theme);
  color: #fff;
}

.ch-pagination a.is-active {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 52px 20px;
  background: var(--card);
  border: 1px dashed rgba(225, 29, 72, 0.35);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 播放页 */
.player-wrap {
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

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

.detail-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  border-left: 3px solid var(--theme);
  padding: 22px;
  margin-bottom: 28px;
}

.detail-panel h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-meta span {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--ink);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.detail-panel h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--theme-light);
  margin: 20px 0 8px;
}

.detail-panel p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-tags span {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.28);
  color: var(--theme-light);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.sidebar-card h2 {
  font-size: 14px;
  font-weight: 800;
  padding-left: 0;
  border-left: none;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card h2::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--theme);
}

.mini-card {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mini-card:last-child { border-bottom: none; }

.mini-card img {
  width: 44px;
  height: 62px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.mini-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
  line-height: 1.3;
}

.mini-card span { font-size: 11px; color: var(--text-muted); }

.primary-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--theme);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.2s;
}

.primary-btn:hover {
  background: var(--theme-dark);
  transform: translateX(2px);
}

.ghost-btn {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(244, 239, 230, 0.2);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.ghost-btn:hover {
  border-color: var(--theme);
  color: var(--theme-light);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.category-tile {
  padding: 20px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.category-tile:hover {
  border-left-color: var(--theme);
  background: var(--card-hover);
  transform: none;
}

.category-tile strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.category-tile p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.site-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 4px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.28);
  font-size: 13px;
  color: var(--theme-light);
}

.site-contact__icon { width: 16px; height: 16px; fill: currentColor; }

.auth-panel { max-width: 400px; margin: 32px auto 48px; }

.auth-panel form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.auth-panel input {
  height: 44px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid rgba(244, 239, 230, 0.12);
  background: #0e161e;
  color: var(--text);
  outline: none;
}

.auth-panel input:focus { border-color: var(--theme); }

.auth-panel button[type='submit'] {
  height: 44px;
  border-radius: 4px;
  background: var(--theme);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-panel a { color: var(--theme-light); }

.detail-panel ul {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 搜索 / 最新 / 排行等列表页共用 */
.search-page .page-head,
.rankings-page .page-head,
.latest-page .page-head {
  margin-bottom: 22px;
}

@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
}

@media (max-width: 768px) {
  .page-head { padding: 16px; }
  .page-head h1 { font-size: 20px; }
  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar select, .filter-bar button { width: 100%; }
  .detail-panel { padding: 18px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}
