﻿/* ============================================================
 * 下载弹窗 (pcgh-dl-modal)
 * - 点击 hero “立即下载”按钮弹出
 * - 代替旧的下载区 / unlock / tabs 多版本
 * ========================================================== */
.pcgh-dl-modal__panel {
	width: min(560px,calc(100vw - 32px));
	padding: 0;
	overflow: hidden;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 60px)
}

/* 顶部 bar：标题左 + 关闭 × 右 */
.pcgh-dl-modal__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--pcgh-border)
}

.pcgh-dl-modal__bar-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	letter-spacing: .3px
}

.pcgh-dl-modal__bar-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--pcgh-text-3);
	cursor: pointer;
	transition: .15s
}

.pcgh-dl-modal__bar-close:hover {
	background: rgba(255,255,255,.06);
	color: #fff
}

.pcgh-dl-modal__bar-close i[data-lucide] {
	width: 18px;
	height: 18px
}

/* body 容器（可滚动） */
.pcgh-dl-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 20px
}

/* 游戏信息：左横图小封面 + 右标题/英文/大小 */
.pcgh-dl-modal__game {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 0 16px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--pcgh-border)
}

.pcgh-dl-modal__game-cover {
	flex-shrink: 0;
	width: 80px;
	aspect-ratio: 4/2.5;
	background: var(--pcgh-surface-2) center/cover no-repeat;
	background-size: cover !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	border-radius: 6px;
	border: 1px solid var(--pcgh-border)
}

.pcgh-dl-modal__game-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block
}

.pcgh-dl-modal__game-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1
}

.pcgh-dl-modal__game-title {
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.pcgh-dl-modal__game-en {
	color: var(--pcgh-text-3);
	font-size: 12px;
	line-height: 1.4
}

.pcgh-dl-modal__game-size {
	color: var(--pcgh-text-2);
	font-size: 12px;
	font-weight: 500
}

/* 下载方式 section title */
.pcgh-dl-modal__section-title {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--pcgh-text-2);
	letter-spacing: .3px
}

/* 下载源列表 */
.pcgh-dl-modal__list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px
}

.pcgh-dl-modal__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: var(--pcgh-surface-2);
	border: 1px solid var(--pcgh-border);
	border-radius: 10px;
	transition: .18s
}

.pcgh-dl-modal__item:hover {
	border-color: rgba(124,58,237,.4);
	transform: translateY(-1px)
}

.pcgh-dl-modal__item.is-main {
	background: linear-gradient(135deg,rgba(124,58,237,.16),rgba(59,130,246,.08));
	border-color: rgba(124,58,237,.55);
	box-shadow: inset 0 0 0 1px rgba(124,58,237,.12),0 10px 24px -18px rgba(124,58,237,.65)
}

.pcgh-dl-modal__item.is-main:hover {
	border-color: rgba(124,58,237,.78);
	box-shadow: inset 0 0 0 1px rgba(124,58,237,.2),0 14px 30px -20px rgba(124,58,237,.8)
}

.pcgh-dl-modal__disk-icon {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center
}

.pcgh-dl-modal__disk-icon i[data-lucide] {
	width: 18px;
	height: 18px
}

.pcgh-dl-modal__disk-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block
}

.pcgh-dl-modal__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px
}

.pcgh-dl-modal__title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	line-height: 1.3
}

.pcgh-dl-modal__title-row strong {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px
}

.pcgh-dl-modal__rec {
	padding: 1px 7px;
	background: rgba(124,58,237,.18);
	color: #a78bfa;
	border: 1px solid rgba(124,58,237,.4);
	border-radius: 4px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.5
}

.pcgh-dl-modal__sub {
	color: var(--pcgh-text-3);
	font-size: 11px;
	line-height: 1.4
}

.pcgh-dl-modal__note {
	display: block;
	margin-top: 4px;
	color: var(--pcgh-text-3);
	font-size: 11px;
	line-height: 1.5
}

/* 提取码 / 解压码 chip */
.pcgh-dl-modal__pwds {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px
}

.pcgh-dl-modal__pwd {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	border-radius: 6px;
	background: var(--pcgh-bg);
	border: 1px solid var(--pcgh-border);
	color: var(--pcgh-text-2);
	font-size: 11px;
	cursor: pointer;
	transition: .15s;
	line-height: 1
}

.pcgh-dl-modal__pwd:hover {
	border-color: var(--pcgh-primary);
	background: rgba(124,58,237,.12);
	color: #fff
}

.pcgh-dl-modal__pwd i[data-lucide] {
	width: 11px;
	height: 11px;
	color: var(--pcgh-text-3)
}

.pcgh-dl-modal__pwd:hover i[data-lucide] {
	color: var(--pcgh-primary)
}

.pcgh-dl-modal__pwd-label {
	color: var(--pcgh-text-3);
	font-size: 10px
}

.pcgh-dl-modal__pwd code {
	color: #fff;
	font-family: Menlo,Consolas,monospace;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .5px
}

.pcgh-dl-modal__pwd.is-copied {
	background: rgba(34,197,94,.18);
	border-color: rgba(34,197,94,.5);
	color: #4ade80
}

/* 右侧"立即下载"按钮（蓝紫色实心） */
.pcgh-dl-modal__go {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 16px;
	border-radius: 8px;
	background: #3b82f6;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: .15s;
	border: 0
}

.pcgh-dl-modal__go:hover {
	background: #2563eb;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px -4px rgba(59,130,246,.5)
}

.pcgh-dl-modal__go:focus-visible {
	outline: 2px solid rgba(255,255,255,.82);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(59,130,246,.28)
}

.pcgh-dl-modal__go:active {
	transform: translateY(0) scale(.98)
}

.pcgh-dl-modal__go i[data-lucide] {
	width: 13px;
	height: 13px
}

