:root {
	--bg: #0b0f1a;
	--bg2: #0f1524;
	--bg3: #141c2e;
	--bg4: #1a2440;
	--border: #24304a;
	--border2: #32405f;
	--text: #d6e2ff;
	--text2: #8fa3c7;
	--text3: #5b6f93;
	--accent: #b6ff4d;
	--accent2: #7fd12a;
	--blue: #8ab4f8;
	--red: #f88a8a;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: "Azeret Mono", monospace;
	min-height: 100vh;
	font-size: 0.75rem;
	letter-spacing: -0.04em;
	margin: 0;
}

a {
	text-decoration: none;
}

button {
	border: none;
	outline: none;
	cursor: pointer;
}

.link {
	color: var(--text3);
}

.link:hover {
	color: var(--text);
}

header {
	display: flex;
	gap: 1rem;
	align-items: center;
	height: 39px;
	border-bottom: 1px solid var(--border);
	background: var(--bg2);
	padding: 0 1rem;
}

.vertical {
	height: 100%;
	border-left: 1px solid var(--border);
}

#links {
	display: flex;
	width: 100%;
	gap: 1rem;
}

#logout {
	margin-left: auto;
}

.logo {
	font-family: var(--mono);
	font-size: 1rem;
	font-weight: 600;
	color: var(--accent);
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 2px;
}

.logo span {
	color: var(--text2);
	font-weight: 400;
}

.layout {
	display: flex;
	align-items: stretch;
	min-height: calc(100vh - 40px);
}

aside {
	width: 15rem;
	border-right: 1px solid var(--border);
	padding: 1rem 1rem;
	background: var(--bg2);
	display: flex;
	flex-direction: column;
}

#search-legend {
	margin-bottom: 4px;
}

.search-bar {
	display: flex;
}

input {
	height: 1.75rem;
	background: var(--bg3);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 0 7px;
	outline: none;
	letter-spacing: -0.02em;
}

#search-button {
	aspect-ratio: 1;
	background: var(--border);
	color: var(--text);
	font-size: 1.25rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.moe-counter {
	display: flex;
	margin-top: auto;
}

.moe-counter img {
	height: 6rem;
	image-rendering: pixelated;
}

hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 0.75rem 0;
}

main {
	flex: 1;
	padding: 0.75rem;
	display: flex;
	flex-direction: column;
}

p {
	margin-bottom: 0;
}

h4 {
	font-weight: 600;
	margin: 0;
	margin-bottom: 0.1rem;
}

h4:not(:first-child) {
	margin-top: 0.5rem;
}

.hidden {
	visibility: hidden;
	pointer-events: none;
}

.post-content {
	max-height: 90vh;
	width: min-content;
}

.tag-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	overflow-y: auto;
}

.tag {
	display: inline-block;
	padding: 2px 8px;
	font-size: 0.75rem;
	color: var(--blue);
	text-decoration: none;
	border-left: 2px solid var(--blue);
	transition:
		color 0.15s,
		border-color 0.15s;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 0;
}

.tag:hover {
	color: #fff;
	border-color: #fff;
}

.tag-character {
	border-color: var(--accent);
	color: var(--accent);
}

.no-tags {
	font-size: 0.8em;
	opacity: 0.4;
	font-style: italic;
}

/* MOBILE SUPPORT */
#sidebar-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--text2);
	font-size: 1.25rem;
	cursor: pointer;
	padding: 0 0.25rem;
	align-items: center;
}

#sidebar-toggle:hover {
	color: var(--text);
}

@media (max-width: 700px) {
	header {
		padding: 0 0.75rem;
		position: sticky;
		top: 0;
		z-index: 100;
	}

	#sidebar-toggle {
		display: flex;
	}

	.layout {
		flex-direction: column;
	}

	aside {
		width: 100%;
		box-sizing: border-box;
		border-right: none;
		border-bottom: 0px solid var(--border);
		max-height: 0;
		overflow: hidden;
		padding-top: 0;
		padding-bottom: 0;
		transition:
			max-height 0.25s ease,
			padding 0.25s ease;
	}

	aside.open {
		max-height: 400px;
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
		border-bottom-width: 1px;
	}

	.post-content {
		max-width: 100vw;
		max-height: 60vh;
		width: auto;
	}
}
