/* 视频页面样式 */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 16px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.video-count {
    font-size: 14px;
    color: #86868b;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.video-card {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}@media (hover: hover) {


.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
}

.video-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
}

.video-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    transition: background 0.2s;
}@media (hover: hover) {


.video-card:hover .video-play-overlay {
    background: rgba(0,0,0,0.35);
}
}

.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 4px;
    transition: transform 0.2s;
}@media (hover: hover) {


.video-card:hover .play-btn {
    transform: scale(1.1);
}
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.compress-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,149,0,0.9);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.video-card-info {
    padding: 12px 14px;
}

.video-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-meta {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 8px;
}

.meta-dot {
    margin: 0 6px;
}

.video-card-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #86868b;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #86868b;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 15px;
}

/* 上传弹窗 */
.upload-modal {
    max-width: 480px;
    width: 90%;
}

.upload-drop-zone {
    border: 2px dashed #d1d1d6;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 16px;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
    border-color: #007aff;
    background: rgba(0,122,255,0.04);
}

.drop-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.drop-hint {
    font-size: 13px;
    color: #86868b;
    margin-top: 6px;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e5ea;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007aff;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

#progressText {
    font-size: 13px;
    color: #86868b;
    min-width: 40px;
    text-align: right;
}

/* 视频预览弹窗 */
.video-preview-modal {
    max-width: 900px;
    width: 95%;
    padding: 0;
    overflow: hidden;
}

.video-player-wrap {
    width: 100%;
    background: #000;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoPlayer {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.video-info-section {
    padding: 20px 24px 24px;
}

.video-info-header {
    margin-bottom: 16px;
}

.video-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.video-meta {
    font-size: 14px;
    color: #86868b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.video-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}@media (hover: hover) {


.action-btn:hover {
    background: #f5f5f7;
}
}

.action-icon {
    font-size: 16px;
}

.action-count {
    font-weight: 600;
}

/* 评论区 */
.video-comments-section {
    border-top: 1px solid #e5e5ea;
    padding-top: 16px;
}

.comment-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.comment-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e5ea;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.comment-input-row input:focus {
    border-color: #007aff;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 20px;
}

.comment-list {
    max-height: 240px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f7;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e5ea;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-user {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.comment-time {
    font-size: 11px;
    color: #c7c7cc;
    margin-top: 4px;
}

/* 加载更多 */
.load-more-wrap {
    text-align: center;
    padding: 20px 0 40px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .video-card-info {
        padding: 10px 12px;
    }

    .video-card-title {
        font-size: 13px;
    }

    .video-card-meta,
    .video-card-stats {
        font-size: 11px;
    }

    .play-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .video-preview-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .video-player-wrap {
        max-height: 45vh;
    }

    #videoPlayer {
        max-height: 45vh;
    }

    .video-info-section {
        padding: 16px;
    }

    .video-title {
        font-size: 16px;
    }

    .page-header {
        padding: 16px 0 12px;
    }

    .page-title {
        font-size: 18px;
    }
}

/* 深色主题适配 */
body.theme-dark .video-card {
    background: #2c2c2e;
}

body.theme-dark .video-card-title {
    color: #fff;
}

body.theme-dark .video-card-meta,
body.theme-dark .video-card-stats,
body.theme-dark .video-count {
    color: #98989d;
}

body.theme-dark .upload-drop-zone {
    border-color: #48484a;
}

body.theme-dark .action-btn {
    border-color: #48484a;
    color: #fff;
}@media (hover: hover) {


body.theme-dark .action-btn:hover {
    background: #3a3a3c;
}
}

body.theme-dark .comment-input-row input {
    background: #2c2c2e;
    border-color: #48484a;
    color: #fff;
}

body.theme-dark .comment-item {
    border-bottom-color: #3a3a3c;
}

body.theme-dark .comment-user {
    color: #fff;
}

body.theme-dark .comment-text {
    color: #e5e5ea;
}

/* ===== 主界面混排视频卡片样式（跟图片卡片统一） ===== */
.gallery-item.video-card-item {
    cursor: pointer;
}

.gallery-item.video-card-item .gallery-img-wrap {
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    transition: background 0.2s;
    pointer-events: none;
}@media (hover: hover) {


.gallery-item.video-card-item:hover .video-play-overlay {
    background: rgba(0,0,0,0.4);
}
}

.video-play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 3px;
    transition: transform 0.2s;
}@media (hover: hover) {


.gallery-item.video-card-item:hover .video-play-icon {
    transform: scale(1.1);
}
}

.video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 2;
}

/* 视频预览弹窗 */
.video-preview-content {
    max-width: 900px;
    width: 95%;
    padding: 0;
    overflow: hidden;
}

.video-preview-content .video-player-wrap {
    width: 100%;
    background: #000;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview-content #videoPlayer {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.video-preview-content .video-info-section {
    padding: 20px 24px 24px;
}

.video-preview-content .video-info-header {
    margin-bottom: 16px;
}

.video-preview-content .video-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.video-preview-content .video-meta {
    font-size: 14px;
    color: #86868b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.video-preview-content .video-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.video-preview-content .action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}@media (hover: hover) {


.video-preview-content .action-btn:hover {
    background: #f5f5f7;
}
}

