/* ============ 优拍视频 PC/响应式前端 ============ */
:root {
  --bg: #0f1115;
  --bg-2: #161a22;
  --bg-3: #1e2430;
  --line: #262d3b;
  --text: #e8ecf3;
  --text-2: #9aa4b8;
  --text-3: #6b7689;
  --accent: #0095ff;
  --accent-2: #33aaff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,17,21,.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; padding-left: 3px;
}
.top-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--text-2);
  white-space: nowrap; transition: .18s;
}
.top-nav a:hover { color: var(--text); background: var(--bg-3); }
.top-nav a.active { color: #fff; background: var(--accent); }

/* ---------- 布局 ---------- */
#app { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }

.page-loading, .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100px 20px; color: var(--text-3); gap: 16px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state .icon { font-size: 44px; opacity: .5; }
.empty-state p { font-size: 15px; }

/* ---------- 首页 ---------- */
.section-title { margin-top: 4px; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; margin: 30px 0 18px; }
.section-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--accent); }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 22px; }
.channel-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .2s; display: flex; flex-direction: column;
}
.channel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #35405a; }
.channel-cover { position: relative; aspect-ratio: 2.45; background: linear-gradient(135deg, #232b3d, #161a22); overflow: hidden; }
.channel-cover img { width: 100%; height: 100%; object-fit: cover; }
.channel-cover .collage { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; height: 100%; }
.channel-cover .collage img { width: 100%; height: 100%; object-fit: cover; }
.channel-cover .cover-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--text-3); background: linear-gradient(135deg, #26304a, #171c26); }
.channel-badge {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 12px;
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.channel-body { padding: 18px 18px 16px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.channel-body h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.channel-body h3 .count { font-size: 12px; font-weight: 400; color: var(--text-3); }
.channel-body .desc { font-size: 13px; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.2em; }
.channel-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.channel-cats span {
  font-size: 12px; color: var(--text-2); background: var(--bg-3);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- 栏目页 ---------- */
.channel-head { display: flex; gap: 24px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.channel-head img { width: 320px; height: 131px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.channel-head-info h2 { font-size: 24px; }
.channel-head-info p { color: var(--text-2); font-size: 13px; margin-top: 8px; line-height: 1.6; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; margin-bottom: 16px; }
.back-link:hover { color: var(--text); }

.cat-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a {
  white-space: nowrap; padding: 8px 18px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 14px; color: var(--text-2); transition: .15s;
}
.cat-tabs a:hover { color: var(--text); }
.cat-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.cat-tabs a .cnt { font-size: 12px; opacity: .7; margin-left: 4px; }

/* ---------- 视频网格 ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.video-card { border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); transition: .2s; display: block; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #35405a; }
.video-thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #232b3d, #161a22); overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.thumb-fallback .play-icon {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(0,149,255,.9);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; padding-left: 4px;
  opacity: .85;
}
.video-duration {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75);
  color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.video-info { padding: 12px 14px 14px; }
.video-info h3 {
  font-size: 14.5px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.9em;
}
.video-meta { display: flex; gap: 12px; color: var(--text-3); font-size: 12px; margin-top: 8px; }
.video-meta .cat-tag { color: var(--accent-2); }

.load-more { display: flex; justify-content: center; margin-top: 30px; }
.load-more button {
  background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line);
  padding: 11px 44px; border-radius: 999px; font-size: 14px; transition: .18s;
}
.load-more button:hover { color: var(--text); border-color: #3a455f; }
.load-more button:disabled { opacity: .5; cursor: default; }

/* ---------- 播放页 ---------- */
.play-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.player-wrap video { width: 100%; aspect-ratio: 16/9; display: block; background: #000; }

/* 无视频（图文）与超级链接模式 */
.article { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; line-height: 1.9; font-size: 15px; min-height: 200px; }
.article img { max-width: 100%; border-radius: 8px; }
.article h1,.article h2,.article h3 { margin: .7em 0 .35em; }
.article p { margin: .5em 0; }
.article ul,.article ol { padding-left: 1.4em; margin: .5em 0; }
.desc.rich img { max-width: 100%; border-radius: 8px; }

.link-card { position: relative; aspect-ratio: 16/9; background: #161a22 center/cover no-repeat; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.link-card-body { text-align: center; padding: 26px 34px; background: rgba(10,12,16,.78); border-radius: 14px; backdrop-filter: blur(4px); }
.link-ico { font-size: 36px; margin-bottom: 10px; }
.link-card-body p { color: var(--text-2); font-size: 14px; margin-bottom: 16px; }
.link-open { display: inline-block; background: var(--accent); color: #fff; padding: 11px 34px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.link-open:hover { background: var(--accent-2); }

/* 微信环境跳转视频号引导层 */.wx-jump {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(10,12,16,.9); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.wx-jump-card { text-align: center; padding: 28px 32px; max-width: 88%; }
.wx-jump-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.wx-jump-card p { color: var(--text-2); font-size: 13.5px; line-height: 1.7; margin-bottom: 18px; }
.wx-jump-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.wx-jump-go { background: #07c160; color: #fff; padding: 10px 28px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.wx-jump-actions button { background: transparent; border: 1px solid var(--line); color: var(--text-2); padding: 10px 22px; border-radius: 999px; font-size: 13px; }
.play-info { padding: 20px 0 0; }
.play-info h1 { font-size: 22px; line-height: 1.5; }
.play-info .meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-3); font-size: 13px; margin: 12px 0; }
.play-info .meta .cat-tag { color: var(--accent-2); }
.play-info .desc { color: var(--text-2); font-size: 14px; line-height: 1.8; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 8px; white-space: pre-wrap; }

.related-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.related-panel h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-item { display: flex; gap: 12px; border-radius: 10px; padding: 6px; transition: .15s; }
.related-item:hover { background: var(--bg-3); }
.related-item .r-thumb { position: relative; width: 152px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg,#232b3d,#161a22); }
.related-item .r-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-item .r-title { font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-item .r-meta { color: var(--text-3); font-size: 12px; margin-top: 6px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 20px 36px; text-align: center; color: var(--text-3); }
.footer p { font-size: 14px; }
.footer-sub { font-size: 12px !important; margin-top: 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .play-layout { grid-template-columns: 1fr; }
  .related-panel { margin-top: 26px; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 14px; height: 54px; gap: 12px; }
  .logo { font-size: 17px; }
  .logo-mark { width: 28px; height: 28px; border-radius: 7px; }
  #app { padding: 18px 14px 46px; }
  .channel-grid { grid-template-columns: 1fr; gap: 16px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .video-info h3 { font-size: 13px; }
  .channel-head { flex-direction: column; align-items: flex-start; padding: 16px; }
  .channel-head img { width: 100%; height: auto; aspect-ratio: 2.45; }
  .channel-head-info h2 { font-size: 20px; }
  .play-info h1 { font-size: 17px; }
  .related-item .r-thumb { width: 128px; }
  .section-title { font-size: 17px; margin: 22px 0 14px; }
}
