.home-grid {
    grid-template-columns: 30% 1fr !important;
}

.main-content-new {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 0;
    min-width: 0;
}

/* ================= 播放模式按钮激活态 ================= */
.ri-arrow-left-s-line{
    color:#ffffff
}
.mode-btn.active-mode {
    background: #4f46e5 !important;
    color: white !important;
}

.player-mode-btn.active-mode {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 500;
}

/* ================= 历史记录选项卡 ================= */
.history-tab {
    color: #6b7280;
}

.history-tab.active-tab {
    background: white !important;
    color: #4f46e5 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.history-count {
    min-width: 20px;
    text-align: center;
}

/* 历史列表项hover效果 */
#history-search-list li:hover .del-item,
#history-play-list li:hover .del-item,
#history-playlist-list li:hover .del-item {
    opacity: 1 !important;
}

/* 保存按钮已保存状态 */
#save-playlist-btn.saved {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #d97706 !important;
}

/* ================= 视图切换 ================= */
.view-panel {
    display: none;
    opacity: 0;
    transform: translateX(20px);
}

.view-panel.active {
    display: block;
    animation: viewSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes viewSlideIn {
    0% {
        opacity: 0;
        transform: translateX(24px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================= 顶部 Banner 样式 ================= */
.playlist-header {
    position: relative;
    width: 100%;
    height: 320px;
}

.playlist-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

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

.cover-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(245,245,250,1) 0%, rgba(245,245,250,0.7) 60%, transparent 100%);
}

.playlist-info {
    position: absolute;
    bottom: 24px;
    left: 16px;
    z-index: 2;
}

.playlist-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.playlist-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}
.like-btn {
    transition: transform 0.2s ease;
}

.like-btn.like-animate {
    animation: likePop 0.4s ease;
}

@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.like-btn:hover {
    transform: scale(1.15);
}

/* ================= 加载更多按钮 ================= */
#load-more-btn {
    transition: all 0.2s ease;
}

#load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#load-more-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ================= 歌单标签 ================= */
.playlist-chip {
    transition: all 0.2s ease;
    user-select: none;
}

.playlist-chip:hover {
    transform: translateY(-1px);
}

.playlist-chip .remove-btn {
    padding: 2px;
    border-radius: 50%;
    transition: background 0.2s;
}

.playlist-chip .remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ================= 歌单视图表单 ================= */
#view-playlist details summary {
    list-style: none;
}

#view-playlist details summary::-webkit-details-marker {
    display: none;
}

#view-playlist details summary i {
    margin-right: 4px;
}

#view-playlist code {
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
    color: #6366f1;
}

/* ================= 喜欢视图空状态 ================= */
/* 空状态默认隐藏，由 JS 根据数据控制显示 */
#liked-empty,
#playlist-empty {
    display: none;
}

/* ================= 序号样式 ================= */
.song-list li .w-6 {
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

/* ================= 加载动画 ================= */
.animate-spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* ================= 歌单项 hover ================= */
.song-list li {
    transition: background 0.15s ease;
}

.song-list li:hover .like-btn {
    opacity: 1;
}

.song-list li .like-btn {
    opacity: 0.6;
}

.song-list li:hover .like-btn {
    opacity: 1;
}

.music-section {
    border-radius: none;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(245,245,250,0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.playlist-header {
    position: relative;
    width: 100%;
    height: 320px;
}

.playlist-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

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

.cover-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(245,245,250,1) 0%, rgba(245,245,250,0.7) 60%, transparent 100%);
}

.playlist-info {
    position: absolute;
    bottom: 24px;
    left: 16px;
    z-index: 2;
}

.playlist-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.playlist-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.search-area {
    padding: 16px;
}

.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

#search-input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 16px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-size: 15px;
    outline: none;
    border: none;
    border-radius: 22px;
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.clear-btn.visible {
    opacity: 1;
}

.search-btn {
    height: 44px;
    padding: 0 20px;
    border-radius: 22px;
    border: none;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.loading-msg, .no-result-msg {
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: #666;
    display: none;
}

.song-list {
    list-style: none;
    padding: 0 16px;
    margin: 0 0 80px 0;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.song-item:active {
    background: rgba(0,0,0,0.03);
}

.song-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.song-info {
    flex: 1;
    overflow: hidden;
}

.song-name {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.song-singer {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item.active .song-name {
    color: #ff6b6b;
}

.mini-player {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 500px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mini-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    margin-right: 12px;
}

.mini-info {
    flex: 1;
    overflow: hidden;
}

.mini-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.mini-artist {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mini-controls button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#audio-player {
    display: none;
}

#full-player {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #000;
    padding-top: calc(env(safe-area-inset-top, 0px) + 40px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-padding-top: calc(env(safe-area-inset-top, 0px) + 40px);
    -webkit-padding-bottom: env(safe-area-inset-bottom, 0px);
}

#full-player.hidden {
    display: none;
}

#full-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.8);
}

#full-cover {
    width: clamp(120px, 30vh, 200px);
    height: clamp(120px, 30vh, 200px);
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin-bottom: clamp(12px, 2vh, 24px);
    background-color: #f0f0f0;
    flex-shrink: 0;
}

#full-title {
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    line-height: 1.2;
}

#full-artist {
    font-size: clamp(14px, 3vw, 18px);
    color: rgba(255,255,255,0.8);
    line-height: 1.3;
}

