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

html, body {
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 13px;
	background: #1e1e1e;
	color: #ccc;
}

#toolbar {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	background: #2d2d2d;
	border-bottom: 1px solid #444;
	height: 38px;
}

.tool-btn {
	padding: 4px 12px;
	background: #3a3a3a;
	border: 1px solid #555;
	color: #ccc;
	cursor: pointer;
	border-radius: 3px;
	font-size: 12px;
	transition: background 0.15s;
}

.tool-btn:hover {
	background: #4a4a4a;
}

.tool-btn.active {
	background: #0078d4;
	border-color: #0078d4;
	color: #fff;
}

#main {
	display: flex;
	height: calc(100vh - 38px - 32px);
}

#object-panel {
	width: 200px;
	min-width: 200px;
	background: #252525;
	border-right: 1px solid #444;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#object-panel-header {
	padding: 8px 10px;
	background: #2d2d2d;
	border-bottom: 1px solid #444;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #999;
}

#object-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
}

.object-group-header {
	padding: 6px 10px 4px;
	font-size: 11px;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.object-list-item {
	padding: 5px 10px 5px 20px;
	cursor: pointer;
	border-left: 3px solid transparent;
	transition: background 0.1s;
}

.object-list-item:hover {
	background: #333;
}

.object-list-item.selected {
	background: #0078d433;
	border-left-color: #0078d4;
}

.object-name {
	font-size: 12px;
}

#canvas-container {
	flex: 1;
	position: relative;
	overflow: hidden;
	background: #1a1a2e;
}

#canvas {
	width: 100%;
	height: 100%;
	display: block;
}

.map-label {
	font-family: 'Georgia', serif;
	fill: #333;
	stroke: rgba(255,255,255,0.6);
	paint-order: stroke fill;
	pointer-events: none;
}

.river-label {
	fill: #2a5a8a;
	stroke: rgba(255,255,255,0.5);
}

#properties-panel {
	width: 240px;
	min-width: 240px;
	background: #252525;
	border-left: 1px solid #444;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#properties-header {
	padding: 8px 10px;
	background: #2d2d2d;
	border-bottom: 1px solid #444;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #999;
}

#properties-content {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}

.no-selection {
	padding: 20px 10px;
	text-align: center;
	color: #666;
	font-style: italic;
}

.prop-field {
	margin-bottom: 10px;
}

.prop-field label {
	display: block;
	font-size: 11px;
	color: #999;
	margin-bottom: 3px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.prop-field input[type="text"],
.prop-field input[type="number"],
.prop-field select {
	width: 100%;
	padding: 4px 6px;
	background: #333;
	border: 1px solid #555;
	color: #ddd;
	border-radius: 3px;
	font-size: 12px;
}

.prop-field input[type="text"]:focus,
.prop-field input[type="number"]:focus,
.prop-field select:focus {
	outline: none;
	border-color: #0078d4;
}

.prop-field input[type="color"] {
	width: 100%;
	height: 28px;
	padding: 2px;
	background: #333;
	border: 1px solid #555;
	border-radius: 3px;
	cursor: pointer;
}

.prop-field input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.range-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.range-wrap input[type="range"] {
	flex: 1;
	accent-color: #0078d4;
}

.range-value {
	font-size: 11px;
	color: #aaa;
	min-width: 40px;
	text-align: right;
}

#statusbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 10px;
	background: #2d2d2d;
	border-top: 1px solid #444;
	height: 32px;
	font-size: 12px;
}

#status-info {
	color: #999;
}

#status-actions {
	display: flex;
	gap: 6px;
}

#status-actions button {
	padding: 2px 10px;
	background: #3a3a3a;
	border: 1px solid #555;
	color: #ccc;
	cursor: pointer;
	border-radius: 3px;
	font-size: 11px;
}

#status-actions button:hover {
	background: #4a4a4a;
}

#object-list::-webkit-scrollbar,
#properties-content::-webkit-scrollbar {
	width: 6px;
}

#object-list::-webkit-scrollbar-track,
#properties-content::-webkit-scrollbar-track {
	background: transparent;
}

#object-list::-webkit-scrollbar-thumb,
#properties-content::-webkit-scrollbar-thumb {
	background: #555;
	border-radius: 3px;
}
