:root {
    --bg: #13151c;
    --panel: #1c1f28;
    --panel2: #252936;
    --line: #303541;
    --text: #f4f5f7;
    --muted: #9298a8;
    --pink: #fa4d87;
    --cyan: #51d6d0;
}

html, body { background: var(--bg); }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.pp-header, .pp-top, .pp-nav, .pp-wrap, .pp-footer { width: min(100%, 390px); max-width: 390px; }
.pp-header { margin: 0 auto; background: rgba(19, 21, 28, .96); }
.pp-top { height: 54px; gap: 10px; padding: 0 12px; }
.pp-brand { color: var(--text); font-size: 20px; }
.pp-search-entry {
    display: flex;
    min-width: 0;
    height: 34px;
    flex: 1;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 6px;
    background: var(--panel);
    color: #aeb3c0;
    font-size: 12px;
    white-space: nowrap;
}
.pp-search-entry span:first-child { color: #f4f5f7; font-size: 18px; line-height: 1; }
.pp-nav { justify-content: space-around; gap: 0; padding: 0 8px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pp-nav a { padding: 9px 14px 10px; color: #a6abba; font-size: 13px; }
.pp-nav a:first-child { border-bottom: 0; }
.pp-home-page .pp-nav-recommend,
.pp-search-page .pp-nav-recommend { color: #fff; border-bottom: 2px solid var(--pink); }
.pp-wrap { padding: 14px 12px 20px; }
.pp-section { margin-bottom: 23px; }
.pp-section-head { min-height: 25px; margin-bottom: 11px; }
.pp-section-head h2 { font-size: 16px; font-weight: 700; }
.pp-section-head a, .pp-muted { color: #a6abba; font-size: 11px; }
.pp-home-main { padding-top: 14px; }
.pp-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; }
.pp-home-card { display: block; min-width: 0; overflow: hidden; border-radius: 6px; background: var(--panel); }
.pp-home-card-poster { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: var(--panel2); }
.pp-home-card-poster img { width: 100%; height: 100%; object-fit: cover; }
.pp-home-card-poster > span { position: absolute; right: 8px; bottom: 8px; display: grid; width: 30px; height: 30px; place-items: center; padding-left: 2px; border: 1px solid rgba(255, 255, 255, .75); border-radius: 50%; background: rgba(0, 0, 0, .38); color: white; font-size: 11px; }
.pp-home-card-copy { display: grid; gap: 3px; padding: 8px; }
.pp-home-card-copy strong { display: -webkit-box; overflow: hidden; font-size: 12px; font-weight: 600; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pp-home-card-copy small { color: var(--muted); font-size: 10px; }
.pp-home-hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 9px; }
.pp-home-hot-grid .pp-poster { aspect-ratio: 3 / 4; border-radius: 6px; }
.pp-home-hot-grid .pp-card-title { margin-top: 6px; font-size: 12px; }
.pp-home-empty { display: block; padding: 14px 0; color: var(--muted); font-size: 11px; text-align: center; }
.pp-home-ad { margin: 0 0 23px; }
.pp-home-ad-head { display: none; }
.pp-home-ad-slider { position: relative; overflow: hidden; aspect-ratio: 1 / 1; min-height: 0; max-height: 366px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 7px; background: var(--panel); }
.pp-home-ad-track { display: flex; width: 100%; height: 100%; transition: transform .4s ease; }
.pp-home-ad-slide { position: relative; display: block; flex: 0 0 100%; min-width: 0; height: 100%; overflow: hidden; background: var(--panel); }
.pp-home-ad-slide img { width: 100%; height: 100%; object-fit: cover; }
.pp-home-ad-slide > span { position: absolute; right: 0; bottom: 0; left: 0; padding: 28px 12px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: white; font-size: 12px; font-weight: 650; }
.pp-home-ad-controls { position: absolute; right: 9px; bottom: 8px; z-index: 2; display: flex; align-items: center; gap: 7px; }
.pp-home-ad-controls button { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255, 255, 255, .38); border-radius: 50%; background: rgba(12, 14, 19, .66); color: white; font-size: 19px; line-height: 1; cursor: pointer; }
.pp-home-ad-dots { display: flex; align-items: center; gap: 5px; }
.pp-home-ad-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .5); cursor: pointer; }
.pp-home-ad-dots button[aria-current="true"] { width: 17px; background: white; }
.pp-home-ad-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #858b9b; font-size: 11px; }
.pp-home-ad-slider:has(.pp-home-ad-slide) .pp-home-ad-empty { display: none; }
.pp-home-ad-controls[hidden] { display: none !important; }
.pp-rank-tabs { display: flex; align-items: center; gap: 13px; }
.pp-rank-tabs button { min-height: 28px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.pp-rank-tabs button[aria-selected="true"] { border-bottom-color: var(--pink); color: var(--text); }
.pp-rank-list { display: grid; gap: 8px; }
.pp-rank-list[hidden] { display: none; }
.pp-rank-row { display: grid; min-width: 0; min-height: 62px; grid-template-columns: 20px 48px minmax(0, 1fr) 12px; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pp-rank-number { color: var(--pink); font-size: 13px; font-weight: 750; text-align: center; }
.pp-rank-row > img { width: 48px; height: 58px; border-radius: 4px; background: var(--panel2); object-fit: cover; }
.pp-rank-copy { display: grid; min-width: 0; gap: 4px; }
.pp-rank-copy strong { display: -webkit-box; overflow: hidden; font-size: 11px; font-weight: 600; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pp-rank-copy small { color: var(--muted); font-size: 10px; }
.pp-rank-arrow { color: var(--muted); font-size: 19px; }
.pp-home-short .pp-reel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; }
.pp-home-short .pp-reel-poster { aspect-ratio: 9 / 13; border-radius: 6px; }
.pp-home-loufeng .pp-loufeng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; }
.pp-home-loufeng .pp-loufeng-poster { aspect-ratio: 4 / 3; border-radius: 6px; }
.pp-home-page .pp-bottom-home,
.pp-shortvideo-page .pp-bottom-short,
.pp-loufeng-page .pp-bottom-loufeng,
.pp-search-page .pp-bottom-search,
.pp-mine-page .pp-bottom-me { color: var(--text); font-weight: 700; }
body.pp-home-page .pp-bottom > .pp-bottom-home { color: var(--text); }
.pp-bottom { position: fixed; z-index: 30; bottom: 0; left: 50%; display: grid; width: min(390px, 100%); height: calc(62px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; padding: 6px 8px env(safe-area-inset-bottom); transform: translateX(-50%); overflow: visible; border-top: 1px solid var(--line); background: rgba(25, 27, 35, .97); }
.pp-bottom > a { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 2px; color: #949aaa; font-size: 10px; white-space: nowrap; }
.pp-bottom > a i { font-size: 19px; font-style: normal; line-height: 1; }
.pp-bottom-loufeng { flex-direction: column; justify-content: flex-start !important; gap: 0 !important; }
.pp-bottom-label { line-height: 14px; }
.pp-mine-main { min-height: calc(100svh - 170px); }
.pp-mine-profile { display: flex; align-items: center; gap: 11px; margin: 1px 0 17px; }
.pp-mine-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--pink); font-size: 20px; }
.pp-mine-profile-copy { display: grid; min-width: 0; gap: 3px; }
.pp-mine-profile-copy strong { font-size: 15px; }
.pp-mine-profile-copy small { color: var(--muted); font-size: 11px; }
.pp-mine-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 13px; padding: 4px; border-radius: 6px; background: var(--panel); }
.pp-mine-tabs button { min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.pp-mine-tabs button[aria-selected="true"] { background: var(--panel2); color: var(--text); }
.pp-mine-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.pp-mine-toolbar span { color: var(--muted); font-size: 11px; }
.pp-mine-clear { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: #c4c8d1; font: inherit; font-size: 11px; cursor: pointer; }
.pp-mine-records { display: grid; gap: 8px; }
.pp-mine-record { display: grid; min-width: 0; grid-template-columns: 64px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 7px; border-radius: 6px; background: var(--panel); }
.pp-mine-record img { width: 64px; height: 76px; border-radius: 4px; background: var(--panel2); object-fit: cover; }
.pp-mine-record-placeholder { display: block; width: 64px; height: 76px; border-radius: 4px; background: var(--panel2); }
.pp-mine-record-copy { display: grid; min-width: 0; gap: 4px; }
.pp-mine-record-copy strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pp-mine-record-copy small { color: var(--muted); font-size: 10px; }
.pp-mine-record-remove { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #aeb3c0; font-size: 15px; cursor: pointer; }
.pp-mine-empty { padding: 34px 18px; border: 1px dashed #414655; border-radius: 6px; color: var(--muted); font-size: 12px; text-align: center; }
.pp-mine-empty[hidden] { display: none; }
.pp-mine-empty a { display: inline-block; margin-top: 10px; color: var(--text); }
.pp-mine-ad { margin-top: 25px; }
.pp-mine-ad .pp-home-ad-slider { max-height: 330px; }
.pp-section-page-head { border-color: var(--line); }

@media (max-width: 760px) {
    .pp-home-ad-slider { max-height: calc(100vw - 24px); }
    .pp-home-ad-slide > span { padding: 26px 11px 10px; font-size: 11px; }
    .pp-reel-grid, .pp-loufeng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-home-main { padding-top: 13px; }
    .pp-mine-main { padding-top: 17px; }
    .pp-mine-record { grid-template-columns: 58px minmax(0, 1fr) 30px; gap: 8px; }
    .pp-mine-record img { width: 58px; height: 70px; }
    .pp-mine-record-placeholder { width: 58px; height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    .pp-home-ad-track, .pp-loufeng-pulse { animation: none; transition: none; }
}
