
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.header {
    text-align: center;
    margin: 30px 0 40px;
}

.header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 1rem;
}

.upload-area {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

#fileInput {
    display: none;
}

.custom-file-btn {
    display: inline-block;
    background: #1890ff;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 15px;
    transition: background 0.3s;
}

.custom-file-btn:hover {
    background: #096dd9;
}

.upload-btn {
    background: #52c41a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #4aa919;
}

.upload-btn:disabled {
    background: #a0e085;
    cursor: not-allowed;
}

.file-info {
    margin: 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.preview-title {
    font-size: 1.2rem;
    color: #333;
    margin: 20px 0 15px;
}

#preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 视频预览容器 */
.video-preview {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 16/9;
}

/* 视频缩略图 */
.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

/* 播放按钮 */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.play-icon:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid white;
    margin-left: 3px;
}

/* 视频元信息 */
.video-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-size: 0.9rem;
}

/* 视频播放器 */
.video-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player video {
    max-width: 90%;
    max-height: 90%;
}

.close-player {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.upload-info {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 100;
}

.footer {
    text-align: center;
    color: #999;
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.footer p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 20px 15px;
    }

    .custom-file-btn, .upload-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0 0 10px 0;
    }

    #preview {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

