/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}


/* PC 端样式 */
.fs-4 {
    display: flex; /* 原 d-flex */
    align-items: center; /* 原 align-items-center */
    margin-bottom: 1rem; /* 原 mb-3 */
    color: white; /* 原 text-white */
    text-decoration: none; /* 原 text-decoration-none */
    font-size: 1.5rem; /* Bootstrap 的 fs-4 默认字体大小 */
    font-weight: bold; /* 可选，增加标题的视觉权重 */
    padding: 10px 0; /* 可选，增加一些内边距 */
}


/* 侧边栏样式 */
.sidebar {
    width: 10%; /* 屏幕宽度的15% */
    height: 100vh;
    background-color: #212529;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px;

    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #ffc107;
}





/* 导航菜单样式 */
.nav-menu {
    display: flex;
    flex-direction: column; /* 竖排 */
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

/* 导航菜单项样式 */
.nav-item {
    margin-bottom: 5px; /* 菜单项之间的间距 */
}

/* 导航链接样式 */
.nav-link {
    display: block;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* 激活状态的导航链接样式 */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 鼠标悬停效果 */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}














/* 内容区样式 */
.content {
    margin-left: 10%; /* 与侧边栏宽度一致 */
    width: 85%; /* 屏幕宽度的85% */
    padding: 20px;
}






/* 书籍卡片样式 */



.book-card {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    width: 38%;
    margin-right: 2%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.book-image-container {
    margin-right: 10px;
}

.book-image {
    width: 100px;
    height: 150px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.book-image:hover {
    transform: scale(1.05);
}

.book-right-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-title {
    margin-bottom: 5px;
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.book-description {
    font-size: 14px;
    color: #666;
    white-space: normal;
    text-align: left;
}


.book-card:hover {
    transform: translateY(-5px);
}






.book-info {
    padding: 15px;
}

.book-info h3 {
    font-size: 1.1em;
    margin: 10px 0 5px;
    color: #333;
}

.book-info p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}



/* 激活状态的菜单项 */
.nav-link.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
    border-radius: 4px;
}

/* 菜单项悬停效果 */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}




/* 搜索栏样式 */
.search-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%; /* 屏幕宽度的85% */
    height: 80px;
    background-color: white;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-wrapper {
    width: 50%; /* 调整为50%宽度 */
    max-width: 600px; /* 最大宽度限制 */
    display: flex;
    align-items: center;
}

#searchInput {
    flex: 1;
    margin-right: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 50%; /* 确保输入框占满父容器 */
}

#searchButton {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#searchButton:hover {
    background-color: #0056b3;
}


/* 内容区样式 */
.content {
    margin-left: 280px;
    padding: 80px 20px 20px; /* 增加顶部内边距 */
}

/* PDF查看器样式 */
.pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pdf-control-button {
    margin: 0 5px;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pdf-control-button:hover {
    background-color: #0056b3;
}

.pdf-control-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.page-info {
    font-size: 1.2em;
    color: #333;
    margin: 0 15px;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* 返回按钮样式 */
.back-button {
    margin: 20px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #0056b3;
}

/* 激活状态的菜单项 */
.nav-link.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}