﻿/* 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: #f9f9f9;
	margin: 0;
	padding: 0;
	font-size: .9rem !important;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	background-color: #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}
li{
	list-style: none;
}
a {
	color: #e91e63;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

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: #e91e63;
	color: white;
	padding: 10px 20px;
	margin-bottom: 20px;
}

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

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

.recommended-books {
	background-color: #f9f9f9;
	padding: 10px;
}

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

.books-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 5px;
}

.book-card {
	display: flex;
	border: 1px solid #ddd;
	padding: 5px;
	background-color: white;
	height: 200px;
	overflow: hidden;
}

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

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

.book-image span {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(0, 0, 0, 0.7);
	color: white;
	text-align: center;
	padding: 5px 0;
	font-size: .8rem;
}

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

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

.book-info h3 {
	color: #e91e63;
	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: #fff;
	border: 1px solid #ddd;

}

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

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

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

.category-header .more {
	color: white;
	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: #e91e63;
}

.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: #999;
	display: block;
}

/* 阅读进度 */
.reading-progress,
.recent-read {
	background-color: #f1f1f1;
	padding: 15px;
	border-left: 5px solid #e91e63;
	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 #e91e63;
	padding-bottom: 5px;
	color: #e91e63;
}




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

.recent-read strong {
	color: #e91e63;
}
.chapter-list h3{
	text-align: center;
	margin: 10px;
}
.chapter-list ul{
	overflow: hidden;
}
.chapter-list .item-list{
	width: 25%;
	text-align: center;
	float: left;
	list-style: none;
	margin-bottom: 10px;
}
.chapter-content {
            background-color: #f9f9f9;
            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: #e91e63;
            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: #e91e63;
            color: #fff !important;
            text-decoration: none;
            border-radius: 4px;
        }

        .back-to-index:hover {
            background-color: #d81b60;
        }
        .reading-progress {
            margin-top: 20px;
            padding: 10px;
            background-color: #f0f0f0;
            border-radius: 5px;
        }
.footer {
	width: 100%;
	height: auto;
	overflow: hidden;
	background-color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 6px;
	flex-direction: column;
}


@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%;
	}
}