/* --- Windows 98 System Styles --- */
:root {
	--win-gray: #c0c0c0;
	--win-dark-gray: #808080;
	--win-white: #ffffff;
	--win-black: #000000;
	--win-blue: #000080;
	--win-teal: #008080;
	--win-title-grad: linear-gradient(90deg, #000080, #1084d0);
}

body {
	background-color: var(--win-teal);
	margin: 0;
	padding: 0;
	font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
	overflow: hidden;
	user-select: none;
}

/* --- Login Overlay --- */
.login-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: var(--win-teal);
	z-index: 100000;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* --- Right Click Context Menu --- */
.context-menu {
	display: none;
	position: absolute;
	background: var(--win-gray);
	border: 2px outset var(--win-white);
	flex-direction: column;
	color: black;
	z-index: 10005;
	min-width: 150px;
	padding: 2px;
	box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
	font-size: 11px;
}

.context-menu div {
	padding: 4px 15px 4px 10px;
	cursor: pointer;
}

.context-menu div:hover {
	background: var(--win-blue);
	color: white;
}

/* --- Desktop Icons --- */
.desktop {
	padding: 10px;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 20px;
	height: calc(100vh - 30px);
}

.icon {
	width: 75px;
	text-align: center;
	color: white;
	font-size: 11px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.icon-img {
	width: 32px;
	height: 32px;
	margin-bottom: 4px;
	filter: drop-shadow(1px 1px 0px rgba(0,0,0,0.5));
}

.icon-text {
	background: transparent;
	padding: 2px 4px;
	border: 1px dotted transparent;
	word-wrap: break-word;
	max-width: 100%;
}

.icon:hover .icon-text {
	background: var(--win-blue);
	border: 1px dotted var(--win-white);
}

/* --- UI Elements --- */
.win-button {
	background: var(--win-gray);
	border: 2px outset var(--win-white);
	padding: 4px 15px;
	cursor: pointer;
	font-family: inherit;
	font-size: 11px;
	color: black;
}

.win-button:active {
	border: 2px inset var(--win-white);
	padding: 5px 14px 3px 16px;
}

/* --- Taskbar --- */
.taskbar {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 30px;
	background-color: var(--win-gray);
	border-top: 1px solid var(--win-white);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2px;
	box-sizing: border-box;
	box-shadow: inset 1px 1px #dfdfdf, 0 -1px #000;
	z-index: 9999;
}

.start-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
	font-weight: bold;
	background: var(--win-gray);
	border: 2px outset var(--win-white);
	padding: 2px 6px;
	height: 100%;
	cursor: pointer;
	box-sizing: border-box;
}

.start-btn:active, .start-btn.active {
	border: 2px inset var(--win-white);
	padding: 3px 5px 1px 7px;
}

.sys-tray {
	display: flex;
	align-items: center;
	gap: 5px;
	border: 2px inset var(--win-white);
	padding: 2px 10px;
	height: 100%;
	box-sizing: border-box;
	font-size: 11px;
}

/* --- Menu Bar & Dropdowns --- */
.menu-bar {
	padding: 2px 5px;
	font-size: 11px;
	display: flex;
	gap: 10px;
	border-bottom: 1px solid var(--win-white);
	background: var(--win-gray);
}

.menu-item {
	position: relative;
	padding: 2px 5px;
	cursor: pointer;
}

.menu-item:hover, .menu-item.active {
	background: var(--win-blue);
	color: white;
}

.dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--win-gray);
	border: 2px outset var(--win-white);
	flex-direction: column;
	color: black;
	z-index: 3000;
	min-width: 120px;
	padding: 2px;
	box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
	cursor: default;
}

.menu-item.active .dropdown {
	display: flex;
}

.dropdown div {
	padding: 3px 15px 3px 10px;
	cursor: pointer;
}

.dropdown div:hover {
	background: var(--win-blue);
	color: white;
}

.dropdown hr {
	width: 95%;
	border: 1px inset var(--win-white);
	margin: 2px auto;
}

/* --- Start Menu --- */
.start-menu {
	position: absolute;
	bottom: 30px;
	left: 2px;
	width: 200px;
	background-color: var(--win-gray);
	border: 2px outset var(--win-white);
	display: none;
	flex-direction: column;
	z-index: 10000;
	padding: 2px;
}

.start-menu-sidebar {
	background: linear-gradient(0deg, #000080, #1084d0);
	width: 30px;
	color: white;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	text-align: right;
	padding: 5px;
	font-weight: bold;
	font-size: 14px;
	float: left;
	height: 100%;
	position: absolute;
	left: 0;
	top: 0;
}

.start-menu-items {
	margin-left: 35px;
	display: flex;
	flex-direction: column;
}

.start-item {
	padding: 6px 10px;
	font-size: 11px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
}

.start-item img {
	width: 24px;
	height: 24px;
}

.start-item:hover {
	background-color: var(--win-blue);
	color: white;
}

/* --- Windows 98 Window --- */
.window {
	position: absolute;
	background-color: var(--win-gray);
	border: 2px outset var(--win-white);
	display: flex;
	flex-direction: column;
	box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
	z-index: 1000;
}

.title-bar {
	background: var(--win-title-grad);
	color: white;
	padding: 3px;
	font-weight: bold;
	font-size: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: default;
}

.title-bar-left {
	display: flex;
	align-items: center;
	gap: 4px;
}

.title-bar-btns {
	display: flex;
	gap: 2px;
}

.win-btn {
	background: var(--win-gray);
	border: 2px outset var(--win-white);
	font-weight: bold;
	font-size: 10px;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: black;
}

.win-btn:active {
	border-style: inset;
}

.window-content {
	flex-grow: 1;
	background: white;
	border: 2px inset var(--win-white);
	margin: 5px;
	overflow-y: auto;
	position: relative;
}

/* --- Retro Dialog Box --- */
.dialog-input {
	border: 2px inset var(--win-white);
	padding: 4px;
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
}

.dialog-list {
	border: 2px inset var(--win-white);
	height: 120px;
	background: white;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.dialog-list-item {
	padding: 2px 5px;
	cursor: pointer;
	font-size: 11px;
}

.dialog-list-item:hover {
	background: #e0e0e0;
}

.dialog-list-item.selected {
	background: var(--win-blue);
	color: white;
}

/* --- App-Specific Styles --- */
.notepad-textarea {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border: none;
	outline: none;
	resize: none;
	font-family: 'Lucida Console', 'Courier New', monospace;
	font-size: 12px;
	padding: 4px;
	margin: 0;
}

.toolbar {
	border-bottom: 1px solid var(--win-dark-gray);
	padding: 5px;
	font-size: 12px;
	display: flex;
	gap: 15px;
	align-items: center;
}

.address-bar {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px;
	font-size: 12px;
	border-bottom: 1px solid var(--win-dark-gray);
}

/* --- The 2000s Website --- */
.retro-site {
	background-color: #000022;
	background-image: radial-gradient(white, rgba(255,255,255,.2) 1px, transparent 2px);
	background-size: 75px 75px;
	color: #00FF00;
	font-family: "Comic Sans MS", serif;
	padding: 20px;
	min-height: 100%;
}

.retro-container {
	max-width: 600px;
	margin: 0 auto;
	background-color: #000080;
	border: 6px ridge #C0C0C0;
	padding: 20px;
}