/* docs/stylesheets/music-player.css */
.tcy-music-player {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 280px;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(233, 30, 99, 0.12), 0 2px 8px rgba(0,0,0,0.04);

    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Nunito', 'Noto Serif SC', sans-serif;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;

    resize: horizontal;
    overflow: hidden;
    min-width: 250px;
    max-width: 600px;
}

.tcy-music-player:hover {
    box-shadow: 0 12px 35px rgba(233, 30, 99, 0.18), 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.tcy-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #ec407a;
    font-weight: bold;
    font-family: 'ZCOOL KuaiLe', cursive;
    border-bottom: 1px dashed #f8bbd0;
    padding-bottom: 5px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.tcy-player-header:active {
    cursor: grabbing;
}

.tcy-player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tcy-player-title {
    min-width: 0;
}

.tcy-minimize-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(236, 64, 122, 0.12);
    color: #c2185b;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.tcy-minimize-btn:hover {
    background: rgba(236, 64, 122, 0.22);
    transform: scale(1.08);
}

/* 播放列表按钮 */
.tcy-playlist-toggle {
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s;
}
.tcy-playlist-toggle:hover {
    transform: scale(1.2);
}

.tcy-player-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tcy-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #fff 0%, #fce4ec 50%, #f8bbd0 100%);
    color: #d81b60;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(236, 64, 122, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tcy-play-btn:hover {
    background: linear-gradient(135deg, #ec407a 0%, #d81b60 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(236, 64, 122, 0.35);
}

.tcy-play-btn:active {
    transform: scale(0.95);
}

.tcy-player-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tcy-track-name {
    font-size: 0.85rem;
    color: #546e7a;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcy-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: #78909c;
    font-family: 'Fira Code', monospace;
}

.tcy-seek-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    background: transparent;
    height: 4px;
    border-radius: 2px;
    background-color: #fce4ec;
    cursor: pointer;
}

.tcy-seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #ec407a;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(236, 64, 122, 0.5);
    transition: transform 0.1s;
}

.tcy-seek-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* --- 🎵 播放列表面板样式 --- */
.tcy-playlist-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid transparent;
}

.tcy-playlist-panel.show {
    max-height: 200px;
    border-top: 1px solid rgba(236, 64, 122, 0.2);
    margin-top: 5px;
    padding-top: 5px;
}

.tcy-playlist-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 190px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #fce4ec transparent;
}

.tcy-playlist-panel ul::-webkit-scrollbar { width: 4px; }
.tcy-playlist-panel ul::-webkit-scrollbar-thumb { background-color: #fce4ec; border-radius: 2px; }

.tcy-playlist-panel li {
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #546e7a;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.2s;
}

.tcy-playlist-panel li:hover {
    background: rgba(252, 228, 236, 0.5);
    color: #d81b60;
    transform: translateX(3px);
}

.tcy-playlist-panel li.active {
    background: #fce4ec;
    color: #d81b60;
    font-weight: bold;
    border-left: 3px solid #ec407a;
}

.tcy-music-player.minimized {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
    padding: 0;
    gap: 0;
    border-radius: 999px;
    resize: none;
    overflow: visible;
}

.tcy-music-player.minimized .tcy-player-header {
    border-bottom: none;
    padding: 0;
    width: 56px;
    height: 56px;
    justify-content: center;
    cursor: pointer;
}

.tcy-music-player.minimized .tcy-player-title,
.tcy-music-player.minimized .tcy-player-body,
.tcy-music-player.minimized .tcy-playlist-panel,
.tcy-music-player.minimized .tcy-playlist-toggle {
    display: none;
}

.tcy-music-player.minimized .tcy-player-actions {
    gap: 0;
}

.tcy-music-player.minimized .tcy-minimize-btn {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    font-size: 1.05rem;
    position: relative;
    box-shadow: 0 8px 22px rgba(236, 64, 122, 0.24);
}

.tcy-music-player.minimized.is-playing .tcy-minimize-btn::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 999px;
    border: 2px solid rgba(236, 64, 122, 0.35);
    animation: tcy-music-pulse 1.6s ease-in-out infinite;
}

@keyframes tcy-music-pulse {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.12); opacity: 0.18; }
}