#progress-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    background: rgba(255,255,255,0.2);
}

#progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.1s linear;
    background: #ffffff;
}

#control-song button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#full-play {
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3) !important;
    flex-shrink: 0;
}

#full-play:hover {
    background: rgba(255,255,255,0.3) !important;
}

#lyric-box {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    text-align: center;
    padding: 8px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    color: white;
}

#lyric-box::-webkit-scrollbar {
    display: none;
}

.lyric-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lyric-container div,
.lyric-line {
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    margin: 4px 0;
    padding: 0 8px;
    will-change: opacity, transform;
}

/* 歌词大小：小 */
#full-player.lyric-size-small .lyric-container div,
#full-player.lyric-size-small .lyric-line {
    font-size: clamp(13px, 3vw, 18px);
}
#full-player.lyric-size-small .lyric-container div.cur,
#full-player.lyric-size-small .lyric-line.cur {
    font-size: clamp(15px, 3.3vw, 20px);
}

/* 歌词大小：中（默认） */
#full-player.lyric-size-medium .lyric-container div,
#full-player.lyric-size-medium .lyric-line {
    font-size: clamp(16px, 3.8vw, 24px);
}
#full-player.lyric-size-medium .lyric-container div.cur,
#full-player.lyric-size-medium .lyric-line.cur {
    font-size: clamp(18px, 4.2vw, 28px);
}

/* 歌词大小：大 */
#full-player.lyric-size-large .lyric-container div,
#full-player.lyric-size-large .lyric-line {
    font-size: clamp(19px, 4.5vw, 28px);
}
#full-player.lyric-size-large .lyric-container div.cur,
#full-player.lyric-size-large .lyric-line.cur {
    font-size: clamp(22px, 5vw, 34px);
}

.lyric-container div.cur,
.lyric-line.cur {
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    opacity: 1 !important;
    transform: scale(1) !important;
}

#full-bg::after {
    content: '';
    position: absolute;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#close-full {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#close-full:hover {
    background: rgba(255,255,255,0.3);
}

.playing-wave {
    display: flex;
    align-items: flex-end;
    height: 24px;
    gap: 2px;
    width: 22px;
    flex-shrink: 0;
}

.playing-wave span {
    width: 3px;
    background: linear-gradient(to top, #4f46e5, #818cf8);
    border-radius: 2px;
    transition: height 0.15s ease-out;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.5);
    animation: waveGlow 0.6s ease-in-out infinite alternate;
}

@keyframes waveGlow {
    0% { box-shadow: 0 0 4px rgba(79, 70, 229, 0.3); }
    100% { box-shadow: 0 0 8px rgba(129, 140, 248, 0.7); }
}

.fullscreen-icon {
    cursor: pointer;
    padding: 4px;
}

.song-item .w-12.h-12.rounded-lg {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.song-item .text-sm.font-medium {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item .text-xs {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr !important;
    }

    .playlist-header {
        height: 200px;
    }

    #full-cover {
        width: clamp(100px, 28vh, 160px);
        height: clamp(100px, 28vh, 160px);
    }

    #control-song {
        gap: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    #full-play {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.5rem !important;
    }

    #control-song button {
        padding: 2px !important;
    }

    .player-mode-btn {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }

    #full-title {
        font-size: clamp(16px, 3.5vw, 22px);
    }

    #full-artist {
        font-size: clamp(12px, 2.5vw, 15px);
    }
}

@media (max-height: 500px) {
    #full-cover {
        width: clamp(60px, 22vh, 100px);
        height: clamp(60px, 22vh, 100px);
        margin-bottom: 4px !important;
    }

    #full-title {
        font-size: 15px !important;
        margin-bottom: 2px !important;
    }

    #full-artist {
        font-size: 12px !important;
    }

    #control-song {
        gap: 0.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    #full-play {
        width: 2.25rem !important;
        height: 2.25rem !important;
        font-size: 1.125rem !important;
    }

    .player-mode-btn {
        padding: 2px 5px !important;
        font-size: 10px !important;
    }

    #player-mode-bar {
        padding: 2px !important;
    }

    #progress-track {
        height: 3px !important;
    }

    #lyric-box {
        padding: 2px 8px !important;
    }

    .lyric-container div,
    .lyric-line {
        font-size: 12px !important;
        margin: 2px 0 !important;
        line-height: 1.3 !important;
    }

    .lyric-container div.cur,
    .lyric-line.cur {
        font-size: 14px !important;
    }
}

.hidden {
    display: none !important;
}

/* ================= 搜索类型选项卡 ================= */
.search-type-tab {
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
}

.search-type-tab.active-search-tab {
    background: white !important;
    color: #4f46e5 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* 预置歌单按钮 */
.preset-playlist-btn {
    border: 1px solid #c7d2fe;
    transition: all 0.2s;
}

.preset-playlist-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
}

/* 搜索页输入框统一高度（移动端触摸友好） */
#view-search .search-panel input[type="text"] {
    height: 44px;
    line-height: 44px;
    font-size: 14px;
    box-sizing: border-box;
}

#view-search .search-panel button[id$="-btn"] {
    height: 44px;
    min-height: 44px;
}

/* 搜索页歌单列表标题栏 */
#search-playlist-list .play-all-search-playlist {
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}
