/* Shared retro radio player — homepage + podcast detail */
.player-container {
	max-width: 900px;
	margin: 0 auto 24px;
	padding: 0 16px;
	font-family: 'VT323', monospace;
}

.radio-shell {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	min-height: 200px;
	background: linear-gradient(180deg, #d8d8d8 0%, #b0b0b0 40%, #989898 100%);
	border-radius: 6px;
	padding: 8px;
	box-shadow:
		inset 0 2px 4px rgba(255, 255, 255, 0.8),
		inset 0 -2px 5px rgba(0, 0, 0, 0.4),
		0 10px 20px rgba(0, 0, 0, 0.8);
	border: 1px solid #777;
	position: relative;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.radio-shell-inner {
	width: 100%;
	height: 100%;
	display: flex;
}

/* Film grain / MPEG macroblock texture over whole chrome */
.radio-shell::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 6px;
	pointer-events: none;
	z-index: 50;
	opacity: 0.35;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
	mix-blend-mode: overlay;
}

.radio-shell > .screen-bezel,
.radio-shell > .button-panel {
	position: relative;
	z-index: 1;
}

.screen-bezel {
	flex: 1;
	min-width: 0;
	background: #333;
	border-radius: 18px;
	padding: 3px;
	box-shadow:
		inset 0 3px 6px rgba(0, 0, 0, 0.8),
		0 1px 1px rgba(255, 255, 255, 0.4);
	position: relative;
}

.lcd-screen {
	width: 100%;
	height: 100%;
	min-height: 118px;
	background-color: #535853;
	background-image:
		linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px);
	background-size: 3px 3px;
	display: flex;
	flex-direction: column;
	border-radius: 18px;
	overflow: hidden;
	position: relative;
	filter: blur(0.6px) contrast(1.1);
}

.lcd-screen::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 10;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.3) 0%,
		rgba(255, 255, 255, 0.05) 35%,
		transparent 50%,
		rgba(0, 0, 0, 0.1) 80%,
		rgba(0, 0, 0, 0.4) 100%
	);
	box-shadow:
		inset 0 8px 12px -5px rgba(255, 255, 255, 0.7),
		inset 0 -10px 15px -5px rgba(0, 0, 0, 0.8),
		inset 8px 0 10px -5px rgba(0, 0, 0, 0.5),
		inset -8px 0 10px -5px rgba(0, 0, 0, 0.5);
}

.screen-top {
	flex: 1;
	display: flex;
	align-items: center;
	padding: 0 10px 0 12px;
	color: #dcdcdc;
	text-shadow:
		0 0 4px rgba(255, 255, 255, 0.6),
		-1px 0 1px rgba(255, 0, 0, 0.5),
		1px 0 1px rgba(0, 255, 255, 0.5);
	min-height: 0;
}

.play-icon,
.radio-play-indicator {
	font-size: 14px;
	margin-right: 12px;
	color: #bbb;
	flex-shrink: 0;
}

.time-display {
	font-size: clamp(20px, 8vw, 40px);
	letter-spacing: 2px;
	margin-right: 16px;
	line-height: 1;
	flex-shrink: 0;
}

.spacer-md {
	height: 50px;
}

.audio-stats {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	margin-top: 4px;
}

.stat-row {
	display: flex;
	align-items: center;
	font-size: 16px;
	gap: 5px;
}

.stat-row .label {
	color: #aaa;
	letter-spacing: 1px;
	font-family: 'Press Start 2P', monospace;
	font-size: 8px;
}

.stat-row .value {
	background: #dcdcdc;
	color: #333;
	padding: 0 4px;
	border-radius: 3px;
	font-weight: bold;
	line-height: 1.1;
	text-shadow:
		-0.5px 0 0 rgba(255, 0, 0, 0.3),
		0.5px 0 0 rgba(0, 255, 255, 0.3);
}

