/* Pornhub 风格模板 */
:root {
    --ph-bg: #111111;
    --ph-bg-soft: #181818;
    --ph-bg-card: #1f1f1f;
    --ph-text: #ffffff;
    --ph-text-soft: #c4c4c4;
    --ph-accent: #f90;
    --ph-accent-soft: #ffb84d;
    --ph-border: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ph-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--ph-bg);
    color: var(--ph-text);
}

.ph-app {
    min-height: 100vh;
}

/* 头部 */
.ph-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #000;
    border-bottom: 1px solid #000;
}

.ph-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ph-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-right: 12px;
}

.ph-logo-main {
    background: #000;
    color: #fff;
    font-weight: 700;
    padding: 4px 6px;
    font-size: 18px;
}

.ph-logo-sub {
    background: var(--ph-accent);
    color: #000;
    font-weight: 700;
    padding: 4px 6px;
    font-size: 18px;
}

.ph-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #181818;
    border-radius: 4px;
    overflow: hidden;
}

.ph-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 10px;
    color: var(--ph-text);
    font-size: 14px;
}

.ph-search-btn {
    border: none;
    background: #303030;
    color: var(--ph-text);
    padding: 6px 12px;
    cursor: pointer;
}

.ph-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
}

.ph-menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ph-text);
}

.ph-nav {
    border-top: 1px solid #000;
    background: #141414;
}

.ph-nav-scroller {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #303030 transparent;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.ph-nav-scroller::-webkit-scrollbar {
    height: 6px;
}

.ph-nav-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.ph-nav-scroller::-webkit-scrollbar-thumb {
    background: #303030;
    border-radius: 3px;
}

.ph-nav-scroller::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

.ph-nav-item {
    color: var(--ph-text-soft);
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
}

.ph-nav-item:hover,
.ph-nav-item.is-active {
    background: #303030;
    color: #fff;
}

.ph-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.ph-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.ph-section {
    margin-bottom: 24px;
}

.ph-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ph-section-title {
    font-size: 18px;
    font-weight: 600;
}

.ph-more {
    font-size: 13px;
    color: var(--ph-accent-soft);
    text-decoration: none;
}

.ph-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.ph-video-card {
    background: var(--ph-bg-card);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.ph-video-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ph-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.ph-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.ph-video-card:hover .ph-thumb img {
    transform: scale(1.05);
}

.ph-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 2px;
}

.ph-duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 2px;
}

.ph-info {
    padding: 8px 10px 10px;
}

.ph-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ph-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.ph-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 2px;
    background: #303030;
    white-space: nowrap;
}

.ph-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--ph-text-soft);
}

.ph-meta-score {
    color: var(--ph-accent-soft);
}

.ph-meta-time {
    color: var(--ph-text-soft);
}

.ph-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--ph-text-soft);
}

/* 详情 */
.ph-detail-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ph-detail-hero {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
}

.ph-detail-poster img {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
}

.ph-detail-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ph-detail-title {
    font-size: 22px;
    font-weight: 600;
}

.ph-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ph-meta-chip {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 2px;
    background: #2c2c2c;
}

.ph-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--ph-text-soft);
}

.ph-detail-desc {
    font-size: 13px;
    color: var(--ph-text-soft);
    max-height: 5.5em;
    overflow: hidden;
}

.ph-player-container {
    margin-top: 8px;
}

.ph-player-wrapper {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.ph-player-wrapper {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.ph-player-wrapper .player-ad-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 10 !important;
    overflow: hidden !important;
}

.ph-player-wrapper .player-ad-content {
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

.ph-player-wrapper .player-ad-content :where(img, iframe, video) {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.ph-episode-list {
    margin-top: 8px;
}

.ph-episode-group {
    margin-bottom: 12px;
}

.ph-episode-section {
    margin-top: 20px;
}

.ph-episode-title {
    font-size: 14px;
    margin-bottom: 6px;
}

.ph-episode-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ph-episode-item,
.ph-episode-btn {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 2px;
    background: #262626;
    color: var(--ph-text-soft);
    text-decoration: none;
}

.ph-episode-item.is-active,
.ph-episode-item:hover,
.ph-episode-btn.is-active,
.ph-episode-btn:hover {
    background: var(--ph-accent);
    color: #000;
}

.ph-episode-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.ph-play-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ph-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    padding: 4px 8px;
    background: #262626;
    border-radius: 3px;
    text-decoration: none;
    color: var(--ph-text-soft);
}

.ph-play-title {
    font-size: 18px;
    font-weight: 500;
}

/* 分页 */
.ph-pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ph-page-btn {
    padding: 4px 10px;
    border-radius: 3px;
    background: #262626;
    color: var(--ph-text-soft);
    font-size: 13px;
    text-decoration: none;
}

.ph-page-info {
    font-size: 13px;
    color: var(--ph-text-soft);
}

/* 移动端 */
@media (max-width: 768px) {
    .ph-header-inner {
        padding: 8px 10px;
        gap: 8px;
    }

    .ph-logo {
        margin-right: 0;
        flex-shrink: 0;
    }

    .ph-logo-main,
    .ph-logo-sub {
        font-size: 16px;
        padding: 3px 5px;
    }

    .ph-search {
        display: flex;
        flex: 1;
        min-width: 0;
    }

    .ph-search-input {
        font-size: 13px;
        padding: 6px 8px;
    }

    .ph-search-btn {
        padding: 6px 10px;
        flex-shrink: 0;
    }

    .ph-menu-toggle {
        display: none;
    }

    .ph-detail-hero {
        grid-template-columns: 1fr;
    }

    .ph-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

/* Footer 链接滚动 */
.ph-footer-links {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--ph-border);
    padding: 8px 0;
    z-index: 100;
    overflow: hidden;
}

.ph-footer-links-container {
    display: flex;
    gap: 16px;
    white-space: nowrap;
    animation: ph-footer-scroll 30s linear infinite;
    will-change: transform;
}

.ph-footer-links-container:hover {
    animation-play-state: paused;
}

.ph-footer-link {
    display: inline-block;
    padding: 4px 12px;
    color: var(--ph-text-soft);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.ph-footer-link:hover {
    color: var(--ph-accent);
}

@keyframes ph-footer-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--scroll-distance, -50%));
    }
}

/* 移动端 Footer 链接 */
@media (max-width: 768px) {
    .ph-footer-links {
        padding: 6px 0;
    }

    .ph-footer-link {
        font-size: 11px;
        padding: 3px 10px;
    }
}


