/*
Theme Name: CP Reader
Theme URI: http://localhost/wordpress
Description: CP 向文字剧情阅读主题：故事列表 + 左右带头像对话气泡 + 卡片式选项。访客只读。
Version: 1.0.0
Author: AKI
Text Domain: cp-reader
*/

:root {
	--bg: #f4f0ff;
	--surface: rgba(255, 255, 255, .8);
	--ink: #2a2440;
	--muted: #8a80b5;
	--line: #e6e0ff;
	--accent: #7c5cff;
	--accent-dark: #5b3df0;
	--radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: linear-gradient(165deg, #ffffff 0%, #f6f2ff 45%, #ece6ff 100%);
	background-attachment: fixed;
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
	font-size: 15px;
	line-height: 1.7;
}

img { max-width: 100%; }

a { color: var(--accent); }

.cprt-wrap {
	max-width: 780px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------- 站点头部 ---------- */
.cprt-sitehead {
	background: rgba(255, 255, 255, .72);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(230, 224, 255, .9);
	position: sticky;
	top: 0;
	z-index: 20;
}
.cprt-sitehead-inner {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding-top: 12px;
	padding-bottom: 12px;
}
.cprt-brand {
	font-size: 18px;
	font-weight: 800;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: .5px;
}
.cprt-brand:hover { color: var(--accent); }
.cprt-tagline {
	font-size: 12px;
	color: var(--muted);
}

.cprt-main { min-height: 60vh; padding: 28px 0 48px; }

.cprt-sitefoot {
	border-top: 1px solid var(--line);
	padding: 18px 0 30px;
	color: var(--muted);
	font-size: 12px;
	text-align: center;
}

/* ---------- 首页 Banner ---------- */
.cprt-banner {
	position: relative;
	overflow: hidden;
	text-align: center;
	color: #fff;
	background: linear-gradient(140deg, #a78bfa 0%, #7c5cff 45%, #5b3df0 100%);
	border-radius: 22px;
	padding: 50px 24px 44px;
	margin-top: 4px;
	box-shadow: 0 14px 30px rgba(124, 92, 255, .28);
}
.cprt-banner::before,
.cprt-banner::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	pointer-events: none;
}
.cprt-banner::before { width: 300px; height: 300px; top: -140px; right: -90px; }
.cprt-banner::after { width: 190px; height: 190px; bottom: -100px; left: -60px; }
.cprt-banner-eyebrow {
	margin: 0 0 10px;
	font-size: 12.5px;
	letter-spacing: 6px;
	opacity: .88;
	text-transform: uppercase;
}
.cprt-banner-title {
	margin: 0 0 8px;
	font-size: 34px;
	letter-spacing: 3px;
	font-weight: 800;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.cprt-banner-sub {
	margin: 0 auto;
	max-width: 480px;
	font-size: 14.5px;
	opacity: .94;
}
.cprt-banner-content { position: relative; z-index: 1; }
/* 自定义图片模式：图片铺底 + 深色渐变遮罩 */
.cprt-banner.has-img {
	padding: 0;
	background: #3f2d94;
}
.cprt-banner.has-img::before,
.cprt-banner.has-img::after { display: none; }
.cprt-banner-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cprt-banner-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(80, 52, 180, .28), rgba(54, 34, 130, .62));
}
.cprt-banner.has-img .cprt-banner-content { padding: 76px 24px 64px; }

/* ---------- 故事卡片列表 ---------- */
.cprt-stories {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-top: 24px;
	scroll-margin-top: 70px;
}
.cprt-story-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
}
.cprt-story-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(45, 42, 53, .08);
}
.cprt-card-cover {
	position: relative;
	display: block;
	height: 150px;
	background: linear-gradient(135deg, #9d7bff, #6d4aff);
	text-decoration: none;
	color: #fff;
}
.cprt-card-title {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 12px;
	margin: 0;
	font-size: 20px;
	z-index: 1;
	text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.cprt-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}
.cprt-card-intro {
	margin: 0;
	color: #7a71ad;
	font-size: 13.5px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 42px;
}
.cprt-card-chars {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
}
.cprt-card-char {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: #7a71ad;
}
.cprt-card-char + .cprt-card-char::before {
	content: "·";
	color: #c9c2b5;
	margin-right: 6px;
}
.cprt-btn {
	display: inline-block;
	text-align: center;
	background: linear-gradient(135deg, #8b6bff, var(--accent-dark));
	color: #fff;
	border-radius: 999px;
	padding: 9px 22px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: filter .15s ease;
}
.cprt-btn:hover { filter: brightness(1.06); color: #fff; }
.cprt-btn.big { padding: 12px 36px; font-size: 15.5px; }

/* ---------- 故事详情页 ---------- */
.cprt-story-head {
	text-align: center;
	padding: 8px 0 4px;
}
.cprt-story-head h1 {
	margin: 0 0 10px;
	font-size: 28px;
	letter-spacing: 1px;
}
.cprt-story-intro {
	max-width: 560px;
	margin: 0 auto 18px;
	color: #7a71ad;
	font-size: 14.5px;
	line-height: 1.9;
}
.cprt-story-chars {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin: 22px 0 26px;
}
.cprt-story-char {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6d63a8;
}
.cprt-story-char .cpr-avatar {
	width: 56px;
	height: 56px;
}
.cprt-story-actions { text-align: center; margin-top: 8px; }

/* ---------- 阅读页工具栏 ---------- */
.cprt-toolbar {
	max-width: 720px;
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0 4px;
}
.cprt-toolbar a {
	font-size: 12.5px;
	color: #6d5cae;
	text-decoration: none;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(124, 92, 255, .1);
	transition: all .15s ease;
}
.cprt-toolbar a:hover { background: rgba(124, 92, 255, .2); color: var(--accent-dark); }
.cprt-toolbar .spacer { flex: 1; }
.cprt-toolbar .cprt-toolbar-title { font-size: 14px; font-weight: 700; color: var(--ink); }

/* ---------- 站内导航 ---------- */
.cprt-nav {
	display: flex;
	gap: 18px;
	margin-left: auto;
	align-self: center;
}
.cprt-nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 13.5px;
	padding: 4px 2px;
	position: relative;
}
.cprt-nav a:hover { color: var(--accent); }
.cprt-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
	transition: right .18s ease;
}
.cprt-nav a:hover::after { right: 0; }

/* ---------- 相关资料：新闻列表 ---------- */
.cprt-newslist { margin-top: 26px; }
.cprt-news-item {
	display: flex;
	gap: 18px;
	padding: 20px 4px;
	border-bottom: 1px solid var(--line);
	transition: background .15s ease;
}
.cprt-news-item:first-child { border-top: 1px solid var(--line); }
.cprt-news-item:hover { background: rgba(255, 255, 255, .72); }
.cprt-news-date {
	flex: 0 0 74px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 2px;
}
.cprt-news-day {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
	color: var(--accent-dark);
	letter-spacing: .5px;
}
.cprt-news-month { font-size: 12px; color: var(--muted); margin-top: 5px; }
.cprt-news-body { flex: 1; min-width: 0; }
.cprt-news-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.cprt-news-title a { color: var(--ink); text-decoration: none; }
.cprt-news-title a:hover { color: var(--accent); }
.cprt-news-excerpt { margin: 0; color: #6f6877; font-size: 13.5px; }
.cprt-pagination { text-align: center; margin: 30px 0 0; }
.cprt-pagination .page-numbers {
	display: inline-block;
	min-width: 34px;
	padding: 6px 12px;
	margin: 0 3px;
	border-radius: 999px;
	background: rgba(124, 92, 255, .1);
	color: #6d5cae;
	text-decoration: none;
	font-size: 13px;
}
.cprt-pagination .page-numbers.current { background: var(--accent); color: #fff; }

/* ---------- 相关资料：详情 ---------- */
.cprt-news-post { max-width: 720px; margin: 0 auto; padding-top: 10px; }
.cprt-news-head { padding: 6px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.cprt-news-head h1 { margin: 0 0 10px; font-size: 26px; letter-spacing: 1px; }
.cprt-news-date-line { margin: 0; color: var(--muted); font-size: 13px; }
.cprt-news-content { font-size: 15.5px; line-height: 2; }
.cprt-news-content p { margin: 0 0 1.2em; }
.cprt-news-content img { border-radius: 12px; margin: 6px 0; }
.cprt-news-content h2, .cprt-news-content h3 { margin: 1.4em 0 .6em; }
.cprt-news-content blockquote {
	margin: 1.2em 0;
	padding: 10px 18px;
	border-left: 4px solid var(--accent);
	background: #f7f3ff;
	color: #5c4fa8;
	border-radius: 0 10px 10px 0;
}

/* ---------- 通用帖子 ---------- */
.cprt-post h1 { font-size: 24px; }
.cprt-post h1 a { color: var(--ink); text-decoration: none; }

@media (max-width: 480px) {
	.cprt-stories { grid-template-columns: 1fr; }
	.cprt-nav { gap: 12px; }
}
