:root {
	--xp-titlebar-a: #0a58d9;
	--xp-titlebar-b: #3f8cf3;
	--xp-titlebar-c: #1657d6;
	--xp-face: #ece9d8;
	--xp-border: #0a246a;
	--xp-select: #316ac5;
	--xp-btn-red: #e81123;
	--ink: #1a1a1a;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
	font-family: Tahoma, "Segoe UI", Verdana, Arial, sans-serif;
	overflow: hidden;
	user-select: none;
}

#desktop {
	position: relative;
	width: 100%;
	height: 100vh;
	background: url("https://static.wikitide.net/windowswallpaperwiki/c/cf/Bliss.jpg")
		center / cover no-repeat;
}

.xp-window {
	position: absolute;
	background: var(--xp-face);
	border: 1px solid var(--xp-border);
	border-radius: 8px 8px 3px 3px;
	box-shadow: 3px 5px 18px rgba(0, 0, 0, 0.45);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.main-window {
	width: 780px;
	height: 600px;
	left: calc(50% - 390px);
	top: 40px;
}

.titlebar {
	height: 30px;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0 3px 0 6px;
	background: linear-gradient(
		180deg,
		var(--xp-titlebar-b) 0%,
		var(--xp-titlebar-a) 45%,
		var(--xp-titlebar-c) 55%,
		var(--xp-titlebar-a) 100%
	);
	color: #fff;
	font-family: "Trebuchet MS", Tahoma, Arial, sans-serif;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 0.2px;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
	cursor: default;
	border-bottom: 1px solid #0a246a;
}

.titlebar .ttl-icon {
	width: 16px;
	height: 16px;
	margin-right: 6px;
	flex: 0 0 auto;
}

.titlebar .ttl-text {
	flex: 1 1 auto;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.titlebar .win-btns {
	display: flex;
	gap: 2px;
	flex: 0 0 auto;
}

.win-btn {
	width: 21px;
	height: 19px;
	border-radius: 3px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: bold;
	color: #fff;
	background: linear-gradient(180deg, #5b9bf2, #1652c9);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
	cursor: pointer;
}

.win-btn.close {
	background: linear-gradient(180deg, #f37b73, var(--xp-btn-red));
}

.win-btn:hover {
	filter: brightness(1.15);
}

.menubar {
	flex: 0 0 auto;
	background: var(--xp-face);
	border-bottom: 1px solid #aca899;
	display: flex;
	font-size: 12.5px;
	padding: 3px 6px;
	gap: 14px;
	color: #000;
}

.menubar span {
	padding: 2px 4px;
	border-radius: 3px;
}

.menubar span:hover {
	background: #316ac5;
	color: #fff;
}

.toolbar {
	flex: 0 0 auto;
	height: 42px;
	background: linear-gradient(180deg, #fff 0%, #f6f2ea 45%, #ece9d8 100%);
	border-top: 1px solid #fff;
	border-bottom: 1px solid #aca899;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 3px 7px;
}

.tb-btn {
	height: 32px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #222;
	padding: 3px 7px;
	border: 1px solid transparent;
	border-radius: 2px;
	cursor: default;
	white-space: nowrap;
}

.tb-btn:hover {
	border-color: #7f9db9;
	background: linear-gradient(180deg, #fff, #dbeafe);
}

.tb-btn.disabled {
	color: #9c9c9c;
	opacity: 0.65;
}

.tb-btn.disabled:hover {
	border-color: transparent;
	background: transparent;
}

.tb-btn.active {
	border-color: #7f9db9;
	background: linear-gradient(180deg, #fff, #e2eaf6);
	box-shadow: inset 1px 1px 0 #fff;
}

.tb-btn svg {
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}

.tb-btn.small svg {
	width: 22px;
	height: 22px;
}

.tb-caret {
	font-size: 9px;
	margin-left: 1px;
}

.tb-sep {
	width: 1px;
	height: 28px;
	background: #aca899;
	border-right: 1px solid #fff;
	margin: 0 3px;
}

.addressbar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 8px;
	border-bottom: 1px solid #aca899;
	background: var(--xp-face);
	font-size: 12.5px;
}

.addressbar .lbl {
	color: #000;
}

.addr-input {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #7f9db9;
	border-radius: 2px;
	padding: 2px 6px;
	height: 22px;
}

.addr-input svg {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.go-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	background: linear-gradient(180deg, #f7f7f7, #dedede);
	border: 1px solid #8c8c8c;
	border-radius: 2px;
	padding: 2px 10px;
	font-size: 12px;
	height: 22px;
	cursor: pointer;
}

.body-area {
	flex: 1 1 auto;
	display: flex;
	min-height: 0;
}

.sidebar {
	width: 210px;
	flex: 0 0 auto;
	background: #fff;
	border-right: 1px solid #aca899;
	display: flex;
	flex-direction: column;
	overflow: auto;
}

.sidebar-hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--xp-face);

	font-size: 12.5px;
	font-weight: bold;
	padding: 4px 8px;
}

.sidebar-hd .x {
	cursor: pointer;
	font-weight: bold;
	padding: 0 4px;
}

.tree {
	padding: 6px 4px;
	font-size: 12.5px;
	line-height: 20px;
	color: #000;
}

.tree-row {
	display: flex;
	align-items: center;
	gap: 5px;
	padding-left: calc(var(--depth, 0) * 14px);
	border-radius: 2px;
	white-space: nowrap;
}

.tree-row svg {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.tree-row.selected .tree-label {
	background: var(--xp-select);
	color: #fff;
	padding: 1px;
}

.tree-pm {
	width: 9px;
	height: 9px;
	border: 1px solid #7f9db9;
	background: #fff;
	font-size: 8px;
	line-height: 8px;
	text-align: center;
	color: #000;
	flex: 0 0 auto;
}

.content {
	flex: 1 1 auto;
	background: #fff;
	overflow: auto;
	padding: 14px;
}

.icon-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, 96px);
	gap: 18px 8px;
}

.file-icon {
	width: 96px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	padding: 6px 4px;
	border-radius: 3px;
	cursor: pointer;
}

.file-icon:hover {
	background: #e5f1fe;
	outline: 1px dotted #b5d2f2;
}

.file-icon.selected {
	background: #d8e8fc;
	outline: 1px dotted #7da2ce;
}

.file-icon svg {
	width: 48px;
	height: 48px;
	pointer-events: none;
}

.file-icon .name {
	font-size: 12px;
	color: #000;
	line-height: 1.2;
	word-break: break-word;
}

.statusbar {
	flex: 0 0 auto;
	display: flex;
	border-top: 1px solid #aca899;
	background: var(--xp-face);
	font-size: 11.5px;
	color: #000;
}

.statusbar svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

.statusbar div {
	padding: 3px 10px;
	border-right: 1px solid #aca899;
	display: flex;
	align-items: center;
	gap: 5px;
}

.statusbar div:last-child {
	border-right: none;
	margin-left: auto;
}

.notepad {
	min-width: 420px;
	min-height: 320px;
}

.np-menu {
	display: flex;
	gap: 14px;
	font-size: 12.5px;
	padding: 3px 8px;
	background: var(--xp-face);
	border-bottom: 1px solid #aca899;
}

.np-menu span:hover {
	background: #316ac5;
	color: #fff;
	border-radius: 2px;
	padding: 0 2px;
}

textarea.np-body {
	flex: 1 1 auto;
	border: none;
	outline: none;
	resize: none;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13px;
	line-height: 1.5;
	padding: 8px 10px;
	color: var(--ink);
	background: #fff;
	white-space: pre;
}

.np-status {
	flex: 0 0 auto;
	border-top: 1px solid #aca899;
	background: var(--xp-face);
	font-size: 11.5px;
	padding: 2px 10px;
	display: flex;
	justify-content: flex-end;
}

.resize-handle {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 16px;
	height: 16px;
	cursor: nwse-resize;
}
