/* ==================== 导航栏播放器 - 霓虹像素风格 ==================== */
.nav-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid var(--neon-cyan);
    border-radius: 4px;
    margin-right: 16px;
    transition: all 0.3s;
    box-shadow:
        0 0 10px rgba(0, 255, 249, 0.3),
        inset 0 0 10px rgba(0, 255, 249, 0.05);
    font-family: 'Zpix', 'Press Start 2P', 'Courier New', monospace;
    image-rendering: pixelated;
}

.nav-player:hover {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.15), rgba(139, 92, 246, 0.15));
    border-color: var(--neon-purple);
    box-shadow:
        0 0 20px rgba(139, 92, 246, 0.5),
        inset 0 0 15px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

.nav-player-prev,
.nav-player-play,
.nav-player-next,
.nav-player-heartbeat,
.nav-player-open {
    background: rgba(0, 255, 249, 0.1);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all 0.2s;
    image-rendering: pixelated;
}

.nav-player-prev:hover,
.nav-player-next:hover,
.nav-player-open:hover {
    background: rgba(0, 255, 249, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transform: scale(1.05);
}

.nav-player-play {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid var(--neon-cyan);
    border-radius: 4px;
}

.nav-player-play:hover {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.3), rgba(139, 92, 246, 0.3));
    box-shadow:
        0 0 15px rgba(0, 255, 249, 0.6),
        0 0 25px rgba(139, 92, 246, 0.4);
    transform: scale(1.1);
}

.nav-player-heartbeat {
    width: 32px;
    height: 32px;
    background: rgba(255, 20, 147, 0.1);
    border: 2px solid #ff1493;
    border-radius: 4px;
    color: #ff1493;
    position: relative;
    display: none; /* 默认隐藏，JS控制显示 */
}

.nav-player-heartbeat:hover {
    background: rgba(255, 20, 147, 0.2);
    box-shadow:
        0 0 15px rgba(255, 20, 147, 0.6),
        0 0 25px rgba(255, 20, 147, 0.4);
    transform: scale(1.1);
}

.nav-player-heartbeat.active {
    background: rgba(255, 20, 147, 0.3);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14%, 28% {
        transform: scale(1.15);
    }
    21%, 35% {
        transform: scale(1);
    }
}

.nav-player-info {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    max-width: 300px;
    margin: 0 8px;
    font-family: 'Zpix', 'Press Start 2P', 'Courier New', monospace;
}

.nav-player-song {
    font-size: 11px;
    font-weight: 500;
    color: var(--neon-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px var(--neon-cyan);
    letter-spacing: 1px;
}

.nav-player-artist {
    font-size: 9px;
    color: var(--neon-purple);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px var(--neon-purple);
    letter-spacing: 1px;
    margin-top: 2px;
}

/* 移动端隐藏播放器信息 */
@media (max-width: 768px) {
    .nav-player-info {
        display: none;
    }

    .nav-player {
        padding: 4px 8px;
        gap: 4px;
    }
}

/* ==================== 弹窗面板 - 霓虹像素风格 ==================== */
.music-player-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 450px;
    max-height: 650px;
    z-index: 1500;
    background: #0a0e27;
    border: 3px solid var(--neon-cyan);
    border-radius: 0;
    box-shadow:
        0 0 0 3px #1a1f3a,
        0 0 20px rgba(0, 255, 249, 0.5),
        0 0 40px rgba(0, 255, 249, 0.3),
        inset 0 0 30px rgba(0, 255, 249, 0.05);
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Zpix', 'Press Start 2P', 'Courier New', monospace;
    image-rendering: pixelated;
}

.music-player-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--neon-cyan) 20%,
        var(--neon-purple) 50%,
        var(--neon-cyan) 80%,
        transparent
    );
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.music-player-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.music-player-header {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-bottom: 3px solid var(--neon-cyan);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.music-player-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--neon-cyan),
        var(--neon-purple),
        var(--neon-cyan)
    );
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.music-player-title {
    font-size: 10px;
    color: var(--neon-cyan);
    text-shadow:
        0 0 5px var(--neon-cyan),
        0 0 10px var(--neon-cyan);
    letter-spacing: 2px;
}

.music-player-close {
    width: 28px;
    height: 28px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff0066;
    color: #ff0066;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    image-rendering: pixelated;
}

.music-player-close:hover {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 102, 0.8);
    transform: scale(1.1);
}

/* ==================== 标签页导航 - 像素风格 ==================== */
.music-tabs {
    display: flex;
    background: rgba(10, 14, 39, 0.8);
    border-bottom: 3px solid rgba(0, 255, 249, 0.3);
}

