.tpl-dlchayishi {
  min-height: 100dvh;
  background: var(--bg);
}

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

/* 移动端导航 */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  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(--bg-elevated);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 12px 4% 20px;
  flex-direction: column;
  gap: 2px;
}

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

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

.mobile-panel a.active {
  color: var(--theme-light);
  font-weight: 600;
}

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

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

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

body.nav-open { overflow: hidden; }

/* 子页 */
.page-head { margin-bottom: 24px; }

.page-head h1 {
  font-size: 20px;
  font-weight: 700;
  padding-left: 12px;
  border-left: 3px solid var(--theme);
  margin-bottom: 8px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.filter-bar input,
.filter-bar select {
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

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

.filter-bar button {
  height: 38px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--theme);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.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: 8px;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

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

.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 14px;
}

/* 播放页 */
.player-wrap {
  border-radius: var(--radius-xl);
  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: var(--radius-xl);
  padding: 24px;
  margin-bottom: 32px;
}

.detail-panel h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

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

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

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

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

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

.detail-tags span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  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: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.sidebar-card h2 {
  font-size: 14px;
  font-weight: 700;
  padding-left: 10px;
  border-left: 3px solid var(--theme);
  margin-bottom: 12px;
}

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

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

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

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

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

.primary-btn {
  display: inline-block;
  padding: 11px 24px;
  background: var(--theme);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.primary-btn:hover { background: var(--theme-dark); }

.ghost-btn {
  display: inline-block;
  padding: 11px 24px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.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: 14px;
  margin-bottom: 28px;
}

.category-tile {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s;
}

.category-tile:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.category-tile strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--theme-light);
  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 14px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  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: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
}

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

.auth-panel button[type='submit'] {
  height: 42px;
  border-radius: 8px;
  background: var(--theme);
  color: #fff;
  font-weight: 600;
}

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

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

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

@media (max-width: 768px) {
  .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; }
}
