/* Keke Ad Unlock —— 激励广告解锁
   配色对齐紫色 SaaS 设计令牌：主紫 #7C3AED / 深紫 #4C1D95 */

:root {
	--keke-ad-primary: #7C3AED;
	--keke-ad-primary-dark: #4C1D95;
	--keke-ad-primary-soft: #F3EEFF;
	--keke-ad-text: #17102B;
	--keke-ad-muted: #6B6480;
	--keke-ad-line: #E9E4F5;
	--keke-ad-warn: #B45309;
	--keke-ad-warn-bg: #FFFBEB;
}

/* ---------- 触发按钮 ---------- */
.keke-ad-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--keke-ad-primary), var(--keke-ad-primary-dark));
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
	box-shadow: 0 6px 18px rgba(124, 58, 237, .28);
}

.keke-ad-cta::before {
	content: "▶";
	font-size: 11px;
}

.keke-ad-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(124, 58, 237, .36);
}

.keke-ad-cta[disabled] {
	background: #C9B6F5;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}

/* ---------- 广告弹层 ---------- */
.keke-ad-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.keke-ad-mask {
	position: absolute;
	inset: 0;
	background: rgba(23, 16, 43, .62);
	backdrop-filter: blur(3px);
}

.keke-ad-box {
	position: relative;
	width: min(420px, calc(100vw - 40px));
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(23, 16, 43, .34);
	animation: kekeAdPop .22s ease;
}

@keyframes kekeAdPop {
	from { transform: translateY(12px) scale(.97); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

.keke-ad-box__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: var(--keke-ad-primary-soft);
	color: var(--keke-ad-primary-dark);
	font-size: 14px;
	font-weight: 700;
}

.keke-ad-close {
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: var(--keke-ad-muted);
	cursor: pointer;
	padding: 0 4px;
}

.keke-ad-stage {
	position: relative;
	height: 220px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background:
		radial-gradient(circle at 30% 20%, #F3EEFF, transparent 60%),
		linear-gradient(160deg, #2E1065, #4C1D95);
	color: #fff;
}

.keke-ad-stage__hint {
	font-size: 13px;
	opacity: .82;
}

.keke-ad-count {
	font-size: 56px;
	font-weight: 800;
	letter-spacing: -1px;
	text-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

.keke-ad-box__foot {
	padding: 16px 18px 18px;
	text-align: center;
}

.keke-ad-claim {
	width: 100%;
	padding: 12px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--keke-ad-primary), var(--keke-ad-primary-dark));
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity .16s ease;
}

.keke-ad-claim[disabled] {
	background: #C9B6F5;
	cursor: not-allowed;
}

.keke-ad-tip {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--keke-ad-muted);
	min-height: 16px;
}

.keke-ad-tip.is-error {
	color: #DC2626;
}

.keke-ad-tip.is-ok {
	color: #15803D;
}

/* ---------- 解锁记录列表（「我的」页） ---------- */
.keke-ad-list {
	border: 1px solid var(--keke-ad-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.keke-ad-row {
	display: grid;
	grid-template-columns: 2fr .8fr 1.2fr .8fr;
	gap: 10px;
	align-items: center;
	padding: 12px 16px;
	font-size: 13px;
	border-top: 1px solid var(--keke-ad-line);
}

.keke-ad-row:first-child {
	border-top: 0;
}

.keke-ad-row--head {
	background: var(--keke-ad-primary-soft);
	color: var(--keke-ad-primary-dark);
	font-weight: 700;
}

.keke-ad-title a {
	color: var(--keke-ad-text);
	text-decoration: none;
}

.keke-ad-title a:hover {
	color: var(--keke-ad-primary);
}

.keke-ad-price s {
	color: var(--keke-ad-muted);
}

.keke-ad-time {
	color: var(--keke-ad-muted);
}

.keke-ad-go {
	color: var(--keke-ad-primary);
	text-decoration: none;
	font-weight: 600;
}

.keke-ad-empty {
	padding: 18px;
	text-align: center;
	color: var(--keke-ad-muted);
	font-size: 13px;
	background: var(--keke-ad-primary-soft);
	border-radius: 12px;
}

/* ---------- 免费用户提示条 ---------- */
.keke-ad-note {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--keke-ad-warn-bg);
	color: var(--keke-ad-warn);
	font-size: 13px;
}

@media (max-width: 600px) {
	.keke-ad-row {
		grid-template-columns: 1.6fr 1fr;
		grid-auto-rows: auto;
	}
	.keke-ad-row--head {
		display: none;
	}
}
