/**
 * 自动逻辑生成工具 - 样式文件
 * 从原始HTML文件提取的CSS样式
 */

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

body {
    font-family: 'Microsoft YaHei UI', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.file-upload {
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.file-upload:hover {
    border-color: #667eea;
    background-color: #f7fafc;
}

.file-upload.dragover {
    border-color: #667eea;
    background-color: #edf2f7;
}

.file-input {
    display: none;
}

.upload-text {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 10px;
}

.upload-icon {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

/* 语音录制按钮 */
.btn-voice {
    background: linear-gradient(135deg, #ed64a6 0%, #d53f8c 100%);
}

.btn-voice:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(237, 100, 166, 0.4);
}

.btn-voice.recording {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(229, 62, 62, 0); }
}

.status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.status.success {
    background-color: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.status.error {
    background-color: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

.status.info {
    background-color: #ebf8ff;
    color: #3182ce;
    border: 1px solid #90cdf4;
}

.status.hidden {
    display: none;
}

.progress-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #4a5568;
    font-weight: 500;
}

.logic-preview {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.logic-preview h4 {
    color: #4a5568;
    margin-bottom: 10px;
}

.logic-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.logic-item .question-id {
    color: #667eea;
    font-weight: bold;
}

.logic-item .logic-text {
    color: #2d3748;
    margin-left: 10px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 5px;
}

.file-info {
    background: #edf2f7;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.file-info h4 {
    color: #4a5568;
    margin-bottom: 8px;
}

.file-info p {
    color: #718096;
    margin: 4px 0;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 15px;
    margin: 0 5px;
    border-radius: 8px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.step.active {
    background: #edf2f7;
    border-color: #667eea;
    color: #667eea;
}

.step.completed {
    background: #f0fff4;
    border-color: #38a169;
    color: #38a169;
}

.step-number {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.step-title {
    font-size: 0.9rem;
}

.xml-preview {
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
}

.logic-mapping {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.logic-mapping h4 {
    color: #4a5568;
    margin-bottom: 10px;
}

.mapping-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 5px;
}

.mapping-question {
    font-weight: 500;
    color: #2d3748;
}

.mapping-logic {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #667eea;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}