.stereo-badge {
	border: 1.5px solid #dcdcdc;
	border-radius: 10px;
	padding: 3px 8px;
	font-size: 8px;
	font-family: 'Press Start 2P', monospace;
	margin-top: 4px;
	display: inline-block;
	letter-spacing: 1px;
}

.middle-icons {
	margin-left: 12px;
	display: flex;
	opacity: 0.5;
	font-size: 12px;
	gap: 5px;
}

.equalizer {
	margin-left: auto;
	width: min(150px, 28vw);
	height: 40px;
	display: flex;
	align-items: flex-end;
	gap: 2px;
	position: relative;
	padding-bottom: 2px;
	flex-shrink: 0;
}

.equalizer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size:
		100% 8px,
		10px 100%;
	z-index: 0;
}

/* Winamp-style green spectrum — uses .radio-vu-bar (never .viz-bar) so /css/somanynights.css cannot paint it purple */
.equalizer .radio-vu-bar {
	flex: 1;
	min-height: 3px;
	border-radius: 1px;
	background: linear-gradient(
		180deg,
		#66ffaa 0%,
		#00ee66 30%,
		#00aa44 70%,
		#004422 100%
	) !important;
	background-image: none !important;
	width: 100%;
	box-shadow:
		0 0 6px rgba(0, 240, 120, 0.55),
		inset 0 -1px 0 rgba(0, 40, 20, 0.35);
	z-index: 1;
	animation: none !important;
}

.screen-bottom {
	height: 35px;
	background-color: #2b2e2b;
	border-top: 1px solid #1a1a1a;
	display: flex;
	align-items: center;
	overflow: hidden;
	position: relative;
}

.ticker-text {
	white-space: nowrap;
	color: #dcdcdc;
	font-size: clamp(16px, 3.5vw, 26px);
	letter-spacing: 3px;
	text-shadow:
		0 0 5px rgba(255, 255, 255, 0.6),
		-1px 0 2px rgba(255, 0, 0, 0.5),
		1px 0 2px rgba(0, 255, 255, 0.5);
	position: absolute;
	animation: radio-ticker-scroll 12s linear infinite;
}

@keyframes radio-ticker-scroll {
	0% {
		left: 100%;
	}
	100% {
		left: -60%;
	}
}

.ticker-text.is-loading {
	animation: radio-ticker-pulse 1.2s ease-in-out infinite;
	left: 0;
	right: 0;
	text-align: center;
	width: 100%;
	padding: 0 8px;
	box-sizing: border-box;
}

@keyframes radio-ticker-pulse {
	0%,
	100% {
		opacity: 0.45;
	}
	50% {
		opacity: 1;
	}
}

.lcd-screen.radio-lcd-loading {
	filter: blur(0.6px) contrast(1.15) brightness(1.08);
}

.radio-play-indicator.is-loading {
	animation: radio-load-blink 0.85s step-start infinite;
	color: #e8e8a0;
}

@keyframes radio-load-blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.2;
	}
}

.time-display.is-loading {
	font-size: clamp(16px, 5vw, 28px);
	letter-spacing: 1px;
}

.radio-btn.radio-btn-loading {
	opacity: 0.72;
	cursor: wait;
}

.radio-btn.radio-btn-loading .radio-btn-inner {
	animation: radio-load-blink 0.85s step-start infinite;
}

.album-card.is-loading {
	outline: 2px solid rgba(200, 180, 255, 0.55);
	outline-offset: 2px;
}

.button-panel {
	width: 150px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: 5px;
	padding: 6px 4px 6px 10px;
	margin-left: 2px;
	box-sizing: border-box;
}

.button-panel-inner {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: center;
	gap: 5px;
}

.radio-btn.radio-btn-playing {
	box-shadow:
		inset 0 2px 2px rgba(255, 255, 255, 0.95),
		0 2px 6px rgba(40, 160, 60, 0.45);
}

.radio-btn.radio-btn-playing .radio-btn-inner {
	color: #1a6630;
}

