body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}
/* 上部分翻译交互区样式 */
.translation-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    border-left: 4px solid #4299e1;
    padding-left: 10px;
}
.translation-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#sourceText {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    resize: none;
    min-height: 100px;
}
#sourceText:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}
.translate-btn {
    align-self: flex-start;
    padding: 10px 24px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.translate-btn:hover {
    background-color: #3182ce;
}
.translate-btn:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}
.result-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.original-text, .translated-text {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
}
/* 复制按钮样式 */
.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    background-color: #f5f5f5;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.copy-btn:hover {
    background-color: #f0f0f0;
    border-color: #cbd5e0;
    color: #2d3748;
}
.copy-btn.success {
    background-color: #e8f4f8;
    color: #38b2ac;
    border-color: #bee3f8;
}
.text-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 5px;
}
.text-value {
    font-size: 16px;
    font-weight: 500;
    word-break: break-all;
    padding-right: 80px; /* 给复制按钮留空间 */
}
.loading {
    font-size: 14px;
    color: #4299e1;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: none;
}
.error {
    font-size: 14px;
    color: #e53e3e;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #feb2b2;
    background-color: #fef7fb;
    display: none;
}
/* 下部分翻译网站列表样式 */
.translation-sites-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: none; /* 默认隐藏 */
}
.sites-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.site-card {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.site-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}
.site-desc {
    font-size: 14px;
    color: #718096;
    margin-bottom: 12px;
    line-height: 1.5;
}
.site-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #4299e1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}
.site-link:hover {
    background-color: #3182ce;
}
/* 响应式适配 */
@media (max-width: 768px) {
    .translation-section, .translation-sites-section {
        padding: 20px;
    }
    .section-title {
        font-size: 16px;
    }
    .text-value {
        font-size: 15px;
        padding-right: 70px;
    }
    .translate-btn {
        width: 100%;
        align-self: stretch;
    }
    .sites-list {
        grid-template-columns: 1fr;
    }
    .copy-btn {
        padding: 3px 8px;
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    .translation-content {
        gap: 15px;
    }
    .original-text, .translated-text, #sourceText {
        padding: 12px;
    }
    #sourceText {
        min-height: 80px;
    }
    .text-value {
        padding-right: 60px;
    }
}