:root {
	color-scheme: dark;
	--phosphor: #33ff33;
	--phosphor-dim: #1a8c1a;
	--phosphor-glow: #33ff3380;
	--phosphor-bright: #88ff88;
	--screen-bg: #0a0a0a;
	font-family: 'Courier New', Courier, monospace;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html, body {
	height: 100%;
	width: 100%;
	overflow: hidden;
}

body {
	background: #0a0a0a;
	display: flex;
}

.crt-screen {
	width: 100%;
	height: 100vh;
	background: var(--screen-bg);
	position: relative;
	overflow: hidden;
}

.crt-screen::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
	pointer-events: none;
	z-index: 10;
}

.crt-screen::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 30% 20%, rgba(51, 255, 51, 0.03) 0%, transparent 60%);
	pointer-events: none;
	z-index: 11;
}

.scanlines {
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(to bottom,
			transparent 0px,
			transparent 2px,
			rgba(0, 0, 0, 0.12) 2px,
			rgba(0, 0, 0, 0.12) 4px);
	pointer-events: none;
	z-index: 12;
}

.crt-flicker {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 13;
	animation: crt-flicker 0.1s infinite;
	opacity: 0.02;
	background: white;
}

@keyframes crt-flicker {
	0%, 100% {
		opacity: 0.02;
	}

	50% {
		opacity: 0.01;
	}
}

.terminal {
	height: 100vh;
	overflow-y: auto;
	padding: 24px 32px;
	position: relative;
	z-index: 5;
	scrollbar-width: none;
}

.terminal::-webkit-scrollbar {
	display: none;
}

.terminal__output {
	color: var(--phosphor);
	font-size: 18px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;

}

.terminal__output .line {
	display: block;
	min-height: 1.5em;
}

.terminal__output .line--user {
	color: var(--phosphor-bright);
}

.terminal__output .line--dim {
	color: var(--phosphor-dim);
}

.terminal__output .line--bright {
	color: #ffffff;

}

.terminal__output .line--warning {
	color: #ff5533;

}

.terminal__input-line {
	display: flex;
	align-items: center;
	margin-top: 4px;
	color: var(--phosphor);
	font-size: 18px;
}

.terminal__prompt {
	flex-shrink: 0;
}

.terminal__input {
	background: transparent;
	border: none;
	outline: none;
	color: var(--phosphor-bright);
	font-family: 'Courier New', Courier, monospace;
	font-size: 18px;
	flex: 1;
	caret-color: transparent;
	text-transform: uppercase;
}

.terminal__cursor {
	display: inline-block;
	width: 10px;
	height: 20px;
	background: var(--phosphor);
	animation: blink 1s step-end infinite;

	margin-left: -2px;
	flex-shrink: 0;
}

@keyframes blink {
	0%, 100% {
		opacity: 1;
	}

	50% {
		opacity: 0;
	}
}

/* WAR OVERLAY */
.war-overlay {
	position: fixed;
	inset: 0;
	background: #0a0a0a;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.war-overlay canvas {
	max-width: 95vw;
	max-height: 70vh;
	border: 1px solid var(--phosphor-dim);
	box-shadow: 0 0 30px rgba(51, 255, 51, 0.1);
}

.war-overlay__status {
	color: var(--phosphor);
	font-size: 22px;
	margin-top: 20px;
	text-shadow: 0 0 8px var(--phosphor-glow);
	text-align: center;
	letter-spacing: 2px;
	min-height: 60px;
	font-family: 'Courier New', Courier, monospace;
}

.ttt-board {
	display: inline-block;
	color: var(--phosphor);
	font-size: 18px;
	line-height: 1.4;
}

@media (max-width: 640px) {
	.terminal {
		padding: 16px;
	}

	.terminal__output, .terminal__input, .terminal__input-line {
		font-size: 14px;
	}
}