.radio-vol-knob-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	margin-top: 2px;
	padding-bottom: 2px;
}

.vol-knob-label {
	font-size: 8px;
	letter-spacing: 1px;
	color: #555;
	font-family: 'Press Start 2P', monospace;
	line-height: 1;
}

.radio-vol-knob-shell {
	height: 56px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	position: relative;
}

/* Hidden range retains #volSlider for JS + testing; knob is the interaction target */
.radio-vol-hidden-range {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
	inset: auto;
}

.radio-vol-knob-surface {
	position: relative;
	width: 46px;
	height: 46px;
	margin: 0 auto;
	flex-shrink: 0;
	touch-action: none;
	outline: none;
	cursor: grab;
}

.radio-vol-knob-surface:active {
	cursor: grabbing;
}

.radio-vol-knob-surface:focus-visible {
	outline: 2px solid #4a86c7;
	outline-offset: 2px;
}

.radio-vol-knob-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	pointer-events: none;
	box-shadow:
		0 2px 6px rgba(0, 0, 0, 0.55),
		inset 0 2px 3px rgba(255, 255, 255, 0.25),
		inset 0 -3px 5px rgba(0, 0, 0, 0.6);
	background-image:
		repeating-linear-gradient(
			180deg,
			rgba(180, 180, 180, 0.22) 0px,
			rgba(160, 160, 160, 0.12) 1px,
			rgba(220, 220, 220, 0.1) 2px,
			transparent 3px,
			transparent 4px
		),
		radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
		linear-gradient(145deg, #6a6a6a 0%, #383838 40%, #1e1e1e 72%, #4a4a4a 100%);
	border: 1px solid #111;
	z-index: 0;
}

