/* ==========================================================================
   APPLE HIG GLASSMORPHISM PERSISTENT PLAYER SYSTEM
   ========================================================================== */

.app-player {
	grid-area: player;
	background: rgba(18, 18, 22, 0.85);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border-top: var(--glass-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 28px;
	z-index: 100;
	height: var(--player-height);
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
}

/* Track Info (Left) */
.player-track-info {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 240px;
	max-width: 320px;
}

.player-artwork {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-sm);
	object-fit: cover;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.player-meta {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.player-title {
	font-size: 0.925rem;
	font-weight: 800;
	color: var(--text-base);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: -0.01em;
}

.player-dj {
	font-size: 0.8rem;
	color: var(--text-subdued);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

.player-like-btn {
	color: var(--text-subdued);
	padding: 8px;
	transition: var(--transition);
}

.player-like-btn:hover, .player-like-btn.active {
	color: var(--spotify-green);
	transform: scale(1.15);
}

/* Central Controls & Progress */
.player-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 1;
	max-width: 650px;
}

.player-controls {
	display: flex;
	align-items: center;
	gap: 24px;
}

.control-btn {
	color: var(--text-subdued);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	transition: var(--transition);
}

.control-btn svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.control-btn:hover {
	color: var(--text-base);
	transform: scale(1.08);
}

.control-btn.active {
	color: var(--spotify-green);
	position: relative;
}

.control-btn.active::after {
	content: '';
	position: absolute;
	bottom: -2px;
	width: 4px;
	height: 4px;
	background: var(--spotify-green);
	border-radius: 50%;
}

.play-pause-btn {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-full);
	background: #ffffff;
	color: #000000;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--transition);
	box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
}

.play-pause-btn svg {
	width: 22px;
	height: 22px;
	fill: #000000;
}

.play-pause-btn:hover {
	transform: scale(1.06);
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(255, 255, 255, 0.5);
}

/* Progress Seek Bar */
.progress-container {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.time-stamp {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-subdued);
	min-width: 40px;
	text-align: center;
}

.progress-bar-wrapper {
	flex: 1;
	height: 4px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: var(--radius-full);
	position: relative;
	cursor: pointer;
	transition: height 0.2s;
}

.progress-bar-wrapper:hover {
	height: 6px;
}

.progress-bar-fill {
	height: 100%;
	background: var(--spotify-green);
	border-radius: var(--radius-full);
	width: 0%;
	position: relative;
	transition: background 0.2s;
	box-shadow: 0 0 12px rgba(48, 209, 88, 0.5);
}

.progress-bar-wrapper:hover .progress-bar-fill {
	background: var(--spotify-green-hover);
}

.progress-bar-handle {
	position: absolute;
	right: -6px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 12px;
	border-radius: var(--radius-full);
	background: #ffffff;
	opacity: 0;
	transition: opacity 0.2s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.progress-bar-wrapper:hover .progress-bar-handle {
	opacity: 1;
}

/* Right Controls (Volume & Queue) */
.player-right {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 220px;
	justify-content: flex-end;
}

.volume-container {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 140px;
}

.volume-bar {
	flex: 1;
	height: 4px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: var(--radius-full);
	position: relative;
	cursor: pointer;
}

.volume-bar-fill {
	height: 100%;
	background: var(--text-base);
	border-radius: var(--radius-full);
	width: 70%;
}

.volume-bar:hover .volume-bar-fill {
	background: var(--spotify-green);
}

/* Queue Drawer */
.queue-panel {
	position: fixed;
	right: 20px;
	bottom: 104px;
	width: 390px;
	max-height: 520px;
	background: rgba(22, 22, 26, 0.88);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border: var(--glass-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	z-index: 95;
	display: flex;
	flex-direction: column;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transform: translateY(20px);
	transition: var(--transition);
}

.queue-panel.open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.queue-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.queue-title {
	font-weight: 800;
	font-size: 1.1rem;
	letter-spacing: -0.01em;
}

.queue-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow-y: auto;
}

.queue-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px;
	border-radius: var(--radius-sm);
	transition: var(--transition);
	cursor: pointer;
}

.queue-item:hover {
	background: rgba(255, 255, 255, 0.08);
}

.queue-item.active {
	background: rgba(48, 209, 88, 0.18);
	border: 1px solid rgba(48, 209, 88, 0.3);
}

.queue-item.active .queue-item-title {
	color: var(--spotify-green);
}
