/* ==========================================================================
   豆包音乐播放器 - 前端样式
   外观参照经典音乐播放器：深色面板、顶部提示/音量/菜单、可滚动歌曲列表
   ========================================================================== */

:root {
	--dmp-bg: #1f2129;
	--dmp-bg-2: #282b36;
	--dmp-line: #3a3e4c;
	--dmp-text: #e8e9ee;
	--dmp-muted: #9aa0b0;
	--dmp-accent: #31c27c;
	--dmp-accent-dark: #239b62;
}

/* ---------- 基础 ---------- */
.dmp-player {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, Arial, sans-serif;
	width: 360px;
	max-width: 100%;
	background: var(--dmp-bg);
	color: var(--dmp-text);
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
	overflow: hidden;
	border: 1px solid var(--dmp-line);
	box-sizing: border-box;
}
.dmp-player * {
	box-sizing: border-box;
}

/* ---------- 悬浮模式 ---------- */
.dmp-floating {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
}
.dmp-floating.dmp-collapsed .dmp-list,
.dmp-floating.dmp-collapsed .dmp-progress-wrap,
.dmp-floating.dmp-collapsed .dmp-now {
	display: none;
}

/* ---------- 顶部栏 ---------- */
.dmp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border-bottom: 1px solid var(--dmp-line);
	background: var(--dmp-bg-2);
}
.dmp-hint {
	font-size: 12px;
	color: var(--dmp-muted);
}
.dmp-tools {
	display: flex;
	align-items: center;
	gap: 2px;
}
.dmp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	color: var(--dmp-text);
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 4px;
	line-height: 1;
	transition: color 0.15s, background 0.15s;
}
.dmp-btn:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}
.dmp-btn.active {
	color: var(--dmp-accent);
}

.dmp-volume-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
}
.dmp-volume-range {
	width: 70px;
	accent-color: var(--dmp-accent);
	cursor: pointer;
}

/* ---------- 正在播放 ---------- */
.dmp-now {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 6px;
}
.dmp-cover {
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	flex: 0 0 60px;
	background: var(--dmp-bg-2);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--dmp-line);
}
.dmp-cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dmp-cover-img[src=""],
.dmp-cover-img:not([src]) {
	visibility: hidden;
}

.dmp-meta {
	flex: 1;
	min-width: 0;
}
.dmp-title {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.dmp-artist {
	font-size: 12px;
	color: var(--dmp-muted);
	margin-top: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dmp-ctrl {
	display: flex;
	align-items: center;
	gap: 2px;
}
.dmp-main {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--dmp-accent);
	color: #fff;
}
.dmp-main:hover {
	background: var(--dmp-accent-dark);
	color: #fff;
}
.dmp-prev, .dmp-next {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

/* ---------- 进度条 ---------- */
.dmp-progress-wrap {
	padding: 4px 14px 8px;
}
.dmp-progress {
	position: relative;
	height: 6px;
	background: var(--dmp-line);
	border-radius: 3px;
	cursor: pointer;
}
.dmp-progress-bar {
	position: absolute;
	inset: 0;
}
.dmp-progress-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0%;
	background: var(--dmp-accent);
	border-radius: 3px;
}
.dmp-time {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--dmp-muted);
	margin-top: 4px;
}

/* ---------- 歌曲列表 ---------- */
.dmp-list {
	list-style: none;
	margin: 0;
	padding: 4px 0 8px;
	max-height: 260px;
	overflow-y: auto;
	border-top: 1px solid var(--dmp-line);
}
.dmp-list::-webkit-scrollbar {
	width: 8px;
}
.dmp-list::-webkit-scrollbar-track {
	background: var(--dmp-bg-2);
}
.dmp-list::-webkit-scrollbar-thumb {
	background: var(--dmp-line);
	border-radius: 4px;
}
.dmp-list::-webkit-scrollbar-thumb:hover {
	background: #4c5162;
}
.dmp-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s;
}
.dmp-item:hover {
	background: var(--dmp-bg-2);
}
.dmp-song-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-right: 10px;
}
.dmp-item-state {
	font-size: 11px;
	color: var(--dmp-muted);
	flex: 0 0 auto;
}
.dmp-item.playing .dmp-song-name {
	color: var(--dmp-accent);
}
.dmp-item.playing .dmp-item-state {
	color: var(--dmp-accent);
}
.dmp-empty {
	padding: 14px;
	font-size: 13px;
	color: var(--dmp-muted);
	text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
	.dmp-floating {
		right: 10px;
		bottom: 10px;
	}
}
