* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

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

header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5em;
    color: #1a73e8;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section h3 {
    color: #555;
    margin: 20px 0 10px;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #1a73e8;
    background: #f0f7ff;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.upload-area .hint {
    color: #999;
    font-size: 0.9em;
    margin-top: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #e8f5e9;
    border-radius: 8px;
    margin-top: 15px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #1557b0;
}

.btn-success {
    background: #34a853;
    color: #fff;
}

.btn-success:hover {
    background: #2d8e47;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-sm {
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85em;
}

/* SSH配置表单 */
.ssh-config {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row label {
    width: 90px;
    font-weight: 500;
    color: #555;
}

.form-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
}

.form-row input:focus {
    outline: none;
    border-color: #1a73e8;
}

/* 解析结果 */
.parse-result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.parse-result .title {
    font-size: 1.2em;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 10px;
}

.parse-result .env-info {
    color: #666;
    margin-bottom: 15px;
}

.parse-result .section-block {
    margin-bottom: 12px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #1a73e8;
}

.parse-result .section-block b {
    color: #333;
}

.parse-result .section-block p {
    margin-top: 5px;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

.step-item {
    padding: 10px;
    margin: 5px 0;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #ddd;
}

.step-item .step-num {
    font-weight: 600;
    color: #1a73e8;
}

.step-item .step-cmd {
    font-family: "Courier New", monospace;
    background: #263238;
    color: #80cbc4;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 0.9em;
    overflow-x: auto;
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #34a853);
    width: 0%;
    transition: width 0.5s;
}

.progress-text {
    color: #666;
    font-size: 0.95em;
}

/* 步骤列表（执行中） */
.step-list .exec-step {
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9f9f9;
}

.exec-step .status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    flex-shrink: 0;
}

.exec-step.pending .status-icon { background: #e0e0e0; color: #999; }
.exec-step.running .status-icon { background: #fff3e0; color: #ff9800; animation: pulse 1s infinite; }
.exec-step.success .status-icon { background: #e8f5e9; color: #4caf50; }
.exec-step.failed .status-icon { background: #ffebee; color: #f44336; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.exec-step .step-info {
    flex: 1;
}

.exec-step .step-title {
    font-weight: 500;
}

.exec-step .step-output {
    font-family: "Courier New", monospace;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
    background: #263238;
    color: #80cbc4;
    padding: 8px;
    border-radius: 4px;
}

/* 总结 */
.summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.summary .stat {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
}

.summary .stat-item {
    text-align: center;
}

.summary .stat-num {
    font-size: 2em;
    font-weight: 700;
}

.summary .stat-label {
    color: #666;
    font-size: 0.9em;
}

.stat-num.success { color: #4caf50; }
.stat-num.failed { color: #f44336; }
