/* ==================== 霓虹像素风格音乐播放器 ==================== */

:root {
    --neon-cyan: #00fff9;
    --neon-magenta: #ff006e;
    --neon-yellow: #ffbe0b;
    --neon-green: #39ff14;
    --neon-purple: #bf00ff;
}

/* ==================== Mini播放器（导航栏）==================== */
.mini-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-cyan);
    border-radius: 4px;
    margin-right: 12px;
    box-shadow: 
        0 0 10px var(--neon-cyan),
        inset 0 0 10px rgba(0, 255, 249, 0.1);
    position: relative;
}

.mini-player::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta), var(--neon-yellow));
    border-radius: 4px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.mini-player:hover::before {
    opacity: 0.3;
    animation: borderGlow 2s infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.mini-control-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 255, 249, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 4px;
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}

.mini-control-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background: var(--neon-cyan);
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.3s;
}

.mini-control-btn:hover {
    background: rgba(0, 255, 249, 0.2);
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: translateY(-2px);
}

.mini-control-btn:hover::after {
    opacity: 0.5;
}

.mini-control-btn:active {
    transform: translateY(0);
}

.mini-play-pause {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2), rgba(255, 0, 110, 0.2));
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
}

.mini-play-pause::after {
    background: var(--neon-magenta);
}

.mini-song-info {
    max-width: 200px;
    padding: 0 12px;
    border-left: 2px solid rgba(0, 255, 249, 0.3);
}

.mini-song-name {
    font-size: 12px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-weight: 600;
}

.mini-song-artist {
    font-size: 10px;
    color: var(--neon-yellow);
    text-shadow: 0 0 8px var(--neon-yellow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .mini-song-info {
        display: none;
    }
}

/* ==================== 音乐弹窗面板 ==================== */
.music-player-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 30, 0.95) 100%);
    border-left: 3px solid var(--neon-cyan);
    box-shadow:
        -5px 0 30px rgba(0, 255, 249, 0.5),
        inset 0 0 50px rgba(0, 255, 249, 0.05);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.music-player-panel.open {
    right: 0;
    animation: slideInGlow 0.4s ease-out;
}

@keyframes slideInGlow {
    0% {
        right: -450px;
        box-shadow: -5px 0 30px rgba(0, 255, 249, 0);
    }
    100% {
        right: 0;
        box-shadow: -5px 0 30px rgba(0, 255, 249, 0.5);
    }
}

/* ==================== 头部 ==================== */
.music-player-header {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2) 0%, rgba(255, 0, 110, 0.2) 100%);
    border-bottom: 2px solid var(--neon-cyan);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

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

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

.music-player-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 110, 0.2);
    border: 2px solid var(--neon-magenta);
    border-radius: 4px;
    color: var(--neon-magenta);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-player-close:hover {
    background: rgba(255, 0, 110, 0.4);
    box-shadow: 0 0 20px var(--neon-magenta);
    transform: rotate(90deg);
}

/* ==================== 登录状态栏 ==================== */
.login-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 255, 249, 0.05);
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
}

.login-status-info {
    flex: 1;
}

#loginStatusText {
    font-size: 13px;
    color: #94a3b8;
}

#loginStatusText.logged-in {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
}

#loginStatusText.logged-out {
    color: var(--neon-yellow);
    text-shadow: 0 0 8px var(--neon-yellow);
}

.login-actions {
    display: flex;
    gap: 8px;
}

/* ==================== 搜索区域 ==================== */
.music-search-section {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
}

.pixel-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 249, 0.3);
    border-radius: 6px;
    color: var(--neon-cyan);
    font-size: 14px;
    transition: all 0.3s;
}

.pixel-input::placeholder {
    color: rgba(0, 255, 249, 0.4);
}

.pixel-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 
        0 0 15px rgba(0, 255, 249, 0.3),
        inset 0 0 10px rgba(0, 255, 249, 0.1);
}

.pixel-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2), rgba(255, 0, 110, 0.2));
    border: 2px solid var(--neon-cyan);
    border-radius: 6px;
    color: var(--neon-cyan);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 8px var(--neon-cyan);
    position: relative;
    overflow: hidden;
}

.pixel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 249, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pixel-btn:hover::before {
    width: 300px;
    height: 300px;
}

.pixel-btn:hover {
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: translateY(-2px);
}

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

.pixel-btn-small {
    padding: 6px 14px;
    background: rgba(0, 255, 249, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 4px;
    color: var(--neon-cyan);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 6px var(--neon-cyan);
}

.pixel-btn-small:hover {
    background: rgba(0, 255, 249, 0.2);
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* ==================== 标签页 ==================== */
.music-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(0, 255, 249, 0.2);
}

.music-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.music-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    transform: translateX(-50%);
    transition: width 0.3s;
}

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

.music-tab.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    background: rgba(0, 255, 249, 0.1);
}

.music-tab.active::before {
    width: 100%;
}

/* ==================== 内容区域 ==================== */
.music-content {
    display: none;
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
}

.music-content.active {
    display: block;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== 歌曲卡片 ==================== */
.song-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 249, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.song-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
    opacity: 0;
    transition: opacity 0.3s;
}

