/* 创建视频页面样式 */

.create-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

.create-form-section {
    min-width: 0;
}

.preview-section {
    position: sticky;
    top: calc(var(--navbar-height) + 24px);
}

/* 模板选择 */
.template-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.template-tab {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.template-tab:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.template-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.template-item {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.template-item:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.template-item.selected {
    border-color: var(--primary);
    background: rgba(254, 44, 85, 0.1);
}

.template-item-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
}

.template-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 参数网格 */
.params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 高级选项 */
.advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 24px 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.advanced-toggle:hover {
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.advanced-options {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(254, 44, 85, 0.05);
}

.upload-area.dragging {
    border-color: var(--primary);
    background: rgba(254, 44, 85, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 40px;
    opacity: 0.7;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-preview {
    position: relative;
    display: inline-block;
}

.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--border-radius);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: var(--error);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.remove-image:hover {
    transform: scale(1.1);
}

/* 表单操作 */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.cost-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cost-label {
    color: var(--text-secondary);
}

.cost-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* 手机预览 */
.phone-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.phone-frame {
    width: 220px;
    height: 440px;
    background: #1a1a24;
    border-radius: 32px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
    border: 2px solid #2a2a38;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.preview-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-hint {
    font-size: 13px;
    margin-top: 8px;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 生成状态 */
.generation-status {
    padding: 24px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.status-icon {
    font-size: 24px;
}

.status-text {
    font-weight: 500;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 生成结果 */
.generation-result {
    padding: 20px;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.result-actions .btn {
    flex: 1;
}

/* 提示卡片 */
.tips-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-top: 20px;
}

.tips-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.tips-card ul {
    list-style: none;
    padding: 0;
}

.tips-card li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.tips-card li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--primary);
}

/* 响应式 */
@media (max-width: 992px) {
    .create-container {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        position: static;
        order: -1;
    }
    
    .phone-preview {
        margin-bottom: 16px;
    }
    
    .phone-frame {
        width: 160px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}
