/* ==========================================================================
   news_purplegrad — 紫色渐变玻璃拟态风 Purple Gradient Glassmorphism
   OTCMS / 小旋风 news portal theme
   Pure CSS, no JS, system font stack, mobile-first breakpoints
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
	--pg-purple-1: #6a11cb;
	--pg-purple-2: #8b2ff0;
	--pg-pink-1: #d648e0;
	--pg-pink-2: #ff6ec4;
	--pg-gradient: linear-gradient(135deg, var(--pg-purple-1) 0%, var(--pg-purple-2) 35%, var(--pg-pink-1) 70%, var(--pg-pink-2) 100%);
	--pg-gradient-soft: linear-gradient(135deg, #7b2ff7 0%, #f107a3 100%);

	--pg-bg: #f4f1fb;
	--pg-text-main: #241a3d;
	--pg-text-sub: #5a4d78;
	--pg-text-invert: #ffffff;

	--pg-glass-bg: rgba(255, 255, 255, 0.55);
	--pg-glass-bg-strong: rgba(255, 255, 255, 0.72);
	--pg-glass-border: rgba(255, 255, 255, 0.45);
	--pg-glass-blur: 16px;

	--pg-shadow-glow: 0 8px 32px rgba(106, 17, 203, 0.18), 0 2px 8px rgba(214, 72, 224, 0.12);
	--pg-shadow-glow-hover: 0 16px 48px rgba(106, 17, 203, 0.28), 0 4px 16px rgba(255, 110, 196, 0.22);

	--pg-radius-lg: 22px;
	--pg-radius-md: 16px;
	--pg-radius-sm: 10px;

	--pg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--pg-font);
	color: var(--pg-text-main);
	background-color: var(--pg-bg);
	background-image:
		radial-gradient(circle at 10% 0%, rgba(139, 47, 240, 0.18), transparent 45%),
		radial-gradient(circle at 90% 10%, rgba(255, 110, 196, 0.20), transparent 40%),
		var(--pg-bg);
	background-attachment: fixed;
	line-height: 1.7;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 0.9em; }

/* ---------- Glass card base ---------- */
.glass {
	background: var(--pg-glass-bg);
	border: 1px solid var(--pg-glass-border);
	border-radius: var(--pg-radius-lg);
	backdrop-filter: blur(var(--pg-glass-blur)) saturate(160%);
	-webkit-backdrop-filter: blur(var(--pg-glass-blur)) saturate(160%);
	box-shadow: var(--pg-shadow-glow);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
	.glass,
	.site-header,
	.site-nav .nav-link {
		background: rgba(255, 255, 255, 0.92) !important;
	}
}

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.35);
	backdrop-filter: blur(18px) saturate(180%);
	-webkit-backdrop-filter: blur(18px) saturate(180%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.4);
	box-shadow: 0 4px 24px rgba(106, 17, 203, 0.10);
}
.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}
.site-logo { display: inline-flex; align-items: center; }
.site-logo img { border-radius: 8px; }
.site-nav { flex: 1 1 auto; }
.nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}
.nav-link {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
	color: var(--pg-text-main);
	background: rgba(255, 255, 255, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.5);
	transition: all 0.25s ease;
}
.nav-link:hover,
.nav-link:focus {
	background: var(--pg-gradient-soft);
	color: var(--pg-text-invert);
	box-shadow: 0 6px 18px rgba(214, 72, 224, 0.35);
	transform: translateY(-2px);
}
.nav-home { background: var(--pg-gradient-soft); color: var(--pg-text-invert); }

/* ---------- Hero (index page) ---------- */
.hero {
	position: relative;
	overflow: hidden;
	background: var(--pg-gradient);
	padding: 64px 20px 84px;
	text-align: center;
	isolation: isolate;
}
.hero-inner { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.hero-title {
	font-size: 40px;
	color: var(--pg-text-invert);
	text-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
	letter-spacing: 0.5px;
}
.hero-sub {
	margin: 14px 0 0;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.92);
}
.hero-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	z-index: 1;
	opacity: 0.55;
}
.hero-glow-a {
	width: 320px; height: 320px;
	background: #fff4a3;
	top: -120px; left: -80px;
}
.hero-glow-b {
	width: 280px; height: 280px;
	background: #6ee7ff;
	bottom: -140px; right: -60px;
}

