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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.panel h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #555;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-group .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
    background: white;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="text"]:invalid {
    border-color: #e74c3c;
}

/* 左侧面板 */
.upload-area {
    border: 3px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9f9f9;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8e8ff;
}

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

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

#fileInput {
    display: none;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

#imagePreview {
    max-width: 100%;
    max-height: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: none;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-secondary:hover:not(:disabled) {
    background: #d0d0d0;
}

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

/* 右侧面板 */
.result-container {
    min-height: 400px;
}

.result-empty {
    text-align: center;
    color: #999;
    padding: 60px 20px;
}

.result-empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.result-content {
    display: none;
}

.result-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-section h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.result-item {
    margin: 8px 0;
    padding: 8px;
    background: white;
    border-radius: 5px;
}

.result-label {
    font-weight: bold;
    color: #555;
    display: inline-block;
    min-width: 120px;
}

.result-value {
    color: #333;
}

/* 处理时间统计 */
.timing-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 4px solid #667eea;
}

.timing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.timing-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.timing-item:hover {
    transform: translateY(-2px);
}

.timing-item.timing-total {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.timing-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.timing-total .timing-label {
    color: rgba(255, 255, 255, 0.9);
}

.timing-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #667eea;
}

.timing-total .timing-value {
    color: white;
    font-size: 1.6em;
}

.chat-message {
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 8px;
    line-height: 1.5;
}

.chat-message.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: right;
}

.chat-message.otherparty {
    background: #e8e8e8;
    color: #333;
}

.suggestion-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.1em;
    line-height: 1.6;
    white-space: pre-wrap;
}

.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c62828;
    display: none;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .timing-grid {
        grid-template-columns: 1fr;
    }
    
    .timing-item.timing-total {
        grid-column: 1;
    }
}

