@font-face {
	font-family: Kuro;
	src: url(Kuro-Regular.otf);
}

body {
	margin: 0;
	padding: 0;
	font-family: Kuro, sans-serif;
	background: #111;
	color: #eee;
	height: 100vh;
	font-size: 16px;
}

.screen {
	position: absolute;
	width: 100vw;
	height: 100vh;
}

.hidden {
	display: none !important;
}

.center {
	display: grid;
	align-content: center;
	justify-content: center;
	align-items: center;
	justify-items: center;
}

.grid {
	display: grid;
	align-items: center;
	gap: 5px;
}

.grid-2 {
	grid-template-columns: max-content auto;
}

.box {
	background-color: #333;
	border: 1px solid #666;
	padding: 15px;
	border-radius: 10px;
}

h1, h2, h3 {
	margin-top: 2px;
	margin-bottom: 12px;
	color: #fff;
}

input, select {
	padding: 10px;
	border: none;
	border-radius: 4px;
	background: #222;
	color: #eee;
	font-size: 1rem;
	font-family: Kuro;
	appearance: none;
}

select {
	cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
	background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

select:hover {
	background-color: #2a2a2a;
}

option {
	background: #222;
	color: #eee;
	font-family: Kuro;
}

button {
	padding: 8px;
	border: none;
	border-radius: 4px;
	background: #4a8cff;
	color: #fff;
	font-family: Kuro;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	transition: background 0.2s;
	text-transform: capitalize;
}

button:hover {
	background: #3a7be0;
}

.error {
	color: #ff6b6b;
	margin-top: 10px;
	margin-bottom: 10px;
}

label {
	text-transform: capitalize;
}

#login_form {
	text-align: center;
}

#game {
	display: grid;
	grid-template-rows: 1fr 40px;
	height: 100%;
	z-index: 100;
}

#world {
	background: #445;
	background-image: url('./grid.png');
	position: relative;
	overflow: hidden;
	z-index: 1;
}

#toolbar {
	position: absolute;
	left: 50%;
	bottom: 44px;
	transform: translateX(-50%);
	display: flex;
	gap: 16px;
	padding: 8px 12px;
	background: rgba(20, 22, 25, 0.75);
	border: 1px solid #2c2f33;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.35);
	backdrop-filter: blur(6px);
	z-index: 500;
	pointer-events: auto;
}

#toolbar div {
	cursor: pointer;
	color: #fff;
	transition: color 0.5s ease;
}

#toolbar div:hover {
	color: #555;
}

#infobar {
	background: #222;
	color: #fff;
	display: flex;
	align-items: center;
	padding: 0 20px;
	flex-direction: row;
	justify-content: center;
}

#infobar div {
	padding: 5px 10px;
	border-radius: 5px;
	background-color: #333;
	margin: 0 5px;
}

#mapSvg, #layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

svg {
	transform-origin: 0 0;
}

#zoneLayer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	transform-origin: 0 0;
	pointer-events: none;
}

.zone {
	position: absolute;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	cursor: pointer;
}

.zone-city { background: #ff4444; }
.zone-village { background: #ffaa00; }
.zone-forest { background: #228833; }

#windows {
	position: fixed;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	z-index: 100;
}

.window {
	position: absolute;
	background: #1c1f22;
	border: 1px solid #2c2f33;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.45);
	min-width: 240px;
	min-height: 120px;
	overflow: hidden;
	pointer-events: auto;
	color: #d6d8da;
	display: flex;
	flex-direction: column;
}

.window-header {
	height: 34px;
	background: linear-gradient(#2a2d31, #232629);
	color: #e6e7e8;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 10px;
	cursor: grab;
	user-select: none;
	border-bottom: 1px solid #1a1c1e;
}

.window-header:active {
	cursor: grabbing;
}

.window-title {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.3px;
}

.window-close {
	background: transparent;
	border: none;
	color: #c8c9ca;
	font-size: 18px;
	cursor: pointer;
	padding: 0 4px;
	transition: color 0.15s ease;
}

.window-close:hover {
	color: #ff5f5f;
}

.window-content {
	flex: 1;
	overflow: auto;
	padding: 4px 12px 12px 12px;
	font-size: 14px;
	color: #d6d8da;
}

.window-resize {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 14px;
	height: 14px;
	cursor: se-resize;
	background: linear-gradient(135deg, transparent 0%, transparent 50%, #444 50%, #444 100%);
}

.window-prompt {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.window-prompt-message {
	font-size: 14px;
	color: #d6d8da;
}

.window-prompt-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.window-prompt-buttons button {
	padding: 6px 12px;
	border: 1px solid #3a3d40;
	background: #2a2d31;
	color: #d6d8da;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.window-prompt-buttons button:hover {
	background: #34373b;
	border-color: #4a4d50;
}

.window-input {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.window-input-message {
	font-size: 14px;
	color: #d6d8da;
}

.window-input-field {
	padding: 6px 8px;
	border: 1px solid #3a3d40;
	border-radius: 4px;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	background: #1a1c1e;
	color: #e6e7e8;
	transition: border-color 0.15s ease;
}

.window-input-field:focus {
	border-color: #5a9cff;
	outline: none;
}

.window-input-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.window-input-buttons button {
	padding: 6px 12px;
	border: 1px solid #3a3d40;
	background: #2a2d31;
	color: #d6d8da;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.window-input-buttons button:hover {
	background: #34373b;
	border-color: #4a4d50;
}

#menu {
	z-index: 1050;
	background-color: rgba(0, 0, 0, 0.5);
}

#connect {
	z-index: 1100;
	background-image: url("./background.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

#connect h1 {
	text-align: center;
	text-shadow: 0 0 5px #666;
}

#connect button {
	margin-top: 10px;
	width: 100%;
}

#overlay {
	z-index: 1200;
	background-image: url("./background.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

hr {
	border: 0;
	border-top: 1px solid #4a8cff;
	opacity: 0.4;
	margin: 12px 0;
}

.margin {
	margin: 3px;
}

.bold {
	font-weight: bold;
}