/* ============================================================
   Ellan 艾尔岚 · 服务器新闻页
   依赖 main.css 的颜色、字体、按钮、导航基座
   ============================================================ */

body.news-page { background: var(--bg); }

/* ---------- 开场 ---------- */
.news-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background:
		radial-gradient(circle at 24% 12%, rgba(245, 190, 79, .14), transparent 34%),
		radial-gradient(circle at 80% 70%, rgba(94, 214, 196, .1), transparent 36%),
		linear-gradient(180deg, #090b08, var(--bg));
}
.news-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 34%;
	z-index: -1;
	background: linear-gradient(transparent, var(--bg));
}
.news-hero-grid {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-image:
		linear-gradient(rgba(244, 242, 230, .025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(244, 242, 230, .025) 1px, transparent 1px);
	background-size: 52px 52px;
	mask-image: radial-gradient(ellipse 72% 80% at 30% 40%, #000 8%, transparent 76%);
}
.news-hero-inner {
	position: relative;
	padding: 132px 0 64px;
}
.news-breadcrumb {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text-faint);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
}
.news-breadcrumb a { color: var(--text-dim); transition: color .2s ease; }
.news-breadcrumb a:hover { color: var(--leaf); }
.news-breadcrumb strong { color: var(--text); }
.news-eyebrow {
	margin-top: 22px;
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .28em;
	color: var(--gold);
}
.news-hero h1 {
	margin-top: 18px;
	font-family: var(--font-display);
	font-size: clamp(40px, 7vw, 84px);
	line-height: 1.08;
}
.news-hero-intro {
	margin-top: 18px;
	max-width: 36em;
	color: var(--text-dim);
	font-size: clamp(14px, 1.6vw, 17px);
	line-height: 1.8;
}

/* ---------- 列表 ---------- */
.news-section { padding: 8px 0 96px; }
.news-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px 24px;
	margin-bottom: 26px;
}
.news-toolbar h2 { margin-top: 8px; font-size: clamp(24px, 3vw, 34px); }
.news-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.news-updated { color: var(--text-faint); font-size: 12px; letter-spacing: .04em; }

.news-segmented {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .03);
}
.news-segmented button {
	padding: 7px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--text-dim);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.news-segmented button:hover { color: var(--text); }
.news-segmented button[aria-pressed="true"] {
	background: var(--gold);
	color: #1a1405;
	font-weight: 700;
}
.news-segmented button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

.news-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 18px;
}
.news-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--card);
	color: inherit;
	text-decoration: none;
	animation: newsRise .6s var(--ease-out) both;
	animation-delay: calc(var(--i, 0) * 45ms);
	transition: transform .25s var(--ease-out), border-color .25s ease, background .25s ease;
}
.news-card:hover,
.news-card:focus-visible {
	transform: translateY(-3px);
	border-color: rgba(245, 190, 79, .55);
	background: rgba(255, 255, 255, .07);
}
.news-card:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
.news-card-media {
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: rgba(255, 255, 255, .04);
}
.news-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform .6s var(--ease-out);
}
.news-card:hover .news-card-media img { transform: scale(1.04); }
.news-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.news-card-meta { display: flex; align-items: center; gap: 10px; }
.news-tag {
	padding: 3px 9px;
	border: 1px solid rgba(245, 190, 79, .45);
	border-radius: 999px;
	color: var(--gold);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
}
.news-tag[data-category="更新日志"] { border-color: rgba(143, 221, 85, .5); color: var(--leaf); }
.news-date { color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.news-card h3 {
	font-size: 18px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}
.news-card p {
	color: var(--text-dim);
	font-size: 14px;
	line-height: 1.75;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: anywhere;
}
.news-card-more { margin-top: auto; padding-top: 4px; color: var(--leaf); font-size: 13px; font-weight: 700; }

/* 最新一条通栏 */
.news-card.is-featured { grid-column: 1 / -1; }
@media (min-width: 820px) {
	.news-card.is-featured { flex-direction: row; }
	.news-card.is-featured .news-card-media { flex: 0 0 46%; aspect-ratio: auto; min-height: 280px; }
	.news-card.is-featured .news-card-body { justify-content: center; padding: 30px 34px; gap: 14px; }
	.news-card.is-featured h3 { font-size: clamp(22px, 2.4vw, 30px); }
	.news-card.is-featured p { -webkit-line-clamp: 5; font-size: 15px; }
}

/* 骨架 / 状态 */
.news-skeleton {
	height: 210px;
	border-radius: 16px;
	background: linear-gradient(100deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 70%);
	background-size: 220% 100%;
	animation: newsShimmer 1.6s linear infinite;
}
.news-empty,
.news-error {
	padding: 48px 0;
	text-align: center;
	color: var(--text-dim);
}
.news-error { color: var(--danger); }
.news-retry {
	margin-left: 12px;
	padding: 6px 14px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--text);
	font: inherit;
	cursor: pointer;
}
.news-retry:hover { border-color: var(--gold); color: var(--gold); }
.news-source { margin-top: 36px; color: var(--text-faint); font-size: 12px; text-align: center; }
.news-source a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.news-source a:hover { color: var(--leaf); }

@keyframes newsRise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes newsShimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) {
	.news-card, .news-skeleton { animation: none; }
	.news-card, .news-card-media img { transition: none; }
}
@media (max-width: 720px) {
	.news-hero-inner { padding: 108px 0 44px; }
}
