/* 上传页面专用样式 */

.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-header {
    text-align: center;
    margin-bottom: 3rem;
}

.upload-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.upload-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 表单区域 */
.upload-form {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.required {
    color: var(--color-danger);
    font-weight: 700;
}

/* 文件上传区域 */
.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    background: var(--bg-tertiary);
    transition: var(--transition);
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--color-info);
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--color-success);
    background: rgba(0, 212, 170, 0.1);
    transform: scale(1.02);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-content {
    padding: 3rem 2rem;
    text-align: center;
    pointer-events: none;
}

.upload-content i {
    font-size: 3rem;
    color: var(--color-info);
    margin-bottom: 1rem;
    display: block;
}

.upload-content p {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.file-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 文件预览 */
.file-preview {
    padding: 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-info i {
    font-size: 2rem;
    color: var(--color-success);
    flex-shrink: 0;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.remove-file {
    background: var(--color-danger);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.remove-file:hover {
    background: #ee5a24;
    transform: scale(1.1);
}

/* 参数预览 */
.params-preview {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.params-preview pre {
    margin: 0;
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    background: transparent;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* 输入框组 */
.input-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-info);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 上传进度 */
.upload-progress {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    text-align: center;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 帮助区域 */
.help-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.help-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.help-content {
    display: grid;
    gap: 1.5rem;
}

.help-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.help-item ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-item li {
    margin-bottom: 0.25rem;
}

.help-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow-x: auto;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-container {
        padding: 0;
    }
    
    .upload-header h1 {
        font-size: 2rem;
    }
    
    .upload-form {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .upload-content {
        padding: 2rem 1rem;
    }
    
    .upload-content i {
        font-size: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .help-section {
        padding: 1.5rem;
    }
    
    .help-content {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .upload-header {
        margin-bottom: 2rem;
    }
    
    .upload-header h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1rem;
        flex-wrap: wrap;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .remove-file {
        align-self: flex-end;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeInUp 0.5s ease;
}

.file-preview {
    animation: fadeInUp 0.3s ease;
}

/* 文件拖拽状态 */
.file-upload-area.dragover .upload-content i {
    animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}