:root {
	--bg-1: #120f0d;
	--bg-2: #2a1d16;
	--panel: rgba(25, 19, 16, 0.88);
	--panel-soft: rgba(41, 31, 25, 0.82);
	--stroke: rgba(255, 232, 194, 0.18);
	--text: #f5eddc;
	--muted: #cfbfaa;
	--accent: #f5bb63;
	--danger: #f36f5d;
	--safe: #bddb8e;
	--water: #1d4f63;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: "Space Grotesk", sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at top, rgba(216, 108, 78, 0.28), transparent 28%),
		radial-gradient(circle at right, rgba(94, 149, 168, 0.16), transparent 20%),
		linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

button {
	font: inherit;
}

.app-shell {
	width: min(1180px, calc(100vw - 24px));
	margin: 0 auto;
	padding: 18px 0 28px;
}

.hero-strip {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	padding: 18px 22px;
	margin-bottom: 16px;
	border: 1px solid var(--stroke);
	border-radius: 24px;
	background: linear-gradient(135deg, rgba(59, 37, 28, 0.95), rgba(18, 15, 13, 0.82));
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.eyebrow {
	margin: 0 0 6px;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.78rem;
	color: var(--accent);
}

h1,
h2 {
	margin: 0;
	font-family: "Bebas Neue", sans-serif;
	letter-spacing: 0.04em;
	font-weight: 400;
}

h1 {
	font-size: clamp(2.8rem, 7vw, 4.5rem);
	line-height: 0.95;
}

.subtitle {
	max-width: 620px;
	margin: 8px 0 0;
	color: var(--muted);
}

.hero-stats {
	display: grid;
	gap: 10px;
	min-width: 180px;
}

.hero-stats div {
	padding: 14px 16px;
	border-radius: 18px;
	background: rgba(255, 244, 223, 0.06);
	border: 1px solid rgba(255, 233, 199, 0.12);
}

.hero-stats span {
	display: block;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
}

.hero-stats strong {
	display: block;
	margin-top: 5px;
	font-size: 1.05rem;
}

.board-wrap {
	position: relative;
	border-radius: 26px;
	overflow: hidden;
	border: 1px solid var(--stroke);
	background: #0d0b0a;
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
}

#game {
	display: block;
	width: 100%;
	height: auto;
	background: linear-gradient(180deg, #6a8561, #4d6448);
}

.board-money,
.board-controls,
.tower-popup,
.boss-bar {
	position: absolute;
	z-index: 2;
	backdrop-filter: blur(10px);
}

.board-money {
	top: 14px;
	left: 14px;
	min-width: 148px;
	padding: 12px 14px;
	border-radius: 18px;
	background: var(--panel);
	border: 1px solid rgba(255, 244, 223, 0.12);
}

.money-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.money-row:last-child {
	margin-bottom: 0;
}

.money-row span {
	color: var(--muted);
}

.board-controls {
	top: 14px;
	right: 14px;
	width: 220px;
	padding: 12px;
	border-radius: 18px;
	background: var(--panel);
	border: 1px solid rgba(255, 244, 223, 0.12);
	display: grid;
	gap: 8px;
}

.board-controls button,
.popup-actions button,
.path-chooser button,
.tower-card button {
	border: 0;
	border-radius: 14px;
	padding: 10px 12px;
	color: #201611;
	background: linear-gradient(180deg, #ffd590, #e8a546);
	cursor: pointer;
	transition: transform 0.14s ease, filter 0.14s ease, opacity 0.14s ease;
}

.board-controls button:hover,
.popup-actions button:hover,
.path-chooser button:hover,
.tower-card button:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
}

.board-controls button:disabled,
.popup-actions button:disabled,
.path-chooser button:disabled,
.tower-card button:disabled,
.muted {
	opacity: 0.45;
	cursor: default;
	transform: none;
	filter: none;
}

.hint,
.log,
.board-loadout p,
.tower-card p,
.tower-popup p {
	margin: 0;
	color: var(--muted);
}

.log {
	min-height: 36px;
}

.boss-bar {
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	width: min(480px, calc(100% - 280px));
	padding: 12px 14px;
	border-radius: 18px;
	background: rgba(40, 16, 12, 0.9);
	border: 1px solid rgba(255, 147, 117, 0.24);
}

.hidden {
	display: none !important;
}

.boss-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.boss-track {
	height: 14px;
	border-radius: 999px;
	background: rgba(255, 220, 208, 0.12);
	overflow: hidden;
}

.boss-fill {
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #ff7c64, #ffd07f);
}

.tower-popup {
	width: 232px;
	padding: 14px;
	border-radius: 18px;
	background: var(--panel-soft);
	border: 1px solid rgba(255, 244, 223, 0.16);
}

.path-chooser,
.popup-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 12px;
}

.path-chooser button.active {
	outline: 2px solid rgba(160, 237, 255, 0.72);
}

.board-loadout {
	margin-top: 16px;
	padding: 18px;
	border-radius: 24px;
	border: 1px solid var(--stroke);
	background: linear-gradient(180deg, rgba(27, 20, 17, 0.94), rgba(18, 15, 13, 0.84));
}

.loadout-header {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 16px;
	margin-bottom: 14px;
}

.tower-picker {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
	gap: 12px;
}

.tower-card {
	padding: 14px;
	border-radius: 18px;
	background: rgba(255, 244, 223, 0.05);
	border: 1px solid rgba(255, 244, 223, 0.1);
}

.tower-card.active {
	border-color: rgba(162, 236, 255, 0.82);
	box-shadow: inset 0 0 0 1px rgba(162, 236, 255, 0.28);
}

.tower-card header {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.tower-card h3 {
	margin: 0;
	font-size: 1rem;
}

.tower-card strong {
	color: var(--accent);
}

@media (max-width: 860px) {
	.hero-strip,
	.loadout-header {
		grid-template-columns: 1fr;
		display: grid;
	}

	.board-controls,
	.board-money {
		position: static;
		margin: 12px;
	}

	.boss-bar {
		width: calc(100% - 24px);
	}

	.board-wrap {
		padding-top: 0;
	}
}
