/*
 * 前台视频样式。
 *
 * 只定义网格与播放器外框；字体、间距、配色尽量让主题接管，
 * 这样换主题时视频页不会显得像外来模块。
 */

.lcsv-grid-front {
    display: grid;
    grid-template-columns: repeat(var(--lcsv-cols, 4), minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

@media (max-width: 1024px) {
    .lcsv-grid-front { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .lcsv-grid-front { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

.lcsv-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.lcsv-item-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    overflow: hidden;
    background: #14161a;
}

.lcsv-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.lcsv-item:hover .lcsv-item-thumb img {
    transform: scale(1.04);
}

.lcsv-item-dur {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 1px 5px;
    font-size: 11px;
    font-style: normal;
    border-radius: 3px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
}

.lcsv-item-title {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lcsv-item-meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: .55;
}

.lcsv-empty {
    padding: 40px 0;
    text-align: center;
    opacity: .6;
}

/* ---------- 播放器 ---------- */

.lcsv-player {
    margin: 22px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #0d0f12;
}

.lcsv-player video {
    display: block;
    width: 100%;
    height: auto;
}

.lcsv-fallback {
    margin: 0;
    padding: 8px 12px;
    font-size: 12px;
    background: #14161a;
    color: #8d939c;
}

.lcsv-fallback a {
    color: #ff7a45;
}

/* ---------------------------------------------------------------- 视频详情页 */

/*
 * 详情页的骨架（page-head / crumb / tag / wall）全部复用主题的类名，
 * 这里只补主题没有的两块：元信息行与相关视频区。
 */

.lcsv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    opacity: .75;
}

.lcsv-meta > span + span::before,
.lcsv-meta > a + span::before {
    content: "·";
    margin-right: 10px;
    opacity: .5;
}

.lcsv-meta .tag {
    opacity: 1;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.lcsv-related {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(128, 128, 128, .25);
}

.lcsv-related h2 {
    font-size: 18px;
    margin: 0 0 8px;
}

/* 播放器容器：宽屏不铺满，避免低码率片源被拉得过糊 */
.lcsv-player {
    max-width: 1080px;
    margin: 0 auto;
}

/* ── 分类导航（列表页/分类页顶部）─────────────────────────────
   没有它的话 /v/ 是死胡同：只能翻页，进不了任何分类。 */
.lcsv-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--lcsv-line, rgba(255, 255, 255, .08));
}

.lcsv-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--lcsv-line, rgba(255, 255, 255, .14));
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s;
}

.lcsv-cat:hover {
  border-color: var(--lcsv-accent, #e0b070);
  color: var(--lcsv-accent, #e0b070);
}

.lcsv-cat.is-active {
  background: var(--lcsv-accent, #e0b070);
  border-color: var(--lcsv-accent, #e0b070);
  color: #14110d;
  font-weight: 600;
}

.lcsv-cat em {
  font-style: normal;
  font-size: 11px;
  opacity: .62;
}

.lcsv-cat.is-active em {
  opacity: .8;
}

@media (max-width: 640px) {
  .lcsv-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .lcsv-cats::-webkit-scrollbar {
    display: none;
  }
}

/* ── 首页视频条 ──────────────────────────────────────────────
   主题没留扩展点，由 LCSV_Front::inject_home() 插在 main.wall 之前。 */
.lcsv-home-strip {
  max-width: 1240px;
  margin: 0 auto 32px;
  padding: 0 16px;
}

.lcsv-home-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.lcsv-home-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .02em;
}

.lcsv-home-more {
  font-size: 13px;
  text-decoration: none;
  opacity: .72;
  white-space: nowrap;
}

.lcsv-home-more:hover {
  opacity: 1;
}

.lcsv-home-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 172px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.lcsv-home-rail > * {
  scroll-snap-align: start;
}

.lcsv-home-rail .lcsv-item-title {
  font-size: 13px;
  display: block;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .lcsv-home-rail {
    grid-auto-columns: 138px;
    gap: 10px;
  }

  .lcsv-home-strip {
    margin-bottom: 22px;
  }
}
