/* style.css */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* 基础样式 */
body {
	font-family: "Microsoft YaHei", sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #d4d2b9;
	margin: 0;
	padding: 0;
	font-size: .9rem !important;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	background-color: #d4d2b9;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

li {
	list-style: none;
}

a {
	color: #19537D;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.google-ad {
	display: flex;
	justify-content: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: #222;
}

h1 {
	font-size: 2rem !important;
}

h2 {
	font-size: 1.5rem !important;
}

h3 {
	font-size: 1rem !important;
}

h4 {
	font-size: .8rem !important;
}

/* 头部和导航 */
header {
	background-color: #d7d5bc;
	color: #505050;
	padding: 10px 20px;
	margin-bottom: 20px;
	/* border-bottom: 1px solid #fff; */
}

header h1 {
	margin: 0;
	color: #505050;
	font-size: 24px;
}

nav a {
	margin-right: 15px;
	color: #505050;
	font-weight: bold;
}

.recommended-books {
	/* background-color: #f9f9f9; */
	padding: 10px;
	margin-top: 10px;
}

.recommended-books h3 {
	color: #505050;
	background-color: #c7c5ae;
	padding: 5px;
	margin-bottom: 10px;
}

.books-grid {
	display: flex;
}

.book-card {
	display: flex;
	padding: 5px;
	background-color: #c7c5ae;
	height: 150px;
	overflow: hidden;
	width: 24%;
	margin-right: 1%;
}

.book-image {
	position: relative;
	width: 90px;
	height: 120px;
	overflow: hidden;
	margin-right: 10px;
}

.book-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.book-image span {
	position: absolute;
	bottom: 0;
	top: 10px;
	right: 10px;
	color: #783333;
	text-align: center;
	padding: 5px 0;
	font-size: .9rem;
	font-weight: bold;
	writing-mode: vertical-rl;
	text-orientation: upright;
	height: 94%;
	text-align: start;
	letter-spacing: 5px;
}

.book-info {
	flex: 1;
	padding: 0;
}

.book-info h3 a {
	color: black;
	text-decoration: none;
}

.book-info h3 {
	color: #19537D;
	background-color: transparent;
	padding: 0px;
	margin-bottom: 4px !important;
	line-height: 1.2rem;
}

.book-info p {
	margin: 0;
}

.book-info .desc {
	font-size: 0.8em;
}

.category-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.category-section {
	background-color: #c7c5ae;
	border: 1px solid #ddd;

}

.category-header {
	display: flex;
	justify-content: space-between;
	background-color: #c7c5ae;
	align-items: center;
	margin-bottom: 10px;
	padding: 0px;
}

.category-header h3 {
	color: #505050;
	padding: 5px 10px;
	font-size: 16px;
	margin: 0;
}

.category-header h3 a {
	color: #505050 !important;
}

.category-header .more {
	color: #505050;
	padding: 5px 10px;
	text-decoration: none;
	font-size: .8rem;
}

.category-list {
	list-style: none;
	padding: 10px;
	margin: 0;
}

.category-list li {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
	border-bottom: 1px dashed #ddd;
	padding-bottom: 10px;
	font-size: .8rem;
}

.category-list li:last-child {
	border-bottom: none;
}

.category-list a {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: #19537D;
}

.category-list .full,
.category-list .sim {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.category-list .right {
	display: flex;
	flex-direction: column;
}

.category-list .title-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.category-list img {
	margin-right: 10px;
}

.book-title {
	font-weight: bold;
	display: block;
	font-size: .8rem;
}

.book-author {
	color: #666;
	display: block;
}

.book-desc {
	color: #000;
	display: block;
}

/* 阅读进度 */
.reading-progress,
.recent-read {
	background-color: #f1f1f1;
	padding: 15px;
	border-left: 5px solid #d7d5bc;
	margin-top: 20px;
	border-radius: 4px;
}

/* 章节内容展示 */
.chapter-content div[style*="white-space"] {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	margin-top: 20px;
}

/* 分类页、首页等通用卡片 */
.category-section {
	margin-top: 30px;
}

.category-section h2 {
	border-bottom: 2px solid #19537D;
	padding-bottom: 5px;
	color: #19537D;
}




.recent-read {
	background-color: #f9f9f9;
	padding: 15px;
	border-radius: 5px;
	margin-bottom: 20px;
}

.recent-read strong {
	color: #19537D;
}

.chapter-list h3 {
	text-align: center;
	margin: 10px;
}

.chapter-list ul {
	overflow: hidden;
}

.chapter-list .item-list {
	width: 33%;
	text-align: center;
	float: left;
	list-style: none;
	margin-bottom: 10px;
}

.chapter-content {
	background-color: transparent;
	padding: 20px;
	margin-top: 20px;
	/* border: 1px solid #ddd; */
	border-radius: 4px;
	white-space: pre-wrap;
	font-size: 16px;
	line-height: 1.8;
}

.navigation {
	margin-top: 30px;
	text-align: center;
}

.navigation a {
	margin: 0 10px;
	color: #19537D;
	font-weight: bold;
	text-decoration: none;
}

.navigation a:hover {
	text-decoration: underline;
}

.back-to-index {
	display: inline-block;
	margin-top: 20px;
	padding: 8px 16px;
	background-color: #19537D;
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
}

.back-to-index:hover {
	background-color: #19537D;
}

.reading-progress {
	margin-top: 20px;
	padding: 10px;
	background-color: #f0f0f0;
	border-radius: 5px;
}

.footer {
	width: 100%;
	height: auto;
	overflow: hidden;
	background-color: transparent;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 6px;
	flex-direction: column;
	/* border-top: solid 1px #fff;; */
}


@media (max-width: 1000px) {
	.container {
		padding: 10px;
	}

	.books-grid {
		grid-template-columns: 1fr;
	}

	.chapter-list .item-list {
		width: 33%;
	}
}

@media (max-width: 800px) {
	.container {
		padding: 10px;
	}

	.books-grid {
		grid-template-columns: 1fr;
	}

	.chapter-list .item-list {
		width: 50%;
	}
}


@media (max-width: 500px) {
	.container {
		padding: 10px;
	}

	.books-grid {
		grid-template-columns: 1fr;
	}

	.chapter-list .item-list {
		width: 100%;
	}
}