@font-face {
	font-family: "Kode Mono";
	src: url(KodeMono-VariableFont_wght.ttf);
}
:root {
	--primary: #7c3aed;
	--background: #0f172a;
	--surface: #1e293b;
	--text: #f8fafc;
	--border: #334155;
}

[data-theme="light"] {
	--primary: #6d28d9;
	--background: #ffffff;
	--surface: #f1f5f9;
	--text: #0f172a;
	--border: #cbd5e1;
}

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

body {
	font-family: "Kode Mono", monospace;
	font-optical-sizing: auto;
	background: var(--background);
	color: var(--text);
	min-height: 100dvh;
	height: auto;
	display: grid;
	grid-template-columns: 300px 1fr;
}

header {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	border-bottom: 1px solid var(--border);
	color: var(--text);
	position: fixed;
	z-index: 999;
	height: 80px;
	background-color: var(--background);
}

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

#header-logo {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	max-width: 30%;
	width: 30%;
	height: 100%;
	border-right: 1px solid #fff;
}

#header-logo svg {
	width: 2rem;
	height: 2rem;
}

nav {
	display: flex;
	width: 100%;
	height: 100%;
}

nav .navSection {
	display: flex;
	align-items: center;
	justify-content: space-evenly;
	padding: 1.5rem 2rem;
	gap: 1rem;
	border-right: 1px solid #fff;
	font-weight: 700;
	font-size: 1.2rem;
	flex: 1;
}

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

.navSection:last-child {
	border-right: none;
}

.navSection:has(.theme-switch) {
	max-width: 120px;
	min-width: 100px;
}

.mobile-nav {
	display: none;
}

.mobile-nav-section {
	display: none;
}

#toggleBtn {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
}

.hamburger .bar {
	width: 25px;
	height: 3px;
	background: #fff;
	margin: 5px 0;
	transition: 0.3s;
}

.toggle-btn.active .bar:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.toggle-btn.active .bar:nth-child(2) {
	opacity: 0;
}

.toggle-btn.active .bar:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

#circle {
	display: none;
	position: fixed;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #fff;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transition: transform 0.3s ease;
	mix-blend-mode: difference;
	-webkit-box-shadow: 0px 0px 5px 3px rgba(255, 255, 255, 1);
	-moz-box-shadow: 0px 0px 5px 3px rgba(255, 255, 255, 1);
	box-shadow: 0px 0px 5px 3px rgba(255, 255, 255, 1);
	z-index: 99999;
}

@media screen and (max-width: 1000px) {
	header {
		justify-content: space-around;
	}
	.mobile-nav.active {
		display: flex;
		position: absolute;
		max-width: 80dvw;
		min-width: 60dvw;
		height: 100dvh;
		top: 0;
		right: 0;
		background-color: var(--surface);
		color: var(--text);
	}

	.mobile-nav.active .mobile-nav-section {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		text-align: left;
		padding: 50px;
		gap: 2rem;
		font-size: 1.6rem;
	}
	.mobile-nav.active .mobile-nav-section a {
		color: var(--text);
		text-decoration: none;
	}

	nav.navbar {
		display: none;
	}

	#toggleBtn {
		display: flex;
	}

	#circle {
		display: none;
		width: 10px;
		height: 10px;
		-webkit-box-shadow: 0px 0px 2.5px 1.5px rgba(255, 255, 255, 1);
		-moz-box-shadow: 0px 0px 2.5px 1.5px rgba(255, 255, 255, 1);
		box-shadow: 0px 0px 2.5px 1.5px rgba(255, 255, 255, 1);
	}
}

.theme-switch {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	background: var(--surface);
	border: none;
	border-radius: 50%;
	padding: 0.75rem;
	cursor: pointer;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	color: var(--text);
}

.side-panel {
	padding: 2rem 1rem;
	background: var(--surface);
	border-right: 1px solid var(--border);
	position: sticky;
	margin-top: 80px;
	min-height: 100vh;
}

.search-header {
	margin-bottom: 2rem;
	position: relative;
}

.search-input {
	width: 100%;
	padding: 1rem 3rem 1rem 1.5rem;
	border: 2px solid var(--border);
	border-radius: 0.75rem;
	background: var(--background);
	color: var(--text);
	font-size: 1rem;
}

