@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');
@font-face {
	font-family: "OTSP";
	src: url("/static/fonts/core-narae-pro.eot");
	src: url("/static/fonts/core-narae-pro.woff") format("woff"),
	url("/static/fonts/core-narae-pro.ttf") format("truetype");
}

:root {
	--menu-width: 320px;
}

:root {
	--bg-menu: #eee;
	--bg: #fff;
	--fg: #151618;
	--accent: #ffc107;
}

body.dark {
	--bg-menu: #202122;
	--bg: #151618;
	--fg: #fff;
	--accent: #ffc107;
}

body.light {
	--bg-menu: #eee;
	--bg: #fff;
	--fg: #151618;
	--accent: #ffc107;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-menu: #202122;
		--bg: #151618;
		--fg: #fff;
		--accent: #ffc107;
	}
}

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

html,
body {
	height: 100%;
	font-family: 'IBM Plex Sans', sans-serif;
	user-select: none;
	user-drag: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

button {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--fg);
}

a {
	color: var(--fg);
	text-decoration: none;
}

#app {
	position: relative;
	height: 100%;
	background: var(--bg);
}

#open {
	position: fixed;
	top: 2rem;
	left: 2rem;
	z-index: 1;
}

aside {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--menu-width);
	height: 100%;
	background: var(--bg-menu);
	color: var(--fg);
	display: grid;
	grid-template-columns: 4rem 1fr 4rem;
	grid-template-rows: 5rem auto 4rem;
	font-size: 16px;
	transform: translateX(calc(-100%));
	transition: transform 250ms ease;
	align-items: start;
	justify-items: start;
	z-index: 2;
}

.open aside {
	transform: translateX(0);
}

aside .logo {
	align-self: end;
	justify-self: center;
}

aside .title {
	display: flex;
	flex-direction: column;
	align-self: end;
}

aside .title h1 {
	font-weight: 600;
	font-size: 20px;
}

aside .title h2 {
	font-weight: 400;
	font-size: 16px;
	color: var(--accent);
}

aside #close {
	padding: 1rem 1rem 0 0;
	align-self: start;
	justify-self: end;
}

aside nav {
	margin-top: 2rem;
	gap: 1rem;
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: start;
	justify-content: start;
}

aside #toggle {
	grid-column: 2 / 3;
	display: flex;
	flex-direction: row;
	align-self: center;
	justify-self: center;
	gap: 0.5rem;
}

.checkbox {
	opacity: 0;
	position: absolute;
}

.checkbox-label {
	background-color: var(--fg);
	width: 50px;
	height: 26px;
	border-radius: 50px;
	position: relative;
	padding: 5px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.checkbox-label .ball {
	background-color: var(--bg);
	width: 22px;
	height: 22px;
	position: absolute;
	left: 2px;
	top: 2px;
	border-radius: 50%;
	transition: transform 0.2s linear;
	transform: translateX(24px);
}

.checkbox:checked+.checkbox-label .ball {
	transform: translateX(0);
}

.dark #btn-dark,
.light #btn-light {
	color: var(--accent);
}

whiteboard-canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.status-indicator {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: var(--bg-menu);
	border-radius: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #999;
	transition: background 0.3s ease;
}

.status-indicator.online {
	display: none;
}

.status-indicator.offline .status-dot {
	background: #f44336;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.5;
	}
}
