373 lines
6.2 KiB
CSS
373 lines
6.2 KiB
CSS
/* ===== 全局重置 ===== */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #f5f7fa;
|
|
color: #1a1a2e;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 820px;
|
|
width: 100%;
|
|
background: #ffffff;
|
|
border-radius: 24px;
|
|
padding: 40px 48px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
/* ===== 头部 ===== */
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.subtitle {
|
|
color: #6b7280;
|
|
font-size: 15px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ===== 上传区域 ===== */
|
|
.upload-section {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.upload-zone {
|
|
border: 2px dashed #d1d5db;
|
|
border-radius: 16px;
|
|
padding: 48px 24px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.25s ease;
|
|
background: #fafbfc;
|
|
}
|
|
|
|
.upload-zone:hover {
|
|
border-color: #8b5cf6;
|
|
background: #f5f3ff;
|
|
}
|
|
|
|
.upload-zone.dragover {
|
|
border-color: #8b5cf6;
|
|
background: #ede9fe;
|
|
}
|
|
|
|
.upload-icon {
|
|
font-size: 48px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.upload-text {
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
color: #1f2937;
|
|
}
|
|
|
|
.upload-hint {
|
|
font-size: 13px;
|
|
color: #9ca3af;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
#fileInput {
|
|
display: none;
|
|
}
|
|
|
|
.file-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
background: #f0fdf4;
|
|
border-radius: 12px;
|
|
border: 1px solid #86efac;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.file-name {
|
|
font-weight: 500;
|
|
color: #166534;
|
|
flex: 1;
|
|
}
|
|
|
|
.file-size {
|
|
color: #6b7280;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.btn-remove {
|
|
background: none;
|
|
border: none;
|
|
color: #ef4444;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
/* ===== 配置区域 ===== */
|
|
.config-section {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 16px 24px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.form-group label {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: #374151;
|
|
}
|
|
|
|
.form-group .required {
|
|
color: #ef4444;
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group select {
|
|
padding: 10px 14px;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 10px;
|
|
font-size: 14px;
|
|
transition: border 0.2s;
|
|
background: #fafbfc;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group select:focus {
|
|
outline: none;
|
|
border-color: #8b5cf6;
|
|
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
|
|
}
|
|
|
|
.form-group input:invalid {
|
|
border-color: #fca5a5;
|
|
}
|
|
|
|
.form-group small {
|
|
font-size: 12px;
|
|
color: #9ca3af;
|
|
}
|
|
|
|
/* ===== 操作按钮 ===== */
|
|
.action-section {
|
|
text-align: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.btn-generate {
|
|
padding: 14px 48px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
border: none;
|
|
border-radius: 12px;
|
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
color: #fff;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn-generate:hover:not(:disabled) {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
|
|
}
|
|
|
|
.btn-generate:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
transform: none;
|
|
}
|
|
|
|
.btn-spinner {
|
|
display: inline-block;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ===== 进度区域 ===== */
|
|
.progress-section {
|
|
margin-bottom: 24px;
|
|
padding: 20px 0;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 6px;
|
|
background: #e5e7eb;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #6366f1, #8b5cf6);
|
|
border-radius: 4px;
|
|
transition: width 0.4s ease;
|
|
}
|
|
|
|
.progress-status {
|
|
text-align: center;
|
|
font-size: 14px;
|
|
color: #6b7280;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.progress-logs {
|
|
margin-top: 12px;
|
|
background: #1f2937;
|
|
border-radius: 10px;
|
|
padding: 12px 16px;
|
|
max-height: 180px;
|
|
overflow-y: auto;
|
|
font-family: 'Menlo', 'Consolas', monospace;
|
|
font-size: 12px;
|
|
color: #d1d5db;
|
|
}
|
|
|
|
.progress-logs .log-line {
|
|
padding: 2px 0;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.progress-logs .log-line.info { color: #60a5fa; }
|
|
.progress-logs .log-line.success { color: #34d399; }
|
|
.progress-logs .log-line.warning { color: #fbbf24; }
|
|
.progress-logs .log-line.error { color: #f87171; }
|
|
|
|
/* ===== 结果区域 ===== */
|
|
.result-section {
|
|
padding: 20px 0;
|
|
border-top: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.result-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.result-icon {
|
|
font-size: 24px;
|
|
}
|
|
|
|
.result-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.result-files {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.result-files .file-tag {
|
|
background: #f3f4f6;
|
|
padding: 4px 14px;
|
|
border-radius: 20px;
|
|
font-size: 13px;
|
|
color: #374151;
|
|
}
|
|
|
|
.result-actions {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.result-actions button {
|
|
padding: 10px 24px;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-download {
|
|
background: #6366f1;
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-download:hover {
|
|
background: #4f46e5;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-view {
|
|
background: #f3f4f6;
|
|
color: #374151;
|
|
}
|
|
|
|
.btn-view:hover {
|
|
background: #e5e7eb;
|
|
}
|
|
|
|
.result-error {
|
|
margin-top: 12px;
|
|
padding: 12px 16px;
|
|
background: #fef2f2;
|
|
border-radius: 10px;
|
|
border: 1px solid #fca5a5;
|
|
color: #dc2626;
|
|
}
|
|
|
|
/* ===== 响应式 ===== */
|
|
@media (max-width: 600px) {
|
|
.container {
|
|
padding: 24px 16px;
|
|
}
|
|
|
|
.config-section {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.upload-zone {
|
|
padding: 32px 16px;
|
|
}
|
|
|
|
.btn-generate {
|
|
width: 100%;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
/* 查看代码仓库按钮 */
|
|
.btn-view-repo {
|
|
background: #10b981;
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-view-repo:hover {
|
|
background: #059669;
|
|
transform: translateY(-1px);
|
|
} |