/* [sx]-TETRIS — pseudographic falling-blocks overlay */

#sx-tetris-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: rgba(4, 5, 14, 0.96);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
	font-family: ui-monospace, Menlo, Monaco, Consolas, "Courier New", monospace;
}
#sx-tetris-overlay * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* close button pinned to the very top right of the page */
.sxt-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 40;
	width: 48px;
	height: 48px;
	background: rgba(4, 5, 14, 0.8);
	border: 1px solid #2a3cff;
	color: #aab2ff;
	font: inherit;
	font-size: 22px;
	line-height: 1;
	border-radius: 8px;
	cursor: pointer;
}
.sxt-close:hover {
	background: #2a3cff;
	color: #fff;
}
@media (max-width: 640px), (pointer: coarse) {
	.sxt-close {
		top: 8px;
		right: 8px;
		width: 58px;
		height: 58px;
		font-size: 28px;
	}
}

.sxt-frame {
	background: #04050e;
	border: 2px solid #2a3cff;
	border-radius: 8px;
	box-shadow: 0 0 24px rgba(42, 60, 255, 0.45), inset 0 0 60px rgba(42, 60, 255, 0.07);
	padding: 10px 14px 8px;
	transform-origin: center center;
}

/* title above the playfield */
.sxt-title {
	text-align: center;
	padding: 4px 40px 10px;
}
.sxt-title-main {
	color: #ffe737;
	font-size: 20px;
	font-weight: bold;
	letter-spacing: 2px;
	text-shadow: 0 0 10px rgba(255, 231, 55, 0.6);
}
.sxt-title-sub {
	color: #8f99e8;
	font-size: 12px;
	margin: 5px auto 0;
	max-width: 560px;
	line-height: 1.5;
}

.sxt-hud {
	display: flex;
	gap: 18px;
	color: #aab2ff;
	font-size: 13px;
	letter-spacing: 1px;
	padding: 0 2px 8px;
	justify-content: center;
}
.sxt-hud b {
	color: #fff;
}

.sxt-play {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	justify-content: center;
}

.sxt-board-wrap {
	position: relative;
	background: #04050e;
	border: 1px solid #141a52;
	overflow: hidden;
	line-height: 0;
}
.sxt-board {
	display: block;
}

/* equal-width flanks keep the playfield dead-centre */
.sxt-side {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 92px;
	flex: 0 0 92px;
}
.sxt-side-left { align-items: flex-start; }
.sxt-side-right { align-items: flex-start; }
.sxt-panel {
	background: #04050e;
	border: 1px solid #141a52;
	border-radius: 6px;
	padding: 6px;
}
.sxt-panel-label {
	color: #8f99e8;
	font-size: 11px;
	letter-spacing: 2px;
	text-align: center;
	margin-bottom: 5px;
}
.sxt-hold,
.sxt-next {
	display: block;
	margin: 0 auto;
}

/* center message */
.sxt-msg {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 9;
	text-align: center;
	background: rgba(4, 5, 14, 0.85);
	border: 1px solid #2a3cff;
	border-radius: 6px;
	padding: 16px 26px;
	max-width: 90%;
	line-height: 1.2;
}
.sxt-msg-main {
	color: #ffe737;
	font-size: 20px;
	font-weight: bold;
	letter-spacing: 2px;
	text-shadow: 0 0 10px rgba(255, 231, 55, 0.7);
	white-space: pre-line;
}
.sxt-msg-sub {
	color: #8f99e8;
	font-size: 12px;
	margin-top: 9px;
}
.sxt-msg-sub:empty {
	display: none;
}

/* CRT scanlines */
.sxt-crt {
	position: absolute;
	inset: 0;
	z-index: 20;
	pointer-events: none;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.025) 0 1px,
		transparent 1px 3px
	);
}

.sxt-foot {
	color: #5560a8;
	font-size: 11px;
	letter-spacing: 1px;
	padding: 10px 2px 2px;
	text-align: center;
}

/* the launch link inside post content */
.sx-tetris-launch {
	cursor: pointer;
}
