/* ===== 基础设置 ===== */

:root {
	--primary-color: #4f46e5 !important; /* 更柔和的紫色 */
	--secondary-color: #6366f1;
	--accent-color: #8b5cf6;
	--gray-100: #f3f4f6;
	--gray-200: #e5e7eb;
	--gray-300: #d1d5db;
	--gray-500: #6b7280;
	--gray-700: #374151;
}

/* 全局页面加载动画 */
.page-wrapper {
	opacity: 0;
	animation: pageEntrance 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageEntrance {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	gap: 25px;
}

/* ===== 布局系统 ===== */
.content-container {
	display: flex;
	gap: 2rem;
	margin-top: 2rem;
}

#sidebar {
	flex: 0 0 280px;
	height: fit-content;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 0 10px #eee;
	padding: 1rem 1.5rem;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	opacity: 0;
	transform: translateX(-30px);
	animation: sidebarSlide 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes sidebarSlide {
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.main-content {
	flex: 1;
	min-width: 0;
}

/* ===== 侧边栏 ===== */
.sidebar-list {
	border-left: 3px solid var(--primary-color);
}

.sidebar-list li {
	margin: 0.5rem 0;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.sidebar-list li:hover, .sidebar-list li.active {
	background: var(--gray-100);
	transform: translateX(8px);
}

.sidebar-list a {
	display: block;
	padding: 0.6rem 1.2rem;
	color: var(--gray-500);
	text-decoration: none;
	position: relative;
}

article {
	line-height: 1.75;
	font-size: 1.05rem;
	color: var(--gray-700);
	opacity: 0;
	transform: translateY(10px);
	animation: contentAppear 0.6s ease-out 0.6s forwards;
}

@keyframes contentAppear {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

h2.title {
	font-family: "Segoe UI", system-ui;
	font-weight: 700;
	letter-spacing: -0.025em;
}

/* ===== 面包屑导航 ===== */
#breadcrumb {
	padding: 1rem 0;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--gray-200);
	opacity: 0;
	transform: translateY(-20px);
	animation: breadcrumbEntrance 0.8s ease-out 0.4s forwards;
}

@keyframes breadcrumbEntrance {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#breadcrumb ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

#breadcrumb li {
	display: inline-flex;
	align-items: center;
	font-size: 0.9rem;
	color: var(--gray-500);
}

#breadcrumb li:not(:last-child, .spacer)::after {
	content: ">";
	margin-left: 0.75rem;
	color: var(--gray-500);
}

/* 面包屑分隔符动画 */
#breadcrumb li:not(:last-child)::after {
	opacity: 0;
	animation: chevronAppear 0.3s ease-out 0.8s forwards;
}

@keyframes chevronAppear {
	to {
		opacity: 0.5;
	}
}

#breadcrumb a {
	color: var(--gray-500);
	transition: color 0.2s ease;
}

#breadcrumb a:hover {
	color: var(--primary-color);
}

/* ===== 文章内容 ===== */
#details,
#newsList {
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 0 10px #eee;
	animation: fadeIn 0.6s ease;
}

.d-header {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--gray-200);
}

.d-header .title {
	width: fit-content;
	font-size: 2rem;
	color: #1e293b;
	position: relative;
	padding-bottom: .5rem;
}

.v_news_content img {
	max-width: 100%;
}

/* 表格样式 */
#details table {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	overflow: hidden;
}

#details th,
#details td {
	padding: 1rem;
	border: 1px solid var(--gray-200);
}

#details tr:nth-child(even) {
	background: var(--gray-100);
}

#details th {
	background: var(--primary-color);
	color: white;
	font-weight: 500;
}

#details .info {
	display: flex;
	align-items: center;
}

#details .info img {
	width: 20px;
	height: 20px;
	margin: 0 5px;
}

#details .attr a {
	text-decoration: underline;
}

#details .d-footer {
	margin-top: 30px;
}

#details .d-footer  .prev,
#details .d-footer  .next{
    transition: .3s;
    padding: 5px 10px;
    border-radius: 5px;
}

#details .d-footer  .prev:hover,
#details .d-footer  .next:hover
{
     background: #f3f4f6;
}

/* 图片处理优化 */
.v_news_content img {
	border-radius: 8px;
	margin: 1.5rem 0;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
	.content-container {
		flex-direction: column;
	}

	#sidebar {
		flex: none;
		width: 100%;
	}

	.d-header .title {
		font-size: 1.75rem;
	}
}