:root {
	--bg: #26282c;
	--panel: #161616;
	--ink: #eaeaea;
	--muted: #9aa3a7;
	--accent: #ff4a0f;
	--accent-hover: #ff5a00;
	--radius: 14px;
	--container: 800px;
	--bar-h: 108px;
	--surf-start: #33393e;
	--surf-end: #1c1d21;
	--brd-start: #4b4f52;
	--brd-end: #212327;
}

* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family:
		ui-sans-serif,
		system-ui,
		-apple-system,
		Segoe UI,
		Roboto,
		Inter,
		Arial,
		sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.view[hidden] {
	display: none !important;
}

.app-header {
	max-width: var(--container);
	margin: 16px auto 40px;
	padding: 0 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.brand {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}
.logo {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #1c1d21;
	display: flex;
	align-items: center;
	justify-content: center;
}
.logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
.brand-name {
	font-weight: 700;
}
.header-right {
	display: flex;
	align-items: center;
	gap: 8px;
}
.header-sub {
	color: var(--muted);
	font-size: 13px;
	display: none;
}
.back-btn {
	height: 28px;
	padding: 0 10px;
	border-radius: 8px;
	background: #1c1d21;
	color: var(--ink);
	border: 1px solid transparent;
	cursor: pointer;
	position: relative;
}

.back-btn img {
	width: 200px;
	position: fixed;
	transform: rotateZ(-10deg);
	bottom: -20px;
	right: -10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.back-btn:hover img {
	opacity: 1;
}

.app {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 12px 16px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.surface {
	/*background:*/
	/*linear-gradient(180deg, var(--surf-start), var(--surf-end)) padding-box,*/
	/*linear-gradient(180deg, var(--brd-start), var(--brd-end)) border-box;*/
	/*border: 1px solid transparent;*/
	border-radius: var(--radius);
	/*box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);*/
	backdrop-filter: saturate(130%) blur(8px);
	/*border: 1px solid #333;*/
	/*background: transparent;*/
	background: rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.library {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: stretch;
}
.lib-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.section-title {
	margin: 4px 0 0;
	color: var(--muted);
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.4px;
}

.cards-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.card {
	width: calc(33% - 10px);
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: pointer;
	transition:
		transform 0.12s ease,
		opacity 0.2s ease,
		box-shadow 0.2s ease;
}
.card:hover {
	/*transform: translateY(-1px);*/
}
.card-cover {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: #0f0f0f;
}
.card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.card-name {
	font-weight: 600;
	font-size: 14px;
}
.card-meta {
	color: var(--muted);
	font-size: 12px;
}

#view-albums .cards-grid .card {
	width: calc(33% - 10px);
}

.player {
	display: flex;
	gap: 16px;
}
.player-left {
	width: 320px;
	flex: 0 0 320px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.album-art {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius);
	overflow: hidden;
	background: #000;
}
.album-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.track-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.track-title {
	margin: 0;
	font-size: 20px;
}
.track-artist {
	color: var(--muted);
	font-size: 13px;
}

.player-right {
	flex: 1;
	display: flex;
	flex-direction: column;
}
.list-title {
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-bottom: 6px;
}

.tracklist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow-y: auto;
	padding-bottom: 8px;
}
.track-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 15px;
	cursor: pointer;
	color: var(--ink);
	border-radius: 10px;
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease,
		color 0.15s ease,
		transform 0.1s ease;
	border: 1px solid transparent;
}
.track-row:hover {
	background: rgba(0, 0, 0, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.06);
}
.track-row.playing {
	color: var(--accent);
}
.track-row .n {
	font-variant-numeric: tabular-nums;
}
.track-row .thumb {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	overflow: hidden;
	background: #0f0f0f;
	flex: 0 0 36px;
}
.track-row .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.track-row .info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}
.track-row .title {
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.track-row .artist {
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.track-row .dur {
	text-align: right;
	font-size: 12px;
	color: var(--muted);
}

#view-player {
	padding-bottom: calc(var(--bar-h) + 16px);
}

.transport {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 1000;
	display: flex;
	justify-content: center;
	pointer-events: none;
}
.transport-inner {
	width: min(550px, calc(100% - 24px));
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	pointer-events: auto;
	animation: pop 0.18s ease;
}

.np {
	position: absolute;
	left: -238px;
	top: 50%;
	transform: translateY(-50%);
	max-width: 226px;
	padding: 8px 14px 8px 8px;
	border: 1px solid #333;
	display: flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	box-shadow: none;
	border-radius: 10px;
}
.np-thumb {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	overflow: hidden;
	background: #0f0f0f;
	flex: 0 0 42px;
}
.np-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.np-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.np-title {
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.np-artist {
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.center {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	min-width: 0;
}
.time-row {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--muted);
}
#seek {
	appearance: none;
	width: 100%;
	height: 10px;
	border-radius: 999px;
	background: #333;
	outline: none;
	transition: filter 0.15s ease;
	cursor: pointer;
}
#seek:hover {
	filter: brightness(1.2);
}
#seek::-webkit-slider-thumb {
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #151515;
	cursor: pointer;
	transition: transform 0.1s ease;
}
#seek::-webkit-slider-thumb:active {
	transform: scale(1.05);
}
#seek::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #151515;
	cursor: pointer;
}

.controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
}
.btn {
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 999px;
	background: rgba(66, 66, 66, 0.9);
	color: var(--ink);
	cursor: pointer;
	font-size: 16px;
	border: 2px solid #66666650;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	transition:
		transform 0.04s ease,
		background-color 0.1s ease;
}
.btn.primary {
	width: 40px;
	height: 40px;
	font-size: 20px;
	border: 2px solid #33333320;
	background: var(--accent);
	color: #111;
	font-weight: 700;
}
.btn:hover {
	transform: scale(1.05);
	background: #777;
}
.btn.primary:hover {
	background: var(--accent-hover);
}
.btn:active {
	transform: scale(0.95);
}

.card,
.transport-inner {
	transition:
		transform 0.18s ease,
		box-shadow 0.2s ease,
		opacity 0.2s ease;
}
.transport-inner:hover {
	/*transform: translateY(-1px);*/
}

@keyframes pop {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1200px) {
	.np {
		display: none;
	}
}
@media (max-width: 980px) {
	.player {
		flex-direction: column;
	}
	.player-left {
		width: 100%;
		flex: 0 0 auto;
	}
	.np {
		position: static;
		transform: none;
		width: auto;
		order: -1;
		margin-bottom: 6px;
	}
}

#albums-title {
	padding: 0 0 12px;
}
