body {
    background-color: #f8f9fa;
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
}

/* 历史记录侧边栏样式 */
#historyList {
    max-height: 80vh;
    overflow-y: auto;
}

.history-item {
    transition: all 0.2s;
    padding: 0.75rem 1.25rem;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.delete-btn {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

.card {
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.result-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-box {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    height: calc(100% - 40px);
    overflow-y: auto;
    background-color: #f9f9f9;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
}

#polishButton {
    transition: all 0.3s;
}

#polishButton:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.polished-result {
    background-color: #f8f9fa;
    border-left: 4px solid #4e73df;
    padding: 15px;
    margin-bottom: 20px;
}

.polished-result h5 {
    color: #4e73df;
    margin-bottom: 15px;
}

.result-text {
    line-height: 1.6;
    white-space: pre-wrap;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
}

.feedback-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 5px;
}

@media (max-width: 767.98px) {
    .col-md-6:last-child {
        margin-top: 20px;
    }
}

/* 打印样式 */
@media print {
    /* 隐藏页面上的其他元素 */
    body * {
        visibility: hidden;
    }
    /* 只显示打印模板 */
    #printTemplate, #printTemplate * {
        visibility: visible;
    }
    #printTemplate {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        display: block !important;
        padding: 2cm;
    }
    /* 去掉页眉和页脚 */
    @page {
        margin: 0;
        size: auto;
    }
    .print-container {
        width: 100%;
        height: 100%;
    }
    .essay-title {
        text-align: center;
        margin-bottom: 2em;
        font-size: 18pt;
        font-weight: bold;
    }
    .essay-content p {
        text-indent: 2em; /* 段首缩进2个字符 */
        line-height: 2;
        margin-bottom: 1em;
        font-size: 14pt;
    }
}