/* 抖音视频解析播放器样式 */

.douyin-video-player {
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #000;
}

/* 封面图层 */
.douyin-video-cover {
    position: relative;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #1a1a1a;
}

.douyin-video-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 480px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.douyin-video-cover:hover img {
    transform: scale(1.02);
}

/* 播放按钮 */
.douyin-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.douyin-video-play-btn svg {
    margin-left: 4px;
}

.douyin-video-cover:hover .douyin-video-play-btn {
    background: rgba(254, 44, 85, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 视频容器 */
.douyin-video-container {
    width: 100%;
    line-height: 0;
}

.douyin-video-container video {
    width: 100%;
    display: block;
    border-radius: 0;
    background: #000;
    max-height: 480px;
}

/* 视频信息栏 */
.douyin-video-info {
    padding: 12px 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #f0f0f0;
}

.douyin-video-title {
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.douyin-video-author {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

/* 加载状态 */
.douyin-video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8f8f8;
    color: #999;
    font-size: 14px;
    gap: 8px;
}

.douyin-video-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #fe2c55;
    border-radius: 50%;
    animation: douyin-spin 0.8s linear infinite;
}

@keyframes douyin-spin {
    to { transform: rotate(360deg); }
}

/* 错误状态 */
.douyin-video-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: #fff5f5;
    color: #fe2c55;
    font-size: 14px;
    border-radius: 8px;
    margin: 16px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .douyin-video-player {
        margin: 12px auto;
        border-radius: 8px;
    }

    .douyin-video-cover img {
        max-height: 360px;
    }

    .douyin-video-container video {
        max-height: 360px;
    }

    .douyin-video-play-btn {
        width: 56px;
        height: 56px;
    }

    .douyin-video-play-btn svg {
        width: 36px;
        height: 36px;
    }

    .douyin-video-info {
        padding: 10px 12px;
    }

    .douyin-video-title {
        font-size: 13px;
    }

    .douyin-video-author {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .douyin-video-cover img {
        max-height: 300px;
    }

    .douyin-video-container video {
        max-height: 300px;
    }
}
