/* ========== 全局基础（修复边距核心） ========== */
* {
	font-family: "微软雅黑";
	font-weight: 600;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	/* 统一盒模型，避免边距溢出 */
}

html {
	zoom: 125%;
	height: 100%;
	/* 防止高度塌陷 */
	overflow-x: hidden;
	/* 避免横向滚动 */
}

body {
	font-family: Microsoft YaHei;
	margin: 20px;
	background-image: url('https://tu.ltyuanfang.cn/api/fengjing.php');
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

/* 主容器样式 */
.main-container {
	background-color: rgba(255, 255, 255, 0.8);
	padding: 20px;
	border-radius: 10px;
	width: 80%;
	max-width: 1200px;
	position: relative;
	/* 为内部绝对定位元素兜底 */
}

/* 标题样式（修复行高/边距异常） */
h1 {
	text-align: center;
	color: #333;
	line-height: 1.5;
	/* 修复原line-height:0导致文字重叠 */
	letter-spacing: 10px;
	margin: 30px 0;
	/* 上下合理间距 */
	font-size: 50px;
}

h2 {
	color: #333;
	margin: 15px 0;
	/* 统一h2边距 */
}

h3 {
	text-align: center;
	color: #333;
	line-height: 1.5;
	letter-spacing: 10px;
	margin: 30px 0;
	/* 明确上下边距 */
}

h4 {
	color: #555;
	line-height: 1.2;
	/* 修复原line-height:0% */
	margin: 20px 0 10px;
	/* 合理上下间距 */
	font-size: 16px;
	/* 统一字体大小定义 */
}

h5 {
	color: #666;
	line-height: 1.2;
	/* 修复行高异常 */
	margin: 15px 0 8px;
	padding: 0;
	font-weight: bold;
	font-size: 16px;
	width: 100%;
}

h6 {
	color: #a3a3a3;
	line-height: 1.2;
	/* 修复行高异常 */
	margin: 15px 0 8px;
	padding: 0;
	font-weight: bold;
	font-size: 14px;
}

/* 分类容器样式（优化间距/宽度计算） */
.category-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	/* 替代margin，间距更均匀 */
	margin: 20px 0;
	/* 上下外边距 */
}

.category {
	width: calc(20% - 8px);
	/* 适配gap的宽度计算 */
	border: 3px solid #919191;
	padding: 10px;
	box-sizing: border-box;
	height: 200px;
	overflow-y: auto;
	overflow-x: hidden;
	/* border-radius: 5px; */
	/* 轻微圆角，兼容边距 */
}

.category:nth-child(5n + 1) {
	border-left: 3px solid #919191;
}

/* .category:nth-child(n + 6) {
	border-top: none;
} */

.category:last-child,
.category:nth-last-child(2),
.category:nth-last-child(3),
.category:nth-last-child(4),
.category:nth-last-child(5) {
	border-bottom: 3px solid #919191;
}

/* 大框样式（基础+嵌套框强化） */
.large-box {
	width: 100%;
	border: 3px solid #252525;
	border-radius: 10px;
	margin: 20px 0;
	/* 替代仅margin-top，上下对称 */
	padding: 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	/* 嵌套框新增：透明背景 */
	background: transparent;
}

.large-box-up {
	border: 3px solid #252525;
	border-radius: 10px;
	margin: 20px 0;
	padding: 20px;
	/* width: 100%;

	
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: transparent; */
}

.large-box h2 {
	margin: 0 0 15px 0;
}

