/* ==================== PDF智能阅读页面样式 (基于b.html) ==================== */

/* 主容器样式 */
.online-reading {
    display: flex;
    height: calc(100vh - 6.6rem);
    position: relative;
    margin-top: 6.6rem;
}

/* PDF内容区域 */
.pdf-content {
    overflow: hidden;
    height: 100%;
    flex: 1;
    position: relative;
}

.pdf-content iframe {
    border: none;
    width: 100%;
    height: 100%;
}

/* AI容器 */
.ai-container {
    display: flex;
    flex-direction: row-reverse;
}

/* AI工具侧边栏 */
.ai-tools-container {
    position: relative;
    z-index: 2;
    width: 9rem;
    height: 100%;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 0.4rem 2rem 0 rgba(46, 61, 82, 0.11);
}

/* 菜单项 */
.menu-item {
    width: 100%;
    height: 9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item img {
    width: 3.2rem;
    height: 3.2rem;
    transition: filter 0.3s;
}

.menu-item span {
    font-size: 1.3rem;
    color: #172533;
    margin-top: 0.4rem;
    transition: color 0.3s;
}

.menu-item:hover {
    background-color: #f9fbff;
}

.menu-item:hover img {
    filter: invert(33%) sepia(89%) saturate(5600%) hue-rotate(215deg) brightness(95%) contrast(89%);
}

.menu-item:hover span {
    color: #0f6cf8;
}

/* 选中状态 */
.menu-item--selected {
    background-color: #f9fbff;
}

.menu-item--selected img {
    filter: invert(33%) sepia(89%) saturate(5600%) hue-rotate(215deg) brightness(95%) contrast(89%);
}

.menu-item--selected span {
    color: #0f6cf8;
}

/* AI内容面板 */
.ai-content-container {
    z-index: 1;
    position: relative;
    width: 60rem;
    height: 100%;
    background-color: #fff;
    transition: width 0.3s ease-out;
    padding: 2.4rem 3rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.05);
}

.ai-content-container.close {
    padding: 0 !important;
    width: 0 !important;
    overflow: hidden;
}

/* AI面板标题 */
.ai-panel-name {
    font-weight: bold;
    font-size: 1.6rem;
    color: #172533;
    margin: 0;
}

/* AI面板样式 */
.ai-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ai-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.4rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid #e5e9f0;
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #535d71;
    cursor: pointer;
    padding: 0.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    transition: all 0.3s;
}

.close-panel-btn:hover {
    background-color: #f5f7fa;
    color: #172533;
}

.ai-panel-content {
    flex: 1;
    overflow-y: auto;
}

/* 固定顶部项 */
.fixed-top-item {
    display: flex;
    flex-direction: column;
}

.fixed-top-item__title {
    display: flex;
    align-items: center;
}

.fixed-top-item__title span {
    font-weight: bold;
    font-size: 1.6rem;
    color: #172533;
    margin-left: 0.4rem;
}

.fixed-top-item__title img {
    width: 2.13rem;
}

.fixed-top-item__content {
    margin-top: 0.8rem;
    font-size: 1.4rem;
    color: #172533;
    line-height: 2.4rem;
}

.fixed-top-item__tips {
    margin-top: 1.6rem;
    padding: 2rem;
    background: #f9fbff;
    border-radius: 1.2rem;
    font-size: 1.4rem;
    color: #172533;
}

.fixed-top-item__tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fixed-top-item__tips ul li {
    position: relative;
    padding-left: 1rem;
    cursor: pointer;
    margin-bottom: 0.8rem;
    transition: color 0.3s;
}

.fixed-top-item__tips ul li:hover {
    color: #274ab5;
}

.fixed-top-item__tips ul li::before {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #274ab5;
}

/* AI输入框 */
.ai-input {
    margin-top: auto;
    padding-top: 1rem;
}

.ai-input-container {
    height: 6rem;
    border-radius: 0.6rem;
    border: 0.1rem solid #bed1e3;
    padding: 0 2rem;
    display: flex;
    align-items: center;
}

.ai-input-container img {
    cursor: pointer;
    width: 2.62rem;
}

.ai-input-container .input {
    border: none;
    outline: none;
    box-shadow: none;
    flex: 1;
    height: 100%;
    display: block;
    font-size: 1.4rem;
    color: #535d71;
    padding: 0 1rem;
}

/* 滚动条样式 */
.ai-panel-content::-webkit-scrollbar {
    width: 1rem;
    background-color: transparent;
}

.ai-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.ai-panel-content::-webkit-scrollbar-thumb {
    background-color: #dee4e9;
    border-radius: 0.5rem;
}

.ai-panel-content::-webkit-scrollbar-thumb:hover {
    background: #c1c6ca;
}

/* 响应式调整 */
@media screen and (max-width: 1600px) {
    .ai-content-container {
        width: 50rem;
    }
}

@media screen and (max-width: 1400px) {
    .ai-content-container {
        width: 40rem;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 60rem;
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        width: 60rem;
        opacity: 1;
    }
    to {
        width: 0;
        opacity: 0;
    }
}

/* 加载状态 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    color: #535d71;
}
