/* ─── PPTV 移动端风格主题 ─── */
:root {
    --pp-primary: #0d7ff0;      /* PPTV 蓝 */
    --pp-primary-dark: #0960b3;
    --pp-bg: #f5f6f8;
    --pp-card: #ffffff;
    --pp-text: #222;
    --pp-text2: #666;
    --pp-text3: #999;
    --pp-border: #ececec;
    --pp-red: #ff2d4b;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--pp-bg);
    color: var(--pp-text);
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,.06);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border: 0; }

/* ─── 顶部 ─── */
.pp-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--pp-primary);
    box-shadow: 0 2px 8px rgba(13,127,240,.25);
}
.pp-header-inner {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
}
.pp-logo {
    color: #fff; font-size: 1.15rem; font-weight: 800;
    white-space: nowrap; flex-shrink: 0;
    letter-spacing: -.5px;
}
.pp-search {
    flex: 1; display: flex; align-items: center;
    background: rgba(255,255,255,.92);
    border-radius: 18px; height: 34px;
    padding: 0 6px 0 12px;
}
.pp-search input {
    flex: 1; border: 0; outline: 0; background: transparent;
    font-size: .85rem; color: var(--pp-text);
}
.pp-search button {
    width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: var(--pp-primary); color: #fff;
    cursor: pointer; font-size: .95rem; line-height: 1;
    flex-shrink: 0;
}
.pp-search button::before { content: "🔍"; font-size: .8rem; }

/* 分类导航 */
.pp-nav {
    display: flex; gap: 2px;
    overflow-x: auto; white-space: nowrap;
    padding: 0 8px 6px;
    scrollbar-width: none;
}
.pp-nav::-webkit-scrollbar { display: none; }
.pp-nav a {
    color: rgba(255,255,255,.92); font-size: .85rem;
    padding: 4px 10px; border-radius: 12px;
    flex-shrink: 0;
}
.pp-nav a:hover { background: rgba(255,255,255,.15); }

/* ─── 主体 ─── */
.pp-main { padding: 10px 10px 20px; min-height: 60vh; }

/* 区块 */
.pp-section { margin-bottom: 16px; }
.pp-section-head {
    display: flex; align-items: center;
    padding: 4px 2px 8px;
}
.pp-section-head .pp-bar {
    width: 4px; height: 15px; border-radius: 2px;
    background: var(--pp-primary); margin-right: 7px;
}
.pp-section-head h2 { font-size: .98rem; font-weight: 700; flex: 1; }
.pp-section-head .pp-more { font-size: .78rem; color: var(--pp-text3); }

