/* 互动乐园：Python 知识点小游戏 + 双人 / 多人街机 */

/* ================================================================
 * 通用
 * ================================================================ */
.fz-hud {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 14px;
	border-radius: 11px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	font-size: 12.5px;
	font-weight: 700;
	color: #475569;
	margin-bottom: 12px;
}
.fz-life {
	letter-spacing: 1px;
	color: #ef4444;
	font-size: 14px;
}
.fz-score {
	color: #4f46e5;
	font-variant-numeric: tabular-nums;
}
.fz-prog {
	color: #94a3b8;
	font-weight: 600;
}

.fz-card {
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin-bottom: 12px;
}
.fz-ask {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #1f2937;
	line-height: 1.6;
}
.fz-sub {
	margin: 0;
	font-size: 12.5px;
	color: #94a3b8;
	line-height: 1.7;
}
.fz-card.is-center {
	align-items: center;
	text-align: center;
}

/* 代码块 */
.fz-code {
	margin: 0;
	padding: 13px 16px;
	border-radius: 12px;
	background: #0f172a;
	color: #cbd5e1;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13px;
	line-height: 1.85;
	white-space: pre;
	overflow-x: auto;
	tab-size: 4;
}
.fz-ln {
	display: block;
	min-height: 1.85em;
}
.fz-ln i {
	display: inline-block;
	width: 22px;
	margin-right: 10px;
	font-style: normal;
	font-size: 11px;
	color: #475569;
	text-align: right;
	user-select: none;
}
.fz-code.is-trace .fz-ln {
	white-space: pre;
}

/* 选项 */
.fz-opts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
}
.fz-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 11px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	transition: all .14s ease;
	min-width: 0;
}
.fz-opt:hover:not(:disabled) {
	border-color: #a5b4fc;
	background: #f8faff;
	transform: translateY(-1px);
}
.fz-opt:disabled {
	cursor: default;
}
.fz-opt em {
	flex: 0 0 22px;
	height: 22px;
	line-height: 22px;
	border-radius: 6px;
	background: #f1f5f9;
	color: #64748b;
	font-style: normal;
	font-size: 11.5px;
	font-weight: 700;
	text-align: center;
}
.fz-opt code {
	flex: 1 1 auto;
	min-width: 0;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13.5px;
	color: #1f2937;
	overflow-wrap: anywhere;
}
.fz-opt.is-ok {
	border-color: #86efac;
	background: #f0fdf4;
}
.fz-opt.is-ok em {
	background: #16a34a;
	color: #fff;
}
.fz-opt.is-bad {
	border-color: #fca5a5;
	background: #fef2f2;
}
.fz-opt.is-bad em {
	background: #dc2626;
	color: #fff;
}
.fz-opt.is-bad code {
	color: #b91c1c;
	text-decoration: line-through;
}

/* 解析 */
.fz-exp {
	margin-top: 12px;
	padding: 12px 15px;
	border-radius: 11px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}
.fz-exp b {
	display: inline-block;
	font-size: 12px;
	letter-spacing: .06em;
	border-radius: 5px;
	padding: 2px 8px;
	margin-bottom: 6px;
	background: #e2e8f0;
	color: #475569;
}
.fz-exp p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.85;
	color: #475569;
}
.fz-exp.is-ok {
	background: #f0fdf4;
	border-color: #bbf7d0;
}
.fz-exp.is-ok b {
	background: #16a34a;
	color: #fff;
}
.fz-exp.is-ok p {
	color: #14532d;
}
.fz-exp.is-bad {
	background: #fff7ed;
	border-color: #fed7aa;
}
.fz-exp.is-bad b {
	background: #ea580c;
	color: #fff;
}
.fz-exp.is-bad p {
	color: #7c2d12;
}