.large-box ul {
	list-style-type: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.large-box ul h4,
.large-box ul h5,
.large-box ul h6 {
	width: 100%;
	margin-top: 20px;
	clear: both;
	/* 确保独占一行 */
}

.large-box ul h4 {
	color: #393939;
}

.large-box ul h4::after {
	content: "";
	display: block;
	margin-top: 0px;
	margin-bottom: 0px;
}

.large-box ul li {
	margin: 5px;
}

/* 列表样式 */
ul {
	list-style-type: none;
	padding: 0;
}

li {
	margin-bottom: 10px;
}

/* 链接样式 */
a {
	color: #007BFF;
	text-decoration: none;
}

a:hover {
	text-decoration: none;
}

li a {
	display: inline-block;
	transition: all 0.3s ease;
	padding: 5px;
}

li a:hover {
	transform: scale(1.1);
	background-color: #c1c1c1;
	border-radius: 5px;
}

/* 分割线样式 */
.div {
	border: none;
	height: 3px;
	background: black;
	margin: 20px 0;
	/* 给分割线加上下边距 */
}

/* 加载动画样式 */
.loader {
	border: 2px solid #f3f3f3;
	border-top: 2px solid #3498db;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	animation: spin 1s linear infinite;
	display: inline-block;
	margin-right: 5px;
	vertical-align: middle;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* 固定按钮样式（优化边距/交互） */
.fixed-button {
	position: fixed;
	top: 20px;
	right: 20px;
	background-color: rgba(255, 255, 255, 0.8);
	color: #333;
	padding: 10px 20px;
	border-radius: 50px;
	text-decoration: none;
	z-index: 1000;
	display: flex;
	align-items: center;
	transition: transform 0.3s ease;
	margin: 0;
	/* 清除默认边距 */
}

.fixed-button:hover {
	transform: scale(1.1);
	background-color: rgba(230, 230, 230, 0.8);
}

.button-img {
	width: 20px;
	height: 20px;
	margin-right: 10px;
	padding: 0;
}

/* 公告按钮样式 */
#announcementBtn {
	position: fixed;
	top: 20px;
	left: 20px;
	font-size: 15px;
	border: none;
	outline: none;
	box-shadow: none;
	background-color: rgba(255, 255, 255, 0.8);
	color: #333;
	padding: 10px 20px;
	border-radius: 50px;
	text-decoration: none;
	z-index: 1000;
	display: flex;
	align-items: center;
	transition: transform 0.3s ease;
	margin: 0;
	/* 清除默认边距 */
}

#announcementBtn:hover {
	transform: scale(1.1);
	background-color: rgba(230, 230, 230, 0.8);
	text-decoration: none;
}

#announcementBtn::before {
	content: '📢';
	display: inline-block;
	margin-right: 10px;
	font-size: 18px;
}

/* 弹窗基础样式（优化边距/过渡） */
#announcementPopup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1002;
	background-color: rgba(0, 0, 0, 0);
	transition: background-color 0.3s ease;
	pointer-events: none;
	opacity: 0;
	margin: 0;
	padding: 0;
}

#announcementPopup.active {
	background-color: rgba(0, 0, 0, 0.5);
	pointer-events: auto;
	opacity: 1;
}

.popup-content {
	transform: scale(0.7);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
	position: relative;
	background: rgba(255, 255, 255, 0.9);
	padding: 30px;
	border-radius: 15px;
	max-width: 600px;
	margin: 20px;
	/* 弹窗内边距适配 */
}

#announcementPopup.active .popup-content {
	transform: scale(1);
	opacity: 1;
}

/* 关闭按钮样式 */
.closePopup {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 28px;
	cursor: pointer;
	z-index: 1003;
	color: #666;
	transition: all 0.3s ease;
	background: transparent;
	border: none;
	padding: 0;
	line-height: 1;
	margin: 0;
}

/* 标题组样式 */
.title-group {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	/* 控制图片与文字间距 */
	/* margin: 40px 0; */
	/* 上下边距 */
	padding: 0;
}

.title-icon {
	width: 60px;
	height: 60px;
	transition: transform 0.3s ease;
	margin: 0;
	padding: 0;
}

.title-icon:hover {
	transform: scale(1.1);
}

.title-text {
	text-align: center;
	margin: 0;
	padding: 0;
}

/* 悬浮文字样式（修复transform重叠） */
.maker {
	text-align: center;
	position: absolute;
	top: 3%;
	left: 50%;
	transform: translateX(-50%);
	animation: rainbow 5s linear infinite;
	font-size: 18px;
	transition: all 0.3s ease;
	transform-origin: center;
	padding: 5px;
	margin: 0;
	z-index: 100;
}

.maker:hover {
	transform: translateX(-50%) scale(1.1);
	background-color: #c1c1c1;
	border-radius: 5px;
}

.github {
	text-align: center;
	position: absolute;
	top: 3%;
	left: 20%;
	transform: translateX(-50%);
	font-size: 18px;
	color: #333;
	animation: blackwhite 5s linear infinite;
	transition: all 0.3s ease;
	transform-origin: center;
	padding: 5px;
	margin: 0;
	z-index: 100;
}