.song-item:hover::before {
    opacity: 1;
}

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

.song-cover {
    width: 50px;
    height: 50px;
    border: 2px solid var(--neon-cyan);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 255, 249, 0.3);
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.8), rgba(255, 0, 110, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.song-item:hover .song-play-overlay {
    opacity: 1;
}

.song-info {
    flex: 1;
    margin-left: 14px;
    overflow: hidden;
}

.song-name {
    font-size: 14px;
    color: var(--neon-cyan);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(0, 255, 249, 0.5);
}

.song-artist {
    font-size: 12px;
    color: var(--neon-yellow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 6px rgba(255, 190, 11, 0.5);
}

.song-actions {
    display: flex;
    gap: 6px;
    margin-left: 10px;
}

.song-action-btn {
    width: 30px;
    height: 30px;
    background: rgba(0, 255, 249, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 6px;
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
}

.song-action-btn:hover {
    background: rgba(0, 255, 249, 0.3);
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: scale(1.1);
}

.song-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

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

.song-vip-badge {
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--neon-yellow), var(--neon-magenta));
    border: 1px solid var(--neon-yellow);
    border-radius: 4px;
    font-size: 10px;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 10px var(--neon-yellow);
}

/* ==================== 歌单 ==================== */
.playlist-header {
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlists-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 0, 110, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.playlist-item:hover {
    background: rgba(255, 0, 110, 0.1);
    border-color: var(--neon-magenta);
    box-shadow: 
        0 0 20px rgba(255, 0, 110, 0.3),
        inset 0 0 20px rgba(255, 0, 110, 0.05);
    transform: translateX(4px);
}

.playlist-cover {
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-magenta);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
}

.playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    font-size: 10px;
    color: var(--neon-cyan);
    text-align: right;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 6px var(--neon-cyan);
}

.playlist-info {
    flex: 1;
    margin-left: 14px;
    overflow: hidden;
}

.playlist-name {
    font-size: 15px;
    color: var(--neon-magenta);
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px rgba(255, 0, 110, 0.5);
}

.playlist-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
}

/* ==================== 空状态和加载状态 ==================== */
.empty-state,
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--neon-cyan);
    font-size: 14px;
}

.empty-state::before {
    content: '♪';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.loading-state::before {
    content: '⟳';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== 二维码对话框 ==================== */
.qr-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qr-dialog {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 30, 0.95) 100%);
    border: 3px solid var(--neon-cyan);
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow:
        0 0 40px rgba(0, 255, 249, 0.6),
        inset 0 0 40px rgba(0, 255, 249, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.qr-dialog-header {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.2), rgba(255, 0, 110, 0.2));
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--neon-cyan);
    border-radius: 9px 9px 0 0;
}

.qr-dialog-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan);
    letter-spacing: 1px;
}

.qr-dialog-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 110, 0.2);
    border: 2px solid var(--neon-magenta);
    border-radius: 6px;
    color: var(--neon-magenta);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-dialog-close:hover {
    background: rgba(255, 0, 110, 0.4);
    box-shadow: 0 0 20px var(--neon-magenta);
    transform: rotate(90deg) scale(1.1);
}

.qr-dialog-body {
    padding: 30px;
    text-align: center;
}

.qr-code-container {
    background: white;
    padding: 16px;
    border: 3px solid var(--neon-cyan);
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 
        0 0 30px rgba(0, 255, 249, 0.5),
        inset 0 0 20px rgba(0, 255, 249, 0.1);
    position: relative;
}

.qr-code-container::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta), var(--neon-yellow), var(--neon-cyan));
    border-radius: 12px;
    z-index: -1;
    animation: rotateBorder 4s linear infinite;
    background-size: 300% 300%;
}

@keyframes rotateBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.qr-code-image {
    display: block;
    width: 220px;
    height: 220px;
}

.qr-instructions p {
    margin: 12px 0;
}

.qr-instructions p:first-child {
    color: var(--neon-cyan);
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.qr-instructions p:last-of-type {
    color: #94a3b8;
    font-size: 12px;
}

.qr-footer {
    border-top: 1px solid rgba(0, 255, 249, 0.2);
    padding-top: 16px;
    margin-top: 20px;
}

.qr-footer p {
    color: #64748b;
    font-size: 11px;
    margin: 0;
}

/* ==================== 滚动条 ==================== */
.music-content::-webkit-scrollbar {
    width: 8px;
}

.music-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.music-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.music-content::-webkit-scrollbar-thumb:hover {
    box-shadow: 0 0 20px var(--neon-cyan);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .music-player-panel {
        width: 100%;
        right: -100%;
    }

    .song-item {
        padding: 12px;
    }

    .song-cover {
        width: 45px;
        height: 45px;
    }

    .song-name {
        font-size: 13px;
    }

    .song-artist {
        font-size: 11px;
    }

    .song-actions {
        display: none;
    }

    .playlist-cover {
        width: 50px;
        height: 50px;
    }

    .qr-code-image {
        width: 180px;
        height: 180px;
    }
}
