/* ==========================================================
   common.css
   从 cslsim.html / hahasim.html 中共用的样式提取而来。
   仅供与 .entry-content 内容区 + .floating-bar 悬浮按钮使用。
   ========================================================== */

/* ---------- 内容区（entry-content）基础排版 ---------- */
.entry-content {
	background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 20px;
	padding: 28px clamp(18px, 3vw, 36px);
	box-shadow: 0 22px 46px rgba(15, 23, 42, 0.08);
	color: #1f2937;
	line-height: 1.85;
	font-size: 16px;
}

.entry-content>*:first-child {
	margin-top: 0;
}

.entry-content>*:last-child {
	margin-bottom: 0;
}

.entry-content h3 {
	margin: 2rem 0 1rem;
	padding: 0.8rem 1rem;
	background: linear-gradient(90deg, #e0f2fe 0%, #f8fafc 100%);
	border-left: 5px solid #2563eb;
	border-radius: 12px;
	font-size: 1.8rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: 0.02em;
}

.entry-content h3 strong {
	font-weight: 800;
}

.entry-content p {
	margin: 0.9em 0;
	color: #334155;
}

.entry-content ul,
.entry-content ol {
	margin: 1rem 0 1.2rem;
	padding-left: 1.4rem;
}

.entry-content li {
	margin: 0.48rem 0;
	padding-left: 0.2rem;
	color: #334155;
}

.entry-content li p {
	margin: 0.25rem 0;
}

.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
}

.entry-content strong {
	color: #0f172a;
}

.entry-content a {
	color: #2563eb;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.entry-content a:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.entry-content .text-primary {
	color: #2563eb;
}

.entry-content .underline {
	text-decoration: underline;
}

.entry-content .key-point {
	display: inline-block;
	padding: 0.12em 0.5em;
	margin: 0 0.08em;
	background: linear-gradient(135deg, #fff3b0 0%, #fde68a 100%);
	border: 1px solid rgba(245, 158, 11, 0.35);
	border-radius: 0.5em;
	color: #7c2d12;
	font-weight: 700;
	box-shadow: 0 4px 10px rgba(245, 158, 11, 0.12);
}

/* ---------- 内容区：表格 ---------- */
.entry-content table {
	border-collapse: collapse;
	max-width: 100%;
	margin: 1.2em 0;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.entry-content th,
.entry-content td {
	border: 1px solid #e2e8f0;
	padding: 0.8em 0.9em;
	text-align: left;
}

.entry-content th {
	background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
	color: #0f172a;
	font-weight: 700;
}

/* ---------- 内容区：代码与 pre ---------- */
.entry-content code {
	background: #eef2ff;
	border: 1px solid rgba(99, 102, 241, 0.12);
	border-radius: 8px;
	padding: 0.15em 0.45em;
	font-size: 0.92em;
	color: #312e81;
}

.entry-content pre {
	margin: 1.2rem 0;
	padding: 1rem 1.1rem;
	background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-left: 5px solid #38bdf8;
	border-radius: 14px;
	color: #e2e8f0;
	overflow-x: auto;
	box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}

.entry-content pre code {
	background: transparent;
	border: none;
	padding: 0;
	color: inherit;
}

/* ---------- 内容区：图片与工具类 ---------- */
.entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.2rem auto;
	border-radius: 16px;
	box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
	border: 1px solid rgba(148, 163, 184, 0.18);
}

.entry-content .max-w-full {
	max-width: 100%
}

.entry-content .h-auto {
	height: auto
}

.entry-content .rounded-lg {
	border-radius: .5rem
}

/* ---------- 悬浮操作栏（floating-bar） ---------- */
.floating-bar {
	position: fixed;
	right: 22px;
	bottom: 24px;
	z-index: 2000;
	display: flex;
	align-items: center;
	gap: 10px;
}

.floating-bar .float-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 999px;
	color: #fff;
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 700;
	box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-bar .float-btn:hover {
	transform: translateY(-2px) scale(1.02);
	text-decoration: none;
}

.float-btn .icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	font-size: 1rem;
}

.float-btn.home {
	background: linear-gradient(135deg, #5472b7 0%, #2563eb 100%);
}

.float-btn.telegram {
	background: linear-gradient(135deg, #2a9df4 0%, #0b74d8 100%);
}

.float-btn.wechat {
	background: linear-gradient(135deg, #17bf63 0%, #0ea95c 100%);
}

@media (max-width: 600px) {
	.floating-bar {
		right: 14px;
		bottom: 16px;
		gap: 8px;
	}

	.float-btn {
		padding: 10px 14px;
		font-size: 0.8rem;
	}
}