/**
 * 诵读茶座 PC 壳样式 — 吸收网易云：顶栏导航、主栏封面网格、侧栏列表、常驻底栏播放空间
 * 仅 .chazuo-pc-body 生效，不影响手机 chazuo.php
 */

.chazuo-pc-body {
  --czpc-bg: #f5f5f5;
  --czpc-paper: #fff;
  --czpc-ink: #333;
  --czpc-muted: #888;
  --czpc-accent: #c62f2f;
  --czpc-accent-soft: #f7eaea;
  --czpc-line: #e1e1e1;
  --czpc-topbar-h: 54px;
  --czpc-player-h: 56px;
  background: var(--czpc-bg) !important;
  overflow: auto !important;
}

/* 恢复桌面滚动条 */
.chazuo-pc-body,
.chazuo-pc-body * {
  scrollbar-width: thin;
}

.chazuo-pc-body #show-elements-button,
.chazuo-pc-body #window-fullscreen-button,
.chazuo-pc-body #reset-progress-button,
.chazuo-pc-body #play-control-wrapper,
.chazuo-pc-body .play-control-wrapper {
  display: none !important;
}

/* 隐藏手机端注入的顶栏，改用 czpc-topbar */
.chazuo-pc-body > .header,
.chazuo-pc-body .header:not(.czpc-topbar) {
  display: none !important;
}

.chazuo-pc-body .category-nav {
  display: none !important;
}

.chazuo-pc-body .mini-player-container {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  border-radius: 0 !important;
  z-index: 200 !important;
}

/* ========== 顶栏 ========== */
.czpc-topbar {
  position: sticky;
  top: 0;
  z-index: 150;
  height: var(--czpc-topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: #242424;
  color: #ccc;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.czpc-brand {
  flex-shrink: 0;
  color: #fff !important;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none !important;
  font-family: "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
}

.czpc-topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.czpc-topnav::-webkit-scrollbar {
  display: none;
}

.czpc-topnav-item {
  border: 0;
  background: transparent;
  color: #ccc;
  padding: 0 12px;
  height: 34px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-topnav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.czpc-topnav-item.active {
  color: #fff;
  background: var(--czpc-accent);
}

.czpc-topnav-sep {
  width: 1px;
  height: 16px;
  background: #555;
  margin: 0 8px;
  flex-shrink: 0;
}

.czpc-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 13px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-top-actions a {
  color: #bbb !important;
  text-decoration: none !important;
}

.czpc-top-actions a:hover {
  color: #fff !important;
}

/* ========== 内容区 ========== */
.chazuo-pc-body .content-slider {
  height: auto !important;
  min-height: calc(100vh - var(--czpc-topbar-h) - var(--czpc-player-h));
  overflow: visible !important;
  padding-bottom: calc(var(--czpc-player-h) + 16px);
}

.chazuo-pc-body .slider-wrapper {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  transform: none !important;
  transition: none !important;
}

.chazuo-pc-body .slider-page {
  display: none;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  float: none !important;
  position: relative !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
}

.chazuo-pc-body #page-recommend {
  display: block;
  max-width: none;
  padding: 0;
}

.czpc-home-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 8px;
}

.czpc-block {
  background: var(--czpc-paper);
  border: 1px solid var(--czpc-line);
  border-radius: 4px;
  padding: 16px 18px 18px;
  margin-bottom: 16px;
}

.czpc-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--czpc-accent);
}

.czpc-block-head h2 {
  margin: 0;
  font-size: 20px;
  color: var(--czpc-ink);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.czpc-block-tip {
  font-size: 12px;
  color: var(--czpc-muted);
}

.czpc-more-btn,
.czpc-more-link {
  border: 0;
  background: transparent;
  color: var(--czpc-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-more-btn:hover,
.czpc-more-link:hover {
  color: var(--czpc-accent);
}

/* 精选封面网格 — 网易云热门推荐感 */
.czpc-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 14px;
}

.czpc-cover-card {
  display: block;
  color: inherit;
  text-decoration: none !important;
  min-width: 0;
}

.czpc-cover-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: #ddd;
  margin-bottom: 8px;
}

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

.czpc-cover-card:hover .czpc-cover-media img {
  transform: scale(1.05);
}

.czpc-play-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
}

.czpc-dur {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
}

.czpc-cover-title {
  font-size: 13px;
  line-height: 1.4;
  color: var(--czpc-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-cover-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--czpc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* 发现网格更密 */
.chazuo-pc-body #page-recommend .work-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.chazuo-pc-body #page-recommend .work-grid .work-item,
.chazuo-pc-body #page-recommend .work-card {
  max-width: none !important;
  width: 100% !important;
}

.chazuo-pc-body #recommend-loading {
  padding: 20px 0;
}

/* ========== 侧栏 ========== */
.czpc-side-card {
  background: var(--czpc-paper);
  border: 1px solid var(--czpc-line);
  border-radius: 4px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
}

.czpc-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--czpc-muted);
  line-height: 1.8;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-stats strong {
  color: var(--czpc-ink);
}

.czpc-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.czpc-recent-list li + li {
  border-top: 1px solid var(--czpc-line);
}

.czpc-recent-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  text-decoration: none !important;
  color: inherit;
}

.czpc-recent-list img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: #ddd;
  flex-shrink: 0;
}

.czpc-recent-list span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.czpc-recent-list em {
  font-style: normal;
  font-size: 13px;
  color: var(--czpc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-recent-list small {
  font-size: 11px;
  color: var(--czpc-muted);
}

.czpc-side-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.czpc-side-links a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  background: #f7f7f7;
  color: var(--czpc-ink) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.czpc-side-links a:hover {
  background: var(--czpc-accent-soft);
  color: var(--czpc-accent) !important;
}

.czpc-empty {
  margin: 0;
  padding: 8px 0;
  color: var(--czpc-muted);
  font-size: 13px;
}

/* 发现/动态/我的容器：PC 居中 */
.chazuo-pc-body #discover-container,
.chazuo-pc-body #moments-container,
.chazuo-pc-body #profile-container,
.chazuo-pc-body #personal-home-container {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 12px;
  padding-bottom: calc(var(--czpc-player-h) + 20px);
}

@media (max-width: 1100px) {
  .czpc-home-wrap {
    grid-template-columns: 1fr;
  }
  .czpc-featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .chazuo-pc-body #page-recommend .work-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .czpc-topnav {
    display: none;
  }
}