.github:hover {
	transform: translateX(-50%) scale(1.1);
	background-color: #c1c1c1;
	border-radius: 5px;
}

.issue {
	text-align: center;
	position: absolute;
	top: 3%;
	left: 82%;
	transform: translateX(-50%);
	font-size: 18px;
	color: black;
	animation: blackwhite 5s linear infinite;
	z-index: 100;
	transition: all 0.3s ease;
	transform-origin: center;
	padding: 5px;
	margin: 0;
}

.issue:hover {
	transform: translateX(-50%) scale(1.1);
	background-color: #c1c1c1;
	border-radius: 5px;
}

/* 动画关键帧 */
@keyframes blackwhite {
	0% {
		color: #000;
	}

	25% {
		color: #606060;
	}

	50% {
		color: #a0a0a0;
	}

	75% {
		color: #606060;
	}

	100% {
		color: #000;
	}
}

@keyframes rainbow {
	0% {
		color: hsl(0, 100%, 50%);
	}

	16% {
		color: hsl(30, 100%, 50%);
	}

	32% {
		color: hsl(60, 100%, 50%);
	}

	48% {
		color: hsl(120, 100%, 50%);
	}

	64% {
		color: hsl(200, 100%, 50%);
	}

	80% {
		color: hsl(240, 100%, 50%);
	}

	96% {
		color: hsl(270, 100%, 50%);
	}

	100% {
		color: hsl(0, 100%, 50%);
	}
}

/* 表格样式（优化边距/圆角） */
/* 全局表格基础样式（保留你的核心设计） */
table {
	width: 100%;
	border: 3px solid #141414;
	border-radius: 5px;
	margin: 15px 0;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	/* 新增：解决圆角被单元格覆盖的问题 */
}

td {
	border: 3px solid #141414;
	border-radius: 0;
	/* 改：取消单元格单独圆角，避免边框重叠 */
	padding: 8px;
	margin: 0;
	text-align: center;
	/* 新增：单元格文字居中，更整齐 */
}

/* 新增：domain表格专属优化（不影响其他表格） */
table.domain th {
	border: 3px solid #141414;
	/* 和td保持一致的粗边框 */
	padding: 8px;
	border-radius: 0;
	text-align: center;
	font-weight: bold;
	background-color: rgba(240, 240, 240, 0.8);
	/* 表头浅灰背景，区分内容 */
}

/* 新增：隔行变色（提升可读性，不破坏原有风格） */
table.domain tbody tr:nth-child(even) td {
	background-color: rgba(250, 250, 250, 0.8);
}

/* 新增：domain表格链接样式（贴合你的交互风格） */
table.domain td a {
	color: #007BFF;
	text-decoration: none;
	transition: all 0.3s ease;
}

table.domain td a:hover {
	transform: scale(1.1);
	background-color: #c1c1c1;
	border-radius: 5px;
	padding: 3px;
}

/* 强化不可访问状态（保留你的errcon样式） */
table.domain .errcon {
	color: darkred;
	font-weight: bold;
}

/* 文本样式 */
.errcon {
	color: darkred;
	margin: 0;
	padding: 0;
}

.announcement-tip {
	color: #777;
	margin-bottom: 10px;
	padding: 0;
}

.announcement-text p font {
	text-indent: 0;
	margin: 0;
	padding: 0;
}

.red {
	margin: 0;
	padding: 0;
	text-indent: 0;
	color: red;
}

.blue {
	margin: 0;
	padding: 0;
	text-indent: 0;
	color: #0ab2e3;
}

/* ========== 嵌套框样式（大框→长方形框→小框） ========== */
/* 中层长方形框（每个大分类：GAME类/娱乐类等套一个） */
.middle-rect-box {
	margin: 15px 0;
	padding: 15px;
	border: 3px solid #919191;
	border-radius: 8px;
	background: transparent;
	/* 中层长方形框背景透明 */
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	justify-content: center;
	/* 核心：让内部元素（小框）水平居中 */
}

/* 内层小框（关键：透明背景+滚动条+去掉ul圆点） */
.inner-small-box {
	margin: 10px 0;
	padding: 10px;
	border: 3px solid #b8b8b8;
	border-radius: 6px;
	background: transparent;
	/* 内层小框背景透明 */
	max-height: 400px;
	/* 固定高度，超出滚动 */
	overflow-y: auto;
	overflow-x: hidden;
	flex: 1;
	min-width: 300px;
}

