@font-face {
	font-family: "gohu";
	src: url("/fonts/gohu-nerd.ttf") format('truetype');
	font-weight: 400;
}

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

html, body {
	background: #0c0d10;
	color: #fefefe;
	font-family: "gohu", "Lucida Console", monospace, Monaco;
	height: 100%;
	overflow: hidden;
}

body {
	line-height: 1.0;
	font-size: 17px;
}

.page {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	padding: 1rem;
}

pre {
	white-space: pre;
	font-family: "gohu", "Lucida Console", monospace, Monaco;
	font-size: 17px;
	margin: 0;
	overflow: hidden;
}

a {
	color: #d10000;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

#bbs-root {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #0c0d10;
	z-index: 9999;
	overflow: hidden;
	display: none;
	flex-direction: column;
}

#bbs-root.active {
	display: flex;
}

.bbs-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#bbs-content {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0.3rem 0.8rem;
	font-family: "gohu", "Lucida Console", monospace, Monaco;
	font-size: 17px;
	line-height: 1.0;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.hint {
	border-top: 1px solid #333;
	padding: 0.3rem 1rem;
	color: #888;
	font-size: 12px;
}

.invisible-link {
	position: fixed;
	top: 0;
	right: 0;
	width: 60px;
	height: 60px;
	z-index: 999;
	cursor: pointer;
	opacity: 0;
}

/* Mobile Optimization */
@media (max-width: 768px) {
	body {
		font-size: 9px;
	}

	pre {
		font-size: 9px;
		overflow: hidden;
	}

	.page {
		padding: 0.5rem;
		align-items: center;
		justify-content: center;
	}

	#bbs-root.active {
		align-items: center;
		justify-content: center;
	}

	#bbs-content {
		font-size: 9px;
		padding: 0.1rem 0.3rem;
		overflow: hidden;
	}

	.bbs-container {
		overflow: hidden;
		align-items: center;
		justify-content: center;
	}

	.hint {
		font-size: 9px;
		padding: 0.1rem 0.3rem;
	}

	.invisible-link {
		width: 50px;
		height: 50px;
	}
}

/* Small phones */
@media (max-width: 480px) {
	body {
		font-size: 7px;
	}

	pre {
		font-size: 7px;
		overflow: hidden;
	}

	.page {
		padding: 0.4rem;
		align-items: center;
		justify-content: center;
	}

	#bbs-root.active {
		align-items: center;
		justify-content: center;
	}

	#bbs-content {
		font-size: 7px;
		padding: 0.05rem 0.2rem;
		overflow: hidden;
	}

	.bbs-container {
		overflow: hidden;
		align-items: center;
		justify-content: center;
	}

	.hint {
		font-size: 7px;
		padding: 0.05rem 0.2rem;
	}

	.invisible-link {
		width: 40px;
		height: 40px;
	}
}

/* Touch-friendly improvements for mobile */
@media (hover: none) {
	a:hover {
		text-decoration: none;
	}

	.invisible-link {
		opacity: 0.1;
	}
}
