@font-face {
	font-family: 'Agave';
	src: url('/fonts/Agave/agave regular Nerd Font Complete.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

:root {
	--bg: #404040;
	--fg: #ecf0f1;
	--fg-muted: rgba(200, 200, 200, 1);
	--fg-muted-soft: rgba(200, 200, 200, 0.4);
	--tile-bg: rgba(128, 128, 128, 0.4);
	--tile-bg-hover: rgba(128, 128, 128, 0.7);
	--tile-border: rgba(100, 100, 100, 0.5);
	--rule: rgba(200, 200, 200, 0.15);
	--radius: 8px;
	--gap: 20px;
	--font: 'Agave', sans-serif;
}

* {
	box-sizing: border-box;
	font-family: var(--font);
}

html {
	font-size: 100%;
}

body {
	background-color: var(--bg);
	color: var(--fg);
	margin: 0;
	padding: 26px;
	text-align: center;
}

/* Page title -------------------------------------------------------------- */

.page-title {
	font-size: 1.25rem;
	margin-top: 20px;
	margin-bottom: 40px;
	text-align: center;
}

/* Layout ------------------------------------------------------------------ */

.page {
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	max-width: 95%;
}

.tile-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap);
	margin-bottom: var(--gap);
	justify-content: left;
}

.page--center .tile-row {
	justify-content: center;
}

@media (max-width: 768px) {
	.tile-row {
		justify-content: center;
	}
}

/* Tiles ------------------------------------------------------------------- */

.tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: var(--fg);
	margin-bottom: 20px;
	flex-basis: 0 0 135px;
	width: 135px;
}

.tiles-medium .tile {
	flex-basis: 0 0 185px;
	width: 185px;
}

.tiles-big .tile {
	flex-basis: 0 0 220px;
	width: 220px;
}

.tile-icon {
	background: var(--tile-bg);
	border: 1px solid var(--tile-border);
	border-radius: var(--radius);
	width: 100%;
	aspect-ratio: 16 / 10;
	height: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 5px;
	transition: background-color 0.3s;
}

.tile:hover .tile-icon {
	background: var(--tile-bg-hover);
}

.tile-icon img {
	width: 65%;
	height: 65%;
	object-fit: contain;
}

.tile-label {
	font-size: 0.95rem;
	text-align: center;
	margin-top: 5px;
	display: block;
}

.tile.disabled .tile-icon {
	opacity: 0.2;
}

@media (max-width: 768px) {
	.tile {
		flex-basis: 45%;
		width: auto;
	}
}

@media (max-width: 480px) {
	.tile {
		flex-basis: 95%;
	}
}

/* Tooltip ----------------------------------------------------------------- */

.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltip-text {
	position: absolute;
	bottom: -5px;
	right: 0px;
	visibility: hidden;
	z-index: 1;
	border-radius: 6px;
	width: 100%;
	background-color: rgba(64, 64, 64, 0.5);
	color: var(--fg);
	padding: 0 5px 5px;
	text-align: center;
	white-space: nowrap;
}

.tooltip:hover .tooltip-text {
	visibility: visible;
}

/* Collapsible category (newtab only) -------------------------------------- */

.category {
	margin-bottom: 0.5em;
}

.category-header {
	display: flex;
	align-items: center;
	gap: 0.5em;
	cursor: pointer;
	user-select: none;
	padding: 0.3em 0.4em;
	border-radius: 6px;
	transition: background 0.15s;
}

.category-header:hover .category-label {
	color: #fafafa;
}

.category-header:hover .category-arrow {
	color: rgba(200, 200, 200, 1);
}

.category-label {
	font-size: 0.9em;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fg-muted);
}

.category-arrow {
	font-size: 0.65em;
	color: var(--fg-muted-soft);
	transition: transform 0.25s ease;
	line-height: 1;
}

.category.collapsed .category-arrow {
	transform: rotate(-90deg);
}

.category-body {
	overflow: hidden;
	max-height: 600px;
	transition: max-height 0.3s ease, opacity 0.25s ease;
	opacity: 1;
}

.category.collapsed .category-body {
	max-height: 0;
	opacity: 0;
}