.fz-foot {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	min-height: 40px;
}
.fz-streak {
	font-size: 12px;
	font-weight: 700;
	color: #d97706;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 999px;
	padding: 4px 11px;
}
.fz-actions {
	display: flex;
	gap: 9px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.fz-btn {
	padding: 10px 20px;
	border: 1px solid #4f46e5;
	border-radius: 10px;
	background: #4f46e5;
	color: #fff;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .12s ease, background .15s ease;
}
.fz-btn:hover {
	background: #4338ca;
	transform: translateY(-1px);
}
.fz-btn:active {
	transform: scale(.97);
}
.fz-btn.ghost {
	background: #fff;
	color: #4f46e5;
	border-color: #c7d2fe;
}
.fz-btn.ghost:hover {
	background: #f5f7ff;
}
.fz-msg {
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.7;
	color: #64748b;
}
.fz-msg.is-bad {
	color: #b91c1c;
}
.fz-msg.is-win {
	color: #15803d;
	font-weight: 700;
}

/* 结算 */
.fz-end {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	padding: 34px 18px;
	border-radius: 16px;
	background: linear-gradient(140deg, #faf8ff, #f8fafc);
	border: 1px solid #eef2f7;
}
.fz-end-ico {
	font-size: 38px;
	line-height: 1;
}
.fz-end h3 {
	margin: 0;
	font-size: 19px;
	color: #1e1b4b;
}
.fz-end p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.8;
	color: #7b7796;
	max-width: 440px;
}
.fz-end .fz-actions {
	justify-content: center;
}

/* ================================================================
 * 代码拼图
 * ================================================================ */
.fz-slots {
	min-height: 76px;
	padding: 12px;
	border-radius: 13px;
	border: 1px dashed #d7d3ee;
	background: #fbfaff;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.fz-empty {
	margin: 0;
	padding: 12px 0;
	text-align: center;
	font-size: 12.5px;
	color: #a8a4c4;
}
.fz-line {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #e5e2f3;
	border-radius: 8px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	transition: all .13s ease;
	min-width: 0;
}
.fz-line:hover {
	border-color: #c7c2e8;
	background: #faf9ff;
}
.fz-line i {
	flex: 0 0 18px;
	font-style: normal;
	font-size: 11px;
	font-weight: 700;
	color: #c4c0dd;
	text-align: center;
}
.fz-line code {
	flex: 1 1 auto;
	min-width: 0;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13px;
	line-height: 1.7;
	color: #312e5c;
	white-space: pre;
	overflow-x: auto;
}
.fz-line.is-in {
	background: #f8faff;
	border-color: #dbe3ff;
}
.fz-line.is-ok {
	background: #f0fdf4;
	border-color: #86efac;
}
.fz-line.is-ok i {
	color: #16a34a;
}
.fz-line.is-bad {
	background: #fef2f2;
	border-color: #fca5a5;
	animation: fz-shake .3s ease;
}
.fz-line.is-bad i {
	color: #dc2626;
}
.fz-line.is-anim {
	animation: fz-pop .18s ease;
}
@keyframes fz-pop {
	from { transform: scale(.98); opacity: .6; }
	to { transform: scale(1); opacity: 1; }
}
@keyframes fz-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-3px); }
	75% { transform: translateX(3px); }
}
.fz-pool {
	margin-top: 10px;
	padding: 12px;
	border-radius: 13px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

/* ================================================================
 * 人肉解释器
 * ================================================================ */
.fz-asks {
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin-top: 12px;
}
.fz-ask-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 11px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	min-width: 0;
}
.fz-ask-row code {
	flex: 0 0 auto;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13.5px;
	color: #4f46e5;
	font-weight: 700;
}
.fz-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 9px;
	font-family: Consolas, "Courier New", monospace;
	font-size: 14px;
	color: #1f2937;
	background: #fff;
}
.fz-input:focus {
	outline: none;
	border-color: #a5b4fc;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.fz-input.is-ok {
	border-color: #86efac;
	background: #f0fdf4;
	color: #14532d;
}
.fz-input.is-bad {
	border-color: #fca5a5;
	background: #fef2f2;
	color: #b91c1c;
}
.fz-mark {
	flex: 0 0 16px;
	font-style: normal;
	font-size: 15px;
	font-weight: 700;
	color: #16a34a;
}

/* ================================================================
 * 冰火人
 * ================================================================ */