/* 核心：ul去掉前面的圆点 + 透明背景 */
.inner-small-box ul {
	margin: 0;
	padding: 0;
	/* 保留缩进，可改0取消缩进 */
	list-style: none;
	/* 彻底去掉ul前面的圆点 */
	background: transparent;
	/* ul背景透明 */
}

/* 标题样式微调（透明背景） */
/* 统一h5和h6的基础样式，让居中后视觉一致 */
.inner-small-box h5,
.inner-small-box h6 {
		text-align: center;
		/* 文字水平居中 */
		width: 100%;
		/* 标题宽度=小框宽度 */
		margin: 15px 0 10px 0;
		/* 统一上下边距 */
		display: block;
		/* 强制独占一行 */
		clear: both;
		/* 清除浮动影响 */
		padding: 0;
		/* 清空默认内边距 */
	}


.middle-rect-box h4 {
	margin: 0 0 10px 0;
	width: 100%;
	background: transparent;
	/* 大标题背景透明 */
}

/* 可选：li hover样式（优化体验） */
.inner-small-box li {
	margin: 4px 0;
	background: transparent;
	/* li背景透明 */
}

.inner-small-box a {
	text-decoration: none;
	/* 去掉链接下划线（如需） */
}

.inner-small-box a:hover {
	color: #ff6600;
	/* 链接hover变色（如需） */
	transform: scale(1.1);
	background-color: #c1c1c1;
	border-radius: 5px;
}

.osww-title-h1{
	margin: 30px 0 0 0;
}

.osww-title-h3{
	margin: 0px;
}

