/* 抖音 / 视频号风格垂直滑动播放器 */
/* 视频栏目页顶栏 */
.video-page-hero {
	margin: 12px 0 24px;
	padding: 16px 20px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
}

.video-page-hero-title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 600;
	color: #fff;
	line-height: 1.3;
}

.video-page-hero-desc {
	margin: 0;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.78);
	display: flex;
	align-items: center;
	gap: 8px;
	line-height: 1.5;
}

.video-page-hero-desc .loading-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	border-top-color: #fdbb2d;
	animation: video-hero-spin 0.8s linear infinite;
	flex-shrink: 0;
}

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

.video-feed-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: #000;
    display: none;
}

.video-feed-overlay.is-open {
    display: block;
}

.video-feed-overlay.is-open body {
    overflow: hidden;
}

.video-feed-close {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10052;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-feed-counter {
    position: fixed;
    top: max(20px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 10052;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    pointer-events: none;
}

.video-feed-scroller {
    height: 100%;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.video-feed-scroller::-webkit-scrollbar {
    display: none;
}

.video-feed-slide {
    position: relative;
    width: 100%;
    height: 100%;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
    overflow: hidden;
}

.video-feed-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

.video-feed-gradient {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
    pointer-events: none;
}

.video-feed-meta {
    position: absolute;
    left: 0;
    right: 84px;
    bottom: max(24px, env(safe-area-inset-bottom));
    padding: 0 16px;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}

.video-feed-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.video-feed-sub {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
}

.video-feed-detail {
    display: none;
}

/* 右侧互动栏（抖音风格） */
.video-feed-actions {
    position: absolute;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 48px));
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.video-feed-act {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease;
}

.video-feed-act i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    font-size: 1.35rem;
    backdrop-filter: blur(4px);
}

.video-feed-act-num {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    min-height: 14px;
}

.video-feed-act.is-active i {
    background: rgba(255, 71, 87, 0.35);
    color: #ff6b81;
}

.video-feed-act.is-active .fa-heart {
    color: #ff4757;
}

.video-feed-act-pop {
    animation: vf-act-pop 0.32s ease;
}

@keyframes vf-act-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* 评论抽屉 */
.video-feed-comment-sheet {
    position: fixed;
    inset: 0;
    z-index: 10055;
    display: none;
    pointer-events: none;
}

.video-feed-comment-sheet.is-open {
    display: block;
    pointer-events: auto;
}

.video-feed-comment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.video-feed-comment-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 62vh;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 16px 16px 0 0;
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.28s ease;
}

.video-feed-comment-sheet.is-open .video-feed-comment-panel {
    transform: translateY(0);
}

.video-feed-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    flex-shrink: 0;
}

.video-feed-comment-header button {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.video-feed-comment-list-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
    -webkit-overflow-scrolling: touch;
}

.video-feed-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.video-feed-comment-list .ci-comment-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.video-feed-comment-list .ci-comment-body {
    margin-left: 46px;
    color: rgba(255, 255, 255, 0.9);
}

.video-feed-comment-empty {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
}

.video-feed-comment-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #141414;
    flex-shrink: 0;
}

.video-feed-comment-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.92rem;
}

.video-feed-comment-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.video-feed-comment-form button {
    flex-shrink: 0;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: #ff4757;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.video-feed-toast {
    position: fixed;
    left: 50%;
    bottom: max(100px, calc(env(safe-area-inset-bottom) + 80px));
    transform: translateX(-50%) translateY(8px);
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 0.84rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
    z-index: 10060;
}

.video-feed-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.video-feed-toast.is-ok {
    background: rgba(46, 125, 50, 0.92);
}

/* 分享面板 */
.ci-share-sheet {
    position: fixed;
    inset: 0;
    z-index: 10056;
    display: none;
    pointer-events: none;
}

.ci-share-sheet.is-open {
    display: block;
    pointer-events: auto;
}

.ci-share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.ci-share-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.ci-share-sheet.is-open .ci-share-panel {
    transform: translateY(0);
}

.ci-share-title {
    margin: 0 0 14px;
    text-align: center;
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
}

.ci-share-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.ci-share-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: none;
    border-radius: 12px;
    background: #f5f5f5;
    color: #333;
    font-size: 0.82rem;
    cursor: pointer;
}

.ci-share-opt i {
    font-size: 1.5rem;
}

.ci-share-opt[data-share="friend"] i { color: #07c160; }
.ci-share-opt[data-share="moment"] i { color: #576b95; }

.ci-share-cancel {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #eee;
    font-size: 0.92rem;
    cursor: pointer;
}

/* 微信内：引导点右上角分享 */
.ci-share-guide {
    position: fixed;
    inset: 0;
    z-index: 10057;
    display: none;
    background: rgba(0, 0, 0, 0.72);
    padding: max(16px, env(safe-area-inset-top)) 16px 16px;
    box-sizing: border-box;
}

.ci-share-guide.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ci-share-guide-card {
    position: relative;
    margin-top: 8px;
    margin-right: 4px;
    max-width: 280px;
    padding: 18px 16px 14px;
    border-radius: 12px;
    background: #fff;
    color: #222;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.ci-share-guide-arrow {
    position: absolute;
    top: -36px;
    right: 18px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 16px solid #fff;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.08));
}

.ci-share-guide-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
}

.ci-share-guide-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
}

.ci-share-guide-desc {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #444;
}

.ci-share-guide-tip {
    margin: 0;
    font-size: 0.78rem;
    color: #888;
}

.video-feed-tap {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}

.video-feed-play-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 2;
}

.video-feed-play-hint.show {
    opacity: 1;
}

.video-feed-swipe-hint {
    position: fixed;
    bottom: max(80px, calc(env(safe-area-inset-bottom) + 60px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10052;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-feed-swipe-hint.show {
    opacity: 1;
}

body.video-feed-open {
    overflow: hidden;
    touch-action: none;
}

@media (min-width: 769px) {
    .video-feed-slide video {
        object-fit: contain;
    }
}