.music-tab {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-right: 2px solid rgba(0, 255, 249, 0.2);
    color: #64748b;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    font-family: 'Zpix', 'Press Start 2P', 'Courier New', monospace;
    letter-spacing: 1px;
    image-rendering: pixelated;
}

.music-tab:last-child {
    border-right: none;
}

.music-tab svg {
    transition: all 0.3s;
    filter: drop-shadow(0 0 3px currentColor);
}

.music-tab:hover {
    background: rgba(0, 255, 249, 0.1);
    color: var(--neon-cyan);
}

.music-tab.active {
    color: var(--neon-cyan);
    background: rgba(0, 255, 249, 0.15);
    box-shadow:
        inset 0 -3px 0 var(--neon-cyan),
        0 0 15px rgba(0, 255, 249, 0.3);
}

.music-tab.active svg {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        filter: drop-shadow(0 0 3px currentColor);
    }
    50% {
        filter: drop-shadow(0 0 8px currentColor);
    }
}

/* ==================== 标签页内容 ==================== */
.music-tab-contents {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: rgba(10, 14, 39, 0.5);
    display: flex;
    flex-direction: column;
}

.music-tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.music-tab-content.active {
    display: flex;
}

/* ==================== 搜索框 - 像素风格 ==================== */
.music-search-box {
    display: flex;
    gap: 8px;
    margin: 16px 16px 0 16px;
    flex-shrink: 0;
}

.music-search-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-size: 11px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
    image-rendering: pixelated;
}

.music-search-input::placeholder {
    color: rgba(100, 116, 139, 0.6);
}

.music-search-input:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow:
        0 0 10px rgba(139, 92, 246, 0.5),
        inset 0 0 10px rgba(139, 92, 246, 0.1);
}

.music-search-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    image-rendering: pixelated;
}

.music-search-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.3), rgba(139, 92, 246, 0.3));
    box-shadow: 0 0 15px rgba(0, 255, 249, 0.6);
    transform: translateY(-2px);
}

.music-search-btn:active {
    transform: translateY(0);
}

/* ==================== 歌曲列表 - 像素风格 ==================== */
.music-song-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
}

.music-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 249, 0.3);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    image-rendering: pixelated;
}

.music-song-item:hover {
    background: rgba(0, 255, 249, 0.1);
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 10px rgba(0, 255, 249, 0.3),
        inset 0 0 10px rgba(0, 255, 249, 0.05);
    transform: translateX(4px);
}

.music-song-item:active {
    transform: translateX(2px);
}

.music-song-cover {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 2px solid var(--neon-cyan);
    flex-shrink: 0;
    image-rendering: pixelated;
}

.music-song-info {
    flex: 1;
    min-width: 0;
}

.music-song-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--neon-cyan);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px var(--neon-cyan);
    letter-spacing: 1px;
}

.music-song-artist {
    font-size: 8px;
    color: var(--neon-purple);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 3px var(--neon-purple);
    letter-spacing: 1px;
}

.music-song-duration {
    font-size: 9px;
    color: #64748b;
    font-family: 'Courier New', monospace;
}

/* ==================== 删除按钮 ==================== */
.music-song-delete {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 0;
}

.music-song-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
}

.music-song-delete:active {
    transform: scale(0.95);
}

.music-song-delete svg {
    pointer-events: none;
}

/* ==================== Toast 提示 ==================== */
.music-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 12px 24px;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Zpix', monospace;
    text-shadow: 0 0 5px var(--neon-cyan);
    box-shadow:
        0 0 10px rgba(0, 255, 249, 0.3),
        inset 0 0 10px rgba(0, 255, 249, 0.1);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.music-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== 空状态 - 像素风格 ==================== */
.music-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.music-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.music-empty-text {
    font-size: 10px;
    color: #64748b;
    letter-spacing: 1px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .music-player-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 70vh;
    }

    .music-tab {
        font-size: 8px;
        padding: 10px 6px;
    }

    .music-tab svg {
        width: 14px;
        height: 14px;
    }

    .music-song-name {
        font-size: 9px;
    }

    .music-song-artist {
        font-size: 7px;
    }
}

/* ==================== 滚动条 - 像素风格 ==================== */
.music-song-list::-webkit-scrollbar {
    width: 10px;
}

.music-song-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 249, 0.2);
}

.music-song-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border: 2px solid rgba(0, 255, 249, 0.5);
}

.music-song-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-purple), var(--neon-cyan));
    box-shadow: 0 0 10px var(--neon-cyan);
}