/* 手机适配测试 */
/* ========== 手机专用适配层 ========== */
/* 当屏幕宽度小于等于 768px 时生效 */
@media only screen and (max-width: 768px) {

	/* ---------- 全局重置：拍扁所有弹性布局 ---------- */
	body {
		margin: 0;
		display: block;
		min-height: 100vh;
		background: #e8f5e9;
		/* 极简灰白色，类似苹果风格 */
	}

	/* 主容器：撑满屏幕 */
	.main-container {
		width: 100%;
		max-width: 100%;
		padding: 15px;
		margin: 0;
	}

	/* ---------- 强制所有flex/grid元素变成块级 ---------- */
	.category-container,
	.large-box ul,
	.middle-rect-box,
	[class*="flex"],
	[class*="grid"] {
		display: block;
	}

	/* ---------- 分类盒子：从5列变1列 ---------- */
	.category {
		width: 100%;
		/* 每个占满一行 */
		height: auto;
		/* 高度自适应 */
		max-height: 250px;
		/* 但给个最大高度，内容多了可滚动 */
		margin: 10px 0;
		/* 上下间距 */
		border: 3px solid #919191;
		/* 保留原有边框风格 */
	}

	/* 修正分类盒子的边框重叠问题 */
	.category:nth-child(n) {
		border-left: 3px solid #919191;
		border-bottom: 3px solid #919191;
		border-top: 3px solid #919191;
		border-right: 3px solid #919191;
	}

	/* ---------- 标题文字缩小 ---------- */
	h1 {
		font-size: 28px;
		/* 从50px/24px混乱中统一 */
		letter-spacing: 5px;
		/* 减小字间距 */
		margin: 15px 0;
	}

	h2 {
		font-size: 22px;
		margin: 10px 0;
	}

	h3 {
		font-size: 20px;
		letter-spacing: 5px;
		margin: 15px 0;
	}

	h4 {
		font-size: 18px;
	}

	h5,
	h6 {
		font-size: 16px;
	}

	/* ---------- 标题组：图标和文字垂直堆叠 ---------- */
	.title-group {
		flex-direction: column;
		/* 垂直排列 */
		gap: 10px;
		margin: 20px 0;
	}

	.title-icon {
		width: 50px;
		height: 50px;
	}

	/* ---------- 悬浮定位元素处理 ---------- */
	/* 顶部三个悬浮文字：改成静态块级，避免重叠 */
	.maker,
	.github,
	.issue {
		position: static;
		/* 取消绝对定位 */
		transform: none;
		display: inline-block;
		/* 改成inline-block让它们排成一行 */
		text-align: center;
		margin: 5px;
		/* 统一外边距 */
		width: auto;
		/* 宽度自适应内容 */
		padding: 5px 10px;
		/* 稍微缩小内边距 */
		animation: none;
		background-color: rgba(255, 255, 255, 0.5);
		/* 加个半透明背景，更清晰 */
		border-radius: 20px;
		/* 圆角背景 */
	}

	/* 让它们排成一行（可选，如果三个能放下） */
	/* 如果想排成一行，取消下面注释 */
	/*
    body {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .maker, .github, .issue {
        display: inline-block;
        width: auto;
    }
    */

	/* ---------- 固定按钮调整 ---------- */
	.fixed-button {
		top: 10px;
		right: 10px;
		padding: 8px 12px;
		/* 稍微缩小 */
		font-size: 14px;
	}

	#announcementBtn {
		top: 10px;
		right: 10px;
		left: auto;
		padding: 8px 12px;
		font-size: 14px;
	}

	/* 防止两个固定按钮在左上/右上打架 */
	@media (max-width: 480px) {
		.fixed-button {
			top: 60px;
			/* 在小屏上把右边的按钮往下挪 */
		}
	}

	/* ---------- 弹窗适配 ---------- */
	.popup-content {
		width: 90%;
		max-width: 90%;
		padding: 20px;
		margin: 10px;
		max-height: 80vh;
		/* 限制最大高度 */
		overflow-y: auto;
		/* 内容多了可滚动 */
	}

	.closePopup {
		top: 10px;
		right: 15px;
		font-size: 32px;
		/* 加大关闭按钮，手指好点 */
	}

	/* ---------- 中层长方形框和内层小框适配 ---------- */
	.middle-rect-box {
		padding: 10px;
		gap: 0;
		/* 取消gap，靠margin */
	}

	.inner-small-box {
		min-width: 100%;
		/* 每个小框占满 */
		max-height: 300px;
		/* 稍微降低最大高度 */
		margin: 10px 0;
		/* 上下间距 */
	}

	/* 内层标题居中修正 */
	.inner-small-box h5,
	.inner-small-box h6 {
		text-align: center;
		width: 100%;
		margin: 10px 0;
	}

	/* ---------- 表格适配 ---------- */
	table {
		display: block;
		/* 块级化 */
		overflow-x: auto;
		/* 可横向滚动 */
		-webkit-overflow-scrolling: touch;
		border: 3px solid #141414;
		/* 保留边框 */
	}

	table.domain th,
	table.domain td {
		white-space: nowrap;
		/* 不换行，配合滚动 */
		padding: 6px;
		/* 稍微缩小内边距 */
	}

	/* ---------- 列表项适配 ---------- */
	li {
		margin-bottom: 12px;
		/* 增大行高，手指好点 */
	}

	li a {
		display: block;
		/* 链接块级化，整块可点 */
		padding: 10px;
		/* 增大点击区域 */
		font-size: 16px;
	}

	/* hover效果在手机上改为active */
	li a:hover {
		transform: none;
		/* 手机hover无效，禁用 */
	}

	li a:active {
		transform: scale(1.05);
		/* 点击时有轻微反馈 */
		background-color: #c1c1c1;
		border-radius: 5px;
	}

	/* ---------- 分割线 ---------- */
	.div {
		margin: 15px 0;
		height: 2px;
		/* 稍微细一点 */
	}

	/* ---------- 隐藏某些可能干扰的元素 ---------- */
	/* 如果你的HTML里有些桌面版才有的元素想隐藏，可以加类似下面这样 */
	/*
    .desktop-only-element {
        display: none;
    }
    */

	/* ---------- 加载动画微调 ---------- */
	.loader {
		width: 14px;
		height: 14px;
	}

	/* ---------- 修复body背景可能造成的性能问题 ---------- */
	body {
		background-attachment: scroll;
		/* 修复ios fixed背景闪烁 */
	}
}

/* ========== 超小屏（480px以下）额外优化 ========== */
@media only screen and (max-width: 480px) {
	h1 {
		font-size: 24px;
		letter-spacing: 3px;
	}

	h3 {
		font-size: 18px;
		letter-spacing: 3px;
	}

	.title-icon {
		width: 40px;
		height: 40px;
	}

	.fixed-button {
		padding: 6px 10px;
		font-size: 12px;
	}

	#announcementBtn {
		padding: 6px 10px;
		font-size: 12px;
	}

	.button-img {
		width: 16px;
		height: 16px;
		margin-right: 5px;
	}
}
