/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.header h1 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 28px;
}

.model-info {
    color: #666;
    font-size: 14px;
}

/* 标题样式 */
h2 {
    color: #2c3e50;
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 500;
}

h3 {
    color: #34495e;
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 500;
}

/* 快速翻译区域 */
.quick-translate-section {
    margin-bottom: 30px;
}

.quick-translate-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

#chineseInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#chineseInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.quick-translate-result {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    min-height: 60px;
    font-size: 16px;
    line-height: 1.6;
}

/* 主要内容区域 */
.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-box, .translate-box {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 翻译结果区域 */
.translate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.translate-results {
    display: grid;
    gap: 20px;
}

.result-group {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.result-content {
    min-height: 100px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.6;
}

/* 纠错结果区域 */
.correction-box {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.correction-item {
    background-color: #f8f9fa;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.correction-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.correction-item:last-child {
    margin-bottom: 0;
}

.correction-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.correction-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #3498db;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 50%;
}

.correction-type {
    flex: 1;
    display: flex;
    align-items: center;
}

.type-label {
    color: #666;
    font-size: 14px;
    margin-right: 6px;
}

.type-content {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
}

.correction-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.correction-section {
    display: flex;
    padding: 8px 12px;
    border-radius: 4px;
    line-height: 1.4;
}

.correction-section.original {
    background-color: #fff3e0;
}

.correction-section.explanation {
    background-color: #f5f5f5;
}

.correction-section.suggestion {
    background-color: #e8f5e9;
}

.section-label {
    flex-shrink: 0;
    width: 45px;
    color: #666;
    font-size: 14px;
}

.section-text {
    flex: 1;
    margin-left: 8px;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.correction-section.explanation .section-text {
    color: #666;
}

.correction-section.suggestion .section-text {
    color: #2c3e50;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2980b9;
}

.correction-btn {
    width: 100%;
    margin-top: 10px;
}

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

/* 加载状态 */
.btn-loading {
    position: relative;
}

.btn-loading-icon {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 状态提示 */
.loading {
    color: #666;
    text-align: center;
    padding: 10px;
}

.success {
    color: #333;
}

.error-message {
    color: #e74c3c;
    padding: 10px;
    background-color: #fdf3f2;
    border-radius: 6px;
    font-size: 14px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .top-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .input-box, .translate-box, .correction-box {
        padding: 15px;
    }

    textarea, .result-content {
        font-size: 15px;
    }

    .correction-item {
        padding: 12px;
    }
    
    .correction-header {
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .correction-number {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .type-label,
    .type-content {
        font-size: 13px;
    }
    
    .correction-section {
        padding: 6px 10px;
    }
    
    .section-label {
        width: 40px;
        font-size: 13px;
    }
    
    .section-text {
        font-size: 13px;
        margin-left: 6px;
    }
} 