body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}
.container {
    /* max-width: 1200px; */
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    padding-top: 5px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-bottom: 30px;
}
h2 {
    color: #555;
    margin-top: 30px;
    font-size: 18px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}
.section-title {
    font-size: 18px;
    margin-top: 5px;
    padding-bottom: 5px;
    background-color: rgb(255, 100, 0);
    color: white;
    text-align: center;
    border-bottom: 1px solid #ddd;
}
.table-container {
    /* margin: 20px 0; */
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.button-container {
    text-align: center;
    margin: 20px 0;
}



button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.info {
    background-color: #e7f3ff;
    border-left: 6px solid #2196F3;
    padding: 10px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}
/* 自定义Handsontable样式 */
.htCore {
    font-size: 14px;
    font-family: monospace;
}
.htCore th {
    background-color: #f8f8f8;
    font-weight: bold;
    text-align: center;
}
.htCore td {
    text-align: center;
    vertical-align: middle;
}
.htCore tr:hover td {
    background-color: #f5f5f5;
}
/* 悬浮窗样式 */
.floating-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 800px;
    max-height: 700px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

/* AI语法检查悬浮窗样式 */
#aiWindow {
    /* bottom: 80px; */
    left: 20px;
    top: auto;
    max-height: 80vh;
}

/* 悬浮窗头部样式 */
.window-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 统计输入框样式 */
.stats-inputs {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f9f9f9;
    display: flex;
    gap: 20px;
    align-items: center;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group label {
    margin-right: 10px;
    font-size: 14px;
    width: 120px;
}

.input-group input {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

.input-group textarea {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
    height: 100px;
    resize: vertical;
}

.window-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* 窗口控制按钮样式 */
.window-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* AI控件容器样式 */
.ai-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 配置按钮样式 */
.config-btn {
    background-color: #1890ff !important;
    color: white !important;
    border-color: #1890ff !important;
}

.config-btn:hover {
    background-color: #40a9ff;
}

/* 检查按钮样式 */
.check-btn {
    background-color: rgb(255, 100, 0) !important;
    color: white !important;
    border-color: rgb(255, 100, 0);
}

.check-btn:hover {
    background-color: rgb(255, 100, 0);
}

.control-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background-color: #f0f0f0;
}

.update-btn {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.update-btn:hover {
    background-color: #45a049;
}

.minimize-btn {
    background-color: #f0f0f0;
    color:#000000;
    width: auto;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: normal;
    padding: 0 10px;
}

/* 查看统计结果按钮样式 */
.show-stats-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* AI语法检查按钮样式 */
.show-ai-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: rgba(255, 100, 0, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.show-ai-btn:hover {
    background-color: rgba(255, 100, 0, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* AI按钮容器样式 */
.ai-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.report-btn {
    padding: 10px 20px;
    /* margin: 10px 0; */
    border-radius: 4px;
    background-color: rgb(255, 100, 0);
    color: white;
    border: none;
    cursor: pointer;
    /* font-size: 14px; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.report-btn:hover {
    background-color: rgba(255, 100, 0, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


.show-stats-btn:hover {
    background-color: rgba(76, 175, 80, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 输出表格特殊样式 */
#outputTable .htCore th {
    background-color: #e8f4f8;
}
#outputTable .htCore td:first-child {
    font-weight: bold;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .floating-window {
        width: 90%;
        bottom: 10px;
        right: 5%;
        max-height: 500px;
    }
}
/* AI语法检查相关样式 */
.ai-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* AI配置区域样式 */
.ai-config {
    padding: 0;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-config.expanded {
    padding: 15px;
    max-height: 300px;
}

/* 输入组样式优化 */
.ai-config .input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-config .input-group:last-child {
    margin-bottom: 0;
}

.ai-config .input-group label {
    width: 120px;
    font-weight: bold;
    color: #333;
    margin-top: 8px;
    flex-shrink: 0;
}

.ai-config .input-group input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.ai-config .input-group input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2), inset 0 1px 2px rgba(0,0,0,0.05);
}

.ai-config .input-group textarea {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    font-family: inherit;
    line-height: 1.5;
}

.ai-config .input-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2), inset 0 1px 2px rgba(0,0,0,0.05);
}

/* AI结果区域样式 */
.ai-result {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.response-title {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
}

.status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.status.loading {
    background-color: #fff3cd;
    color: #856404;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.copy-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 0;
}

.copy-btn:hover {
    background-color: #5a6268;
}

/* Markdown 样式 */
.markdown-body {
    background-color: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-family: monospace;
    line-height: 1.6;
    word-wrap: break-word;
    /* max-height: 500px; */
    overflow-y: auto;
    margin-bottom: 20px;
}

.markdown-body h1 {
    font-size: 2em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #333;
    text-align: left;
}

.markdown-body h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #333;
    text-align: left;
    border-bottom: 1px solid #eaecef;
}

.markdown-body h3 {
    font-size: 1.25em;
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #333;
    text-align: left;
}

.markdown-body p {
    margin-top: 0;
    margin-bottom: 16px;
    color: #333;
    text-align: left;
}

.markdown-body ul, 
.markdown-body ol {
    padding-left: 2em;
    margin-top: 0;
    margin-bottom: 16px;
    text-align: left;
}

.markdown-body li {
    margin: 4px 0;
    text-align: left;
}

.markdown-body strong {
    font-weight: 600;
}

.markdown-body blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin: 0 0 16px 0;
}

/* Markdown表格样式 */
.markdown-body table {

    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    display: table;
    overflow-x: auto;
    border: 2px solid #dfe2e5;
}

.markdown-body table th {
    background-color: #f6f8fa;
    font-weight: 600;
    border: 1px solid #dfe2e5;
}

.markdown-body table th,
.markdown-body table td {
    padding: 8px 12px;
    border: 1px solid #dfe2e5;
    text-align: left;
}

.markdown-body table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}

.markdown-body table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* 设置表格列宽度：倒数第二列80px，最后一列40px，其余均分 */
.markdown-body table th:nth-last-child(2),
.markdown-body table td:nth-last-child(2) {
    width: 80px;
}


/* 其余列均分剩余宽度 */
.markdown-body table th:not(:nth-last-child(2)),
.markdown-body table td:not(:nth-last-child(2)){
    width: calc((100% - 80px) / 4);
}

.raw-response {
    /* margin-top: 20px; */
    /* padding: 15px; */
    background-color: #f1f3f4;
    border-radius: 6px;
}

.raw-response summary {
    cursor: pointer;
    color: #666;
    font-weight: bold;
    /* margin-bottom: 10px; */
}

.raw-response pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
    font-size: 12px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    h1 {
        font-size: 20px;
    }
    h2 {
        font-size: 16px;
    }
    button {
        font-size: 14px;
        padding: 8px 16px;
        margin: 5px;
    }
    .ai-section {
        padding: 15px;
    }
    .floating-window {
        width: 90%;
        bottom: 10px;
        right: 5%;
        max-height: 500px;
    }
}
