@font-face {
	font-family: "Vermin Vibes";
	src: url("assets/fonts/vermin-vibes-simcluster.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: "VT323";
	src: url("assets/fonts/VT323-Regular.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: "Fool";
	src: url("assets/fonts/Fool.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: "Chakra Petch";
	src: url("assets/fonts/ChakraPetch-Regular.ttf") format("truetype");
	font-display: swap;
}

:root {
	color-scheme: dark;
	--accent: #da7b8b;
	--accent-soft: rgba(218, 123, 139, 0.55);
	--panel: rgba(8, 4, 10, 0.8);
	--ink: #f7dce2;
	font-family: "VT323", monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	min-width: 320px;
	height: 100%;
	margin: 0;
	overflow: hidden;
}

body {
	display: grid;
	grid-template-rows: auto 1fr auto;
	color: var(--ink);
	background:
		radial-gradient(circle at 50% 48%, rgba(89, 26, 51, 0.2), transparent 42%),
		#050409;
}

button,
input {
	font: inherit;
}

button,
a,
input[type="range"] {
	touch-action: manipulation;
}

#visualizer {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 1;
	image-rendering: pixelated;
}

.topbar {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 0.75rem;
}

.studio {
	color: rgba(247, 220, 226, 0.38);
	font-family: "Fool", "VT323", monospace;
	font-size: clamp(0.8rem, 1.6vw, 1.05rem);
}

.studio span {
	opacity: 0.55;
}

.socials {
	display: flex;
	gap: 0.5rem;
}

.socials a {
	display: grid;
	width: 2.4rem;
	height: 2.4rem;
	place-items: center;
	color: var(--accent);
	border: 1px solid var(--accent-soft);
	border-radius: 50%;
	background: rgba(218, 123, 139, 0.06);
	opacity: 0.62;
	transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
}

.socials a:hover,
.socials a:focus-visible {
	opacity: 1;
	transform: scale(1.08);
	background: rgba(218, 123, 139, 0.14);
}

.socials svg {
	width: 1.2rem;
	fill: currentColor;
}

main {
	position: relative;
	z-index: 2;
	display: grid;
	min-height: 0;
	place-items: center;
	padding: 2rem 1rem 8rem;
}

.title-card {
	position: relative;
	width: min(1200px, 80vw);
	padding-right: 2cqw;
	container-type: inline-size;
	text-align: center;
	filter: drop-shadow(0 0 1.5rem rgba(218, 123, 139, 0.16));
}

h1 {
	position: relative;
	margin: 0;
	color: var(--accent);
	font-family: "Vermin Vibes", sans-serif;
	font-size: 18cqw;
	font-style: italic;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-shadow:
		0.035em 0.035em 0 #581e34,
		0 0 0.32em rgba(218, 123, 139, 0.23);
	white-space: nowrap;
	animation: breathe 4s ease-in-out infinite;
}

h1 .cent {
	display: inline-block;
	color: #f4afba;
	transform: translateY(-0.025em);
}

.underline {
	position: absolute;
	inset: 0;
	color: transparent;
	font-family: "Vermin Vibes", sans-serif;
	font-size: 18cqw;
	font-style: italic;
	line-height: 1;
	text-align: center;
	text-decoration-line: underline;
	text-decoration-color: rgba(218, 123, 139, 0.8);
	text-decoration-thickness: 0.5cqw;
	text-underline-offset: 2cqw;
	mask-image: linear-gradient(to right, transparent 32%, black 35%, black 85%, transparent 90%);
	pointer-events: none;
}

.splash {
	position: absolute;
	right: 7cqw;
	bottom: -0.8cqw;
	left: 35cqw;
	width: 55cqw;
	min-height: 1.3em;
	margin: 0;
	color: var(--ink);
	font-family: "Fool", "VT323", monospace;
	font-size: 2.65cqw;
	font-style: italic;
	line-height: 1.1;
	text-align: left;
	text-shadow: 2px 2px 0 #000, 0 0 0.6rem rgba(218, 123, 139, 0.65);
	transition: opacity 180ms ease, transform 180ms ease;
}

.splash.changing {
	opacity: 0;
	transform: translateY(0.35rem);
}

.player {
	position: fixed;
	z-index: 10;
	right: 1rem;
	bottom: 1rem;
	left: 1rem;
	display: grid;
	grid-template-columns: 3.5rem minmax(8rem, 11rem) auto minmax(12rem, 1fr) auto;
	gap: 0.7rem;
	align-items: center;
	width: min(920px, calc(100% - 2rem));
	margin: 0 auto;
	padding: 0.35rem;
	border: 1px solid rgba(218, 123, 139, 0.42);
	border-radius: 0.65rem;
	background: var(--panel);
	box-shadow: 0 0.8rem 3rem rgba(0, 0, 0, 0.62), inset 0 0 1.6rem rgba(218, 123, 139, 0.04);
	backdrop-filter: blur(12px) brightness(0.65);
	font-family: "Chakra Petch", sans-serif;
}

.artwork {
	width: 3.5rem;
	height: 3.5rem;
	border: 1px solid rgba(218, 123, 139, 0.4);
	border-radius: 0.4rem;
	object-fit: cover;
	background: #110a10;
	box-shadow: 0 0.4rem 1rem #000;
}

.track {
	min-width: 0;
}

.track p {
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.song-title {
	font-size: clamp(0.85rem, 1.5vw, 1.05rem);
	font-weight: 400;
	text-shadow: 2px 2px 0 #000;
}

.song-title span {
	display: inline-block;
	white-space: nowrap;
}

.creator {
	color: rgba(247, 220, 226, 0.65);
	font-size: 0.78rem;
}

.timeline {
	display: grid;
	grid-template-columns: 3ch 1fr 3ch;
	gap: 0.55rem;
	align-items: center;
	margin: 0;
	color: rgba(247, 220, 226, 0.65);
	font-size: 0.68rem;
}

input[type="range"] {
	width: 100%;
	height: 1rem;
	margin: 0;
	accent-color: var(--accent);
	cursor: pointer;
}

.controls {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.controls button {
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: var(--ink);
	border: 0;
	background: transparent;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	transition: color 120ms ease, transform 120ms ease;
}

.controls button:hover,
.controls button:focus-visible {
	color: var(--accent);
	transform: scale(1.13);
}

.controls .play {
	width: 2.8rem;
	height: 2.8rem;
	padding-left: 0.15rem;
	border: 1px solid var(--accent-soft);
	border-radius: 50%;
	font-size: 1rem;
}

.volume {
	position: relative;
	color: rgba(247, 220, 226, 0.65);
	font-size: 0.85rem;
}

.volume summary {
	display: grid;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0.5rem;
	place-items: center;
	cursor: pointer;
	list-style: none;
}

.volume summary svg {
	width: 1.2rem;
	fill: currentColor;
}

.volume summary::-webkit-details-marker {
	display: none;
}

.volume summary:hover,
.volume summary:focus-visible {
	color: var(--accent);
}

.volume-popup {
	position: absolute;
	right: 0;
	bottom: calc(100% + 0.8rem);
	display: grid;
	grid-template-columns: auto 9rem;
	gap: 0.65rem;
	align-items: center;
	padding: 0.7rem;
	border: 1px solid rgba(218, 123, 139, 0.42);
	border-radius: 0.5rem;
	background: rgba(8, 4, 10, 0.95);
	box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.65);
}

.status {
	position: fixed;
	z-index: 20;
	bottom: 7.7rem;
	left: 50%;
	margin: 0;
	padding: 0.2rem 0.6rem;
	color: var(--ink);
	background: rgba(0, 0, 0, 0.7);
	transform: translateX(-50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease;
}

.status.visible {
	opacity: 1;
}

@keyframes breathe {
	50% { transform: scale(1.015); }
}

@media (max-width: 720px) {
	#visualizer {
		opacity: 0.55;
	}

	main {
		padding-bottom: 5.5rem;
	}

	.title-card {
		width: 100%;
	}

	.splash {
		font-size: max(0.85rem, 2.65cqw);
	}

	.player {
		grid-template-columns: 3.25rem minmax(0, 1fr) auto auto;
		gap: 0.5rem;
	}

	.artwork {
		width: 3.25rem;
		height: 3.25rem;
	}

	.timeline {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

@media (max-width: 450px) {
	.topbar {
		padding: 0.55rem;
	}

	.player {
		right: 0.5rem;
		bottom: 0.5rem;
		left: 0.5rem;
		grid-template-columns: 3rem minmax(0, 1fr) auto auto;
		width: calc(100% - 1rem);
		padding: 0.35rem;
	}

	.artwork {
		width: 3rem;
		height: 3rem;
	}

	.controls {
		justify-content: center;
	}

	.timeline {
		margin-top: 0.2rem;
	}

	.status {
		bottom: 9.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	h1 {
		animation: none;
	}

	* {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
