/* =========================================================================
   ArtGamer 作品列表页（原创作品 fid=56 / forum.php?mod=forumdisplay）
   复刻首页"精选作品"卡片视觉。容器 1600px，5 列 ×300px，gap 25px，封面 190px。
   仅在 forumdisplay && fid==56 时加载（见 header_common.php）。
   版本号=filemtime，改文件即破缓存。
   说明：内部卡片类名 .artg-work-* 与首页一致，但作用域被 .artg-worklist 限定，
   首页 CSS 仅在 portal index 加载，两页不冲突。
   ========================================================================= */

/* ---- 页面底色：与首页同款赛博朋克暗色 ---- */
body#nv_forum .artg-worklist {
	color: #eef3ff;
}

body#nv_forum.pg_forumdisplay .main-wrapper.wp {
	margin-bottom: 0;
	min-height: 0;
}

/* 让外层主体宽度自适应，由 .artg-worklist 自己控制 1600 居中 */
.artg-worklist {
	position: relative;
	width: 1600px;
	max-width: calc(100vw - 180px);
	margin: 25px auto 0;
	padding: 0;
	box-sizing: border-box;
}

.artg-worklist .advlong-bottom,
.artg-worklist .all-work-list {
	display: none;
}

/* =========================== 顶部类型 tab =========================== */
.artg-worklist-types {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 56px;
	min-height: 60px;
	margin-top: 4px;
	padding: 0;
	border-bottom: 1px solid rgba(113, 125, 172, 0.12);
}

.artg-worklist-types .artg-wl-tab {
	position: relative;
	height: 60px;
	margin: 0 !important;
	padding: 0 0 2px;
	color: rgba(239, 243, 255, 0.66);
	font-size: 16px;
	line-height: 60px;
	white-space: nowrap;
	cursor: pointer;
	transition: color .2s, text-shadow .2s;
}

.artg-worklist-types .artg-wl-tab:before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -8px;
	width: 190px;
	height: 78px;
	background: radial-gradient(ellipse at center bottom, rgba(207, 52, 255, 0.42) 0, rgba(151, 43, 255, 0.24) 30%, rgba(87, 42, 168, 0.11) 54%, transparent 76%);
	filter: blur(10px);
	opacity: 0;
	transform: translateX(-50%);
	pointer-events: none;
	transition: opacity .2s;
}

.artg-worklist-types .artg-wl-tab:after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 70px;
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, #ff2df7, #8e44ff);
	box-shadow: 0 0 10px rgba(255, 66, 255, 0.96), 0 0 28px rgba(139, 55, 255, 0.88);
	transform: translateX(-50%) scaleX(0);
	transform-origin: center;
	transition: transform .2s;
}

.artg-worklist-types .artg-wl-tab:hover,
.artg-worklist-types .artg-wl-tab.is-active {
	color: #fff;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 0 18px rgba(198, 55, 255, 0.9);
}

.artg-worklist-types .artg-wl-tab:hover:before,
.artg-worklist-types .artg-wl-tab.is-active:before {
	opacity: 1;
}

.artg-worklist-types .artg-wl-tab.is-active:after {
	transform: translateX(-50%) scaleX(1);
}

.artg-worklist-types .artg-wl-tab img {
	vertical-align: middle;
	margin-right: 4px;
}

/* =========================== 全部 / 精华 二级 tab =========================== */
.artg-worklist-subtabs {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 40px;
	height: 56px;
	margin-bottom: 14px;
}

.artg-worklist-subtabs .artg-wl-subtab {
	position: relative;
	height: 40px;
	margin: 0 !important;
	color: rgba(239, 243, 255, 0.62);
	font-size: 16px;
	line-height: 40px;
	cursor: pointer;
	transition: color .2s, text-shadow .2s;
}

.artg-worklist-subtabs .artg-wl-subtab:after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 56px;
	height: 3px;
	border-radius: 999px;
	background: linear-gradient(90deg, #ff2df7, #8e44ff);
	box-shadow: 0 0 8px rgba(255, 66, 255, 0.9), 0 0 22px rgba(139, 55, 255, 0.8);
	transform: translateX(-50%) scaleX(0);
	transition: transform .2s;
}

