/* Custom Audio UI */
:root {
	--player-bg: ;
	--button-bg: #ff4d4d;
	--button-color: #fff;
	--progress-bg: #333;
	--progress-fill: #ff4d4d;
	--volume-color: #ff4d4d;
	--time-color: #ccc;
}

.custom-audio {
	background: var(--player-bg);
	padding: 10px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.play-btn {
	background: var(--button-bg);
	color: var(--button-color);
	border: none;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
}

.progress-container {
	flex: 1;
	height: 6px;
	background: var(--progress-bg);
	border-radius: 5px;
	cursor: pointer;
	position: relative;
}

.progress {
	height: 100%;
	width: 0%;
	background: var(--progress-fill);
	border-radius: 5px;
}

.time {
	font-size: 0.75rem;
	color: var(--time-color);
	min-width: 70px;
	text-align: right;
}

#volume {
	width: 80px;
	accent-color: var(--volume-color);
}

/* Player als relativer Container für absolute Positionierung des Visualizers */
.player {
	position: relative;
	overflow: hidden;
}

/* Visualizer-Container – hinter den Inhalten */
#visualizer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	pointer-events: none; /* Klicks gehen durch */
}

/* Einzelne Balken */
#visualizer .bar {
	width: 8px;
	margin: 0 2px;
	background: linear-gradient(to top, #A4F0A7 0%, #db84d2 50%, #A4F0A7 100%);
	transition: height 0.05s ease;
	border-radius: 4px 4px 0 0;
	opacity: 0.5;
}

/* Toggle‑Button (unverändert) */
#visualizer-toggle {
    background: rgba(108, 117, 125, 0.8);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    margin-left: 5px;
}

/* Alle anderen Inhalte des Players über den Visualizer legen */
.player > *:not(#visualizer) {
	position: relative;
	z-index: 1;
}

/* Player-Style */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
	background-image: url(blue-stars.png);
	background-repeat: no-repeat;
	background-size: cover;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	display: flex; justify-content: center; align-items: center;
	min-height: 100vh; margin: 0; opacity: 0.98;
}
.player {
	background: rgba(20, 20, 30, 0.9); backdrop-filter: blur(5px);
	border-radius: 20px; padding: 15px; width: 100%; max-width: 400px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1);
	color: white;
}
.player-header {
	display: flex; align-items: center; gap: 10px; margin-bottom: 15px;
	padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stream-selector {
	background: rgba(0, 0, 0, 0.5);
	color: #ff4d4d;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 1rem;
	font-weight: bold;
	flex: 1;
	cursor: pointer;
	outline: none;
}
.stream-selector option {
	background: #2a2a3a;
	color: #ff4d4d;
}
.live {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}
.live-badge {
	color: white; font-size: 0.9rem; font-weight: bold;
	border-radius: 20px; animation: pulse 1.5s infinite;
	display: none;
}
.live-badge.visible { display: inline-block; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }
.cover-art {
	width: 100%; aspect-ratio: 1 / 1; border-radius: 12px;
	background: #2a2a3a; margin-bottom: 15px; display: flex;
	align-items: center; justify-content: center; overflow: hidden;
	border: 2px solid rgba(255,255,255,0.1);
}
.cover-art img { width: 100%; height: 100%; object-fit: cover; display: none; }
.cover-art img.visible { display: block; }
.cover-art .placeholder { font-size: 4rem; color: rgba(255,255,255,0.2); }
.now-playing { margin: 10px 0; }
.song-title-container {
	overflow: hidden;
	white-space: nowrap;
	width: 100%;
}
.song-title {
	display: inline-block;
	font-size: 1.2rem; font-weight: 500; color: #81D4FA;
	transition: transform 0.3s ease;
}
.song-title.marquee {
	animation: marquee 8s linear infinite;
}
@keyframes marquee {
	0%   { transform: translateX(370px); }
	100% { transform: translateX(-100%); }
}
.dj {
	font-size: 0.9rem; color: #ff4d4d; margin-left: 5px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.listeners {
	display: flex; align-items: center; justify-content: flex-start; gap: 5px;
	margin: 10px 0; font-size: 0.9rem; color: #ccc;
}
.listeners-count { font-weight: bold; color: #ff4d4d; }
.status-message { font-size: 0.8rem; color: #888; text-align: center; margin-top: 10px; }
.footer { font-size: 0.6rem; color: #888; text-align: center; margin-top: 10px; }
.error { color: #ff6b6b; }
.station-name { display:none }