/* 列表页样式 */

/* 内容容器 */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
}

/* 顶部导航栏 */
.page-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    max-width: 800px;
    margin: 0 auto;
}

.page-header .back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.page-header .back-btn:hover {
    background-color: #f5f6fa;
}

.page-header .back-btn svg {
    width: 18px;
    height: 18px;
    color: #2c3e50;
}

.page-header .title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

.page-header .action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.page-header .action-btn:hover {
    background-color: #f5f6fa;
}

.page-header .action-btn svg {
    width: 24px;
    height: 24px;
    color: #2c3e50;
}

/* 视频卡片 */
.video-list {
    padding: 0;
}

.video-card {
    display: flex;
    align-items: flex-start;
    padding: 0 0 10px 15px;
    background: white;
    cursor: pointer;
}

.video-cover-wrapper {
    width: 177.78px;
    aspect-ratio: 16/9;
    position: relative;
    flex-shrink: 0;
}

.video-cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0;
    background: #e0e0e0;
    overflow: hidden;
    position: relative;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-cover .duration {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 12px;
}

.video-cover .playlist-overlay {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: rgba(0, 0, 0, 0.67);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.video-cover .playlist-overlay .spacer {
    flex: 1;
}

.video-cover .playlist-overlay .file-count {
    color: white;
    font-size: 18px;
    font-weight: normal;
    flex: 0;
}

.video-cover .playlist-overlay .playlist-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0;
}

.video-info {
    flex: 1;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 14px;
    color: #222222;
    font-weight: normal;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 12px;
    color: #757575;
    margin-bottom: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta .user-name {
    color: #757575;
}

.video-meta .publish-time {
    color: #999;
    margin-left: 8px;
}

.video-duration {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 12px;
}

.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.2s;
}

.fav-btn svg {
    width: 18px;
    height: 18px;
    color: #999;
}

.fav-btn.active svg {
    color: #ff5722;
}

.fav-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cover-placeholder::after {
    content: '';
    width: 40px;
    height: 40px;
    background: url('../images/video_placeholder.png') center/contain no-repeat;
}

.video-actions {
    width: 32px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.video-actions .more-icon {
    width: 3px;
    height: 13px;
    background: url('../images/search_more.png') center/contain no-repeat;
}

/* 加载状态 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.loading-container .loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #999;
    animation: spin 0.8s linear infinite;
}

/* 加载更多 */
.load-more {
    padding: 16px 0 48px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.load-more.error {
    padding: 7px 0 54px 0;
}

.load-more .text {
    font-size: 14px;
    color: #999;
}

.load-more .retry-btn {
    font-size: 14px;
    color: #3498db;
    cursor: pointer;
}

.load-more .retry-btn:hover {
    text-decoration: underline;
}

.load-more .loading-spinner {
    width: 16px;
    height: 16px;
    border: 1.5px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #999;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 14px;
    color: #999;
}

/* 错误状态 */
.error-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.error-state .refresh-btn {
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: transform 0.2s;
}

.error-state .refresh-btn:hover {
    transform: scale(1.1);
}

.error-state .refresh-btn svg {
    width: 36px;
    height: 36px;
    color: #3498db;
}

/* 下拉刷新提示 */
.refresh-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    font-size: 14px;
    color: #999;
}

.refresh-indicator .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #999;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* 响应式 */
@media (max-width: 480px) {
    .video-cover-wrapper {
        width: 160px;
    }
    
    .video-title {
        font-size: 13px;
    }
}

