@charset "utf-8";
/* 统一盒模型，确保内边距和边框包含在宽度和高度内 */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --background-color: #f9f9f9;
    --container-bg: #fff;
    --primary-color: #333;
    --secondary-color: #007BFF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #ccc;
    --title-font-size: 1.5em;
    --subtitle-font-size: 1.2em;
}

/* 全局样式 */
body {
    font-family: 'Noto Sans SC', Arial, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--primary-color);
}

/* 分类条样式 */
.category-bar {
    width: 100%; /* 全宽 */
    background: var(--container-bg);
    padding: 15px 0;
    box-shadow: 0 2px 5px var(--shadow-color);
}
.category-content {
    width: 70%; /* 与主体框架同宽 */
    max-width: 980px;
    margin: 0 auto;
    text-align: left; /* 左对齐 */
}
.category-content a {
    margin: 0 10px 10px 0; /* 调整右侧和下方间距 */
    text-decoration: none;
    color: var(--primary-color);
    padding: 5px 10px;
    transition: color 0.3s;
}

.category-content a:hover {
    color: var(--secondary-color);
}

/* Logo和搜索框容器样式 */
.logo-search-bar {
    width: 70%; /* 与主体框架同宽 */
    max-width: 980px;
    margin: 20px auto; /* 保持原有的上下间距 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--container-bg);
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
}
.logo-search-bar img {
    height: 50px; /* 根据需要调整Logo高度 */
    border-radius: 5px;
}
.search-box {
    display: flex;
    align-items: center;
}
.search-box input[type="text"] {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
    transition: width 0.3s;
}
.search-box input[type="text"]:focus {
    width: 250px;
}
.search-box button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-left: none;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}
.search-box button:hover {
    background-color: #0056b3; /* 深蓝色 */
}

/* 主体内容 */
.main-container {
    width: 70%;
    max-width: 980px;
    margin: 20px auto;
    display: flex;
    flex-direction: column; /* 修改为列方向 */
    /*margin-top: 0px;*/
}

/* 推荐小说区块 */
.recommended-books {
    width: 100%; /* 占用100%的空间 */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 三列布局 */
    grid-gap: 5px; /* 调整内间距为5px */
}

.book-info {
    background: var(--container-bg);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}
.book-info a {
    text-decoration: none;
    color: var(--secondary-color);
    margin-right: 5px;
}
.book-info img {
    width: 180px;
    height: 240px;
    border-radius: 5px;
    margin-right: 20px;
    flex-shrink: 0;
}
.book-info div {
    flex: 1;
    min-width: 200px;
}

.book-link {
    text-decoration: none; /* 去掉链接的下划线 */
    color: inherit; /* 保持字体颜色不变 */
    display: block; /* 确保整个块都是可点击的 */
}
.book-link:hover .book-item {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 鼠标悬停时增加阴影效果 */
    transform: translateY(-2px); /* 鼠标悬停时轻微上移 */
    transition: all 0.3s ease; /* 平滑过渡效果 */
}
/* 单个小说框 */
.book-item {
    /*display: flex;*/
    padding: 10px;
    background: var(--container-bg);
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    align-items: flex-start; /* 使小说名与图片顶部对齐 */
    gap: 15px;
}
.book-item img {
    width: 120px;
    height: auto;
    border-radius: 5px;
}
.book-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.book-item-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap; /* 不换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 以省略号显示超出部分 */
    max-width: 300px;  /*根据需要设置最大宽度 */
}
.book-item-info h3 {
    margin: 0;
    font-size: 0.9em; /* 调整书名字体为小一号 */
    color: var(--primary-color);
}
.book-item-info .author {
    margin-left: 10px;
    font-size: 0.9em;
    color: #666;
}
.book-item-info p {
    margin-top: 10px;
    padding-top: 10px;
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid var(--border-color); /* 分割线 */
}