/* 横向滑动卡片区 */
.pp-scroll {
    display: flex; gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pp-scroll::-webkit-scrollbar { display: none; }
.pp-card {
    width: 105px; flex-shrink: 0;
    background: var(--pp-card);
    border-radius: 8px; overflow: hidden;
}
.pp-card .pp-poster {
    aspect-ratio: 3/4; background: #e8e8e8; position: relative;
}
.pp-card .pp-poster img { width: 100%; height: 100%; object-fit: cover; }
.pp-card .pp-poster .pp-flag {
    position: absolute; left: 0; bottom: 0;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: .62rem; padding: 1px 5px;
}
.pp-card .pp-name {
    font-size: .78rem; color: var(--pp-text);
    padding: 5px 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pp-card .pp-sub {
    font-size: .68rem; color: var(--pp-text3);
    padding: 0 6px 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 网格（列表页用） */
.pp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.pp-grid .pp-card { width: 100%; }

/* 首页图标导航 */
.pp-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: var(--pp-card);
    border-radius: 8px;
    padding: 10px 6px;
    margin-bottom: 12px;
}
.pp-icons a {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 6px 0;
}
.pp-icons .pp-ico {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
}
.pp-icons span { font-size: .72rem; color: var(--pp-text2); }

/* Banner 轮播 */
.pp-banner {
    position: relative; border-radius: 8px; overflow: hidden;
    margin-bottom: 12px; aspect-ratio: 16/7;
}
.pp-banner .pp-banner-list { display: flex; height: 100%; transition: transform .4s; }
.pp-banner .pp-banner-item { min-width: 100%; position: relative; }
.pp-banner .pp-banner-item img { width: 100%; height: 100%; object-fit: cover; }
.pp-banner .pp-banner-txt {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff; font-size: .85rem; padding: 20px 10px 6px;
}
.pp-banner .pp-dots {
    position: absolute; right: 8px; bottom: 6px;
    display: flex; gap: 4px;
}
.pp-banner .pp-dots i {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.5);
}
.pp-banner .pp-dots i.on { background: #fff; }

/* 筛选条 */
.pp-filter {
    display: flex; gap: 8px; flex-wrap: wrap;
    background: var(--pp-card); border-radius: 8px;
    padding: 10px; margin-bottom: 10px;
}
.pp-filter a {
    padding: 4px 12px; border-radius: 14px;
    font-size: .78rem; color: var(--pp-text2);
    background: var(--pp-bg);
}
.pp-filter a.on { background: var(--pp-primary); color: #fff; }

/* 分页 */
.pp-page {
    display: flex; justify-content: center; gap: 8px;
    padding: 16px 0;
}
.pp-page a, .pp-page span {
    padding: 6px 14px; border-radius: 6px;
    background: var(--pp-card); font-size: .82rem;
    color: var(--pp-text2);
}
.pp-page .on { background: var(--pp-primary); color: #fff; }

/* 详情页 */
.pp-detail { background: var(--pp-card); border-radius: 8px; padding: 12px; }
.pp-detail-head { display: flex; gap: 12px; }
.pp-detail-poster {
    width: 108px; flex-shrink: 0;
    aspect-ratio: 3/4; border-radius: 6px; overflow: hidden;
    background: #eee;
}
.pp-detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.pp-detail-info { flex: 1; min-width: 0; }
.pp-detail-info h1 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.pp-detail-meta { font-size: .76rem; color: var(--pp-text2); line-height: 1.9; }
.pp-detail-meta b { color: var(--pp-text); font-weight: 600; }
.pp-play-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    background: var(--pp-red); color: #fff;
    border-radius: 6px; font-size: .9rem; font-weight: 600;
    padding: 9px 0; margin-top: 10px;
}
.pp-detail-desc {
    margin-top: 12px; font-size: .82rem; line-height: 1.8;
    color: var(--pp-text2);
}
.pp-detail-desc h3 { color: var(--pp-text); font-size: .9rem; margin-bottom: 4px; }

/* 剧集网格 */
.pp-eps {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.pp-eps a, .pp-eps span {
    padding: 6px 0; text-align: center;
    background: var(--pp-bg); border-radius: 5px;
    font-size: .74rem; color: var(--pp-text2);
}
.pp-eps .on { background: var(--pp-primary); color: #fff; }

/* 播放器 */
.pp-player {
    background: #000; border-radius: 8px; overflow: hidden;
    margin-bottom: 12px;
}

/* 明星 */
.pp-actor-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.pp-actor {
    text-align: center;
}
.pp-actor .pp-avatar {
    width: 100%; aspect-ratio: 1; border-radius: 50%;
    overflow: hidden; background: #e8e8e8; margin-bottom: 5px;
}
.pp-actor .pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pp-actor span { font-size: .74rem; color: var(--pp-text2); }

/* 文章 */
.pp-article {
    background: var(--pp-card); border-radius: 8px;
    padding: 11px 12px; margin-bottom: 8px;
    display: flex; gap: 10px;
}
.pp-article .pp-art-pic {
    width: 110px; height: 70px; border-radius: 5px;
    overflow: hidden; flex-shrink: 0; background: #eee;
}
.pp-article .pp-art-pic img { width: 100%; height: 100%; object-fit: cover; }
.pp-article .pp-art-body { flex: 1; min-width: 0; }
.pp-article h3 { font-size: .85rem; font-weight: 600; line-height: 1.4; }
.pp-article p { font-size: .74rem; color: var(--pp-text3); margin-top: 4px; }

/* 友链 / 专题标签 */
.pp-links {
    display: flex; flex-wrap: wrap; gap: 6px;
    background: var(--pp-card); border-radius: 8px; padding: 10px;
}
.pp-links a {
    padding: 4px 10px; border-radius: 12px;
    background: var(--pp-bg); font-size: .74rem; color: var(--pp-text2);
}

/* 底部 */
.pp-footer {
    text-align: center; padding: 18px 12px 26px;
    color: var(--pp-text3); font-size: .72rem; line-height: 1.9;
    border-top: 1px solid var(--pp-border);
    background: var(--pp-card);
}
.pp-footer a { color: var(--pp-text3); }
.pp-copy { color: #bbb; font-size: .68rem; }
