/*
 * AI家园 修生养性音乐播放器 — 精致奢华版
 * 设计: 深色基底 + 金色点缀 + 玻璃质感
 * 缓存: ?v=N → immutable 1 年
 */

/* ─── 播放器容器 ─── */
.mp-wrapper {
    background: linear-gradient(160deg, rgba(12, 16, 28, 0.95) 0%, rgba(15, 20, 35, 0.92) 100%);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 16px;
    padding: 0;
    backdrop-filter: blur(20px);
    box-shadow:
        0 4px 32px rgba(0,0,0,0.5),
        0 0 0 1px rgba(201,169,110,0.06) inset,
        0 0 80px rgba(99,102,241,0.04);
    overflow: hidden;
    max-width: 680px;
    margin: 0 auto;
}

/* ─── 顶部栏 ─── */
.mp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.08);
    background: rgba(201, 169, 110, 0.03);
}
.mp-header-icon {
    font-size: 1.2rem;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(99,102,241,0.1));
    border-radius: 10px;
    border: 1px solid rgba(201,169,110,0.15);
}
.mp-header-title {
    color: #c9a96e;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.mp-header-subtitle {
    color: #6b7280;
    font-size: 0.7rem;
    margin-left: 4px;
    font-weight: 400;
    letter-spacing: 0.05em;
}
.mp-header-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.mp-hdr-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    color: #6b7280;
    width: 28px; height: 28px;
    border-radius: 7px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.mp-hdr-btn:hover {
    color: #c9a96e;
    border-color: rgba(201,169,110,0.3);
    background: rgba(201,169,110,0.06);
}

/* ─── 正在播放区 ─── */
.mp-now-playing {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
}
.mp-cover-wrapper {
    position: relative;
    flex-shrink: 0;
}
.mp-cover {
    width: 64px; height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(201,169,110,0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}
.mp-cover-wrapper.playing .mp-cover {
    border-color: rgba(201,169,110,0.35);
    box-shadow: 0 4px 24px rgba(201,169,110,0.12), 0 0 0 1px rgba(201,169,110,0.08) inset;
}
.mp-cover.spinning {
    animation: mp-spin 12s linear infinite;
}
@keyframes mp-spin {
    to { transform: rotate(360deg); }
}
.mp-equalizer {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5px;
    opacity: 0;
    transition: opacity 0.3s;
}
.mp-cover-wrapper.playing .mp-equalizer {
    opacity: 1;
}
.mp-eq-bar {
    width: 2px; height: 10px;
    background: #c9a96e;
    border-radius: 1px;
    animation: mp-eq 0.8s ease-in-out infinite;
}
.mp-eq-bar:nth-child(1) { animation-delay: 0s; }
.mp-eq-bar:nth-child(2) { animation-delay: 0.1s; }
.mp-eq-bar:nth-child(3) { animation-delay: 0.2s; }
.mp-eq-bar:nth-child(4) { animation-delay: 0.3s; }
@keyframes mp-eq {
    0%, 100% { height: 6px; }
    50% { height: 16px; }
}
.mp-track-info {
    flex: 1; min-width: 0;
}
.mp-track-title {
    color: #e8e4dc;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.mp-track-artist {
    color: #786d53;
    font-size: 0.72rem;
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0.03em;
}
.mp-track-category-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    background: rgba(201,169,110,0.08);
    border-radius: 8px;
    color: #9b8c6f;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    border: 1px solid rgba(201,169,110,0.1);
}
.mp-time-display {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4a4555;
    font-size: 0.7rem;
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}
.mp-time-current {
    color: #c9a96e;
}