.search-header svg {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.filter-section {
	margin-top: 2rem;
}

.filter-group {
	margin-bottom: 2rem;
}

.filter-title {
	font-weight: 600;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--primary);
	padding: 0 10px;
}

.filter-title .arrow-icon {
	display: flex;
	justify-content: flex-end;
	flex: 1;
	transition: transform 0.3s ease;
}

.filter-title svg {
	fill: var(--text);
	transition: transform 0.3s ease;
}

.open svg {
	transform: rotate(180deg);
	flex-direction: row-reverse;
}

.sub-section {
	max-height: 0;
	overflow-y: hidden;
	transition: max-height 0.3s ease;
	padding: 0 10px;
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	align-items: center;
}

.filter-section .all-assets-btn {
	background: transparent;
	width: calc(100% - 20px);
	outline: none;
	border: none;
	font-family: monospace;
	font-size: 1rem;
	color: var(--text);
	margin-bottom: 1rem;
	background-color: var(--primary);
	align-items: center;
	justify-self: center;
}

aside button {
	background: none;
	width: 100%;
	border: none;
	outline: none;
	font-family: "Kode Mono", monospace;
	font-optical-sizing: auto;
	color: var(--text);
	font-size: 1rem;
}

aside button:focus-visible,
aside button:focus {
	outline: 2px solid var(--text);
}

.filter-chip,
.all-assets-btn {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	margin: 0.25rem 0;
	border-radius: 0.5rem;
	cursor: pointer;
	background: var(--background);
	width: 100%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

svg {
	width: 1.2rem;
	height: 1.2rem;
	fill: var(--text);
}

#themeSwitch {
	max-width: 3rem;
}

.main-content {
	padding: 1rem;
	margin-top: 80px;
}

.results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.sort-control {
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
}

.results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
	gap: 0.8rem;
}

.preview-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.8rem;
	background-color: var(--surface);
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
	border-radius: 0.5rem;
	padding: 0.8rem;
	transition: transform 0.2s;
	border: 1px solid var(--border);
}

.preview-card.wide {
	grid-column: 1 / -1;
	grid-row: 1;
	max-height: 80dvh;
}

.preview-card.wide img {
	display: none;
}

.preview-card.wide iframe {
	display: block !important;
	width: 100%;
}

.preview-card .wideBtn {
	color: var(--primary);
	background-color: var(--surface);
	border: none;
	margin-left: auto;
	cursor: pointer;
}

.wideBtn:hover {
	text-decoration: underline;
	transform: scale(1.1);
	transition: 0.3s ease;
}

.preview-card:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.preview-card-content {
	background-color: var(--background);
	border-radius: 0.4rem;
	overflow: hidden;
	aspect-ratio: 1.4/1;
	display: flex;
	justify-content: center;
	width: 100%;
}

.preview-card-content img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.preview-card-footer {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	align-items: flex-start;
	color: var(--text);
	width: 100%;
	min-height: 70px;
}

.preview-card-footer p {
	flex: 1;
}

.preview-card-footer a {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
}

.preview-card-footer a:hover {
	text-decoration: underline;
}

.preview-card-footer svg {
	width: 1.2rem;
	height: 1.2rem;
	fill: var(--primary);
}

.pagination {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 0.2rem;
	margin: 1rem 0;
	width: 100%;
}

.pagination button {
	border-radius: 6px;
	min-width: 2rem;
	aspect-ratio: 1;
	font-size: 1rem;
	background-color: var(--surface);
	color: var(--text);
	cursor: pointer;
	border: none;
}

.pagination button.active {
	color: var(--primary);
}

.filter-chip:hover,
.all-assets-btn:hover,
.pagination button:hover {
	background: rgba(124, 58, 237, 0.1);
}

.preview-card-footer a:hover {
	text-decoration: underline;
}

.filter-chip.active,
.all-assets-btn.active {
	background: var(--primary);
	color: white;
}

@media (max-width: 768px) {
	body {
		grid-template-columns: 1fr;
	}

	.side-panel {
		position: static;
		height: auto;
		min-height: auto;
		border-right: none;
		border-bottom: 1px solid var(--border);
	}

	.main-content {
		padding: 0.8rem;
	}
}