.radio-vol-knob-indicator {
	position: absolute;
	left: 50%;
	bottom: 50%;
	width: 4px;
	height: 16px;
	margin-left: -2px;
	transform-origin: 50% 100%;
	transform: rotate(-135deg);
	border-radius: 1px;
	pointer-events: none;
	z-index: 1;
	background: linear-gradient(180deg, #f8f8f8 0%, #858585 50%, #3a3a3a 100%);
	border: 1px solid #222;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.radio-vol-knob-hub {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	line-height: 1;
	color: rgba(220, 220, 220, 0.55);
	text-shadow:
		0 1px 0 rgba(0, 0, 0, 0.8),
		-1px 0 0 rgba(180, 180, 180, 0.15);
	pointer-events: none;
	z-index: 2;
	box-shadow:
		inset 0 2px 3px rgba(255, 255, 255, 0.2),
		inset 0 -2px 4px rgba(0, 0, 0, 0.7);
	background:
		radial-gradient(circle at 40% 35%, rgba(90, 90, 90, 0.6) 0%, transparent 50%),
		linear-gradient(160deg, #3a3a3a 0%, #242424 100%);
	border: 1px solid #0a0a0a;
}

.radio-btn {
	height: 30px;
	width: 40px;
	min-width: 40px;
	min-height: 30px;
	background: linear-gradient(180deg, #e0e0e0 0%, #b8b8b8 100%);
	border: 1px solid #888;
	border-radius: 15px;
	box-shadow:
		inset 0 2px 2px rgba(255, 255, 255, 0.9),
		0 2px 4px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	transition: all 0.1s;
	padding: 0;
}

.radio-btn:active {
	box-shadow:
		inset 0 2px 4px rgba(0, 0, 0, 0.3),
		0 1px 1px rgba(0, 0, 0, 0.2);
	background: linear-gradient(180deg, #b8b8b8 0%, #d0d0d0 100%);
}

.radio-btn-inner {
	width: 80%;
	height: 70%;
	background: linear-gradient(180deg, #a0a0a0 0%, #c8c8c8 100%);
	border-radius: 12px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 12px;
	color: #555;
	pointer-events: none;
}

/* Seek + transport below LCD */
.radio-seekbar-row {
	padding: 10px 0 8px;
	max-width: 800px;
	margin: 10px auto 0 auto;
}

.radio-seekbar {
	height: 12px;
	background: #2a2a2a;
	border: 1px solid #555;
	border-radius: 3px;
	position: relative;
	cursor: pointer;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
	touch-action: none;
	outline: none;
}

.radio-seekbar:focus-visible {
	outline: 2px solid #4a86c7;
	outline-offset: 2px;
}

.radio-seekbar.is-dragging {
	cursor: grabbing;
}

.radio-seek-buffer {
	position: absolute;
	inset: 0 auto 0 0;
	height: 100%;
	width: 0%;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 2px;
	pointer-events: none;
}

.radio-seek-fill {
	height: 100%;
	background: linear-gradient(90deg, #6a6a6a 0%, #b0b0b0 100%);
	border-radius: 2px;
	width: 0%;
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
	transition: width 0.1s linear;
	pointer-events: none;
	position: relative;
	z-index: 1;
}

.radio-seekbar.is-dragging .radio-seek-fill {
	transition: none;
}

.radio-seek-handle {
	position: absolute;
	top: -3px;
	width: 10px;
	height: 16px;
	background: linear-gradient(180deg, #e8e8e8 0%, #888 50%, #666 100%);
	border: 1px solid #aaa;
	border-radius: 2px;
	left: 0%;
	transform: translateX(-50%);
	cursor: grab;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
	touch-action: none;
	z-index: 2;
	transition: transform 0.12s ease, height 0.12s ease, width 0.12s ease, top 0.12s ease;
}

.radio-seek-handle.is-dragging,
.radio-seekbar:hover .radio-seek-handle,
.radio-seekbar.is-dragging .radio-seek-handle {
	cursor: grabbing;
	transform: translateX(-50%) scale(1.15);
}

.radio-seek-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0%;
	transform: translateX(-50%);
	padding: 2px 6px;
	background: rgba(0, 0, 0, 0.88);
	border: 1px solid #555;
	color: #eee;
	font-family: 'VT323', monospace;
	font-size: 14px;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease;
	z-index: 5;
}

.radio-seek-tooltip.is-visible {
	opacity: 1;
	visibility: visible;
}

body.radio-seek-dragging {
	user-select: none;
	cursor: grabbing;
}

/* Seek only (transport lives in .button-panel) */
.player-chrome-wrap {
	max-width: 900px;
	margin: 0 auto;
}

.post-body .player-container {
	margin: 20px auto 28px;
}

@media (max-width: 768px) {
	.player-container {
		padding: 0 12px;
		margin-bottom: 16px;
	}

	.radio-shell-inner {
		flex-direction: column;
	}

	.button-panel {
		width: 100%;
		margin-left: 0;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 8px;
		padding: 8px 4px;
	}

	.screen-top {
		flex-wrap: wrap;
		row-gap: 6px;
		padding: 8px 10px;
		align-items: center;
	}

	.play-icon,
	.radio-play-indicator {
		margin-right: 8px;
	}

	.time-display {
		font-size: clamp(18px, 6vw, 28px);
		margin-right: 8px;
	}

	.middle-icons {
		display: none;
	}

	.equalizer {
		width: min(120px, 38vw);
		margin-left: auto;
	}

	.lcd-screen {
		min-height: 96px;
	}

	.radio-btn {
		min-width: 44px;
		min-height: 44px;
		width: 44px;
		height: 44px;
	}

	.radio-seekbar-row {
		max-width: none;
		margin-top: 6px;
		padding: 12px 0;
	}

	.radio-seekbar {
		height: 14px;
	}

	.radio-seek-handle {
		width: 16px;
		height: 24px;
		top: 50%;
		transform: translate(-50%, -50%);
	}

	.radio-seek-handle.is-dragging,
	.radio-seekbar:hover .radio-seek-handle,
	.radio-seekbar.is-dragging .radio-seek-handle {
		transform: translate(-50%, -50%) scale(1.12);
	}
}