/* ─── 进度条 ─── */
.mp-progress-wrapper {
    padding: 0 20px 14px;
}
.mp-progress-bar {
    -webkit-appearance: none;
    width: 100%; height: 2px;
    border-radius: 1px;
    background: rgba(255,255,255,0.06);
    outline: none; cursor: pointer;
    transition: height 0.15s;
}
.mp-progress-bar:hover {
    height: 3px;
}
.mp-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #c9a96e;
    border: 2px solid #1a1a2e;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(201,169,110,0.3);
    transition: transform 0.15s;
}
.mp-progress-bar:hover::-webkit-slider-thumb {
    transform: scale(1.3);
}
.mp-progress-bar::-moz-range-thumb {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #c9a96e;
    border: 2px solid #1a1a2e;
    cursor: pointer;
}

/* ─── 控制区 ─── */
.mp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px 16px;
}
.mp-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.05);
    color: #6b7280;
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    user-select: none;
}
.mp-btn:hover {
    background: rgba(201,169,110,0.08);
    border-color: rgba(201,169,110,0.25);
    color: #c9a96e;
}
.mp-btn-play {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #c9a96e, #a68b4f);
    border: none;
    font-size: 1rem;
    color: #0a0f1e;
    box-shadow: 0 4px 16px rgba(201,169,110,0.2);
    transition: all 0.25s;
}
.mp-btn-play:hover {
    background: linear-gradient(135deg, #d4b87a, #b8944f);
    box-shadow: 0 6px 24px rgba(201,169,110,0.3);
    transform: scale(1.05);
    color: #0a0f1e;
}
.mp-btn.active {
    color: #c9a96e;
    border-color: rgba(201,169,110,0.3);
    background: rgba(201,169,110,0.08);
}
.mp-btn:disabled {
    opacity: 0.2; cursor: not-allowed;
}

/* ─── 音量 ─── */
.mp-volume {
    display: flex; align-items: center;
    gap: 6px; margin-left: 6px;
}
.mp-volume-icon {
    color: #6b7280; font-size: 0.75rem;
    cursor: pointer; transition: color 0.2s;
}
.mp-volume-icon:hover { color: #c9a96e; }
.mp-volume-bar {
    -webkit-appearance: none;
    width: 60px; height: 2px;
    border-radius: 1px;
    background: rgba(255,255,255,0.06);
    outline: none; cursor: pointer;
}
.mp-volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #9b8c6f;
    cursor: pointer;
}
.mp-volume-bar::-moz-range-thumb {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #9b8c6f;
    cursor: pointer;
}

/* ─── 播放列表切换栏 ─── */
.mp-playlist-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.mp-playlist-toggle:hover {
    background: rgba(201,169,110,0.03);
}
.mp-playlist-toggle-icon {
    color: #c9a96e;
    font-size: 0.6rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.mp-playlist.open .mp-playlist-toggle-icon {
    transform: rotate(90deg);
}
.mp-playlist-toggle-text {
    color: #8b826b;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.mp-playlist-toggle-count {
    color: #4a4555;
    font-size: 0.68rem;
    margin-left: auto;
}

/* ─── 播放列表内容区 ─── */
.mp-playlist-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    border-top: 1px solid transparent;
}
.mp-playlist.open .mp-playlist-body {
    max-height: 420px;
    border-top-color: rgba(255,255,255,0.04);
}

/* ─── 搜索 + 分类 ─── */
.mp-playlist-tools {
    padding: 12px 20px 8px;
    display: flex; flex-direction: column; gap: 8px;
}
.mp-search {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #c9a96e;
    padding: 7px 12px;
    width: 100%;
    font-size: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 0.02em;
}
.mp-search::placeholder { color: #3a3550; }
.mp-search:focus {
    border-color: rgba(201,169,110,0.3);
    background: rgba(255,255,255,0.05);
}
.mp-category-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
}
.mp-cat-tab {
    padding: 3px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    color: #5a5568;
    font-size: 0.68rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    letter-spacing: 0.02em;
}
.mp-cat-tab:hover {
    background: rgba(201,169,110,0.06);
    color: #9b8c6f;
    border-color: rgba(201,169,110,0.15);
}
.mp-cat-tab.active {
    background: rgba(201,169,110,0.1);
    color: #c9a96e;
    border-color: rgba(201,169,110,0.25);
}
.mp-cat-tab .mp-cat-count {
    color: #3a3550; font-size: 0.62rem; margin-left: 1px;
}
.mp-cat-tab.active .mp-cat-count { color: #8b7a55; }
.mp-track-count {
    color: #4a4555; font-size: 0.65rem;
    padding: 0 20px 8px;
    letter-spacing: 0.04em;
}

/* ─── 播放列表 ─── */
.mp-playlist-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 0 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.04) transparent;
}
.mp-playlist-list::-webkit-scrollbar { width: 3px; }
.mp-playlist-list::-webkit-scrollbar-track { background: transparent; }
.mp-playlist-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
}
.mp-track {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px; border-radius: 6px;
    cursor: pointer; transition: all 0.15s;
}
.mp-track:hover {
    background: rgba(201,169,110,0.04);
}
.mp-track.active {
    background: rgba(201,169,110,0.06);
    border-left: 2px solid #c9a96e;
    padding-left: 8px;
}
.mp-track.playing .mp-track-num {
    color: #c9a96e; font-weight: 600;
}
.mp-track-num {
    width: 22px; text-align: center;
    color: #3a3550; font-size: 0.7rem;
    flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.mp-track.active .mp-track-num { color: #c9a96e; }
.mp-track-info-list {
    flex: 1; min-width: 0;
}
.mp-track-title-list {
    color: #9b9588; font-size: 0.78rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.mp-track.active .mp-track-title-list { color: #d4c8a8; }
.mp-track.playing .mp-track-title-list { color: #e8dcc0; }
.mp-track-artist-list {
    color: #3a3550; font-size: 0.65rem;
    margin-top: 1px; letter-spacing: 0.03em;
}
.mp-track-duration {
    color: #3a3550; font-size: 0.68rem;
    flex-shrink: 0; font-variant-numeric: tabular-nums;
}

/* ─── 空状态 ─── */
.mp-empty {
    text-align: center; padding: 32px 20px; color: #4a4555;
}
.mp-empty-icon { font-size: 1.8rem; margin-bottom: 8px; opacity: 0.5; }
.mp-empty-text { font-size: 0.78rem; letter-spacing: 0.04em; }

/* ─── Toast ─── */
.mp-toast {
    position: fixed;
    bottom: 24px; left: 50%; transform: translateX(-50%);
    background: rgba(15,20,35,0.97);
    border: 1px solid rgba(201,169,110,0.2);
    color: #c9a96e;
    padding: 8px 20px; border-radius: 10px;
    font-size: 0.75rem; z-index: 10000;
    pointer-events: none; opacity: 0;
    transition: opacity 0.3s;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.mp-toast.show { opacity: 1; }

/* ─── 响应式 ─── */
@media (max-width: 768px) {
    .mp-wrapper { border-radius: 12px; max-width: 100%; }
    .mp-header { padding: 12px 14px; }
    .mp-now-playing { padding: 14px; gap: 12px; }
    .mp-cover { width: 48px; height: 48px; font-size: 1.2rem; }
    .mp-track-title { font-size: 0.85rem; }
    .mp-controls { padding: 0 14px 12px; gap: 7px; }
    .mp-btn { width: 30px; height: 30px; font-size: 0.7rem; }
    .mp-btn-play { width: 38px; height: 38px; font-size: 0.9rem; }
    .mp-volume-bar { width: 40px; }
    .mp-playlist-tools { padding: 10px 14px 6px; }
    .mp-playlist-list { max-height: 220px; padding: 0 8px 6px; }
    .mp-cat-tab { padding: 2px 8px; font-size: 0.64rem; }
    .mp-search { padding: 6px 10px; font-size: 0.7rem; }
    .mp-progress-wrapper { padding: 0 14px 10px; }
    .mp-playlist-toggle { padding: 8px 14px; }
}