/* =========================================================
   Top IA Music Productions Pro — Player Styles
   Inspirado en la UI de reproductor de Audiomack
   ========================================================= */

.topia-player {
	--topia-accent: #ff7a00;
	--topia-text: #ffffff;
	--topia-text-dim: rgba(255, 255, 255, 0.6);
	--topia-track-bg: rgba(255, 255, 255, 0.12);

	background: #15171c;
	color: var(--topia-text);
	border-radius: 18px;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
	max-width: 640px;
	width: 100%;
	box-sizing: border-box;
}

.topia-player * {
	box-sizing: border-box;
}

/* ---------- TOP: portada + info ---------- */
.topia-player__top {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 18px;
}

.topia-player__cover {
	position: relative;
	width: 72px;
	height: 72px;
	flex-shrink: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #2a2d35;
}

.topia-player__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.topia-player__cover-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.35);
	border: none;
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease;
	padding: 0;
}

.topia-player__cover:hover .topia-player__cover-play {
	opacity: 1;
}

.topia-player__cover-play svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

.topia-player__info {
	min-width: 0;
	flex: 1;
}

.topia-player__title {
	margin: 0 0 2px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--topia-text);
}

.topia-player__artist {
	margin: 0;
	font-size: 14px;
	color: var(--topia-text-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topia-player__genre {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--topia-accent);
	font-weight: 600;
}

/* ---------- CONTROLES ---------- */
.topia-player__controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.topia-player__btn {
	background: var(--topia-accent);
	border: none;
	width: 42px;
	height: 42px;
	min-width: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
	padding: 0;
}

.topia-player__btn:hover {
	transform: scale(1.06);
}

.topia-player__btn svg {
	width: 20px;
	height: 20px;
	fill: #15171c;
}

.topia-player__btn--mute {
	background: transparent;
	width: 28px;
	height: 28px;
	min-width: 28px;
}

.topia-player__btn--mute svg {
	width: 18px;
	height: 18px;
	fill: var(--topia-text-dim);
}

.topia-player__time {
	font-size: 12px;
	color: var(--topia-text-dim);
	min-width: 38px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.topia-player__progress {
	flex: 1;
	cursor: pointer;
	padding: 10px 0;
}

.topia-player__progress-bar {
	position: relative;
	height: 4px;
	background: var(--topia-track-bg);
	border-radius: 4px;
	width: 100%;
}

.topia-player__progress-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	background: var(--topia-accent);
	border-radius: 4px;
}

.topia-player__progress-handle {
	position: absolute;
	top: 50%;
	left: 0%;
	width: 12px;
	height: 12px;
	background: #fff;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	transition: transform 0.1s ease;
}

.topia-player__progress:hover .topia-player__progress-handle {
	transform: translate(-50%, -50%) scale(1.2);
}

.topia-player__volume {
	display: none;
	align-items: center;
	gap: 6px;
}

@media (min-width: 560px) {
	.topia-player__volume {
		display: flex;
	}
}

.topia-player__volume-range {
	width: 70px;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: var(--topia-track-bg);
	border-radius: 4px;
	outline: none;
	cursor: pointer;
}

.topia-player__volume-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.topia-player__volume-range::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border: none;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

/* ---------- ACCIONES (Like / Playlist / Share / Re-Up) ---------- */
.topia-player__actions {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-wrap: wrap;
}

.topia-player__action {
	display: flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	color: var(--topia-text-dim);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 0;
	transition: color 0.15s ease;
}

.topia-player__action svg {
	width: 18px;
	height: 18px;
	fill: var(--topia-text-dim);
	transition: fill 0.15s ease;
}

.topia-player__action:hover,
.topia-player__action.is-active {
	color: var(--topia-accent);
}

.topia-player__action:hover svg,
.topia-player__action.is-active svg {
	fill: var(--topia-accent);
}

.topia-player__plays {
	margin-left: auto;
	font-size: 12px;
	color: var(--topia-text-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.topia-player {
		padding: 16px;
	}

	.topia-player__cover {
		width: 56px;
		height: 56px;
	}

	.topia-player__title {
		font-size: 16px;
	}

	.topia-player__actions {
		gap: 12px;
	}

	.topia-player__plays {
		width: 100%;
		margin-left: 0;
		order: 5;
		text-align: right;
	}
}
