/* 双速下载前台样式 */
.dwd-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 16px 0;
}

.dwd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border: none;
	border-radius: 8px;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: filter .15s ease, opacity .15s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.dwd-btn:hover {
	filter: brightness(1.08);
}

.dwd-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
	filter: none;
}

.dwd-badge {
	font-size: 12px;
	background: rgba(255, 255, 255, .25);
	padding: 2px 8px;
	border-radius: 999px;
	font-weight: 400;
}

.dwd-counts {
	color: #6b7280;
	font-size: 13px;
	margin: 8px 0 0;
}

.dwd-none {
	color: #6b7280;
}

/* 模态框 */
.dwd-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.dwd-modal[hidden] {
	display: none;
}

.dwd-modal-box {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 14px;
	padding: 24px 24px 20px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	box-sizing: border-box;
}

.dwd-modal-box h3 {
	margin: 0;
	padding-right: 28px;
	font-size: 18px;
}

.dwd-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #9ca3af;
}

.dwd-modal-close:hover {
	color: #4b5563;
}

.dwd-modal-text {
	color: #374151;
	font-size: 14px;
	line-height: 1.7;
	margin: 10px 0 14px;
}

.dwd-turnstile {
	min-height: 65px;
	margin: 12px 0;
}

.dwd-modal-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 4px;
}

.dwd-modal-actions .dwd-btn {
	padding: 10px 22px;
	font-size: 15px;
}

.dwd-btn-primary {
	background: #2563eb;
}

.dwd-btn-switch {
	background: #6b7280;
}

.dwd-modal-error {
	color: #dc2626;
	font-size: 13px;
	margin: 10px 0 0;
}

body.dwd-modal-open {
	overflow: hidden;
}

/* 下载中心卡片 */
.dwd-grid {
	display: grid;
	gap: 20px;
	margin: 20px 0;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dwd-grid-1 { grid-template-columns: 1fr; }
.dwd-grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.dwd-grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.dwd-card {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 18px;
	background: #fff;
	box-sizing: border-box;
}

.dwd-card-title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.4;
}

.dwd-card-title a {
	text-decoration: none;
}

.dwd-desc {
	color: #6b7280;
	font-size: 14px;
	margin: 0 0 4px;
	line-height: 1.6;
}

/* 内置详情/列表模板容器 */
.dwd-single-inner,
.dwd-archive-inner {
	max-width: 760px;
	margin: 0 auto;
	padding: 24px 16px;
	box-sizing: border-box;
}

.dwd-single-title {
	margin: 0 0 16px;
}

.dwd-single-thumb img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin-bottom: 16px;
}

.dwd-single-meta {
	color: #6b7280;
	font-size: 13px;
	margin-top: 20px;
	border-top: 1px solid #e5e7eb;
	padding-top: 12px;
}

@media (max-width: 600px) {
	.dwd-btn {
		width: 100%;
	}
	.dwd-modal-box {
		padding: 18px;
	}
}