/* ---------- Page banner (list / show top strip) ---------- */
.page-banner {
	background: var(--pg-gradient);
	padding: 40px 20px;
	text-align: center;
}
.page-banner-inner { max-width: 1200px; margin: 0 auto; }
.page-title {
	font-size: 28px;
	color: var(--pg-text-invert);
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- Layout ---------- */
.main-wrap {
	max-width: 1200px;
	margin: -40px auto 40px;
	padding: 0 20px;
	position: relative;
	z-index: 3;
}
.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 24px;
	align-items: start;
}
.content-col { min-width: 0; }
.sidebar-col { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Homepage catelog grid ---------- */
.catelog-grid {
	margin-top: -40px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.catelog-card { padding: 22px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.catelog-card:hover { transform: translateY(-4px); box-shadow: var(--pg-shadow-glow-hover); }
.catelog-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 2px solid rgba(139, 47, 240, 0.18);
}
.catelog-card-title { font-size: 18px; }
.catelog-card-title a {
	color: var(--pg-purple-2);
	background: var(--pg-gradient-soft);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
	.catelog-card-title a { color: var(--pg-purple-2); background: none; }
}
.catelog-more {
	font-size: 13px;
	font-weight: 600;
	color: var(--pg-purple-2);
	white-space: nowrap;
}
.catelog-more:hover { color: var(--pg-pink-2); }
.catelog-art-item {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px dashed rgba(90, 77, 120, 0.18);
}
.catelog-art-item:last-child { border-bottom: none; }
.catelog-art-link {
	color: var(--pg-text-main);
	font-size: 14.5px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1 1 auto;
	min-width: 0;
}
.catelog-art-link:hover { color: var(--pg-pink-2); }
.catelog-art-date { font-size: 12.5px; color: var(--pg-text-sub); white-space: nowrap; }

/* ---------- Article list (list.html) ---------- */
.list-panel { padding: 24px; }
.article-list { display: flex; flex-direction: column; }
.article-item {
	padding: 18px 0;
	border-bottom: 1px solid rgba(90, 77, 120, 0.15);
}
.article-item:first-child { padding-top: 0; }
.article-item:last-child { border-bottom: none; }
.article-item-title { font-size: 18px; margin-bottom: 8px; }
.article-item-title a { color: var(--pg-text-main); }
.article-item-title a:hover { color: var(--pg-pink-2); }
.article-item-summary {
	color: var(--pg-text-sub);
	font-size: 14px;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.article-item-meta {
	display: flex;
	gap: 16px;
	font-size: 12.5px;
	color: var(--pg-purple-2);
	font-weight: 600;
}

/* ---------- Pagination ---------- */
.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid rgba(90, 77, 120, 0.15);
}
.page-link {
	padding: 8px 15px;
	border-radius: var(--pg-radius-sm);
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.6);
	font-size: 14px;
	font-weight: 600;
	color: var(--pg-text-main);
	transition: all 0.2s ease;
}
.page-link:hover {
	background: var(--pg-gradient-soft);
	color: var(--pg-text-invert);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(214, 72, 224, 0.3);
}

/* ---------- Article detail (show.html) ---------- */
.article-panel { padding: 28px; margin-bottom: 20px; }
.article-title { font-size: 26px; margin-bottom: 14px; color: var(--pg-text-main); }
.article-meta {
	display: flex;
	gap: 18px;
	font-size: 13px;
	color: var(--pg-text-sub);
	padding-bottom: 16px;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(90, 77, 120, 0.15);
}
.summary {
	background: rgba(139, 47, 240, 0.08);
	border-left: 4px solid var(--pg-pink-2);
	border-radius: var(--pg-radius-sm);
	padding: 14px 16px;
	font-size: 14.5px;
	color: var(--pg-text-sub);
	margin-bottom: 22px;
}
.article-body {
	font-size: 16px;
	color: var(--pg-text-main);
}
.article-body img { border-radius: var(--pg-radius-md); margin: 12px 0; box-shadow: var(--pg-shadow-glow); }
.article-body p { margin: 0 0 1em; }

.prev-next {
	padding: 16px 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
}
.prev-next-item a { color: var(--pg-purple-2); font-weight: 600; }
.prev-next-item a:hover { color: var(--pg-pink-2); }

/* ---------- Sidebar ---------- */
.sidebar-block { padding: 20px; }
.sidebar-title {
	font-size: 16px;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid rgba(139, 47, 240, 0.18);
	position: relative;
}
.sidebar-title::before {
	content: "";
	display: inline-block;
	width: 6px; height: 16px;
	border-radius: 3px;
	background: var(--pg-gradient-soft);
	margin-right: 8px;
	vertical-align: -2px;
}
.sidebar-item {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px dashed rgba(90, 77, 120, 0.18);
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-link {
	font-size: 14px;
	color: var(--pg-text-main);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1 1 auto;
	min-width: 0;
}
.sidebar-link:hover { color: var(--pg-pink-2); }
.sidebar-date { font-size: 12px; color: var(--pg-text-sub); white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; }
.friendlink-section {
	background: rgba(255, 255, 255, 0.4);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-top: 1px solid rgba(255, 255, 255, 0.5);
	padding: 20px 0;
}
.friendlink-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.friendlink-title { font-size: 14px; color: var(--pg-text-sub); margin-bottom: 10px; }
.friendlink-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.friendlink-list a { font-size: 13px; color: var(--pg-purple-2); }
.friendlink-list a:hover { color: var(--pg-pink-2); }

.copyright-bar {
	background: var(--pg-gradient);
	padding: 20px;
	text-align: center;
}
.copyright-text {
	max-width: 1200px;
	margin: 0 auto;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.9;
}
.copyright-text a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.copyright-text a:hover { color: #fff4a3; }

/* ---------- Responsive: tablets & phones (<768px) ---------- */
@media (max-width: 768px) {
	.header-inner { padding: 12px 16px; }
	.nav-list { justify-content: flex-start; gap: 6px; }
	.nav-link { padding: 7px 13px; font-size: 13px; }

	.hero { padding: 40px 16px 60px; }
	.hero-title { font-size: 28px; }
	.hero-sub { font-size: 14px; }

	.page-banner { padding: 30px 16px; }
	.page-title { font-size: 22px; }

	.main-wrap { padding: 0 14px; margin-top: -28px; }
	.catelog-grid { grid-template-columns: 1fr; margin-top: -28px; gap: 16px; }

	.layout-with-sidebar { grid-template-columns: 1fr; }
	.sidebar-col { order: 2; }
	.content-col { order: 1; }

	.article-panel { padding: 20px 16px; }
	.article-title { font-size: 21px; }
	.list-panel { padding: 18px 16px; }

	.copyright-text { font-size: 11.5px; }
}

@media (max-width: 480px) {
	.catelog-art-link, .sidebar-link { font-size: 13.5px; }
	.article-item-title { font-size: 16px; }
	.hero-title { font-size: 24px; }
}

/* ---------- Print ---------- */
@media print {
	.site-header, .hero, .page-banner, .sidebar-col, .site-footer, .pagination { display: none; }
	body { background: #fff; color: #000; }
	.glass {
		background: #fff;
		border: 1px solid #ccc;
		box-shadow: none;
		backdrop-filter: none;
	}
	.article-panel { padding: 0; }
	a { color: #000; text-decoration: underline; }
	.catelog-card-title a { background: none; -webkit-text-fill-color: #000; }
}
