/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #007bff;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #bd2130;
}

/* 主内容区域 */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 20px;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 模式切换 */
.mode-switch {
    display: flex;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.mode-switch button {
    flex: 1;
    padding: 12px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
}

.mode-switch button.active {
    background-color: #007bff;
    color: white;
}

/* 隐藏/显示上传区域 */
.upload-area {
    display: none;
}

.upload-area.show {
    display: block;
}

/* 预览区域 */
#previewContainer {
    margin-top: 30px;
}

#previewContainer h3 {
    margin-bottom: 15px;
}

.video-preview {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

/* 状态信息 */
.status-info {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.status-processing {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* 加载动画 */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果区域 */
.result-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .container {
        padding: 10px;
    }
    header {
        flex-direction: column;
        gap: 10px;
    }
    .result-actions {
        flex-direction: column;
    }
}
