/* 基础布局与通用样式 */
:root {
    --main-blue: #0d6efd;
    --hover-blue: #0b5ed7;
}

body {
    background: #f8f9fa; /* 统一背景颜色 */
    margin: 0;
    padding: 0;
}

.main-container {
    height: calc(100vh - 110px); /* 仅考虑底部版权栏高度 */
    min-height: 800px; /* 提升最小高度 */
    max-width: 1200px; /* 限制最大宽度 */
    margin: 0 auto; /* 水平居中 */
    padding: 20px; /* 增加内边距 */
    background: #e9ecef; /* 容器背景颜色设置为灰色 */
    border-radius: 12px; /* 圆角 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影 */
}

/* 通用容器样式 */
.nav-container,
.form-container,
.response-container {
    background: white; /* 统一背景颜色 */
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* 栅格布局 */
.main-container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px; /* 调整间距 */
    width: 100%; /* 确保占满父容器宽度 */
}

.main-container .col-3 {
    flex: 0 0 30%; /* 左侧区域占 3 列 */
    max-width: 30%;
    padding: 0 10px; /* 调整间距 */
}

.main-container .col-7 {
    flex: 0 0 70%; /* 右侧区域占 7 列 */
    max-width: 70%;
    padding: 0 10px; /* 调整间距 */
}

/* 表单区域 */
.form-container {
    padding: 20px;
    overflow-y: auto; /* 启用智能滚动 */
    height: 100%; /* 确保占满父容器高度 */
}

.form-section {
    margin-bottom: 0.8rem;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
}

/* 响应区域 */
.response-container {
    overflow: hidden; /* 外层容器隐藏溢出 */
    height: calc(100vh - 220px); /* 大屏时设置高度，接近底部版权区域 */
    min-height: 720px; /* 小屏时设置最小高度 */
    display: flex;
    flex-direction: column;
}

.result-header {
    background: #f8f9fa;
    padding: 1.2rem;
    border-bottom: 2px solid var(--main-blue);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0; /* 防止头部被压缩 */
}

.result-header span {
    color: var(--main-blue);
    font-size: 1.3rem;
}

.response-content {
    flex-grow: 1; /* 填充剩余空间 */
    overflow-y: auto; /* 启用垂直滚动条 */
    padding: 20px;
    background: white; /* 背景色 */
    border-radius: 0 0 12px 12px; /* 圆角 */
    max-height: 100%; /* 确保内容不超过容器高度 */
}

/* 优雅滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--main-blue);
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hover-blue);
}

/* 加载层 */
.loading-overlay {
    position: relative; /* 从 absolute 改为 relative */
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin-top: 1rem; /* 与按钮保持一定距离 */
    padding: 1rem; /* 增加内边距 */
    border-radius: 8px; /* 圆角 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
}

/* 按钮样式 */
.btn-submit {
    padding: 14px;
    font-size: 1.1rem;
    border-radius: 8px;
    background: var(--main-blue);
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-submit:hover {
    background: var(--hover-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* 表单元素优化 */
.form-control-lg {
    padding: 0.8rem 1.2rem;
}

.form-select {
    padding: 0.8rem 2.5rem 0.8rem 1.2rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* 辅助样式 */
.default-prompt {
    height: 100%; /* 确保填满容器 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/*.copyright-area {*/
/*    position: relative; !* 从fixed改为relative *!*/
/*    bottom: 0;*/
/*    width: 100%;*/
/*    background: #f8f9fa;*/
/*    padding: 15px 0;*/
/*    text-align: center;*/
/*    border-top: 1px solid #dee2e6;*/
/*}*/

/* 小屏样式 */
@media (max-width: 767.98px) {
    .main-container .col-3,
    .main-container .col-7 {
        flex: 0 0 100%; /* 小屏时占满宽度 */
        max-width: 100%;
    }

    .response-container {
        min-height: 500px; /* 小屏时设置最小高度 */
        height: auto;  /* 移动端使用自动高度 */
    }
}