.artg-worklist-subtabs .artg-wl-subtab:hover,
.artg-worklist-subtabs .artg-wl-subtab.is-active {
	color: #fff;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.5), 0 0 16px rgba(198, 55, 255, 0.85);
}

.artg-worklist-subtabs .artg-wl-subtab.is-active:after {
	transform: translateX(-50%) scaleX(1);
}

/* =========================== 卡片网格 =========================== */
.artg-worklist-grid {
	display: grid;
	grid-template-columns: repeat(5, 300px);
	gap: 25px;
	margin: 0;
	padding: 0;
	justify-content: center;
	list-style: none;
}

.artg-worklist-grid .artg-work-card {
	position: relative;
	width: 300px;
	height: 334px;
	margin: 0;
	box-sizing: border-box;
	border-radius: 8px;
	background: linear-gradient(180deg, rgba(12, 20, 38, 0.92), rgba(6, 15, 23, 0.98));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
	overflow: hidden;
	list-style: none;
	transition: transform .22s, background .22s, box-shadow .22s;
}

.artg-worklist-grid .artg-work-card:hover {
	transform: translateY(-3px);
	background: linear-gradient(180deg, rgba(14, 23, 43, 0.96), rgba(7, 17, 27, 1));
	box-shadow: 0 0 18px rgba(111, 58, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.artg-worklist-grid .artg-work-cover {
	position: relative;
	display: block;
	width: 100%;
	height: 190px;
	overflow: hidden;
}

.artg-worklist-grid .artg-work-cover img {
	display: block;
	width: 100%;
	height: 190px;
	object-fit: cover;
	background: #0b111f;
}

.artg-worklist-grid .artg-work-title {
	position: relative;
	z-index: 4;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 10px 10px 0;
	color: #f5f7ff;
	font-size: 17px;
	font-weight: 700;
	line-height: 24px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 0 0 10px rgba(45, 122, 255, 0.28);
	transition: color .2s, text-shadow .2s;
}

.artg-worklist-grid .artg-work-title:hover {
	color: #fff;
	text-shadow: 0 0 12px rgba(91, 145, 255, 0.48);
}

/* 加精/置顶小图标贴在标题后 */
.artg-worklist-grid .artg-work-title img {
	vertical-align: middle;
}

.artg-worklist-grid .artg-work-meta {
	position: absolute;
	left: 10px;
	right: 10px;
	top: 238px;
	bottom: auto;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 13px;
	margin: 0;
	color: rgba(222, 228, 246, 0.72);
	font-size: 13px;
	line-height: 18px;
	white-space: nowrap;
	overflow: visible;
}

.artg-worklist-grid .artg-work-user,
.artg-worklist-grid .artg-work-stats {
	display: flex;
	align-items: center;
	min-width: 0;
}

.artg-worklist-grid .artg-work-user {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	order: 2;
	width: 100%;
	height: auto !important;
	gap: 10px;
	justify-content: flex-start;
	margin: 0 !important;
	padding: 14px 0 0 !important;
	border-top: 1px solid rgb(118 132 174 / 15%);
	overflow: hidden;
	color: #a7abb5;
}

.artg-worklist-grid .artg-work-user:hover {
	color: #fff;
}

.artg-worklist-grid .artg-work-stats {
	position: static;
	order: 1;
	width: 100%;
	gap: 28px;
	justify-content: flex-start;
	flex-shrink: 1;
}

.artg-worklist-grid .artg-work-avatar {
	display: block !important;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	max-width: 36px !important;
	min-height: 36px !important;
	max-height: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	background: #18233a;
	box-shadow: none;
}

.artg-worklist-grid .artg-work-authorbox {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.artg-worklist-grid .artg-work-author {
	display: block !important;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 190px;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
	color: #a7abb5;
	font-size: 13px;
	line-height: 36px;
}

.artg-worklist-grid .artg-work-time {
	display: block;
	flex: 0 0 auto;
	min-width: max-content;
	margin: 0 0 0 auto !important;
	padding: 0 !important;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: right;
	color: #818691;
	font-size: 12px;
	line-height: 36px;
}

.artg-worklist-grid .artg-work-stat {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	color: #818691;
	font-size: 12px;
	line-height: 18px;
}

.artg-worklist-grid .artg-work-stat svg {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	opacity: .82;
}

.artg-worklist-grid .artg-work-stat:nth-child(3) svg {
	width: 14px;
	height: 14px;
	flex-basis: 14px;
}

/* 管理员勾选框（仅版主可见，叠在封面右上角） */
.artg-worklist-grid .artg-work-mod {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 6;
	margin: 0;
}

/* =========================== 加载更多 / 哨兵 / 加载中 =========================== */
.artg-worklist-loader {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	min-height: 44px;
	margin: 30px 0 40px;
}

.artg-worklist-loader.has-more {
	align-items: flex-end;
}

.artg-worklist-loader.is-loading {
	align-items: center;
	justify-content: center;
}

.artg-worklist-spinner {
	display: none;
	width: 28px;
	height: 28px;
	border: 3px solid rgba(149, 77, 255, 0.25);
	border-top-color: #b15dff;
	border-radius: 50%;
	animation: artg-wl-spin .8s linear infinite;
}

.artg-worklist-loader.is-loading .artg-worklist-spinner {
	display: block;
}

@keyframes artg-wl-spin {
	to { transform: rotate(360deg); }
}

.artg-worklist-more {
	display: none;
	height: 44px;
	padding: 0 38px;
	border: 1px solid rgba(149, 77, 255, 0.5);
	border-radius: 999px;
	background: rgba(20, 14, 40, 0.6);
	color: #e6e2ff;
	font-size: 15px;
	line-height: 42px;
	cursor: pointer;
	transition: border-color .2s, color .2s, box-shadow .2s, background .2s;
}

.artg-worklist-more.is-visible {
	display: block;
	align-self: flex-end;
	flex: 0 0 auto;
	width: max-content;
	margin: 0 0 0 auto !important;
}

.artg-worklist-more:hover {
	border-color: rgba(191, 64, 255, 0.9);
	color: #fff;
	background: rgba(40, 20, 70, 0.7);
	box-shadow: 0 0 18px rgba(147, 57, 255, 0.4);
}

.artg-worklist-end {
	display: none;
	color: rgba(200, 206, 230, 0.4);
	font-size: 13px;
	line-height: 40px;
}

.artg-worklist-end.is-visible {
	display: block;
}

/* =========================== 传统翻页（listmode=page） =========================== */
.artg-worklist-pager {
	position: relative;
	z-index: 2;
	min-height: 36px;
	margin: 36px 0 40px;
	text-align: center;
}

.artg-worklist-pager .pg,
.artg-worklist-pager .pgs {
	display: inline-block;
}

.artg-worklist-pager a,
.artg-worklist-pager strong,
.artg-worklist-pager .pg label {
	display: inline-block;
	min-width: 20px;
	height: 34px;
	margin: 0 3px;
	padding: 0 12px;
	border: 1px solid rgba(118, 132, 174, 0.3);
	border-radius: 6px;
	background: rgba(11, 17, 31, 0.7);
	color: rgba(224, 230, 248, 0.8);
	font-size: 14px;
	line-height: 34px;
	text-align: center;
}

.artg-worklist-pager a:hover {
	border-color: rgba(191, 64, 255, 0.8);
	color: #fff;
}

.artg-worklist-pager strong,
.artg-worklist-pager .pg .current {
	border-color: rgba(191, 64, 255, 0.9);
	background: linear-gradient(90deg, rgba(255, 45, 247, 0.22), rgba(142, 68, 255, 0.22));
	color: #fff;
}

.artg-worklist-pager .pg em {
	font-style: normal;
}

/* =========================== 空状态 =========================== */
.artg-worklist-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	color: rgba(206, 212, 235, 0.55);
	font-size: 16px;
}

/* =========================== 自适应（仅桌面端，参考 ≤1600 收缩列数） =========================== */
@media (max-width: 1700px) {
	.artg-worklist {
		width: auto;
		max-width: 1300px;
	}
	.artg-worklist-grid {
		grid-template-columns: repeat(4, 300px);
	}
}

@media (max-width: 1360px) {
	.artg-worklist {
		max-width: 1000px;
	}
	.artg-worklist-grid {
		grid-template-columns: repeat(3, 300px);
	}
}