.ice {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ice-hud {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	font-weight: 700;
	color: #475569;
}
.ice-lv {
	color: #312e5c;
}
.ice-gem {
	color: #7c3aed;
	font-variant-numeric: tabular-nums;
}
.ice-mini {
	margin-left: auto;
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #64748b;
	font-family: inherit;
	font-size: 12px;
	cursor: pointer;
}
.ice-mini:hover {
	border-color: #c7d2fe;
	color: #4f46e5;
}
.ice-canvas {
	display: block;
	width: 100%;
	max-width: 720px;
	height: auto;
	border-radius: 14px;
	background: #111827;
	touch-action: none;
}
.ice-keys {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
	color: #64748b;
}
.ice-k {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}
.ice-k b {
	display: inline-block;
	min-width: 18px;
	padding: 1px 5px;
	border-radius: 4px;
	background: #fff;
	border: 1px solid #e2e8f0;
	font-size: 11px;
	text-align: center;
	color: #475569;
}
.ice-k.fire {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #c2410c;
}
.ice-k.fire b {
	border-color: #fdba74;
	color: #9a3412;
}
.ice-k.water {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1d4ed8;
}
.ice-k.water b {
	border-color: #93c5fd;
	color: #1e40af;
}
.ice-k.tip {
	background: #f8fafc;
	color: #94a3b8;
}
.ice-msg {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.7;
	color: #64748b;
	min-height: 20px;
}
.ice-msg.is-bad {
	color: #b91c1c;
}
.ice-msg.is-win {
	color: #15803d;
	font-weight: 700;
}

/* ================================================================
 * 吃豆人
 * ================================================================ */
.pac {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}
.pac-top {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.pac-start {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	font-size: 12.5px;
	color: #64748b;
}
.pac-nums {
	display: flex;
	gap: 5px;
}
.pac-num {
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #64748b;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: all .13s ease;
}
.pac-num:hover {
	border-color: #c7d2fe;
}
.pac-num.is-on {
	border-color: #6366f1;
	background: #eef2ff;
	color: #4338ca;
}
.pac-scores {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 12.5px;
}
.pac-sc {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	color: #475569;
}
.pac-sc.is-out {
	opacity: .45;
}
.pac-sc b {
	color: #1f2937;
	font-variant-numeric: tabular-nums;
	min-width: 22px;
}
.pac-sc em {
	font-style: normal;
	font-size: 10.5px;
	color: #ef4444;
	letter-spacing: -.5px;
}
.pac-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--c, #facc15);
	flex: 0 0 auto;
}
.pac-rest {
	margin-left: auto;
	font-size: 12px;
	color: #94a3b8;
}
.pac-canvas {
	display: block;
	width: 100%;
	max-width: 418px;
	height: auto;
	border-radius: 14px;
	background: #0b1020;
	touch-action: none;
}
.pac-keys {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	justify-content: center;
	font-size: 11.5px;
	color: #94a3b8;
}
.pac-keys span {
	padding: 4px 9px;
	border-radius: 7px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}
.pac-keys b {
	color: #475569;
}
.pac-note {
	margin: 0;
	font-size: 12px;
	line-height: 1.7;
	color: #a8b0bd;
	text-align: center;
	max-width: 460px;
}

@media (max-width: 720px) {
	.fz-opts {
		grid-template-columns: minmax(0, 1fr);
	}
	.fz-code {
		font-size: 12px;
		padding: 11px 12px;
	}
	.fz-line code {
		font-size: 12px;
	}
	.fz-end {
		padding: 26px 14px;
	}
	.fz-btn {
		padding: 9px 16px;
		font-size: 13px;
	}
	.ice-keys .ice-k.tip {
		display: none;
	}
	.pac-rest {
		margin-left: 0;
	}
}

/* 大厅卡片自适应列数 */
.fun-cards {
	grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
}

/* ================================================================
 * 双人拳皇
 * ================================================================ */
.ft {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}
.ft-hud {
	width: 100%;
	max-width: 720px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.ft-bar {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.ft-bar.right {
	align-items: flex-end;
}
.ft-name {
	font-size: 12px;
	font-weight: 700;
	color: #475569;
}
.ft-hp {
	width: 100%;
	height: 14px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
	border: 1px solid #dbe3ef;
}
.ft-hp i {
	display: block;
	height: 100%;
	width: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #f97316, #ef4444);
	transition: width .18s ease;
}
.ft-bar.right .ft-hp i {
	margin-left: auto;
	background: linear-gradient(90deg, #2563eb, #38bdf8);
}
.ft-vs {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 800;
	color: #c7d2fe;
	letter-spacing: .08em;
}
.ft-canvas {
	display: block;
	width: 100%;
	max-width: 720px;
	height: auto;
	border-radius: 14px;
	background: #1e1b4b;
	touch-action: none;
}
.ft-keys {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 11.5px;
	color: #64748b;
	justify-content: center;
}
.ft-keys span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}
.ft-keys b {
	display: inline-block;
	min-width: 17px;
	padding: 1px 4px;
	border-radius: 4px;
	background: #fff;
	border: 1px solid #e2e8f0;
	font-size: 10.5px;
	text-align: center;
}
.ft-keys .p1 {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #c2410c;
}
.ft-keys .p2 {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1d4ed8;
}
.ft-ctl {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}
.ft-btn {
	padding: 8px 15px;
	border: 1px solid #e2e8f0;
	border-radius: 9px;
	background: #fff;
	color: #475569;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: all .13s ease;
}
.ft-btn:hover {
	border-color: #c7d2fe;
	color: #4338ca;
}
.ft-btn.is-on {
	border-color: #6366f1;
	background: #eef2ff;
	color: #4338ca;
}
.ft-btn.ghost {
	border-style: dashed;
}
.ft-msg {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.7;
	color: #94a3b8;
	text-align: center;
	min-height: 20px;
}
.ft-msg.is-win {
	color: #15803d;
	font-weight: 700;
}
