@import '/css/core.css';

@import '/css/elements/headings.css';
@import '/css/elements/main.css';

@import '/css/components/panel.css';

@import '/css/composites/quick-stats.css';

#game-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background-color: #000;
	position: relative;
}

#health-container {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	align-self: flex-start;
	margin-left: calc(50% - 300px);
}

#health-container .label {
	color: #aaa;
	font-size: 12px;
}

#game-canvas {
	border: 2px solid #333;
}

#xp-bar-container {
	width: 600px;
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 15px;
}

#level-section {
	display: flex;
	align-items: baseline;
	gap: 5px;
	min-width: 80px;
}

#level-section .label {
	color: #aaa;
	font-size: 12px;
}

#level-section .value {
	color: #4caf50;
	font-size: 18px;
	font-weight: bold;
}

#xp-bar-container .xp-bar {
	flex: 1;
	height: 20px;
	background-color: #1a1a1a;
	border: 1px solid #333;
	position: relative;
	overflow: hidden;
}

#xp-bar-container .xp-fill {
	height: 100%;
	background-color: #4caf50;
	transition: width 0.3s ease;
}

#xp-text-section {
	min-width: 70px;
	text-align: right;
}

#xp-text-section span {
	color: #aaa;
	font-size: 12px;
	font-weight: bold;
}

#notifications-container {
	position: absolute;
	top: calc(100% / 2 + 210px);
	left: 50%;
	transform: translateX(-50%);
	width: 600px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

#notifications-container > * {
	pointer-events: auto;
}

.stat-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 14px;
}

.stat-label {
	color: #aaa;
}

.stat-value {
	font-weight: bold;
	color: #fff;
}

.stat-button {
	background-color: #4caf50;
	color: white;
	border: none;
	padding: 2px 8px;
	cursor: pointer;
	font-size: 12px;
	margin-left: 8px;
	font-family: 'Courier New', monospace;
}

.stat-button:hover {
	background-color: #45a049;
}

.stat-button:disabled {
	background-color: #333;
	cursor: not-allowed;
	color: #666;
}

.controls-info {
	color: #aaa;
	display: flex;
	flex-direction: column;
	font-size: 12px;
	gap: 6px;
	line-height: 1.6;
}

ul.controls-info {
	padding-inline-start: 1em;
}

.key {
	background-color: #333;
	padding: 2px 6px;
	border-radius: 3px;
	color: #fff;
	font-weight: bold;
}

.alert-message {
	background-color: #ff5722;
	color: white;
	padding: 10px;
	border-radius: 4px;
	margin-bottom: 15px;
	font-size: 12px;
	text-align: center;
	animation: pulse 2s infinite;
}

.stat-points-notification {
	background-color: #4caf50;
	color: white;
	padding: 10px;
	border-radius: 4px;
	margin-bottom: 15px;
	font-size: 12px;
	text-align: center;
	font-weight: bold;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.overlay-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: none;
	z-index: 99;
}

#pause-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: rgba(0, 0, 0, 0.9);
	padding: 30px 50px;
	border: 3px solid #4caf50;
	border-radius: 8px;
	text-align: center;
	display: none;
	z-index: 100;
}

#pause-overlay h1 {
	color: #4caf50;
	font-size: 32px;
	margin-bottom: 15px;
}

#pause-overlay p {
	color: #aaa;
	font-size: 14px;
	margin-bottom: 20px;
}

#start-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.95);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

#start-screen h1 {
	color: #4caf50;
	font-size: 48px;
	margin-bottom: 40px;
}

#color-selection-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.95);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

#color-selection-screen h1 {
	color: #4caf50;
	font-size: 48px;
	margin-bottom: 20px;
}

.color-options {
	display: flex;
	gap: 30px;
	margin-top: 20px;
}

.color-button {
	background-color: #222;
	border: 2px solid #444;
	padding: 20px;
	cursor: pointer;
	font-family: 'Courier New', monospace;
	font-size: 16px;
	color: #ccc;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	transition: all 0.2s;
	min-width: 120px;
}

.color-button:hover {
	border-color: #4caf50;
	background-color: #333;
	transform: translateY(-2px);
}

.color-preview {
	width: 60px;
	height: 60px;
	border: 2px solid #666;
	border-radius: 4px;
}

.color-preview.yellow {
	background-color: #ffeb3b;
}

.color-preview.green {
	background-color: #4caf50;
}

.color-preview.blue {
	background-color: #2196f3;
}

.menu-button {
	background-color: #4caf50;
	color: black;
	border: none;
	padding: 12px 30px;
	font-size: 16px;
	cursor: pointer;
	font-family: 'Courier New', monospace;
	margin: 5px;
}

.menu-button:hover {
	background-color: #45a049;
}

.menu-button.secondary {
	background-color: #666;
}

.menu-button.secondary:hover {
	background-color: #555;
}

#game-over {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: rgba(0, 0, 0, 0.9);
	padding: 40px;
	border: 3px solid #ff5722;
	border-radius: 8px;
	text-align: center;
	display: none;
	z-index: 100;
}

#game-over h1 {
	color: #ff5722;
	font-size: 36px;
	margin-bottom: 20px;
}

#levelup-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: none;
	z-index: 99;
}

#levelup-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: rgba(0, 0, 0, 0.9);
	padding: 40px;
	border: 3px solid #4caf50;
	border-radius: 8px;
	text-align: center;
	display: none;
	z-index: 100;
	min-width: 400px;
}

#levelup-overlay h1 {
	color: #4caf50;
	font-size: 36px;
	margin-bottom: 15px;
}

#levelup-overlay p {
	color: #aaa;
	font-size: 16px;
	margin-bottom: 30px;
}

#upgrade-options {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 20px;
}

.upgrade-button {
	background-color: #2a2a2a;
	border: 2px solid #4caf50;
	color: white;
	padding: 20px;
	font-size: 16px;
	cursor: pointer;
	font-family: 'Courier New', monospace;
	text-align: left;
	transition: all 0.2s;
}

.upgrade-button:hover {
	background-color: #4caf50;
	transform: translateX(5px);
}

.upgrade-button .upgrade-name {
	display: block;
	font-size: 20px;
	font-weight: bold;
	color: #4caf50;
	margin-bottom: 8px;
}

.upgrade-button:hover .upgrade-name {
	color: white;
}

.upgrade-button .upgrade-description {
	display: block;
	font-size: 14px;
	color: #aaa;
}

.upgrade-button:hover .upgrade-description {
	color: white;
}

#first-move-overlay {
	position: absolute;
	top: calc(50% + 220px);
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	display: none;
	z-index: 100;
}

#first-move-overlay p {
	color: #4caf50;
	font-size: 18px;
	margin: 0;
	font-weight: bold;
	animation: pulse 2s infinite;
}
