:root {
    --bg: #ffffff;
    --bg-light: #fff5f7;
    --bg-card: #ffffff;
    --text: #1a1a1a;
    --text-muted: #888888;
    --primary: #ff6b9d;
    --primary-dark: #e85a8a;
    --accent: #ff85a7;
    --border: rgba(255,107,157,0.12);
    --radius: 16px;
    --shadow: 0 8px 30px rgba(255,107,157,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: linear-gradient(90deg, #ff85a7 0%, #ff6b9d 100%);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(255,107,157,0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(0,0,0,0.25);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-btn:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(255,107,157,0.35);
    border-color: #fff;
}

.download-btn .icon {
    font-size: 1.1rem;
}

/* Hero */
.hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.5) 100%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
}

.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 14px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.15rem; text-shadow: 0 1px 6px rgba(0,0,0,0.3); }

/* Category Nav */
.category-nav {
    background: linear-gradient(90deg, #ff85a7 0%, #ff6b9d 100%);
    border-bottom: none;
    padding: 14px 0;
    overflow-x: auto;
}

.category-nav .container {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.category-nav a {
    white-space: nowrap;
    padding: 8px 18px;
    border-radius: 24px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.4);
}

.category-nav a:hover, .category-nav a.active {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ad Section */
.ad-section {
    padding: 24px 0 10px;
    background: #fff;
}

.ad-banner {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.ad-banner:hover {
    box-shadow: 0 8px 24px rgba(255,107,157,0.15);
}

.ad-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(255,107,157,0.18);
    border-color: rgba(255,107,157,0.25);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.25s;
}

.video-card:hover .video-thumb img { transform: scale(1.05); }

.thumb-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 1;
}

.video-preview-card:hover .thumb-img,
.video-preview-card.in-view .thumb-img { opacity: 0; }

.video-preview-card:hover .thumb-video,
.video-preview-card.in-view .thumb-video { opacity: 1; }

.video-preview-card .play-btn { z-index: 2; }

.play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.25s;
}

.video-card:hover .play-btn { opacity: 1; }

.play-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,107,157,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,107,157,0.4);
}

.video-info { padding: 16px; }
.video-title { font-size: 1rem; font-weight: 600; }

/* Player Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(30,10,20,0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
}

.player-box {
    width: 100%;
    max-width: 960px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.player-box iframe, .player-box video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-top: none;
    padding: 18px 0;
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    background: linear-gradient(90deg, #ff85a7 0%, #ff6b9d 100%);
}

body {
    padding-bottom: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .video-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .video-info { padding: 10px; }
    .video-title { font-size: 0.85rem; }
    .play-icon { width: 40px; height: 40px; font-size: 1rem; }
    .category-nav a { padding: 6px 12px; font-size: 0.8rem; }
}



.ad-slider {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ad-slider .ad-banner {
    margin-bottom: 0;
}

/* Device-specific download buttons */
.device-ios .download-btn.android,
.device-android .download-btn.ios {
    display: none;
}

.device-ios .header-actions,
.device-android .header-actions {
    justify-content: flex-end;
}

.download-btn .icon svg {
    display: block;
}

/* Share section */
.share-section {
    margin-top: 32px;
    padding: 28px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 107, 157, 0.14);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.1);
}

.share-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.share-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    position: relative;
}

.share-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.share-btn:hover {
    transform: translateY(-5px) scale(1.12);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.share-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.share-btn.telegram { background: linear-gradient(135deg, #0088cc, #00a8e8); }
.share-btn.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.share-btn.twitter  { background: #000000; }
.share-btn.facebook { background: linear-gradient(135deg, #1877f2, #0d5cb6); }
.share-btn.copy     { background: linear-gradient(135deg, #eef2f3, #8e9eab); color: #333; }
.share-btn.native   { background: linear-gradient(135deg, var(--primary), var(--accent)); }

@media (max-width: 768px) {
    .share-section {
        padding: 22px 16px;
        margin-top: 24px;
    }

    .share-btn {
        width: 48px;
        height: 48px;
    }

    .share-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Category sections on homepage */
.category-section {
    margin-bottom: 10px;
}

.category-section .video-grid {
    padding: 10px 0 30px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
    padding: 0 4px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
}

.section-header h2::before {
    content: '';
    width: 5px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 3px;
}

.section-header a {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.section-header a:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.1rem;
    }

    .section-header h2::before {
        height: 18px;
    }

    .section-header a {
        font-size: 0.8rem;
    }
}

/* Load more / infinite scroll */
.load-more-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 40px;
    min-height: 48px;
}

.load-more-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.load-more-spinner .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 107, 157, 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.load-more-end {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.load-sentinel {
    height: 1px;
    pointer-events: none;
}


/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 60px;
    background: #fff;
    border-top: 1px solid rgba(255,107,157,0.15);
    box-shadow: 0 -4px 20px rgba(255,107,157,0.1);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: #888;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: color 0.2s;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.bottom-nav-icon svg {
    width: 100%;
    height: 100%;
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 600;
}

/* 普通页面留出底部导航高度 */
body {
    padding-bottom: 60px;
}

/* 播放页底部导航特殊处理 */
body.feed-page .bottom-nav {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* APP 下载弹窗 */
.app-download-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.app-download-modal.open {
    opacity: 1;
    visibility: visible;
}

.app-download-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.app-download-dialog {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-download-modal.open .app-download-dialog {
    transform: translateY(0) scale(1);
}

.app-download-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.app-download-dialog h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: #333;
}

.app-download-dialog p {
    margin: 0 0 20px;
    font-size: 0.85rem;
    color: #888;
}

.app-download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.app-download-btn.ios {
    background: #000;
    color: #fff;
}

.app-download-btn.android {
    background: linear-gradient(135deg, #ff85a7 0%, #ff6b9d 100%);
    color: #fff;
}

.app-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