.video-preview-content .action-icon {
    font-size: 16px;
}

.video-preview-content .action-count {
    font-weight: 600;
}

.video-preview-content .video-comments-section {
    border-top: 1px solid #e5e5ea;
    padding-top: 16px;
}

.video-preview-content .comment-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.video-preview-content .comment-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e5ea;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.video-preview-content .comment-input-row input:focus {
    border-color: #007aff;
}

.video-preview-content .btn-sm {
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 20px;
}

.video-preview-content .comment-list {
    max-height: 240px;
    overflow-y: auto;
}

.video-preview-content .comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f7;
}

.video-preview-content .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e5ea;
    flex-shrink: 0;
}

.video-preview-content .comment-content {
    flex: 1;
}

.video-preview-content .comment-user {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.video-preview-content .comment-text {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.video-preview-content .comment-time {
    font-size: 11px;
    color: #c7c7cc;
    margin-top: 4px;
}

/* 移动端视频预览 */
@media (max-width: 768px) {
    .video-play-icon {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .video-preview-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .video-preview-content .video-player-wrap {
        max-height: 45vh;
    }

    .video-preview-content #videoPlayer {
        max-height: 45vh;
    }

    .video-preview-content .video-info-section {
        padding: 16px;
    }

    .video-preview-content .video-title {
        font-size: 16px;
    }
}

/* 加好友提示框 */
.friend-hint-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f5f5f7;
    border-radius: 12px;
    margin: 12px 0;
}

.friend-hint-text {
    font-size: 13px;
    color: #86868b;
    margin: 0;
    flex: 1;
}

.friend-hint-box .btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 16px;
    white-space: nowrap;
}

/* 深色主题 */
body.theme-dark .friend-hint-box {
    background: #2c2c2e;
}

body.theme-dark .friend-hint-text {
    color: #98989d;
}

/* 视频弹窗左右布局适配 */
.video-modal-wrap {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-wrap video {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 视频评论区直接显示 */
.video-comments-direct .comments-body {
    display: block !important;
}

.video-comments-direct .comment-list {
    max-height: 200px;
    overflow-y: auto;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    /* 视频预览弹窗全屏 */
    #videoPreviewModal .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    #videoPreviewModal .modal-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
    }

    /* 视频播放器占满宽度 */
    #videoPreviewModal .modal-image-wrap {
        width: 100%;
        height: auto;
        max-height: 45vh;
        flex-shrink: 0;
        background: #000;
    }

    #videoPreviewModal .video-modal-wrap video {
        width: 100%;
        max-height: 45vh;
    }

    /* 信息区可滚动 */
    #videoPreviewModal .modal-info {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
    }

    #videoPreviewModal .modal-info h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    #videoPreviewModal .stats-bar {
        margin-bottom: 12px;
    }

    #videoPreviewModal .meta-section {
        margin-bottom: 12px;
    }

    #videoPreviewModal .meta-row {
        padding: 8px 0;
        font-size: 13px;
    }

    #videoPreviewModal .friend-hint-box {
        margin: 12px 0;
        padding: 10px 12px;
    }

    #videoPreviewModal .friend-hint-text {
        font-size: 12px;
    }

    #videoPreviewModal .modal-actions {
        margin: 12px 0;
        gap: 8px;
    }

    #videoPreviewModal .modal-actions .btn-primary,
    #videoPreviewModal .modal-actions .btn-danger {
        flex: 1;
        padding: 10px;
        font-size: 14px;
    }

    /* 评论区 */
    #videoPreviewModal .comments-section {
        margin-top: 12px;
    }

    #videoPreviewModal .comments-header {
        padding: 8px 0;
        font-size: 15px;
        font-weight: 600;
    }

    #videoPreviewModal .comment-input-row {
        margin-bottom: 12px;
    }

    #videoPreviewModal .comment-input-row input {
        font-size: 14px;
        padding: 8px 12px;
    }

    #videoPreviewModal .comment-list {
        max-height: 30vh;
    }

    /* 关闭按钮 */
    #videoPreviewModal .modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 20px;
        z-index: 10;
        background: rgba(0,0,0,0.5);
        color: #fff;
        border-radius: 50%;
    }
}

/* ===== 手机端上传选择菜单 ===== */
.mobile-upload-sheet {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
}
.mobile-upload-sheet.show { display: block; }
.mobile-upload-sheet-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.mobile-upload-sheet-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.mobile-upload-title {
    text-align: center;
    font-size: 14px;
    color: #8e8e93;
    margin-bottom: 12px;
}
.mobile-upload-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: none;
    background: #f2f2f7;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #1c1c1e;
    cursor: pointer;
    margin-bottom: 8px;
}
.mobile-upload-option:active { background: #e5e5ea; }
.mobile-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #007aff;
}
.mobile-upload-icon svg { width: 100%; height: 100%; display: block; }
.mobile-upload-cancel {
    width: 100%;
    padding: 14px;
    border: none;
    background: #fff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #ff3b30;
    cursor: pointer;
    margin-top: 4px;
}
.mobile-upload-cancel:active { background: #f2f2f7; }

/* 电脑端隐藏上传菜单 */
@media (min-width: 769px) {
    .mobile-upload-sheet { display: none !important; }
}