/* 最新更新列表与经典推荐列表容器 */
.updates-classic-container {
    display: flex; /* 水平排列 */
    justify-content: space-between; /* 两个列表之间有空间 */
    margin-top: 20px; /* 推荐小说区块和这部分之间的间距 */
}

/* 最新更新列表 */
.latest-updates {
    width: 70%; /* 左边70%区域用于最新更新 */
    background: var(--container-bg);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    margin-right: 5px; /* 与经典推荐列表的间距 */
}
.latest-updates a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.latest-updates h3 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.latest-updates table {
    width: 100%;
    border-collapse: collapse;
}
.latest-updates th, .latest-updates td {
    border: 1px solid var(--border-color);
    padding: 5px;
    text-align: left;
    font-size: 0.9em; /* 字体稍小 */
    border: none; /* 移除边框 */
}
.latest-updates td {
    white-space: nowrap; /* 不换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 以省略号显示超出部分 */
    max-width: 170px;  /*根据需要设置最大宽度 */
}
.latest-updates th {
    background-color: var(--secondary-color);
    color: #fff;
}
.latest-updates tr {
    border-bottom: 1px solid var(--border-color); /* 添加横线分割 */
}

/* 经典推荐列表 */
.new-books-list {
    width: 30%; /* 右边30%区域用于经典推荐 */
    background: var(--container-bg);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    margin-left: 5px; /* 与最新更新列表的间距 */
}
.new-books-list h3 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.new-books-list ul {
    list-style-type: none;
    padding: 0;
}
.new-books-list li {
    display: flex; /* 使用flexbox布局 */
    justify-content: space-between; /* 左边小说名，右边作者名 */
    font-size: 0.9em; /* 调整字体大小 */
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color); /* 分割线 */
    white-space: nowrap; /* 不换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 以省略号显示超出部分 */
}
.new-books-list li:last-child {
    border-bottom: none; /* 最后一条没有分割线 */
}
.new-books-list a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}
.new-books-list a:hover {
    color: #0056b3;
}

/* 面包屑导航栏 */
.breadcrumb {
    width: 70%;
    max-width: 980px;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: var(--container-bg);
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    font-size: 0.9em;
    justify-content: space-between;
    align-items: center;
    margin-top: 0px;
    margin-bottom: 0px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--secondary-color);
    margin-right: 5px;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span {
    color: var(--primary-color);
}
.chapters-section {
    background: var(--container-bg);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
}
.chapters-section header {
    text-align: center;
    margin-bottom: 20px;
}
.chapters-section header h2 {
    font-size: var(--header-font-size);
    margin: 0;
}
/* 去除列表前的圆点 */
.latest-chapters, .all-chapters {
    list-style: none; /* 移除列表符号 */
    padding: 0;       /* 移除内边距 */
    margin: 0;        /* 移除外边距 */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 每行3列 */
    gap: 10px;
}
.chapter-item {
    background: #f1f1f1;
    border-radius: 5px;
    text-align: left; /* 左对齐 */
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px var(--shadow-color);
    padding: 10px;
}
.chapter-item:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 5px var(--shadow-color);
}
.chapter-item a {
    text-decoration: none;
    color: var(--primary-color);
    cursor: pointer; /* 手型光标，提升用户体验 */
}
.chapter-item a:hover {
    color: var(--secondary-color);
}

.content-separator {
    margin: 15px 0;
    border-top: 1px solid var(--border-color);
}
/* 字体设置区域 */
.font-settings {
    display: flex;
    align-items: center;
}
.font-settings label {
    margin-left: 10px;
}
/* 章节内容 */
.chapter-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
}
/* 上一章、目录、下一章链接 */
.chapter-navigation {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.chapter-navigation a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    background-color: var(--secondary-color);
    color: white;
    transition: background-color 0.3s;
    margin: 0 10px; /* 保留间距 */
}
.chapter-navigation a:hover {
    background-color: #0056b3;
}
/* 底部区域 */
footer {
    background-color: var(--container-bg);
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 5px var(--shadow-color);
    margin-top: auto;
}






