/* 探播 - 统一面板风格 */
:root {
  --bg: #0a0a0a;
  --bg-card: #161616;
  --text: #eee;
  --text-muted: #888;
  --primary: #e91e63;
  --cat-title: #a855f7;
  --border: #2a2a2a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Header */
.header {
  background: #111;
  border-bottom: 1px solid #222;
  padding: 10px 0;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo img { height: 52px; width: auto; }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 12px; }

/* 子栏目面板 */
.cat-nav {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
  border: 1px solid #ddd;
}
dl.first {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #eee;
  margin: 0;
  background: #fff;
}
dl.first:last-child { border-bottom: none; }
dl.first dt {
  flex: 0 0 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  font-weight: 600;
  font-size: 13px;
  color: var(--cat-title);
  border-right: 1px solid #eee;
}
dl.first dt a { color: var(--cat-title); }
dl.first dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
  background: #fff;
}
dl.first dd a {
  padding: 8px 12px;
  color: #333;
  font-size: 13px;
  border-right: 1px solid #f0f0f0;
}
dl.first dd a:hover { background: #f5f5f5; color: var(--primary); }

/* 广告 */
.m1938-container { margin: 8px 0; text-align: center; }
.m1938-container img { max-width: 100%; margin: 0 auto; border-radius: 4px; }

/* 搜索 */
.search-box {
  display: flex;
  max-width: 480px;
  margin: 14px auto;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.search-box input { flex: 1; border: none; padding: 10px 14px; font-size: 14px; outline: none; }
.search-box button { background: var(--primary); color: #fff; border: none; padding: 0 20px; cursor: pointer; }

/* 热门搜索轮动 */
.hot-tags-wrap { overflow: hidden; margin: 8px 0 14px; }
.hot-tags { display: flex; gap: 8px; animation: marquee 25s linear infinite; width: max-content; }
.hot-tags a { flex-shrink: 0; padding: 4px 12px; background: #222; border-radius: 12px; font-size: 12px; color: #ccc; }
.hot-tags a:hover { background: var(--primary); color: #fff; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.hot-tags-wrap:hover .hot-tags { animation-play-state: paused; }

/* 视频卡片 */
.section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 0 10px; font-size: 15px; font-weight: 600;
}
.section-title::before { content: ""; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }

.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
.vod-card { background: var(--bg-card); border-radius: 6px; overflow: hidden; border: 1px solid #2a2a2a; }
.vod-card:hover { border-color: #444; }
.vod-thumb { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.vod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vod-badge { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; }
.vod-info { padding: 6px 8px 8px; }
.vod-title { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.vod-meta { font-size: 11px; color: #777; margin-top: 2px; }

/* 详情/播放 */
.detail-wrap { display: flex; gap: 16px; background: #161616; border-radius: 8px; padding: 14px; margin: 12px 0; }
.detail-poster { flex: 0 0 150px; border-radius: 6px; overflow: hidden; }
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.detail-title { font-size: 18px; margin: 0 0 10px; }
.meta { font-size: 13px; color: #aaa; line-height: 1.8; }
.meta strong { color: #ddd; }
.play-tabs { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.play-tab { padding: 6px 12px; background: #333; border-radius: 4px; cursor: pointer; font-size: 13px; }
.play-tab.active { background: var(--primary); }
.play-list { display: none; flex-wrap: wrap; gap: 6px; }
.play-list.active { display: flex; }
.play-list a { padding: 6px 10px; background: #222; border: 1px solid #333; border-radius: 4px; font-size: 12px; }
.play-list a:hover { border-color: var(--primary); color: var(--primary); }
.player-wrap { background: #000; border-radius: 8px; overflow: hidden; margin: 12px 0; }
.player-wrap iframe, .player-wrap video { width: 100%; height: 56vw; max-height: 500px; border: 0; }
.ep-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ep-list a { padding: 6px 10px; background: #222; border: 1px solid #333; border-radius: 4px; font-size: 12px; }
.ep-list a.current { background: var(--primary); border-color: var(--primary); }

/* Footer */
.footer { margin-top: 20px; padding: 14px; text-align: center; color: #555; font-size: 12px; border-top: 1px solid #222; }

/* 手机 */
@media (max-width: 768px) {
  .logo img { height: 42px; }
  .container { padding: 8px; }
  dl.first { flex-wrap: nowrap; overflow-x: auto; }
  dl.first dt { flex: 0 0 auto; min-width: 50px; font-size: 11px; padding: 6px; }
  dl.first dd { flex-wrap: nowrap; }
  dl.first dd a { font-size: 11px; padding: 6px 8px; white-space: nowrap; }
  .vod-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .detail-wrap { flex-direction: column; }
  .detail-poster { max-width: 130px; }
}

/* 顶部导航一行居中 */
.header-inner {
  flex-direction: column !important;
  align-items: center;
  gap: 8px;
}
.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: #ccc;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { background: #333; color: #fff; }

/* ===== 导航栏手机优先，一行可滑动 ===== */
.header-inner {
  flex-direction: column !important;
  align-items: center !important;
  padding: 8px 10px !important;
  gap: 6px !important;
}
.logo img { height: 40px !important; }

.nav {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 4px 0 !important;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  flex-shrink: 0 !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  color: #ccc !important;
  white-space: nowrap !important;
  border-radius: 16px !important;
  margin: 0 2px !important;
}
.nav a:hover, .nav a.active {
  background: #e91e63 !important;
  color: #fff !important;
}

/* 手机更紧凑 */
@media (max-width: 768px) {
  .logo img { height: 36px !important; }
  .nav a {
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
}

/* 强制显示顶部导航 */
.header { padding-bottom: 0 !important; }
.header-inner {
  flex-direction: column !important;
  width: 100%;
}
.nav {
  display: flex !important;
  width: 100% !important;
  background: #1a1a1a;
  padding: 8px 10px !important;
  margin-top: 6px;
  border-top: 1px solid #222;
  justify-content: flex-start !important;
}
.nav a {
  background: #252525;
  margin: 0 3px !important;
}
.nav a:first-child { margin-left: 0 !important; }
