.game-wrap {
	padding: 10px 0 24px;
}

.sf-panel {
	box-shadow: var(--shadow);
}

.sf-head {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--gap);
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
}

.sf-title {
	margin: 0 0 6px;
	font-size: 16px;
}

.sf-msg {
	margin: 0;
	color: var(--muted);
}

.sf-stats {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

/* Difficulty row */
.sf-diff {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
}

.sf-diff-label {
	align-self: center;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: var(--muted);
}

.sf-diff .seg {
	flex-wrap: wrap;
}

.sf-diff .btn {
	padding: 8px 12px;
}

.sf-diff .is-active {
	background: linear-gradient(180deg, var(--accent-light), var(--accent));
	color: #fff;
	border: none;
	box-shadow: 0 10px 28px var(--accent-weak);
}

.sf-controls {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
}

.sf-controls .btn {
	padding: 8px 12px;
}

.sf-stage {
	position: relative;
	aspect-ratio: 16 / 9;
	width: 100%;
	background: #05070c url("../images/spacefighter/space.png") center/cover no-repeat;
	overflow: hidden;
	image-rendering: pixelated;
	border-bottom-left-radius: var(--radius);
	border-bottom-right-radius: var(--radius);
}

.sf-line {
	position: absolute;
	left: 0;
	right: 0;
	height: 3px;
	background: #00474f;
	bottom: 80px;
	opacity: .9;
}

.sf-player,
.sf-enemy,
.sf-bullet {
	position: absolute;
	transform: translate(0, 0);
	will-change: transform;
}

.sf-player {
	width: 32px;
	height: 32px;
	background: url("../images/spacefighter/fighter.png") no-repeat center/cover;
	image-rendering: pixelated;
}

.sf-enemy {
	width: 32px;
	height: 32px;
	background: url("../images/spacefighter/alienship.png") no-repeat center/cover;
	image-rendering: pixelated;
}

.sf-bullet {
	width: 5px;
	height: 15px;
	background: #ff5858;
	border-radius: 3px;
	box-shadow: 0 0 8px rgba(255, 88, 88, .6);
}

.sf-overlay {
	position: absolute;
	inset: 0;
	display: none;
	place-items: center;
	background: rgba(0, 0, 0, .35);
	backdrop-filter: blur(2px);
}

.sf-card {
	width: min(420px, 92vw);
	border: 1px solid var(--border);
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
	padding: 18px;
	box-shadow: var(--shadow);
	text-align: center;
}

.sf-card h3 {
	margin: 0 0 8px;
}

.sf-card p {
	color: var(--muted);
	margin: 0 0 14px;
}

.sf-key {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 2px 6px;
}

.sf-overlay .seg {
	justify-content: center;
}

@media (max-width: 760px) {
	.sf-head {
		grid-template-columns: 1fr;
	}
}