.pcgh-dl-modal__item.is-main .pcgh-dl-modal__go {
	background: linear-gradient(135deg,var(--pcgh-primary),#2563eb);
	color: #fff;
	box-shadow: 0 8px 18px -10px rgba(124,58,237,.85)
}

.pcgh-dl-modal__item.is-main .pcgh-dl-modal__go:hover {
	background: linear-gradient(135deg,#8b5cf6,#1d4ed8);
	color: #fff;
	filter: brightness(1.05);
	box-shadow: 0 10px 20px -10px rgba(124,58,237,.9)
}

/* 底部：帮助 + MD5 + 说明 */
.pcgh-dl-modal__foot {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
	padding-top: 14px;
	border-top: 1px solid var(--pcgh-border)
}

.pcgh-dl-modal__help {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	color: var(--pcgh-text-3);
	font-size: 12px;
	line-height: 1.55
}

.pcgh-dl-modal__help i[data-lucide] {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	margin-top: 2px
}

.pcgh-dl-modal__help a {
	color: var(--pcgh-primary);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 2px
}

.pcgh-dl-modal__help a:hover {
	text-decoration: underline
}

.pcgh-dl-modal__help a i[data-lucide] {
	width: 12px;
	height: 12px;
	margin-top: 0
}

.pcgh-dl-modal__md5 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px
}

.pcgh-dl-modal__md5-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--pcgh-text-3);
	font-weight: 500;
	flex-shrink: 0
}

.pcgh-dl-modal__md5-label i[data-lucide] {
	width: 13px;
	height: 13px
}

.pcgh-dl-modal__md5 code {
	flex: 1;
	min-width: 0;
	background: var(--pcgh-bg);
	color: var(--pcgh-text-2);
	padding: 5px 10px;
	border-radius: 6px;
	font-family: Menlo,Consolas,monospace;
	font-size: 11px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap
}

.pcgh-dl-modal__md5-copy {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border: 1px solid var(--pcgh-border);
	border-radius: 6px;
	background: transparent;
	color: var(--pcgh-text-2);
	font-size: 11px;
	cursor: pointer;
	transition: .15s;
	flex-shrink: 0
}

.pcgh-dl-modal__md5-copy i[data-lucide] {
	width: 11px;
	height: 11px
}

.pcgh-dl-modal__md5-copy:hover {
	background: var(--pcgh-primary);
	border-color: var(--pcgh-primary);
	color: #fff
}

.pcgh-dl-modal__note-bar {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 8px 12px;
	background: rgba(59,130,246,.08);
	border: 1px solid rgba(59,130,246,.2);
	border-left: 3px solid #3b82f6;
	border-radius: 6px;
	color: var(--pcgh-text-2);
	font-size: 12px;
	line-height: 1.55
}

.pcgh-dl-modal__note-bar i[data-lucide] {
	width: 14px;
	height: 14px;
	color: #60a5fa;
	flex-shrink: 0;
	margin-top: 2px
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__panel {
	background: #fff;
	box-shadow: 0 24px 72px rgba(15,23,42,.18)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__bar-title,
html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__game-title,
html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__title-row strong {
	color: var(--pcgh-text)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__bar-close:hover {
	background: rgba(15,23,42,.06);
	color: var(--pcgh-text)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__item {
	background: #f8fafc
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__item:hover {
	box-shadow: 0 10px 24px -18px rgba(15,23,42,.32)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__item.is-main {
	background: linear-gradient(135deg,rgba(124,58,237,.1),rgba(59,130,246,.06));
	box-shadow: inset 0 0 0 1px rgba(124,58,237,.08),0 10px 24px -18px rgba(124,58,237,.45)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__go {
	background: linear-gradient(135deg,#3b82f6,#2563eb);
	border: 1px solid transparent;
	color: #fff;
	box-shadow: none
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__go:hover {
	background: linear-gradient(135deg,#2563eb,#1d4ed8);
	color: #fff;
	box-shadow: 0 10px 20px -12px rgba(37,99,235,.72)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__go:focus-visible {
	outline: 2px solid rgba(37,99,235,.36);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(59,130,246,.16)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__go:active {
	background: linear-gradient(135deg,#1d4ed8,#1e40af);
	color: #fff
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__go:visited {
	color: #fff
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__item.is-main .pcgh-dl-modal__go {
	background: linear-gradient(135deg,#3b82f6,#2563eb);
	color: #fff;
	box-shadow: none
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__item.is-main .pcgh-dl-modal__go:hover {
	background: linear-gradient(135deg,#2563eb,#1d4ed8);
	color: #fff;
	box-shadow: 0 10px 20px -12px rgba(37,99,235,.72)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__pwd {
	background: #fff
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__pwd:hover {
	color: var(--pcgh-primary)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__pwd code {
	color: var(--pcgh-text)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__md5 code {
	background: #fff;
	color: var(--pcgh-text)
}

html[data-pcgh-theme-resolved="light"] .pcgh-dl-modal__note-bar {
	background: rgba(59,130,246,.06)
}

@media (max-width:560px) {
	.pcgh-dl-modal__panel {
		max-height: calc(100vh - 20px)
	}

	.pcgh-dl-modal__bar {
		padding: 14px 16px
	}

	.pcgh-dl-modal__body {
		padding: 14px 16px
	}

	.pcgh-dl-modal__game-cover {
		width: 60px
	}

	.pcgh-dl-modal__item {
		flex-wrap: wrap;
		padding: 12px
	}

	.pcgh-dl-modal__go {
		width: 100%;
		justify-content: center;
		order: 3
	}

	.pcgh-dl-modal__title-row strong {
		max-width: none
	}

	.pcgh-dl-modal__foot {
		padding: 12px 16px 14px
	}
}
