.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.15s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

:root {
    --primary: #403e3e;
    --primary-hover: #a4aaa6;
    --primary-light: rgba(29, 185, 84, 0.1);
    
    --bg-base: #000000;
    --bg-highlight: #1a1a1a;
    --bg-surface: #121212;
    --bg-elevated: #242424;
    --bg-card: #181818;
    --bg-card-hover: #282828;
    
    --text-base: #ffffff;
    --text-subdued: #a7a7a7;
    --text-bright: #ffffff;
    
    --topbar-height: 142px;
    --player-height: 90px;
    
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-base);
    color: var(--text-base);
    overflow: hidden;
    line-height: 1.5;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ========== 顶部导航栏 ========== */
.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.topbar-mobile {
    display: none;
}

.topbar-row-1,
.topbar-row-2 {
    max-width: 80vw;
    margin: 0 auto;
}

.topbar-row-1 {
    min-height: 64px;
    align-items: center;
}

.topbar-row-2 {
    display: flex;
    justify-content: center;max-width: 80vw;
    align-items: center;
    min-height: 44px;
    padding: 0 16px 10px;
}

.platform-logo {
    transition: all 0.3s;
}

.platform-logo:hover {
    transform: scale(1.1);
}

.theme-btn,
.tool-btn {
    background: var(--bg-elevated);
    color: var(--text-subdued);
}

.theme-btn:hover,
.tool-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-base);
}

/* 平台名称响应式 */
#platform-name {
    transition: all 0.3s ease;
}

/* 搜索框 */
.search-container {
    position: relative;
    background: var(--bg-elevated);
}

.search-container input {
    color: var(--text-base);
}

.search-container input::placeholder {
    color: var(--text-subdued);
}

.search-tag {
    color: var(--text-subdued);
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-tag:hover {
    color: var(--text-base);
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .search-tag:hover {
    background: rgba(0, 0, 0, 0.06);
}

.search-btn {
    color: var(--text-subdued);
}

.search-btn:hover {
    color: var(--text-base);
}

/* 搜索设置面板 */
.search-settings-panel {
    background: var(--bg-elevated);
    animation: slideDown 0.2s ease-out;
    z-index: 100 !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索平台标签 */
.search-source-tag {
    background: var(--bg-card);
    color: var(--text-subdued);
    border: none;
    transition: all 0.2s;
}

.search-source-tag:hover {
    background: var(--bg-elevated);
}

.search-source-inactive {
    background: var(--bg-card);
    color: var(--text-subdued);
}

.search-platform-label {
    color: var(--text-subdued);
}

.search-source-tag.bg-primary {
    background: var(--primary) !important;
    color: white !important;
}

.search-btn {
    padding: 4px 8px;
    transition: all 0.2s;
}

.search-btn:hover {
    transform: scale(1.1);
}

/* Tab 导航 */
.tab-nav-container {
    background: var(--bg-surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-tab-nav {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========== 底部播放栏 PC端 ========== */
.player-content-pc {
    padding-left: 10vw;
    padding-right: 10vw;
}

.player-bar {
    background: var(--bg-elevated);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 80px;
    border-radius: 0 0 12px 12px;
}

.player-content {
    padding-top: 0;
}

.track-progress {
    display: flex;
    align-items: center;
    gap: 6px;
}

.track-progress .tabular-nums {
    font-variant-numeric: tabular-nums;
    min-width: 32px;
}

.track-progress .tabular-nums:last-child {
    text-align: right;
}

.progress-bar-mini {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
}

.progress-bar-mini:hover {
    height: 6px;
}

.progress-bar-mini .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

.progress-bar-mini .progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.progress-bar-mini:hover .progress-fill::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.progress-bar-mini.is-scrubbing .progress-fill::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.14);
}

.player-lyric-line {
    color: var(--text-subdued);
    font-size: 0.8rem;
    line-height: 1.2;
    max-width: 400px;
    text-align: center;
    min-height: 1em;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: height 0.15s;
}

.volume-slider:hover {
    height: 6px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.15s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.control-btn {
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-subdued);
}

.control-btn:hover {
    color: var(--text-base);
}

.control-btn:active,
.play-btn:active,
.control-btn-m:active,
.play-btn-m:active {
    transform: scale(0.96);
}

@keyframes tapPulseIn {
    0% { transform: scale(1); filter: brightness(1); }
    45% { transform: scale(0.92); filter: brightness(1.08); }
    100% { transform: scale(1); filter: brightness(1); }
}

.tap-pulse {
    animation: tapPulseIn 0.18s ease-out;
}

.play-btn {
    width: 40px !important;
    height: 40px !important;
    background: var(--text-base) !important;
    color: var(--bg-base) !important;
}

.progress-time {
    color: var(--text-subdued);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
}

.progress-time:last-child {
    text-align: right;
}

.track-title {
    color: var(--text-base);
    display: flex;
    align-items: center;
    min-width: 0;
}
.track-title .source-badge {
    flex-shrink: 0;
}
.track-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.quality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
    color: #7dd3fc;
    background: rgba(125, 211, 252, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.25);
    cursor: pointer;
}
.quality-menu {
    position: absolute;
    z-index: 120;
    min-width: 120px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(18, 24, 33, 0.96);
    border: 1px solid rgba(125, 211, 252, 0.18);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}
.quality-menu-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.quality-menu-item:hover {
    background: rgba(125, 211, 252, 0.12);
    color: #e0f2fe;
}
.quality-menu-item.is-active {
    background: rgba(125, 211, 252, 0.18);
    color: #7dd3fc;
}

.track-artist {
    color: var(--text-subdued);
}

.track-cover-expand {
    background: rgba(0,0,0,0.5);
    color: var(--text-base);
}

.progress-bar-mini {
    background: rgba(255,255,255,0.1);
}

body.light-mode .progress-bar-mini {
    background: rgba(0,0,0,0.1);
}

/* ========== 歌词行 ========== */
.lyric-line {
    padding: 8px 24px;
    text-align: center;
    color: var(--text-subdued);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: all 0.3s;
}

.lyric-line.lyric-active {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
}

.lyric-placeholder {
    color: var(--text-subdued);
}

.img-placeholder-icon {
    color: var(--text-subdued);
}

body.light-mode .lyric-line {
    color: var(--text-subdued);
}

body.light-mode .lyric-line.lyric-active {
    color: var(--primary);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 4px 0;
    background: transparent;
    border: none;
    color: var(--text-subdued);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
}

.tab-btn:hover {
    color: var(--text-base);
}

.tab-btn.active {
    color: var(--text-base);
    font-weight: 700;
    background: transparent;
}

.tab-btn.active .tab-text {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tab-btn i {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-top: var(--topbar-height);
}

.content-area {
    min-height: calc(100vh - var(--topbar-height) - var(--player-height));
    max-width: 80vw;
    margin: 0 auto;
}

/* ========== 歌曲列表 ========== */
.song-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 歌曲列表项：超细灰色底部边框线分隔 */
.song-item {
    display: grid;
    grid-template-columns: 50px 1fr 100px 80px;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

.song-item:hover {
    background: var(--bg-card-hover);
}

/* 正在播放的歌曲项：柔和半透明背景 + 左侧强调色边框 */
.song-item.playing {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

.song-item.playing .song-title {
    color: var(--primary);
    font-weight: 700;
}

.song-item.playing .song-artist {
    color: var(--primary);
}

.song-item.playing .song-index {
    display: none;
}

.song-item.playing .song-play-icon {
    display: flex;
}

.song-index {
    width: 20px;
    text-align: center;
    color: var(--text-subdued);
    font-size: 0.875rem;
}

.song-play-icon {
    display: none;
    width: 20px;
    justify-content: center;
}

.song-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.song-title {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    color: var(--text-subdued);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-album {
    color: var(--text-subdued);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    color: var(--text-subdued);
    font-size: 0.875rem;
    text-align: right;
}

/* ========== 播放列表 ========== */
.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* 播放列表中正在播放的项：柔和半透明背景 + 左侧强调色边框 */
.playlist-item.playing {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--primary);
    padding-left: 9px;
}

.playlist-item.playing .playlist-title {
    color: var(--primary);
    font-weight: 700;
}

.playlist-item.playing .playlist-artist {
    color: var(--primary);
}

.playlist-cover {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-elevated);
    position: relative;
    flex-shrink: 0;
}

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

.source-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1;
    padding: 1px 4px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--badge-color, #9ca3af) 18%, transparent);
    color: var(--badge-color, #9ca3af);
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

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

.playlist-title {
    font-weight: 600;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    min-width: 0;
}
.playlist-title .source-badge {
    flex-shrink: 0;
}
.playlist-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.playlist-artist {
    color: var(--text-subdued);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-more,
.playlist-remove {
    opacity: 0;
    color: var(--text-subdued);
    transition: all 0.2s;
}

.playlist-more {
    margin-right: 0.35rem;
}

.playlist-item:hover .playlist-more,
.playlist-item:hover .playlist-remove {
    opacity: 1;
}

.playlist-more:hover {
    color: var(--text-primary);
}

.playlist-remove:hover {
    color: #ef4444;
}

/* ========== 模态框 ========== */
.modal-overlay {
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-elevated);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-close {
    color: var(--text-subdued);
    transition: all 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-base);
    transform: rotate(90deg);
}

.modal-card {
    background: var(--bg-card);
}

.modal-card-hover:hover {
    background: var(--bg-card-hover);
}

.toggle-track {
    background: var(--bg-surface);
}

.xiaoai-cast-card,
.xiaoai-cast-preview {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
}

.xiaoai-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-base);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.xiaoai-inline-btn:hover {
    background: rgba(255,255,255,0.08);
}

.xiaoai-device-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.xiaoai-device-select-wrap {
    flex: 1;
    min-width: 0;
}

.xiaoai-cast-settings-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.xiaoai-setting-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.xiaoai-setting-field .input {
    width: 100%;
    min-width: 0;
}

.xiaoai-cast-preview-main {
    color: var(--text-base);
    font-weight: 600;
}

.xiaoai-tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.xiaoai-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.035);
    color: var(--text-subdued);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
}

.xiaoai-tab-btn:hover {
    color: var(--text-base);
    background: rgba(255,255,255,0.06);
}

.xiaoai-tab-btn.is-active {
    color: #fff;
    border-color: rgba(29, 185, 84, 0.45);
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.88), rgba(21, 154, 69, 0.88));
    box-shadow: 0 14px 30px rgba(21, 154, 69, 0.18);
}

.xiaoai-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.xiaoai-help-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.xiaoai-help-list > div {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    line-height: 1.5;
    color: var(--text-base);
}

#xiaoai-tab-panel-device .xiaoai-cast-card {
    padding: 14px !important;
}

#xiaoai-tab-panel-device .xiaoai-status-grid {
    gap: 10px;
}

.xiaoai-status-top {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.xiaoai-status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.xiaoai-status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}

.xiaoai-status-item span {
    font-size: 0.75rem;
    color: var(--text-subdued);
}

.xiaoai-status-item strong {
    color: var(--text-base);
    font-size: 0.9rem;
}

.xiaoai-status-item-wide {
    grid-column: 1 / -1;
}

.xiaoai-status-refresh-compact {
    width: 100%;
    min-height: 100%;
    justify-content: center;
}

.xiaoai-volume-box,
.xiaoai-tts-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.dlna-manual-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.dlna-manual-row .input {
    flex: 1;
    min-width: 0;
}

.xiaoai-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.xiaoai-cast-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.xiaoai-cast-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text-base);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

#xiaoai-tab-panel-device .xiaoai-cast-action {
    min-height: 42px;
}

.xiaoai-cast-action:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.08);
}

.xiaoai-cast-action.primary {
    background: linear-gradient(135deg, #1db954, #159a45);
    border-color: transparent;
    color: #fff;
}

.xiaoai-cast-action.primary:hover {
    background: linear-gradient(135deg, #22c55e, #17924a);
}

@media (max-width: 640px) {
    .xiaoai-tabbar,
    .xiaoai-cast-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xiaoai-help-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .xiaoai-device-row {
        align-items: stretch;
        gap: 8px;
    }

    .xiaoai-cast-settings-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .xiaoai-status-top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .xiaoai-control-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .xiaoai-status-grid {
        grid-template-columns: 1fr;
    }

    .xiaoai-tab-btn,
    .xiaoai-cast-action,
    .xiaoai-inline-btn {
        min-height: 40px;
    }

    .xiaoai-tab-btn,
    .xiaoai-cast-action {
        padding: 10px 10px;
        gap: 6px;
        font-size: 0.88rem;
    }

    .xiaoai-cast-action span {
        font-size: 0.84rem;
    }

    .xiaoai-volume-box,
    .xiaoai-tts-box {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
    }

    .dlna-manual-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .dlna-manual-row .input {
        flex-basis: 100%;
    }

    .xiaoai-volume-box .volume-slider,
    .xiaoai-tts-box .input {
        flex: 1;
        min-width: 0;
    }

    .xiaoai-volume-box .xiaoai-inline-btn,
    .xiaoai-tts-box .xiaoai-inline-btn,
    .dlna-manual-row .xiaoai-inline-btn,
    .xiaoai-device-row .xiaoai-inline-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .xiaoai-status-item {
        padding: 8px 10px;
    }

    .xiaoai-status-item strong {
        font-size: 0.84rem;
    }

    .xiaoai-status-item span {
        font-size: 0.7rem;
    }

    #xiaoai-tab-panel-device .xiaoai-cast-card {
        padding: 12px !important;
    }

    #xiaoai-tab-panel-device .xiaoai-control-grid,
    #xiaoai-tab-panel-device .xiaoai-status-grid {
        gap: 8px;
    }

    #xiaoai-tab-panel-device .xiaoai-cast-action {
        min-height: 38px;
    }

    .xiaoai-status-refresh-compact {
        font-size: 0.78rem;
        padding: 8px 10px;
    }
}

@media (max-width: 380px) {
    .xiaoai-cast-actions {
        grid-template-columns: 1fr;
    }

    .xiaoai-device-row,
    .xiaoai-cast-settings-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .xiaoai-status-top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .xiaoai-tabbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xiaoai-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xiaoai-status-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 播放列表侧边栏 ========== */

/* 播放列表面板：顶部对齐导航栏，底部止于播放栏上方，避免内容被遮挡 */
.playlist-panel {
    background: var(--bg-surface);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: var(--player-height);
    height: auto;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    padding: 10px 12px !important;
}

/* 播放列表内容区：flex-1占满剩余空间，底部留出间距 */
.playlist-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    margin: 8px 10px 0;
}

.playlist-body .playlist-item:last-child {
    border-bottom: none;
}

.playlist-close {
    color: var(--text-subdued);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.playlist-close:hover {
    color: var(--text-base);
}

.playlist-clear {
    color: var(--text-subdued);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.playlist-clear:hover {
    color: #ef4444;
}

/* ========== 可视化面板 ========== */
.visualizer-panel {
    background: var(--bg-base);
}

.visualizer-close {
    color: var(--text-base);
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.visualizer-close:hover {
    background: rgba(255,255,255,0.2);
}

body.light-mode .visualizer-close {
    background: rgba(0,0,0,0.08);
}

body.light-mode .visualizer-close:hover {
    background: rgba(0,0,0,0.15);
}

/* 平台选择 */
.platform-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.platform-option:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.platform-option.active {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}

.platform-option-desc {
    color: var(--text-subdued);
}

.platform-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.platform-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.platform-option.disabled:hover {
    background: var(--bg-card);
    transform: none;
}

/* ========== 加载动画 ========== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-elevated);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========== 空状态 ========== */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-subdued);
}

.empty i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ========== 章节标题 ========== */
.section-title {
    padding: 24px 0 16px;
}

.section-title h2 {
    color: var(--text-base);
}

/* 推荐歌单标题行右侧解析歌单链接图标 */
.recommend-parse-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-subdued);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.recommend-parse-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(29, 185, 84, 0.1);
}

body.light-mode .recommend-parse-btn {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .recommend-parse-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(29, 185, 84, 0.08);
}

/* ========== 排行榜 ========== */
.lb-layout {
    display: flex;
    gap: 12px;
    height: calc(100vh - var(--topbar-height) - var(--player-height) - 48px);
    min-height: 500px;
}

.lb-sidebar {
    width: 220px;
    min-width: 220px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    padding: 10px 8px;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 28px rgba(0,0,0,0.16);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lb-sidebar::-webkit-scrollbar {
    display: none;
}

.lb-sidebar-item {
    padding: 11px 14px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    margin: 4px 0;
}

.lb-sidebar-item:hover {
    background: var(--bg-card-hover);
}

.lb-sidebar-item.active {
    background: linear-gradient(135deg, rgba(29,185,84,0.2), rgba(29,185,84,0.08));
    border-left-color: color-mix(in srgb, var(--primary) 86%, #fff 14%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 18px rgba(29,185,84,0.16);
}

.lb-sidebar-item.active .lb-sidebar-name {
    color: var(--primary);
    font-weight: 600;
}

.lb-sidebar-name {
    font-size: 0.875rem;
    color: var(--text-subdued);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.lb-sidebar-item:hover .lb-sidebar-name {
    color: var(--text-base);
}

.lb-main {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 0 20px;
    min-width: 0;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    backdrop-filter: blur(14px) saturate(116%);
    -webkit-backdrop-filter: blur(14px) saturate(116%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 30px rgba(0,0,0,0.16);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lb-main::-webkit-scrollbar {
    display: none;
}

.lb-main-header {
    position: sticky;
    top: 0;
    background: transparent;
    z-index: 5;
    padding: 12px 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-main-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lb-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-main-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

body.light-mode .lb-sidebar {
    border-right-color: rgba(15, 23, 42, 0.08);
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(248,250,252,0.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 28px rgba(15,23,42,0.08);
}

body.light-mode .lb-sidebar-item:hover {
    background: var(--bg-card-hover);
}

body.light-mode .lb-sidebar-item.active {
    background: linear-gradient(135deg, rgba(29,185,84,0.16), rgba(29,185,84,0.07));
}

body.light-mode .lb-sidebar-name {
    color: var(--text-subdued);
}

body.light-mode .lb-sidebar-item:hover .lb-sidebar-name {
    color: var(--text-base);
}

body.light-mode .lb-sidebar-item.active .lb-sidebar-name {
    color: var(--primary);
}

body.light-mode .lb-main-header {
    background: transparent;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .lb-main {
    background: linear-gradient(160deg, rgba(255,255,255,0.94), rgba(248,250,252,0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 12px 30px rgba(15,23,42,0.08);
}

/* minimal additions on top of music1 */
.player-controls {
    justify-content: center;
}

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

.discover-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 2px 12px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: color-mix(in srgb, var(--bg-card) 90%, transparent);
}

.discover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 12px;
}

.discover-title-wrap {
    min-width: 0;
}

.discover-title {
    font-size: 1.32rem;
    font-weight: 760;
    line-height: 1.22;
    letter-spacing: 0.01em;
    color: var(--text-base);
}

.discover-subtitle {
    margin-top: 2px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-subdued);
}

.discover-switch-btn {
    border: 0;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-subdued);
    background: transparent;
    transition: all 0.2s ease;
}

.discover-switch-btn:hover {
    color: var(--text-base);
    background: rgba(255, 255, 255, 0.06);
}

.discover-switch-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #ffffff 30%));
}

body.light-mode .discover-switch-btn.active {
    color: #fff;
}

.recommend-featured-carousel {
    position: relative;
    margin-bottom: 16px;
}

.recommend-featured-stage {
    position: relative;
    min-height: 0;
    height: auto;
}

.recommend-featured-stage.slide-in {
    animation: featuredFadeIn 280ms ease;
}

@keyframes featuredFadeIn {
    from { opacity: 0.16; }
    to { opacity: 1; }
}

.recommend-featured-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: rgba(10, 14, 24, 0.42);
    opacity: 0;
    transition: all 0.22s ease;
    z-index: 3;
}

.recommend-featured-nav.prev { left: 10px; }
.recommend-featured-nav.next { right: 10px; }

.recommend-featured-carousel:hover .recommend-featured-nav {
    opacity: 1;
}

.recommend-featured-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.recommend-featured-dot {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.42);
}

.recommend-featured-dot.active {
    width: 16px;
    background: #fff;
}

@media (max-width: 900px) {
    .discover-header {
        margin-bottom: 10px;
        gap: 8px;
        align-items: stretch;
        flex-direction: column;
    }
    .discover-title {
        font-size: 1.14rem;
    }
    .discover-subtitle {
        font-size: 0.72rem;
    }
    .discover-switch {
        margin: 4px 0 0;
        padding: 5px;
        width: 100%;
        justify-content: space-between;
    }
    .discover-switch-btn {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
        flex: 1 1 0;
        justify-content: center;
    }
    .recommend-featured-stage {
        min-height: 220px;
    }
    .recommend-featured-nav {
        opacity: 1;
        width: 30px;
        height: 30px;
    }
    .recommend-featured-nav.prev { left: 8px; }
    .recommend-featured-nav.next { right: 8px; }
}

/* ===== Global translucency tuning ===== */
:root {
    --bg-base: #101215;
    --bg-highlight: #171a1f;
    --bg-surface: #161a20;
    --bg-elevated: #1d222a;
    --bg-card: #1b2028;
    --bg-card-hover: #232a34;
}

body {
    background:
      radial-gradient(1200px 560px at 8% -20%, rgba(255, 255, 255, 0.03), transparent 55%),
      linear-gradient(180deg, #101215 0%, #0f1216 100%);
}

.topbar {
    background: color-mix(in srgb, var(--bg-surface) 74%, transparent) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(14px) saturate(108%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(108%) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22) !important;
}

.player-bar {
    background: color-mix(in srgb, var(--bg-elevated) 78%, transparent) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) saturate(106%);
    -webkit-backdrop-filter: blur(12px) saturate(106%);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.2);
}

.search-container,
.search-container-m,
.search-settings-panel,
.discover-switch,
.lb-main,
.lb-sidebar,
.recommend-featured,
.recommend-card,
.search-result-item,
.song-item,
.playlist-item,
.playlist-panel,
.modal-content {
    background: color-mix(in srgb, var(--bg-card) 78%, transparent) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

.recommend-card,
.search-result-item,
.song-item,
.playlist-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16) !important;
}

body.light-mode .lb-main-title {
    color: var(--text-base);
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.leaderboard-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.leaderboard-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.leaderboard-cover {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

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

.leaderboard-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.leaderboard-card:hover .leaderboard-overlay {
    opacity: 1;
}

.leaderboard-play {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.leaderboard-info {
    padding: 16px;
}

.leaderboard-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-desc {
    font-size: 0.8rem;
    color: var(--text-subdued);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 推荐歌单 ========== */
.recommend-featured {
    display: flex;
    gap: 24px;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
}

.recommend-featured:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.recommend-featured-cover {
    width: 280px;
    min-height: 280px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

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

.recommend-featured-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
}

.recommend-featured-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.recommend-featured:hover .recommend-featured-overlay {
    opacity: 1;
}

.recommend-featured-play {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.recommend-featured-info {
    padding: 24px 24px 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recommend-featured-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommend-featured-desc {
    font-size: 0.9rem;
    color: var(--text-subdued);
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding-bottom: 24px;
}

.recommend-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.recommend-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.recommend-card-cover {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

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

.recommend-card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
}

.recommend-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.recommend-card:hover .recommend-card-overlay {
    opacity: 1;
}

.recommend-card-play {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.recommend-card-info {
    padding: 12px;
}

.recommend-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-card-desc {
    font-size: 0.75rem;
    color: var(--text-subdued);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 工具类 ========== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* ========== 可视化面板 ========== */
.visualizer-panel {
    transition: opacity 0.3s;
}

.visualizer-close {
    transition: all 0.2s;
}

.visualizer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    :root {
        --topbar-height: 122px;
        --player-height: 100px;
    }

    .topbar-pc {
        display: none;
    }

    .topbar-mobile {
        display: block;
    }

    .topbar-mobile-row-1 {
        min-height: 58px;
        align-items: center;
    }

    .topbar-mobile-row-2 {
        min-height: 44px;
        align-items: center;
    }

    .tab-nav-items-m {
        flex: 1;
        justify-content: center;
    }

    .content-area {
        max-width: 100% !important;
        padding: 16px 8px !important;
    }

    .player-bar {
        height: 100px;
    }

    .player-content-pc {
        display: none !important;
    }

    .player-content-mobile {
        display: flex !important;
        padding: 8px 12px;
    }

    .control-btn-m {
        min-width: 36px;
        min-height: 36px;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        color: var(--text-subdued);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s;
    }

    .control-btn-m:hover {
        color: var(--text-base);
    }

    .play-btn-m {
        min-width: 36px;
        min-height: 36px;
        width: 32px;
        height: 32px;
        background: var(--text-base) !important;
        color: var(--bg-base) !important;
    }

    .progress-bar-mini {
        height: 3px !important;
    }

    .search-result-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 8px;
    }

    .search-result-header {
        display: none !important;
    }

    .search-result-item {
        grid-template-columns: 44px minmax(240px, 1fr) auto !important;
        min-width: 500px;
        gap: 12px !important;
        padding: 8px 10px !important;
    }

    .sr-col-artist {
        display: none !important;
    }

    .sr-col-duration {
        display: none !important;
    }

    .sr-col-index {
        display: none !important;
    }

    .sr-col-actions {
        display: flex !important;
        opacity: 1 !important;
        min-width: 200px !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    .sr-col-img {
        width: 44px;
        height: 44px;
    }

    .sr-col-name {
        min-width: 0;
        overflow: hidden;
    }

    .sr-song-name {
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .sr-col-name .sr-song-artist-mobile {
        display: block;
        pointer-events: none;
    }

    .search-songlist-header {
        display: none !important;
    }

    .search-songlist-item {
        grid-template-columns: 40px 1fr !important;
        gap: 16px !important;
        padding: 6px 8px !important;
    }

    .search-songlist-header .sr-col-index,
    .search-songlist-item .sr-col-index {
        display: none !important;
    }

    .search-songlist-header .sr-col-artist,
    .search-songlist-item .sr-col-artist {
        display: none !important;
    }

    .search-songlist-header .sr-col-actions,
    .search-songlist-item .sr-col-actions {
        display: none !important;
    }

    .search-songlist-item .sr-col-name {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        overflow: hidden;
    }

    .search-songlist-item .sr-songlist-creator-mobile {
        display: block;
    }

    .lb-layout {
        flex-direction: column;
        height: auto;
    }

    .lb-sidebar {
        display: none;
    }

    /* 移动端自定义下拉组件：显示 */
    .lb-custom-select {
        display: block !important;
    }

    .lb-main {
        padding: 0 4px;
    }

    .lb-main-header {
        padding: 8px 0 4px;
    }

    .lb-main-title {
        font-size: 1.1rem;
    }

    /* 移动端排行榜操作按钮：迷你胶囊样式 */
    .lb-main-actions .toolbar-action-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .recommend-featured {
        flex-direction: row;
        align-items: stretch;
    }

    .recommend-featured-cover {
        width: 42%;
        min-height: 180px;
    }

    .recommend-featured-info {
        width: 58%;
        padding: 12px;
    }

    .recommend-featured-title {
        font-size: 1.1rem;
    }

    .sr-action-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        flex: 0 0 40px !important;
        aspect-ratio: 1 / 1;
        font-size: 0.8rem;
    }

    .sr-col-actions {
        gap: 8px !important;
        padding-right: 8px;
    }

    .page-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .recommend-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .recommend-card-info {
        padding: 8px;
    }

    .leaderboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .search-toolbar-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-toolbar-actions {
        flex-wrap: wrap;
        gap: 4px;
    }

    .toolbar-action-btn {
        padding: 4px 10px !important;
        font-size: 0.7rem !important;
        border-radius: 14px !important;
        gap: 3px !important;
    }

    .toolbar-action-btn i {
        font-size: 0.55rem !important;
    }

    .toolbar-action-btn .btn-text-full {
        display: none;
    }

    .toolbar-action-btn .btn-text-mobile {
        display: inline;
    }

    .search-back-bar {
        flex-wrap: wrap;
        gap: 6px;
    }

    .search-back-bar-right {
        flex-wrap: wrap;
    }

    .back-to-top {
        right: 16px;
        bottom: 120px;
        min-width: 44px;
        min-height: 44px;
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
        z-index: 90;
    }

    .playlist-panel {
        width: 100%;
        z-index: 70;
    }

    .modal-content {
        min-width: auto !important;
        width: 90vw;
        max-width: 400px;
    }

    /* 移动端平台选项：缩小尺寸 */
    .platform-option {
        padding: 10px;
    }

    .platform-option-icon {
        width: 32px;
        height: 32px;
    }

    .platform-option .font-bold {
        font-size: 0.9rem;
    }

    #platform-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* 移动端全屏播放器：隐藏封面图片，歌词全屏显示 */
    .fs-player-main {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 20px !important;
    }

    /* 移动端隐藏封面区域 */
    .fs-left {
        display: none !important;
    }

    /* 移动端歌词区域：全屏展示 */
    .fs-right {
        max-height: none !important;
        width: 100%;
        flex: 1;
        height: 100%;
    }

    /* 移动端歌词体：占满可用空间 */
    .fs-lyric-body {
        height: 100% !important;
        max-height: calc(100vh - 180px);
    }

    /* 移动端显示歌曲信息栏 */
    .fs-mobile-track-info {
        display: block !important;
    }

    .fullscreen-player {
        bottom: 100px !important;
    }
}

@media (min-width: 769px) {
    .mobile-player-controls {
        display: none !important;
    }

    .sr-col-name .sr-song-artist-mobile {
        display: none;
    }

    .lb-custom-select {
        display: none !important;
    }

    .toolbar-action-btn .btn-text-full {
        display: inline;
    }

    .toolbar-action-btn .btn-text-mobile {
        display: none;
    }
}

/* ========== 搜索工具栏 ========== */
.search-toolbar {
    padding: 12px 0;
    background: transparent !important;
    border-color: transparent !important;
}

.search-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--text-subdued) 18%, transparent);
    background: transparent;
}

.search-mode-btns {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.search-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: var(--text-subdued);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.search-mode-btn:hover {
    color: var(--text-base);
}

.search-mode-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

body:not(.light-mode) .search-mode-btn.active {
    color: #1db954;
    border-bottom-color: #1db954;
}

/* Tab内操作按钮：全新设计 - 圆角胶囊样式 + 微妙渐变 */
.toolbar-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    color: var(--text-base);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-action-btn:hover {
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.15) 0%, rgba(29, 185, 84, 0.05) 100%);
    border-color: rgba(29, 185, 84, 0.3);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.15);
}

.toolbar-action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.toolbar-action-btn i {
    font-size: 0.7rem;
}

.search-toolbar-actions {
    display: flex;
    gap: 8px;
    background: transparent;
}

/* 歌单tab工具栏标题 */
.songlist-toolbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-base);
}

.songlist-toolbar-title i {
    color: var(--primary);
}

.search-back-bar {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
    align-items: center;
    justify-content: space-between;
}

.search-back-bar-right {
    display: flex;
    gap: 8px;
}

.search-toolbar-right {
    display: flex;
    gap: 8px;
}

.ai-state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.ai-state-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px;
    color: var(--text-base);
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 22px rgba(0,0,0,0.14);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-state-card:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 185, 84, 0.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 14px 26px rgba(29,185,84,0.12);
}

.ai-state-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29,185,84,0.18);
    color: #8ef0b7;
    flex: 0 0 42px;
}

.ai-state-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.ai-state-desc {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 2px;
}

.ai-state-extra {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.75;
}

body.light-mode .ai-state-card {
    border-color: rgba(15, 23, 42, 0.1);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,250,252,0.82));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 10px 22px rgba(15,23,42,0.08);
}

body.light-mode .ai-state-icon {
    background: rgba(29,185,84,0.12);
    color: #1f8e4b;
}

/* ========== 搜索结果列表 ========== */
.search-result-list {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
}

.search-result-header {
    display: grid;
    grid-template-columns: 42px 42px minmax(220px, 1fr) 92px 188px 56px;
    gap: 12px;
    align-items: center;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-subdued);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-header .sr-col-index,
.search-result-header .sr-col-img,
.search-result-header .sr-col-actions {
    visibility: hidden;
}

/* 搜索结果列表项：超细灰色底部边框线分隔 */
.search-result-item {
    display: grid;
    grid-template-columns: 42px 42px minmax(220px, 1fr) 92px 188px 56px;
    gap: 12px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: none;
}

/* ========== 搜索结果/排行榜歌曲列表 - 选中状态样式 ========== */

/* 选中行：柔和半透明背景 + 左侧强调色边框（深色模式下使用白色半透明，浅色模式单独覆盖） */
.search-result-item.selected {
    background: linear-gradient(135deg, rgba(29,185,84,0.18), rgba(255,255,255,0.05));
    border-left: 3px solid var(--primary);
    padding-left: 13px;
    border-bottom-color: rgba(29,185,84,0.18);
    transition: background 0.2s ease, border-left 0.2s ease, border-color 0.2s ease;
}

.search-result-list .search-result-item:last-child {
    border-bottom: none;
}

/* 选中行歌曲名：主色高亮 + 加粗 */
.search-result-item.selected .sr-song-name {
    color: var(--primary);
    font-weight: 700;
}

/* 选中行歌手名：主色半透明 */
.search-result-item.selected .sr-col-artist {
    color: var(--primary);
    opacity: 0.8;
}

/* 选中行序号：主色高亮 */
.search-result-item.selected .sr-col-index {
    color: var(--primary);
    font-weight: 600;
}

/* 选中行时长：主色半透明 */
.search-result-item.selected .sr-col-duration {
    color: var(--primary);
    opacity: 0.7;
}

/* 选中行操作按钮：始终可见 */
.search-result-item.selected .sr-col-actions {
    opacity: 1;
}

.search-result-item:hover .sr-col-actions {
    opacity: 1;
}

.sr-source-sup {
    font-size: 1.1rem;
    color: var(--primary);
    margin-right: 1px;
    vertical-align: super;
    font-weight: 700;
    line-height: 0;
}

.search-songlist-header,
.search-songlist-item {
    grid-template-columns: 42px 42px 1fr 120px;
}

.search-songlist-header .sr-col-index,
.search-songlist-header .sr-col-img,
.search-songlist-header .sr-col-actions {
    visibility: hidden;
}

.sr-col-index {
    text-align: center;
    color: var(--text-subdued);
    font-size: 0.875rem;
}

.sr-col-img {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.sr-col-name {
    min-width: 0;
}

.sr-song-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.sr-song-artist-mobile {
    display: none;
    color: var(--text-subdued);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.sr-song-artist-mobile:hover {
    color: var(--primary);
}

.sr-songlist-creator-mobile {
    display: none;
    color: var(--text-subdued);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 自定义排行榜下拉组件：替代原生select */
.lb-custom-select {
    display: none;
    width: 100%;
    padding: 8px 0;
    position: relative;
}

/* 下拉触发器 */
.lb-select-trigger {
    width: 100%;
    padding: 10px 40px 10px 16px;
    background: var(--bg-elevated);
    color: var(--text-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-sizing: border-box;
    user-select: none;
}

.lb-select-trigger:hover {
    border-color: var(--primary);
    background-color: var(--bg-card-hover);
}

.lb-select-trigger:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
}

/* 下拉箭头 */
.lb-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subdued);
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    pointer-events: none;
}

/* 下拉内容区域：最大高度280px + 滚动条 */
.lb-select-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    animation: lbDropdownIn 0.2s ease-out;
}

@keyframes lbDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 下拉选项 */
.lb-select-option {
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-base);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-select-option:hover {
    background: var(--bg-card-hover);
}

.lb-select-option.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(29, 185, 84, 0.08);
}

/* 浅色模式 - 自定义下拉组件适配 */
body.light-mode .lb-select-trigger {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .lb-select-trigger:hover {
    border-color: var(--primary);
}

body.light-mode .lb-select-dropdown {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body.light-mode .lb-select-option.active {
    background: rgba(29, 185, 84, 0.06);
}

.mobile-player-controls {
    display: none;
}

.mobile-play-btn {
    min-width: 44px;
    min-height: 44px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--text-base);
    color: var(--bg-base);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.mobile-list-btn {
    min-width: 44px;
    min-height: 44px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-subdued);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.sr-col-artist {
    color: var(--text-subdued);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.15s;
}

.sr-col-artist:hover {
    color: var(--primary);
    text-decoration: underline;
}

.sr-col-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    min-width: 188px;
    transition: opacity 0.15s;
}

.sr-action-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    flex: 0 0 30px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--text-subdued) 26%, transparent);
    background: color-mix(in srgb, var(--bg-elevated) 84%, transparent);
    color: color-mix(in srgb, var(--text-base) 82%, var(--text-subdued));
    border-radius: 50%;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: none;
    transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sr-action-btn:hover {
    color: var(--text-base);
    border-color: color-mix(in srgb, var(--primary) 52%, transparent);
    background: color-mix(in srgb, var(--bg-elevated) 70%, var(--primary) 14%);
    box-shadow: none;
    transform: translateY(-1px);
}

.sr-action-btn:focus {
    color: var(--text-base);
    outline: none;
    border-color: color-mix(in srgb, var(--primary) 58%, transparent);
}

.sr-action-btn-primary {
    border-color: color-mix(in srgb, var(--primary) 56%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 80%, #ffffff 20%), color-mix(in srgb, var(--primary) 66%, #000000 34%));
    color: #fff;
    box-shadow: none;
}

.sr-action-btn-primary:hover,
.sr-action-btn-primary:focus {
    color: #fff;
    border-color: color-mix(in srgb, var(--primary) 74%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #ffffff 12%), color-mix(in srgb, var(--primary) 72%, #000000 28%));
}

.sr-col-duration {
    color: var(--text-subdued);
    font-size: 0.875rem;
    text-align: right;
}

.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

.page-btn {
    padding: 8px 20px;
    background: var(--bg-elevated);
    color: var(--text-base);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--bg-card-hover);
}

.page-info {
    color: var(--text-subdued);
    font-size: 0.875rem;
}

/* ========== Toast 通知 ========== */
#toast-container {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast-item {
    background: var(--bg-elevated);
    color: var(--text-base);
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
}

.toast-item.toast-fade-out {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

body.light-mode .toast-item {
    background: var(--bg-surface);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.light-mode .back-to-top {
    background: rgba(255, 255, 255, 0.66);
    color: rgba(15, 23, 42, 0.9);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

body.light-mode .back-to-top:hover {
    background: rgba(255, 255, 255, 0.82);
}

/* ========== 移动端导航专用样式 ========== */
.topbar-mobile-row-1 {
    gap: 4px;
}

.tab-btn-m {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px 3px 0;
    background: transparent;
    border: none;
    color: var(--text-subdued);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: all 0.2s;
}

.tab-btn-m:hover {
    color: var(--text-base);
}

.tab-btn-m.active {
    color: var(--text-base);
    font-weight: 700;
    background: transparent;
}

.tab-btn-m.active .tab-text-m {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tab-btn-m i {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.tab-text-m {
    font-size: 0.8rem;
}

.theme-btn-m,
.tool-btn-m {
    background: transparent;
    color: var(--text-subdued);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn-m:hover,
.tool-btn-m:hover {
    color: var(--text-base);
}

.search-container-m {
    background: var(--bg-elevated);
}

.search-container-m input {
    color: var(--text-base);
}

.search-container-m input::placeholder {
    color: var(--text-subdued);
}

body.light-mode .tab-btn-m {
    color: var(--text-subdued);
}

body.light-mode .tab-btn-m:hover {
    color: var(--text-base);
}

body.light-mode .tab-btn-m.active {
    color: var(--text-base);
    font-weight: 700;
    background: transparent;
}

body.light-mode .tab-btn-m.active .tab-text-m {
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.light-mode .theme-btn-m,
body.light-mode .tool-btn-m {
    background: transparent;
    color: var(--text-base);
}

body.light-mode .search-container-m {
    background: var(--bg-elevated);
}

body.light-mode .search-container-m input {
    color: var(--text-base);
}

body.light-mode .search-container-m input::placeholder {
    color: #999;
}

/* ========== 浅色模式 ========== */
body.light-mode {
    --primary: #626161e6;
    --primary-hover: #5e5e5e;
    --primary-light: rgba(29, 185, 84, 0.08);
    
    --bg-base: #f5f5f5;
    --bg-highlight: #ffffff;
    --bg-surface: #ffffff;
    --bg-elevated: #e8e8e8;
    --bg-card: #f0f0f0;
    --bg-card-hover: #e0e0e0;
    
    --text-base: #1a1a1a;
    --text-subdued: #383737;
    --text-bright: #000000;
}

body.light-mode .topbar {
    background: var(--bg-surface);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .tab-nav-container,
body.light-mode .mobile-tab-nav {
    background: var(--bg-surface);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .search-container {
    background: var(--bg-elevated);
}

body.light-mode .search-tag,
body.light-mode .search-settings-panel {
    background: var(--bg-elevated);
    color: var(--text-base);
}

body.light-mode .search-settings-panel {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.light-mode .search-source-tag {
    background: var(--bg-card);
    color: var(--text-subdued);
}

body.light-mode .search-source-tag:hover {
    background: var(--bg-card-hover);
}

body.light-mode .search-container input {
    color: var(--text-base);
}

body.light-mode .search-container input::placeholder {
    color: #999;
}

body.light-mode .theme-btn,
body.light-mode .tool-btn {
    background: var(--bg-elevated);
    color: var(--text-base);
}

body.light-mode .theme-btn:hover,
body.light-mode .tool-btn:hover {
    background: var(--bg-card-hover);
}

body.light-mode .player-bar {
    background: var(--bg-surface);
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .progress-bar-mini .progress-fill {
    background: var(--primary);
}

body.light-mode .volume-slider {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .volume-slider::-webkit-slider-thumb {
    background: var(--text-base);
}

body.light-mode .play-btn {
    background: linear-gradient(140deg, #ff6e67, #ff4a61) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(255, 74, 97, 0.28) !important;
}

body.light-mode .track-cover-expand {
    background: rgba(255,255,255,0.5);
}

body.light-mode .track-cover-expand i {
    color: var(--text-base);
}

/* ========== V3 Full Redesign System ========== */
:root {
    --ui-font: "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ui-bg: #07090d;
    --ui-bg-2: #0d1117;
    --ui-surface: rgba(18, 24, 34, 0.74);
    --ui-surface-2: rgba(28, 36, 48, 0.72);
    --ui-border: rgba(255, 255, 255, 0.12);
    --ui-text: #f4f7fb;
    --ui-muted: #9da8ba;
    --ui-accent: #ff5a52;
    --ui-accent-soft: rgba(255, 90, 82, 0.18);
    --ui-shadow: 0 16px 42px rgba(0, 0, 0, 0.33);
    --ui-radius: 16px;
    --ui-radius-sm: 12px;
}

body {
    font-family: var(--ui-font);
    background:
      radial-gradient(1200px 640px at -10% -20%, rgba(255, 90, 82, 0.18), transparent 48%),
      radial-gradient(1000px 620px at 105% -10%, rgba(72, 140, 255, 0.16), transparent 52%),
      linear-gradient(160deg, var(--ui-bg), var(--ui-bg-2));
    color: var(--ui-text);
}

.topbar,
.player-bar,
.playlist-panel,
.modal-content,
.search-settings-panel,
.discover-switch,
.search-toolbar {
    background: var(--ui-surface) !important;
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    border: 1px solid var(--ui-border) !important;
    box-shadow: var(--ui-shadow);
}

.topbar {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.player-bar {
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    height: 84px;
}

#platform-name,
.discover-title,
.recommend-featured-title,
.recommend-card-title,
.leaderboard-title,
.track-title,
.fs-track-title {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.discover-subtitle,
.track-artist,
.playlist-artist,
.sr-col-artist,
.leaderboard-desc,
.recommend-card-desc,
.recommend-featured-desc {
    color: var(--ui-muted) !important;
}

.search-container,
.search-container-m {
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.theme-btn, .tool-btn, .theme-btn-m, .tool-btn-m,
.control-btn, .playlist-close, .playlist-clear {
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--ui-text);
}

.theme-btn:hover, .tool-btn:hover, .theme-btn-m:hover, .tool-btn-m:hover,
.control-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}

.play-btn, .play-btn-m {
    background: linear-gradient(140deg, #ff6e67, #ff4a61) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 10px 26px rgba(255, 74, 97, 0.42);
}

.tab-btn, .tab-btn-m, .discover-switch-btn, .search-mode-btn, .toolbar-action-btn {
    border-radius: 999px !important;
}

.tab-btn, .tab-btn-m {
    padding: 8px 14px !important;
}

.tab-btn.active, .tab-btn-m.active {
    background: rgba(255, 255, 255, 0.14) !important;
}

.discover-switch-btn.active,
.search-mode-btn.active,
.toolbar-action-btn {
    background: var(--ui-surface-2) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.toolbar-action-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}

.recommend-featured,
.recommend-card,
.leaderboard-card {
    border-radius: var(--ui-radius) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.recommend-featured:hover,
.recommend-card:hover,
.leaderboard-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.search-result-list,
.playlist-body {
    border-radius: var(--ui-radius) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    overflow: hidden;
}

.search-result-header,
.playlist-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.search-result-item,
.playlist-item {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.search-result-item:hover,
.playlist-item:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

.search-result-item.selected,
.playlist-item.playing {
    background: linear-gradient(90deg, var(--ui-accent-soft), rgba(255, 255, 255, 0.04)) !important;
    border-left: 3px solid var(--ui-accent) !important;
}

.source-badge,
.sr-source-sup {
    color: var(--ui-accent) !important;
}

.sr-action-btn,
.page-btn {
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

.sr-action-btn-primary {
    background: linear-gradient(140deg, #ff6e67, #ff4a61) !important;
    border-color: transparent !important;
}

.progress-bar-mini,
.volume-slider {
    border-radius: 999px;
}

.progress-fill,
#progress-fill,
#progress-fill-m {
    background: linear-gradient(90deg, #ff6e67, #ff4a61) !important;
}

.fs-player-bg {
    background:
      radial-gradient(520px 280px at 25% 10%, rgba(255, 90, 82, 0.28), transparent 60%),
      radial-gradient(520px 280px at 75% 12%, rgba(72, 140, 255, 0.24), transparent 60%),
      rgba(5, 8, 12, 0.92) !important;
    filter: blur(32px);
}

.fs-cover,
.track-cover,
.playlist-cover,
.sr-col-img {
    border-radius: var(--ui-radius-sm) !important;
}

body.light-mode {
    --ui-bg: #edf2f8;
    --ui-bg-2: #e6edf5;
    --ui-surface: rgba(255, 255, 255, 0.72);
    --ui-surface-2: rgba(255, 255, 255, 0.86);
    --ui-border: rgba(15, 23, 42, 0.12);
    --ui-text: #121826;
    --ui-muted: #5d6b81;
    background:
      radial-gradient(1000px 540px at 0% -20%, rgba(255, 90, 82, 0.16), transparent 52%),
      radial-gradient(1000px 540px at 100% -20%, rgba(72, 140, 255, 0.14), transparent 52%),
      linear-gradient(160deg, var(--ui-bg), var(--ui-bg-2));
}

body.light-mode .topbar,
body.light-mode .player-bar,
body.light-mode .playlist-panel,
body.light-mode .modal-content,
body.light-mode .search-settings-panel,
body.light-mode .discover-switch,
body.light-mode .search-toolbar {
    background: var(--ui-surface) !important;
    border-color: var(--ui-border) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

body.light-mode .theme-btn, body.light-mode .tool-btn, body.light-mode .theme-btn-m, body.light-mode .tool-btn-m,
body.light-mode .control-btn, body.light-mode .playlist-close, body.light-mode .playlist-clear,
body.light-mode .toolbar-action-btn, body.light-mode .search-mode-btn {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(15, 23, 42, 0.13) !important;
    color: var(--ui-text) !important;
}

body.light-mode .search-result-list,
body.light-mode .playlist-body {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
}

body.light-mode .search-result-item,
body.light-mode .playlist-item {
    border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .search-result-item:hover,
body.light-mode .playlist-item:hover {
    background: rgba(15, 23, 42, 0.05) !important;
}

body.light-mode .search-result-item.selected,
body.light-mode .playlist-item.playing {
    background: linear-gradient(90deg, rgba(255, 90, 82, 0.14), rgba(255, 255, 255, 0.8)) !important;
    border-left-color: var(--ui-accent) !important;
}

@media (max-width: 900px) {
    .topbar-row-1, .topbar-row-2 {
        max-width: 94vw;
    }
    .player-bar {
        height: 92px;
    }
    .discover-switch {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
    .discover-switch-btn {
        white-space: nowrap;
    }
}

/* ========== Modern Apple-like Refresh ========== */
:root {
    --glass-dark: rgba(20, 20, 22, 0.68);
    --glass-light: rgba(255, 255, 255, 0.68);
    --line-dark: rgba(255, 255, 255, 0.11);
    --line-light: rgba(15, 23, 42, 0.12);
}

body {
    background:
        radial-gradient(1200px 600px at 20% -20%, rgba(255, 255, 255, 0.08), transparent 45%),
        radial-gradient(1000px 500px at 100% 0%, rgba(255, 255, 255, 0.04), transparent 42%),
        var(--bg-base);
}

.topbar {
    background: var(--glass-dark);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.player-bar {
    background: var(--glass-dark);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    border-top: 1px solid var(--line-dark);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.25);
}

.search-container,
.search-container-m {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tab-btn,
.tab-btn-m {
    border-radius: 999px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.tab-btn:hover,
.tab-btn-m:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active,
.tab-btn-m.active {
    background: rgba(255, 255, 255, 0.14);
}

.tab-btn.active .tab-text,
.tab-btn-m.active .tab-text-m {
    text-decoration: none;
}

.discover-switch {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px;
    backdrop-filter: blur(8px);
}

.discover-switch-btn {
    border-radius: 999px;
}

.search-toolbar,
.playlist-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.toolbar-action-btn {
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.toolbar-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.control-btn {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.play-btn {
    border: none !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.22);
}

.track-cover {
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.playlist-panel,
.modal-content {
    backdrop-filter: blur(22px) saturate(125%);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.light-mode {
    background:
        radial-gradient(1000px 500px at 10% -20%, rgba(148, 163, 184, 0.2), transparent 50%),
        radial-gradient(800px 420px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 45%),
        #eef2f7;
}

body.light-mode .topbar,
body.light-mode .player-bar {
    background: var(--glass-light);
    border-color: var(--line-light);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body.light-mode .search-container,
body.light-mode .search-container-m {
    background: rgba(255, 255, 255, 0.76) !important;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-mode .tab-btn:hover,
body.light-mode .tab-btn-m:hover {
    background: rgba(15, 23, 42, 0.05);
}

body.light-mode .tab-btn.active,
body.light-mode .tab-btn-m.active {
    background: rgba(15, 23, 42, 0.1);
}

body.light-mode .discover-switch {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(15, 23, 42, 0.1);
}

body.light-mode .search-toolbar,
body.light-mode .playlist-header {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(15, 23, 42, 0.1);
}

body.light-mode .toolbar-action-btn,
body.light-mode .control-btn {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode .toolbar-action-btn:hover,
body.light-mode .control-btn:hover {
    background: rgba(255, 255, 255, 1);
}

/* ===== Light mode final fix (must be last) ===== */
body.light-mode {
    --bg-base: #f4f6f9;
    --bg-highlight: #eef2f7;
    --bg-surface: #ffffff;
    --bg-elevated: #f3f6fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f8fd;
    --text-base: #1f2937;
    --text-subdued: #64748b;
    --text-bright: #0f172a;
    background: linear-gradient(180deg, #f4f6f9 0%, #edf2f7 100%) !important;
}

body.light-mode .topbar {
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}

body.light-mode .player-bar {
    background: rgba(255, 255, 255, 0.9) !important;
    border-top-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08) !important;
}

body.light-mode .search-container,
body.light-mode .search-container-m,
body.light-mode .search-settings-panel,
body.light-mode .discover-switch,
body.light-mode .lb-main,
body.light-mode .lb-sidebar,
body.light-mode .recommend-featured,
body.light-mode .recommend-card,
body.light-mode .search-result-item,
body.light-mode .song-item,
body.light-mode .playlist-item,
body.light-mode .playlist-panel,
body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-mode .search-result-item {
    border-color: rgba(15, 23, 42, 0.08);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    background: transparent;
    box-shadow: none;
}

body.light-mode .search-result-item:hover {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(15, 23, 42, 0.04);
}

body.light-mode .search-result-item.selected {
    background: linear-gradient(135deg, rgba(29,185,84,0.12), rgba(255,255,255,0.98));
    border-bottom-color: rgba(29,185,84,0.24);
}

body.light-mode .search-result-list {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(15, 23, 42, 0.08);
}

/* subtle search field tint */
.search-container,
.search-container-m {
    background: rgba(255, 255, 255, 0.06) !important;
}

body.light-mode .search-container,
body.light-mode .search-container-m {
    background: rgba(15, 23, 42, 0.045) !important;
}

body.light-mode .song-item:hover {
    background: var(--bg-card-hover);
}

body.light-mode .song-item.playing {
    background: rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

body.light-mode .song-title {
    color: var(--text-base);
}

body.light-mode .song-artist,
body.light-mode .song-album,
body.light-mode .song-duration {
    color: var(--text-subdued);
}

body.light-mode .leaderboard-card,
body.light-mode .recommend-featured,
body.light-mode .recommend-card {
    background: var(--bg-card);
}

body.light-mode .leaderboard-card:hover,
body.light-mode .recommend-featured:hover,
body.light-mode .recommend-card:hover {
    background: var(--bg-card-hover);
}

body.light-mode .leaderboard-title,
body.light-mode .recommend-featured-title,
body.light-mode .recommend-card-title {
    color: var(--text-base);
}

body.light-mode .leaderboard-desc,
body.light-mode .recommend-featured-desc,
body.light-mode .recommend-card-desc {
    color: var(--text-subdued);
}

body.light-mode .playlist-panel {
    background: var(--bg-surface);
    border-left-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .playlist-title {
    color: var(--text-base);
}

body.light-mode .playlist-artist {
    color: var(--text-subdued);
}

body.light-mode .playlist-item.playing {
    background: rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--primary);
    padding-left: 9px;
}

body.light-mode .playlist-item {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .playlist-item:hover {
    background: rgba(15, 23, 42, 0.04);
}

body.light-mode .playlist-body {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .modal-content {
    background: var(--bg-surface);
    color: var(--text-base);
}

body.light-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.3);
}

body.light-mode .platform-option {
    background: var(--bg-card);
}

body.light-mode .platform-option:hover {
    background: var(--bg-card-hover);
}

body.light-mode .platform-option.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

body.light-mode .tab-btn {
    color: var(--text-subdued);
}

body.light-mode .tab-btn:hover {
    color: var(--text-base);
}

body.light-mode .tab-btn.active {
    color: var(--text-base);
    font-weight: 700;
    background: transparent;
}

body.light-mode .tab-btn.active .tab-text {
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.light-mode .search-mode-btns {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .search-mode-btn {
    color: var(--text-subdued);
}

body.light-mode .search-mode-btn:hover {
    color: var(--text-base);
}

body.light-mode .search-mode-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

body.light-mode .toolbar-action-btn {
    background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.01) 100%);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-base);
}

body.light-mode .toolbar-action-btn:hover {
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.1) 0%, rgba(29, 185, 84, 0.03) 100%);
    border-color: rgba(29, 185, 84, 0.25);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.1);
}

body.light-mode .search-result-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    color: var(--text-subdued);
}

body.light-mode .search-result-item:hover {
    background: var(--bg-card-hover);
}

body.light-mode .sr-col-index {
    color: var(--text-subdued);
}

body.light-mode .sr-col-img {
    background: var(--bg-elevated);
}

body.light-mode .sr-song-name {
    color: var(--text-base);
}

body.light-mode .sr-col-artist {
    color: var(--text-subdued);
}

body.light-mode .sr-action-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.88);
    color: #475569;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

body.light-mode .sr-action-btn:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.98);
    border-color: color-mix(in srgb, var(--primary) 44%, #d1d5db);
}

body.light-mode .sr-action-btn:focus {
    color: #111827;
    border-color: color-mix(in srgb, var(--primary) 58%, #cbd5e1);
}

body.light-mode .sr-action-btn-primary {
    color: #fff;
    border-color: color-mix(in srgb, var(--primary) 62%, #ffffff);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 84%, #ffffff 16%), color-mix(in srgb, var(--primary) 72%, #0f172a 28%));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 28%, transparent);
}

body.light-mode .sr-action-btn-primary:hover,
body.light-mode .sr-action-btn-primary:focus {
    color: #fff;
    border-color: color-mix(in srgb, var(--primary) 74%, #e2e8f0);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #ffffff 12%), color-mix(in srgb, var(--primary) 76%, #0f172a 24%));
}

body.light-mode .sr-col-duration {
    color: var(--text-subdued);
}

/* 浅色模式 - 选中行：柔和黑色半透明背景 + 左侧强调色边框 */
body.light-mode .search-result-item.selected {
    background: rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

/* 浅色模式 - 选中行歌曲名：主色高亮 + 加粗 */
body.light-mode .search-result-item.selected .sr-song-name {
    color: var(--primary);
    font-weight: 700;
}

/* 浅色模式 - 选中行歌手名：主色半透明 */
body.light-mode .search-result-item.selected .sr-col-artist {
    color: var(--primary);
    opacity: 0.8;
}

/* 浅色模式 - 选中行序号：主色高亮 */
body.light-mode .search-result-item.selected .sr-col-index {
    color: var(--primary);
    font-weight: 600;
}

/* 浅色模式 - 选中行时长：主色半透明 */
body.light-mode .search-result-item.selected .sr-col-duration {
    color: var(--primary);
    opacity: 0.7;
}

body.light-mode .sr-source-sup {
    color: var(--primary);
}

body.light-mode .page-btn {
    background: var(--bg-elevated);
    color: var(--text-base);
}

body.light-mode .page-btn:hover {
    background: var(--bg-card-hover);
}

body.light-mode .page-info {
    color: var(--text-subdued);
}

body.light-mode .track-cover {
    background: var(--bg-elevated);
}

body.light-mode #platform-name {
    color: var(--text-base);
}

body.light-mode .like-btn {
    color: var(--text-subdued);
}

body.light-mode .empty {
    color: var(--text-subdued);
}

body.light-mode .visualizer-panel {
    background: rgba(245, 245, 245, 0.95);
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border: 3px solid transparent;
    background-clip: padding-box;
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
    border: 3px solid transparent;
    background-clip: padding-box;
}

/* ========== 全屏播放界面 ========== */
.fullscreen-player {
    background: var(--bg-base);
    animation: fsSlideUp 0.35s ease-out;
}

@keyframes fsSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fs-player-bg {
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.85) 100%);
    filter: blur(80px);
    opacity: 0.6;
}

.fs-player-top {
    color: white;
}

.fs-close-btn,
/* 全屏播放器浮动设置按钮：右上角定位 */
.fs-settings-float-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    color: white;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.fs-settings-float-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.fs-close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.fs-player-main {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.fs-left {
    flex-shrink: 0;
}

.fs-cover-wrap {
    position: relative;
}

.fs-cover {
    width: 380px;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    background: var(--bg-elevated);
    position: relative;
    cursor: pointer;
}

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

.fs-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
    border-radius: 16px;
}

.fs-cover:hover .fs-cover-overlay {
    opacity: 1;
}

.fs-track-info {
    max-width: 380px;
}

.fs-track-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    min-width: 0;
}
.fs-track-title .source-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 2px 6px;
}
.fs-track-title .track-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.fs-track-title .quality-badge,
.fs-mobile-track-title .quality-badge {
    margin-left: 10px;
    padding: 3px 8px;
    font-size: 0.72rem;
    color: #bae6fd;
    background: rgba(186, 230, 253, 0.14);
    border-color: rgba(186, 230, 253, 0.28);
}

.fs-track-artist {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端全屏播放器歌曲信息栏：PC端隐藏，移动端显示 */
.fs-mobile-track-info {
    display: none;
    text-align: center;
    padding: 16px 0 8px;
}

.fs-mobile-track-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    min-width: 0;
}
.fs-mobile-track-title .source-badge {
    flex-shrink: 0;
}
.fs-track-title .source-badge, .fs-mobile-track-title .source-badge {
    background: color-mix(in srgb, var(--badge-color, #9ca3af) 30%, rgba(255,255,255,0.15));
}

.fs-mobile-track-artist {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-right {
    position: relative;
}

.fs-lyric-body {
    color: rgba(255,255,255,0.5);
    padding: 20px 16px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* 歌词占位空间：确保首尾歌词行能滚动到屏幕中间 */
#fs-lyric-body .lyric-spacer {
    height: 40vh;
    pointer-events: none;
}

#fs-lyric-body .lyric-line {
    color: rgba(255,255,255,0.4);
    padding: 10px 16px;
    text-align: center;
    transition: all 0.35s ease;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1.6;
}

#fs-lyric-body .lyric-line:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.05);
}

#fs-lyric-body .lyric-line.lyric-active {
    font-weight: 600;
}

/* 歌词设置面板：贴附底部播放栏居中显示 */
.fs-lyric-settings-panel {
    position: absolute;
    bottom: var(--player-height);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,30,30,0.95);
    backdrop-filter: blur(16px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 30;
    width: 280px;
    animation: fsSettingsIn 0.2s ease-out;
    color: white;
}

@keyframes fsSettingsIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.fs-lyric-settings-panel h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
}

.fs-settings-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.fs-settings-close-btn:hover {
    color: rgba(255,255,255,1);
}

.fs-setting-item {
    margin-bottom: 16px;
}

.fs-setting-item:last-child {
    margin-bottom: 0;
}

.fs-setting-item label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    font-weight: 500;
}

.fs-setting-options {
    display: flex;
    gap: 8px;
}

.fs-setting-opt {
    padding: 5px 14px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.fs-setting-opt:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.fs-setting-opt.active {
    background: var(--primary);
    color: white;
}

.fs-color-opt {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.fs-color-opt:hover {
    transform: scale(1.15);
}

.fs-color-opt.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--primary);
}

/* 底部播放栏封面hover效果 */
.track-cover {
    background: var(--bg-card);
    margin: 8px;
}

#track-cover-wrap {
    margin: 0;
}

.track-cover-expand {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 6px;
    pointer-events: none;
}

#track-cover-wrap:hover .track-cover-expand {
    opacity: 1;
    pointer-events: auto;
}

/* 全屏播放器浅色模式 */
body.light-mode .fullscreen-player {
    background: var(--bg-base);
}

body.light-mode .fs-player-bg {
    background: linear-gradient(180deg, rgba(200,200,200,0.4) 0%, rgba(180,180,180,0.6) 100%);
    filter: blur(80px);
    opacity: 0.5;
}

body.light-mode .fs-player-top {
    color: var(--text-base);
}

body.light-mode .fs-close-btn,
body.light-mode .fs-settings-float-btn {
    color: var(--text-base);
    background: rgba(0,0,0,0.08);
}

body.light-mode .fs-close-btn:hover,
body.light-mode .fs-settings-float-btn:hover {
    background: rgba(0,0,0,0.15);
}

body.light-mode .fs-cover {
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}

body.light-mode .fs-track-title {
    color: var(--text-base);
}

body.light-mode .fs-track-artist {
    color: var(--text-subdued);
}

/* 浅色模式 - 移动端全屏播放器歌曲信息栏适配 */
body.light-mode .fs-mobile-track-title {
    color: var(--text-base);
}

body.light-mode .fs-mobile-track-artist {
    color: var(--text-subdued);
}

body.light-mode #fs-lyric-body .lyric-line {
    color: #4b5563;
}

body.light-mode #fs-lyric-body .lyric-line:hover {
    color: #111827;
    background: transparent;
}

body.light-mode #fs-lyric-body .lyric-line.lyric-active {
    color: #111827;
    font-weight: 700;
}

body.light-mode .fs-player-bg {
    background: linear-gradient(180deg, rgba(235, 239, 245, 0.28) 0%, rgba(225, 231, 239, 0.3) 100%);
    filter: blur(56px);
    opacity: 0.28;
}

body.light-mode .fs-lyric-body {
    background: transparent !important;
}

body.light-mode .fs-lyric-settings-panel {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    color: var(--text-base);
}

body.light-mode .fs-lyric-settings-panel h4 {
    color: var(--text-base);
}

body.light-mode .fs-lyric-settings-panel .fs-settings-close-btn {
    color: var(--text-subdued);
}

body.light-mode .fs-lyric-settings-panel .fs-settings-close-btn:hover {
    color: var(--text-base);
}

body.light-mode .fs-setting-item label {
    color: var(--text-subdued);
}

body.light-mode .fs-setting-opt {
    background: rgba(0,0,0,0.06);
    color: var(--text-subdued);
}

body.light-mode .fs-setting-opt:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-base);
}

body.light-mode .fs-setting-opt.active {
    background: var(--primary);
    color: white;
}

body.light-mode .fs-color-opt.active {
    border-color: var(--text-base);
}

body.light-mode .track-cover-expand {
    background: rgba(255,255,255,0.5);
}

body.light-mode .track-cover-expand i {
    color: var(--text-base);
}

/* ========== V3 Final Override (Keep At EOF) ========== */
html body {
  --ui-accent: #ff5a52;
  --ui-accent-soft: rgba(255, 90, 82, 0.18);
}

html body .topbar,
html body .player-bar,
html body .playlist-panel,
html body .modal-content,
html body .search-settings-panel,
html body .discover-switch,
html body .search-toolbar {
  background: rgba(18,24,34,0.74) !important;
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border: 1px solid rgba(255,255,255,0.12) !important;
}

html body .search-result-list,
html body .playlist-body {
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: rgba(255,255,255,0.04) !important;
}

html body .search-result-item,
html body .playlist-item {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

html body .search-result-item:hover,
html body .playlist-item:hover {
  background: rgba(255,255,255,0.07) !important;
}

html body .search-result-item.selected,
html body .playlist-item.playing {
  background: linear-gradient(90deg, var(--ui-accent-soft), rgba(255,255,255,0.04)) !important;
  border-left: 3px solid var(--ui-accent) !important;
}

html body .play-btn,
html body .play-btn-m,
html body .sr-action-btn-primary {
  background: linear-gradient(140deg, #ff6e67, #ff4a61) !important;
  color: #fff !important;
  border-color: transparent !important;
}

html body .tab-btn,
html body .tab-btn-m,
html body .discover-switch-btn,
html body .search-mode-btn,
html body .toolbar-action-btn,
html body .control-btn,
html body .theme-btn,
html body .tool-btn,
html body .theme-btn-m,
html body .tool-btn-m {
  border-radius: 999px !important;
}

html body .progress-fill,
html body #progress-fill,
html body #progress-fill-m {
  background: linear-gradient(90deg, #ff6e67, #ff4a61) !important;
}

html body.light-mode .topbar,
html body.light-mode .player-bar,
html body.light-mode .playlist-panel,
html body.light-mode .modal-content,
html body.light-mode .search-settings-panel,
html body.light-mode .discover-switch,
html body.light-mode .search-toolbar {
  background: rgba(255,255,255,0.74) !important;
  border-color: rgba(15,23,42,0.12) !important;
}

html body.light-mode .search-result-list,
html body.light-mode .playlist-body {
  background: rgba(255,255,255,0.84) !important;
  border-color: rgba(15,23,42,0.12) !important;
}

html body.light-mode .search-result-item,
html body.light-mode .playlist-item {
  border-bottom-color: rgba(15,23,42,0.1) !important;
}

html body.light-mode .search-result-item:hover,
html body.light-mode .playlist-item:hover {
  background: rgba(15,23,42,0.05) !important;
}

html body.light-mode .search-result-item.selected,
html body.light-mode .playlist-item.playing {
  background: linear-gradient(90deg, rgba(255,90,82,0.14), rgba(255,255,255,0.8)) !important;
  border-left-color: var(--ui-accent) !important;
}

html body.light-mode .discover-switch-btn.active {
  background: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
}

html body.light-mode .discover-switch-btn.active i,
html body.light-mode .discover-switch-btn.active span {
  color: #0f172a !important;
}

/* ========== Typography System ========== */
:root {
  --font-sans-ui: "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-number-ui: "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body {
  font-family: var(--font-sans-ui) !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "tnum" 0;
}

#platform-name,
.discover-title,
.lb-main-title,
.songlist-toolbar-title span,
.modal-header h3,
.fs-track-title,
.fs-mobile-track-title {
  font-family: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", var(--font-sans-ui) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.discover-subtitle,
.track-artist,
.playlist-artist,
.sr-col-artist,
.leaderboard-desc,
.recommend-card-desc,
.recommend-featured-desc,
.progress-time {
  letter-spacing: 0.01em;
}

.tab-btn,
.tab-btn-m,
.discover-switch-btn,
.search-mode-btn,
.toolbar-action-btn,
.sr-action-btn,
.playlist-clear,
.playlist-close {
  font-weight: 600 !important;
}

.track-title,
.sr-song-name,
.recommend-card-title,
.leaderboard-title,
.recommend-featured-title,
.playlist-title {
  font-weight: 650 !important;
}

.progress-time,
.sr-col-duration,
#time-cur,
#time-total,
#time-cur-m,
#time-total-m {
  font-family: var(--font-number-ui) !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "kern" 1;
}

/* ========== Type Scale (12/13/14/16/20) ========== */
:root {
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-20: 20px;
}

html body {
  font-size: var(--fs-14);
}

/* 20 */
#platform-name,
.discover-title,
.lb-main-title,
.modal-header h3 {
  font-size: var(--fs-20) !important;
  line-height: 1.2;
}

/* 16 */
.track-title,
.fs-track-title,
.fs-mobile-track-title,
.recommend-featured-title {
  font-size: var(--fs-16) !important;
  line-height: 1.3;
}

/* 14 */
.tab-btn,
.tab-btn-m,
.discover-switch-btn,
.search-mode-btn,
.toolbar-action-btn,
.playlist-title,
.sr-song-name,
.recommend-card-title,
.leaderboard-title,
.song-title {
  font-size: var(--fs-14) !important;
  line-height: 1.35;
}

/* 13 */
.discover-subtitle,
.track-artist,
.playlist-artist,
.sr-col-artist,
.recommend-card-desc,
.recommend-featured-desc,
.leaderboard-desc,
.song-artist,
.song-album,
.progress-time {
  font-size: var(--fs-13) !important;
  line-height: 1.4;
}

/* 12 */
.search-result-header,
.sr-col-duration,
.song-duration,
.search-platform-label,
.source-badge,
.sr-song-artist-mobile,
.sr-songlist-creator-mobile,
.page-info {
  font-size: var(--fs-12) !important;
  line-height: 1.35;
}

/* ========== Leaderboard Flatten Override ========== */
html body .lb-layout {
  gap: 10px !important;
}

html body .lb-sidebar,
html body .lb-main {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body .lb-sidebar {
  border-radius: 12px !important;
  padding: 8px 6px !important;
}

html body .lb-main {
  border-radius: 12px !important;
  padding: 0 10px 0 12px !important;
}

html body .lb-main-header {
  padding: 8px 2px 7px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body .lb-sidebar-item {
  margin: 2px 0 !important;
  border-radius: 8px !important;
  border-left-width: 2px !important;
  background: transparent !important;
}

html body .lb-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html body .lb-sidebar-item.active {
  background: rgba(255, 90, 82, 0.14) !important;
  box-shadow: none !important;
}

body:not(.light-mode) .lb-sidebar-item.active .lb-sidebar-name {
  color: #ffffff !important;
}

html body .leaderboard-grid {
  gap: 12px !important;
  padding: 10px 0 14px !important;
}

html body .leaderboard-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

html body .leaderboard-card:hover {
  transform: translateY(-1px) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

html body .leaderboard-info {
  padding: 12px !important;
}

html body.light-mode .lb-sidebar,
html body.light-mode .lb-main {
  background: rgba(255, 255, 255, 0.62) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html body.light-mode .lb-main-header {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
  background: none !important;
  box-shadow: none !important;
}

html body.light-mode .lb-sidebar-item:hover {
  background: rgba(15, 23, 42, 0.05) !important;
}

html body.light-mode .lb-sidebar-item.active {
  background: rgba(255, 90, 82, 0.12) !important;
}

html body.light-mode .leaderboard-card {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html body.light-mode .leaderboard-card:hover {
  background: rgba(255, 255, 255, 0.94) !important;
}

/* ========== Leaderboard Minimal Unified (Final) ========== */
html body .lb-sidebar,
html body .lb-main {
  background: rgba(255, 255, 255, 0.015) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html body .lb-main {
  padding: 0 !important;
  background: rgba(20, 25, 34, 0.82) !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html body .lb-main-header {
  border-bottom: none !important;
  padding: 10px 12px 8px !important;
  background: rgba(34, 41, 53, 0.9) !important;
  border-radius: 0 !important;
  backdrop-filter: blur(16px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(125%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html body .leaderboard-grid {
  gap: 10px !important;
  padding: 8px 0 10px !important;
}

html body .leaderboard-card {
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
}

html body .leaderboard-card:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  transform: none !important;
}

html body .leaderboard-info {
  padding: 10px 8px 8px !important;
}

html body.light-mode .lb-sidebar,
html body.light-mode .lb-main {
  background: rgba(255, 255, 255, 0.56) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode .lb-main-header {
  background: rgba(236, 240, 246, 0.9) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode .lb-main {
  background: rgba(248, 250, 253, 0.78) !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode .leaderboard-card {
  background: transparent !important;
}

html body.light-mode .leaderboard-card:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}

/* ========== Leaderboard Song Text-Only List ========== */
html body #lb-song-list .search-result-list,
html body #lb-song-list .search-result-header {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body #lb-song-list .search-result-header {
  padding: 6px 12px 4px !important;
}

html body #lb-song-list .search-result-item {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 6px 12px !important;
}

html body #lb-song-list .search-result-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

html body #lb-song-list .search-result-item.selected {
  background: rgba(255, 90, 82, 0.14) !important;
  border-left: none !important;
  padding-left: 12px !important;
}

html body.light-mode #lb-song-list .search-result-item:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}

html body.light-mode #lb-song-list .search-result-item.selected {
  background: rgba(255, 90, 82, 0.12) !important;
}

/* ========== Leaderboard Shadow Cleanup ========== */
html body .lb-layout *,
html body #lb-song-list *,
html body .leaderboard-grid *,
html body .lb-custom-select * {
  box-shadow: none !important;
  text-shadow: none !important;
}

html body .lb-sidebar,
html body .lb-main,
html body .leaderboard-card,
html body #lb-song-list .search-result-list,
html body #lb-song-list .search-result-item,
html body .lb-select-trigger,
html body .lb-select-dropdown {
  box-shadow: none !important;
}

/* ========== Global Flat List Unification ========== */
html body .search-result-list,
html body .playlist-body,
html body #favorites-body .search-result-list,
html body #songlist-body .search-result-list,
html body #search-body .search-result-list,
html body #ai-body .search-result-list {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
}

html body .search-result-header,
html body #favorites-body .search-result-header,
html body #songlist-body .search-result-header,
html body #search-body .search-result-header,
html body #ai-body .search-result-header,
html body .playlist-header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body .search-result-item,
html body #favorites-body .search-result-item,
html body #songlist-body .search-result-item,
html body #search-body .search-result-item,
html body #ai-body .search-result-item,
html body .playlist-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html body .search-result-item:hover,
html body #favorites-body .search-result-item:hover,
html body #songlist-body .search-result-item:hover,
html body #search-body .search-result-item:hover,
html body #ai-body .search-result-item:hover,
html body .playlist-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html body .search-result-item.selected,
html body .playlist-item.playing {
  background: rgba(255, 90, 82, 0.14) !important;
  border-left: 2px solid #ff5a52 !important;
}

html body .search-result-list .search-result-item:last-child,
html body .playlist-body .playlist-item:last-child {
  border-bottom: none !important;
}

html body.light-mode .search-result-list,
html body.light-mode .playlist-body,
html body.light-mode #favorites-body .search-result-list,
html body.light-mode #songlist-body .search-result-list,
html body.light-mode #search-body .search-result-list,
html body.light-mode #ai-body .search-result-list {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html body.light-mode .search-result-header,
html body.light-mode #favorites-body .search-result-header,
html body.light-mode #songlist-body .search-result-header,
html body.light-mode #search-body .search-result-header,
html body.light-mode #ai-body .search-result-header,
html body.light-mode .playlist-header {
  background: rgba(15, 23, 42, 0.04) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode .search-result-item,
html body.light-mode #favorites-body .search-result-item,
html body.light-mode #songlist-body .search-result-item,
html body.light-mode #search-body .search-result-item,
html body.light-mode #ai-body .search-result-item,
html body.light-mode .playlist-item {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode .search-result-item:hover,
html body.light-mode #favorites-body .search-result-item:hover,
html body.light-mode #songlist-body .search-result-item:hover,
html body.light-mode #search-body .search-result-item:hover,
html body.light-mode #ai-body .search-result-item:hover,
html body.light-mode .playlist-item:hover {
  background: rgba(15, 23, 42, 0.05) !important;
}

html body.light-mode .search-result-item.selected,
html body.light-mode .playlist-item.playing {
  background: rgba(255, 90, 82, 0.12) !important;
  border-left-color: #ff5a52 !important;
}

/* ========== Leaderboard Match Recommend List ========== */
html body #lb-song-list .search-result-list {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
}

html body #lb-song-list .search-result-header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 7px 12px !important;
}

html body #lb-song-list .search-result-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  padding: 6px 12px !important;
  border-radius: 0 !important;
}

html body #lb-song-list .search-result-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html body #lb-song-list .search-result-item.selected {
  background: rgba(255, 90, 82, 0.14) !important;
  border-left: 2px solid #ff5a52 !important;
  padding-left: 10px !important;
}

html body #lb-song-list .search-result-list .search-result-item:last-child {
  border-bottom: none !important;
}

html body.light-mode #lb-song-list .search-result-list {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html body.light-mode #lb-song-list .search-result-header {
  background: rgba(15, 23, 42, 0.04) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode #lb-song-list .search-result-item {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode #lb-song-list .search-result-item:hover {
  background: rgba(15, 23, 42, 0.05) !important;
}

html body.light-mode #lb-song-list .search-result-item.selected {
  background: rgba(255, 90, 82, 0.12) !important;
  border-left-color: #ff5a52 !important;
}

/* ========== Discover Switch Topbar Placement ========== */
.topbar-row-2 {
  justify-content: space-between !important;
  gap: 12px;
}

.topbar-row-2 #topbar-tabs {
  margin-left: auto;
}

.discover-switch {
  margin: 0 !important;
}

.discover-switch-mobile {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding-right: 8px;
}

.discover-switch-mobile .discover-switch-btn {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .topbar-mobile-row-2 {
    align-items: center;
    gap: 8px;
  }

  .topbar-mobile-row-2 #topbar-tabs-m {
    display: none !important;
  }

  .discover-switch-mobile {
    display: flex;
  }

  .discover-switch-mobile .discover-switch-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
}

/* ========== Discover Switch Topbar Visual Fix ========== */
.topbar-row-2 .discover-switch,
.topbar-mobile-row-2 .discover-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.topbar-row-2 .discover-switch-btn,
.topbar-mobile-row-2 .discover-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  border: none !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--text-subdued) !important;
  font-size: 13px !important;
  line-height: 1;
  font-weight: 600 !important;
}

.topbar-row-2 .discover-switch-btn i,
.topbar-mobile-row-2 .discover-switch-btn i {
  font-size: 12px;
}

.topbar-row-2 .discover-switch-btn:hover,
.topbar-mobile-row-2 .discover-switch-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-base) !important;
}

.topbar-row-2 .discover-switch-btn.active,
.topbar-mobile-row-2 .discover-switch-btn.active {
  background: #ff5a52 !important;
  color: #ffffff !important;
}

.topbar-row-2 .discover-switch-btn.active i,
.topbar-row-2 .discover-switch-btn.active span,
.topbar-mobile-row-2 .discover-switch-btn.active i,
.topbar-mobile-row-2 .discover-switch-btn.active span {
  color: #ffffff !important;
}

body.light-mode .topbar-row-2 .discover-switch,
body.light-mode .topbar-mobile-row-2 .discover-switch {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn {
  color: #475569 !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn:hover,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn.active,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn.active {
  background: #ff5a52 !important;
  color: #fff !important;
}

/* ========== Header Redesign 2026 ========== */
:root {
  --header-blur: 18px;
  --header-line-dark: rgba(255, 255, 255, 0.1);
  --header-line-light: rgba(15, 23, 42, 0.1);
}

.topbar {
  background: linear-gradient(180deg, rgba(14, 19, 28, 0.86), rgba(14, 19, 28, 0.76)) !important;
  backdrop-filter: blur(var(--header-blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--header-blur)) saturate(130%);
  border-bottom: 1px solid var(--header-line-dark) !important;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28) !important;
}

.topbar-row-1,
.topbar-row-2 {
  max-width: 1200px !important;
  width: min(96vw, 1200px);
}

.topbar-row-1 {
  min-height: 72px !important;
  padding: 14px 4px 8px !important;
}

.topbar-row-2 {
  min-height: 54px !important;
  padding: 4px 2px 10px !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

#platform-name {
  font-size: 22px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.platform-logo {
  width: 42px !important;
  height: 42px !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

#search-wrapper .search-container {
  min-height: 46px;
  border-radius: 999px !important;
  padding: 0 14px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

#search-wrapper .search-container:focus-within {
  border-color: rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.11) !important;
}

#search-input {
  font-size: 14px !important;
}

/* Prevent iOS Safari auto-zoom on focused search inputs */
@supports (-webkit-touch-callout: none) {
  #search-input,
  #search-input-m,
  .search-container input {
    font-size: 16px !important;
  }
}

#parse-songlist-input {
  font-size: 16px !important;
}

.search-tag {
  font-size: 13px !important;
  font-weight: 600;
  padding: 4px 10px !important;
  border-radius: 999px !important;
}

.theme-btn,
.tool-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08) !important;
}

.theme-btn:hover,
.tool-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.topbar-row-2 #topbar-tabs {
  justify-self: end;
}

.topbar-row-2 #topbar-tabs .tab-btn {
  min-height: 34px;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05) !important;
  font-size: 13px !important;
}

.topbar-row-2 #topbar-tabs .tab-btn.active {
  background: rgba(255, 90, 82, 0.16) !important;
  border-color: rgba(255, 90, 82, 0.42) !important;
  color: #fff !important;
}

.topbar-row-2 #topbar-tabs .tab-btn.active .tab-text {
  text-decoration: none !important;
}

#search-settings-panel,
#search-settings-panel-m {
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(20, 25, 34, 0.9) !important;
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}

/* Mobile header redesign */
@media (max-width: 768px) {
  :root {
    --topbar-height: 146px;
  }

  .topbar-mobile-row-1 {
    min-height: 62px !important;
    padding: 10px 12px 6px !important;
    gap: 10px !important;
  }

  #platform-logo-m {
    width: 38px !important;
    height: 38px !important;
  }

  .search-container-m {
    min-height: 42px;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 0 10px !important;
  }

  .search-container-m:focus-within {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
  }

  .topbar-mobile-row-2 {
    min-height: 52px !important;
    padding: 4px 10px 8px !important;
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .discover-switch-mobile {
    padding: 3px !important;
    border-radius: 999px !important;
  }

  .discover-switch-mobile .discover-switch-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .theme-btn-m,
  .tool-btn-m {
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }
}

body.light-mode .topbar {
  background: linear-gradient(180deg, rgba(248, 250, 253, 0.92), rgba(244, 247, 251, 0.84)) !important;
  border-bottom-color: var(--header-line-light) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .platform-logo {
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode #search-wrapper .search-container,
body.light-mode .search-container-m {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

body.light-mode #search-wrapper .search-container:focus-within,
body.light-mode .search-container-m:focus-within {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
}

body.light-mode .theme-btn,
body.light-mode .tool-btn,
body.light-mode .theme-btn-m,
body.light-mode .tool-btn-m {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

body.light-mode .theme-btn:hover,
body.light-mode .tool-btn:hover,
body.light-mode .theme-btn-m:hover,
body.light-mode .tool-btn-m:hover {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
}

body.light-mode #search-settings-panel,
body.light-mode #search-settings-panel-m {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

/* ========== Recommend Header Embed ========== */
.recommend-inline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}

.recommend-inline-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-base);
}

.recommend-inline-subtitle {
  font-size: 12px;
  color: var(--text-subdued);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .recommend-inline-header {
    margin: 0 0 10px;
    padding: 7px 10px;
  }

  .recommend-inline-subtitle {
    display: none;
  }
}

body.light-mode .recommend-inline-header {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .recommend-inline-title {
  color: #0f172a;
}

body.light-mode .recommend-inline-subtitle {
  color: #64748b;
}

/* ========== Header Navigation Fusion Fix ========== */
.topbar-row-2 {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2px;
  padding-top: 8px !important;
}

.topbar-row-2 .discover-switch,
.topbar-mobile-row-2 .discover-switch {
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  gap: 4px !important;
}

.topbar-row-2 .discover-switch-btn,
.topbar-mobile-row-2 .discover-switch-btn {
  min-height: 32px;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid transparent !important;
}

.topbar-row-2 .discover-switch-btn:hover,
.topbar-mobile-row-2 .discover-switch-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.94) !important;
}

.topbar-row-2 .discover-switch-btn.active,
.topbar-mobile-row-2 .discover-switch-btn.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* 让右侧 tab 与这组按钮同语义 */
.topbar-row-2 #topbar-tabs .tab-btn {
  min-height: 32px;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.topbar-row-2 #topbar-tabs .tab-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.94) !important;
}

.topbar-row-2 #topbar-tabs .tab-btn.active {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

/* 推荐轻标题条进一步弱化，避免和顶部导航竞争 */
.recommend-inline-header {
  margin-top: 0 !important;
  background: transparent !important;
  border: none !important;
  padding: 2px 2px 8px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.recommend-inline-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.recommend-inline-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

body.light-mode .topbar-row-2 {
  border-top-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .topbar-row-2 .discover-switch-btn,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn,
body.light-mode .topbar-row-2 #topbar-tabs .tab-btn {
  color: rgba(15, 23, 42, 0.62) !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn:hover,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn:hover,
body.light-mode .topbar-row-2 #topbar-tabs .tab-btn:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: rgba(15, 23, 42, 0.9) !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn.active,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn.active,
body.light-mode .topbar-row-2 #topbar-tabs .tab-btn.active {
  background: rgba(15, 23, 42, 0.1) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

body.light-mode .recommend-inline-header {
  background: transparent !important;
}

body.light-mode .recommend-inline-title {
  color: rgba(15, 23, 42, 0.84);
}

body.light-mode .recommend-inline-subtitle {
  color: rgba(15, 23, 42, 0.52);
}

/* ========== Header Nav Center Align (Desktop) ========== */
@media (min-width: 1024px) {
  .topbar-row-2 {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0;
  }

  .topbar-row-2 .discover-switch {
    grid-column: 2;
    justify-self: center;
  }

  .topbar-row-2 #topbar-tabs {
    grid-column: 3;
    justify-self: end;
    margin-left: 0 !important;
  }
}

@media (max-width: 900px) {
  .recommend-featured-stage {
    min-height: 0 !important;
    height: auto !important;
  }
}

/* ========== Header Nav Tone Down ========== */
.topbar-row-2 .discover-switch-btn,
.topbar-mobile-row-2 .discover-switch-btn,
.topbar-row-2 #topbar-tabs .tab-btn {
  color: rgba(255, 255, 255, 0.62) !important;
}

.topbar-row-2 .discover-switch-btn:hover,
.topbar-mobile-row-2 .discover-switch-btn:hover,
.topbar-row-2 #topbar-tabs .tab-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

.topbar-row-2 .discover-switch-btn.active,
.topbar-mobile-row-2 .discover-switch-btn.active,
.topbar-row-2 #topbar-tabs .tab-btn.active {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn,
body.light-mode .topbar-row-2 #topbar-tabs .tab-btn {
  color: rgba(15, 23, 42, 0.52) !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn:hover,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn:hover,
body.light-mode .topbar-row-2 #topbar-tabs .tab-btn:hover {
  background: rgba(15, 23, 42, 0.04) !important;
  color: rgba(15, 23, 42, 0.78) !important;
}

body.light-mode .topbar-row-2 .discover-switch-btn.active,
body.light-mode .topbar-mobile-row-2 .discover-switch-btn.active,
body.light-mode .topbar-row-2 #topbar-tabs .tab-btn.active {
  background: rgba(15, 23, 42, 0.07) !important;
  border-color: rgba(15, 23, 42, 0.07) !important;
  color: rgba(15, 23, 42, 0.9) !important;
}

/* ========== Radius Harmony Fix ========== */
:root {
  --r-pill: 999px;
  --r-xl: 14px;
  --r-lg: 12px;
  --r-md: 10px;
  --r-sm: 8px;
}

/* 头部层级：容器略圆，按钮小圆，输入超圆 */
.topbar-row-2 .discover-switch,
.topbar-mobile-row-2 .discover-switch,
.topbar-row-2 #topbar-tabs .tab-btn,
.topbar-row-2 .discover-switch-btn,
.topbar-mobile-row-2 .discover-switch-btn {
  border-radius: var(--r-sm) !important;
}

#search-wrapper .search-container,
.search-container-m,
.search-tag,
.theme-btn,
.tool-btn,
.theme-btn-m,
.tool-btn-m {
  border-radius: var(--r-pill) !important;
}

/* 内容容器统一 */
.search-result-list,
.playlist-body,
.lb-sidebar,
.lb-main,
.recommend-featured,
.recommend-card,
.leaderboard-card,
.modal-content,
.search-toolbar {
  border-radius: var(--r-lg) !important;
}

/* 行与局部元素统一 */
.search-result-item,
.playlist-item,
.lb-sidebar-item,
.toolbar-action-btn,
.search-mode-btn {
  border-radius: var(--r-sm) !important;
}

.sr-col-img,
.playlist-cover,
.track-cover,
.recommend-card-cover,
.leaderboard-cover {
  border-radius: var(--r-md) !important;
}

/* 避免混用导致的视觉冲突 */
.topbar-row-2 .discover-switch-btn,
.topbar-mobile-row-2 .discover-switch-btn,
.topbar-row-2 #topbar-tabs .tab-btn {
  min-height: 32px;
}

body.light-mode .topbar-row-2 .discover-switch,
body.light-mode .topbar-mobile-row-2 .discover-switch {
  border-radius: var(--r-sm) !important;
}

/* ========== Featured Card Redesign ========== */
.recommend-featured {
  display: grid !important;
  grid-template-columns: minmax(240px, 34%) 1fr;
  gap: 0 !important;
  min-height: 260px;
  border-radius: 14px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.recommend-featured:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}

.recommend-featured-cover {
  width: 100% !important;
  min-height: 100% !important;
}

.recommend-featured-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(7, 10, 16, 0.35) 100%);
  pointer-events: none;
}

.recommend-featured-info {
  padding: 22px 22px 20px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.recommend-featured-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffd9d7;
  background: rgba(255, 90, 82, 0.18);
  border: 1px solid rgba(255, 90, 82, 0.28);
  border-radius: 999px;
}

.recommend-featured-title {
  font-size: 24px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

.recommend-featured-desc {
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.68) !important;
}

.recommend-featured-action {
  margin-top: 2px;
}

.recommend-featured-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.recommend-featured-overlay {
  background: rgba(0, 0, 0, 0.26) !important;
}

.recommend-featured-play {
  width: 52px !important;
  height: 52px !important;
  font-size: 1.2rem !important;
  background: rgba(255, 90, 82, 0.92) !important;
}

@media (max-width: 768px) {
  .recommend-featured {
    grid-template-columns: 124px 1fr !important;
    height: 140px !important;
    min-height: 140px !important;
  }

  .recommend-featured-cover {
    width: 124px !important;
    height: 140px !important;
    min-height: 140px !important;
    aspect-ratio: 1 / 1 !important;
    flex: none !important;
    align-self: stretch !important;
  }

  .recommend-featured-cover img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .recommend-featured-info {
    width: auto !important;
    max-width: none !important;
    padding: 12px 12px 12px 12px !important;
    gap: 6px;
  }

  .recommend-featured-cover,
  .recommend-featured-info {
    min-width: 0 !important;
  }

  .recommend-featured-title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2;
    white-space: normal !important;
  }

  .recommend-featured-desc {
    font-size: 12px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .recommend-featured-kicker {
    font-size: 10px !important;
    padding: 3px 7px !important;
  }

  .recommend-featured-action-btn {
    padding: 5px 9px !important;
    font-size: 11px !important;
  }
}

body.light-mode .recommend-featured {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .recommend-featured:hover {
  background: rgba(255, 255, 255, 0.92) !important;
}

body.light-mode .recommend-featured-cover::after {
  background: linear-gradient(90deg, transparent 60%, rgba(226, 232, 240, 0.45) 100%);
}

body.light-mode .recommend-featured-kicker {
  color: #b42318;
  background: rgba(255, 90, 82, 0.14);
  border-color: rgba(255, 90, 82, 0.24);
}

body.light-mode .recommend-featured-desc {
  color: rgba(15, 23, 42, 0.62) !important;
}

body.light-mode .recommend-featured-action-btn {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

/* ========== Featured Dots Spacing Tweak ========== */
.recommend-featured-carousel {
  margin-bottom: 16px !important;
}

.recommend-featured-dots {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;
  transform: translateX(-50%) !important;
  justify-content: center;
  margin-top: 0 !important;
}

@media (max-width: 768px) {
  .recommend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .recommend-card-info {
    padding: 8px !important;
  }

  .recommend-card-title {
    font-size: 12px !important;
  }

  .recommend-card-desc {
    font-size: 11px !important;
  }

  .recommend-featured-kicker {
    display: none !important;
  }

  .recommend-featured {
    grid-template-columns: 140px 1fr !important;
    height: 140px !important;
    min-height: 140px !important;
  }

  .recommend-featured-cover {
    width: 140px !important;
    height: 140px !important;
    min-height: 140px !important;
    aspect-ratio: auto !important;
    align-self: stretch !important;
  }

  .recommend-featured-cover img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
  }

  .recommend-featured-dots {
    bottom: 6px !important;
  }
}

/* ========== Mobile Safe Area Fix (iOS) ========== */
@media (max-width: 768px) {
  :root {
    --player-height: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .player-bar {
    height: var(--player-height) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .player-content-mobile {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .player-content-mobile .track-cover {
    margin: 0 !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    border-radius: 10px !important;
  }

  .main-content {
    padding-bottom: var(--player-height) !important;
  }
}

/* ========== Mobile List Actions Fix ========== */
@media (max-width: 768px) {
  .search-result-list {
    overflow-x: hidden !important;
  }

  .search-result-item {
    min-width: 0 !important;
    grid-template-columns: 44px 1fr !important;
    row-gap: 8px !important;
    column-gap: 10px !important;
    padding: 8px 10px !important;
  }

  .sr-col-img {
    grid-column: 1;
    grid-row: 1;
  }

  .sr-col-name {
    grid-column: 2;
    grid-row: 1;
  }

  .sr-col-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    opacity: 1 !important;
    padding-right: 0 !important;
  }

  .sr-action-btn {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    flex: 0 0 30px !important;
  }
}

/* ========== Mobile List Actions: Horizontal Scroll Mode ========== */
@media (max-width: 768px) {
  .search-result-list {
    overflow-x: hidden !important;
  }

  .search-result-item {
    min-width: 0 !important;
    grid-template-columns: 44px minmax(160px, 1fr) auto !important;
    row-gap: 0 !important;
    column-gap: 10px !important;
    align-items: center !important;
    padding: 8px 10px !important;
  }

  .sr-col-img,
  .sr-col-name,
  .sr-col-actions {
    grid-row: auto !important;
    grid-column: auto !important;
  }

  .sr-col-actions {
    min-width: 124px !important;
    max-width: 42vw;
    width: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
  }

  .sr-col-actions::-webkit-scrollbar {
    display: none;
  }

  .sr-action-btn {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    flex: 0 0 30px !important;
  }
}

/* ========== Selected State Boost ========== */
html body .search-result-item.selected,
html body .playlist-item.playing {
  background: rgba(255, 90, 82, 0.18) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body .search-result-item.selected .sr-song-name,
html body .playlist-item.playing .playlist-title {
  color: #ffffff !important;
  font-weight: 700 !important;
}

html body .search-result-item.selected .sr-col-artist,
html body .search-result-item.selected .sr-col-duration,
html body .playlist-item.playing .playlist-artist {
  color: rgba(255, 255, 255, 0.9) !important;
}

html body.light-mode .search-result-item.selected,
html body.light-mode .playlist-item.playing {
  background: rgba(255, 90, 82, 0.16) !important;
  border-left-color: #ff5a52 !important;
}

html body.light-mode .search-result-item.selected .sr-song-name,
html body.light-mode .playlist-item.playing .playlist-title {
  color: #7f1d1d !important;
  font-weight: 700 !important;
}

html body.light-mode .search-result-item.selected .sr-col-artist,
html body.light-mode .search-result-item.selected .sr-col-duration,
html body.light-mode .playlist-item.playing .playlist-artist {
  color: #9f1239 !important;
}

/* ========== Selected Row Background Refinement ========== */
html body .search-result-item.selected,
html body .playlist-item.playing {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.28) 0%, rgba(255, 90, 82, 0.14) 55%, rgba(255, 255, 255, 0.04) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body.light-mode .search-result-item.selected,
html body.light-mode .playlist-item.playing {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.24) 0%, rgba(255, 90, 82, 0.12) 55%, rgba(255, 255, 255, 0.86) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

/* ========== Recommend/List Selected Sync (song-item) ========== */
html body .song-item.playing {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.28) 0%, rgba(255, 90, 82, 0.14) 55%, rgba(255, 255, 255, 0.04) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body .song-item.playing .song-title {
  color: #ffffff !important;
  font-weight: 700 !important;
}

html body .song-item.playing .song-artist,
html body .song-item.playing .song-album,
html body .song-item.playing .song-duration,
html body .song-item.playing .song-index {
  color: rgba(255, 255, 255, 0.9) !important;
}

html body.light-mode .song-item.playing {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.24) 0%, rgba(255, 90, 82, 0.12) 55%, rgba(255, 255, 255, 0.86) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body.light-mode .song-item.playing .song-title {
  color: #7f1d1d !important;
}

html body.light-mode .song-item.playing .song-artist,
html body.light-mode .song-item.playing .song-album,
html body.light-mode .song-item.playing .song-duration,
html body.light-mode .song-item.playing .song-index {
  color: #9f1239 !important;
}

/* ========== Recommend Detail Selected Sync (Exact Target) ========== */
html body #recommend-body .search-result-item.selected,
html body #leaderboard-body .search-result-item.selected,
html body #songlist-body .search-result-item.selected {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.28) 0%, rgba(255, 90, 82, 0.14) 55%, rgba(255, 255, 255, 0.04) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body #recommend-body .search-result-item.selected .sr-song-name,
html body #leaderboard-body .search-result-item.selected .sr-song-name,
html body #songlist-body .search-result-item.selected .sr-song-name {
  color: #ffffff !important;
  font-weight: 700 !important;
}

html body #recommend-body .search-result-item.selected .sr-col-artist,
html body #recommend-body .search-result-item.selected .sr-col-duration,
html body #leaderboard-body .search-result-item.selected .sr-col-artist,
html body #leaderboard-body .search-result-item.selected .sr-col-duration,
html body #songlist-body .search-result-item.selected .sr-col-artist,
html body #songlist-body .search-result-item.selected .sr-col-duration {
  color: rgba(255, 255, 255, 0.9) !important;
}

html body.light-mode #recommend-body .search-result-item.selected,
html body.light-mode #leaderboard-body .search-result-item.selected,
html body.light-mode #songlist-body .search-result-item.selected {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.24) 0%, rgba(255, 90, 82, 0.12) 55%, rgba(255, 255, 255, 0.86) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body.light-mode #recommend-body .search-result-item.selected .sr-song-name,
html body.light-mode #leaderboard-body .search-result-item.selected .sr-song-name,
html body.light-mode #songlist-body .search-result-item.selected .sr-song-name {
  color: #7f1d1d !important;
}

html body.light-mode #recommend-body .search-result-item.selected .sr-col-artist,
html body.light-mode #recommend-body .search-result-item.selected .sr-col-duration,
html body.light-mode #leaderboard-body .search-result-item.selected .sr-col-artist,
html body.light-mode #leaderboard-body .search-result-item.selected .sr-col-duration,
html body.light-mode #songlist-body .search-result-item.selected .sr-col-artist,
html body.light-mode #songlist-body .search-result-item.selected .sr-col-duration {
  color: #9f1239 !important;
}

/* ========== Unified List Style (Match Leaderboard) ========== */
html body #lb-song-list .search-result-list,
html body #search-body .search-result-list,
html body #recommend-body .search-result-list,
html body #favorites-body .search-result-list,
html body #songlist-body .search-result-list,
html body #ai-body .search-result-list {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
  overflow: hidden;
}

html body #lb-song-list .search-result-header,
html body #search-body .search-result-header,
html body #recommend-body .search-result-header,
html body #favorites-body .search-result-header,
html body #songlist-body .search-result-header,
html body #ai-body .search-result-header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
}

html body #lb-song-list .search-result-item,
html body #search-body .search-result-item,
html body #recommend-body .search-result-item,
html body #favorites-body .search-result-item,
html body #songlist-body .search-result-item,
html body #ai-body .search-result-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html body #lb-song-list .search-result-list .search-result-item:last-child,
html body #search-body .search-result-list .search-result-item:last-child,
html body #recommend-body .search-result-list .search-result-item:last-child,
html body #favorites-body .search-result-list .search-result-item:last-child,
html body #songlist-body .search-result-list .search-result-item:last-child,
html body #ai-body .search-result-list .search-result-item:last-child {
  border-bottom: none !important;
}

html body #lb-song-list .search-result-item:hover,
html body #search-body .search-result-item:hover,
html body #recommend-body .search-result-item:hover,
html body #favorites-body .search-result-item:hover,
html body #songlist-body .search-result-item:hover,
html body #ai-body .search-result-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html body #lb-song-list .search-result-item.selected,
html body #search-body .search-result-item.selected,
html body #recommend-body .search-result-item.selected,
html body #favorites-body .search-result-item.selected,
html body #songlist-body .search-result-item.selected,
html body #ai-body .search-result-item.selected {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.28) 0%, rgba(255, 90, 82, 0.14) 55%, rgba(255, 255, 255, 0.04) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body #lb-song-list .search-result-item.selected .sr-song-name,
html body #search-body .search-result-item.selected .sr-song-name,
html body #recommend-body .search-result-item.selected .sr-song-name,
html body #favorites-body .search-result-item.selected .sr-song-name,
html body #songlist-body .search-result-item.selected .sr-song-name,
html body #ai-body .search-result-item.selected .sr-song-name {
  color: #ffffff !important;
  font-weight: 700 !important;
}

html body.light-mode #lb-song-list .search-result-list,
html body.light-mode #search-body .search-result-list,
html body.light-mode #recommend-body .search-result-list,
html body.light-mode #favorites-body .search-result-list,
html body.light-mode #songlist-body .search-result-list,
html body.light-mode #ai-body .search-result-list {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html body.light-mode #lb-song-list .search-result-header,
html body.light-mode #search-body .search-result-header,
html body.light-mode #recommend-body .search-result-header,
html body.light-mode #favorites-body .search-result-header,
html body.light-mode #songlist-body .search-result-header,
html body.light-mode #ai-body .search-result-header {
  background: rgba(15, 23, 42, 0.04) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode #lb-song-list .search-result-item,
html body.light-mode #search-body .search-result-item,
html body.light-mode #recommend-body .search-result-item,
html body.light-mode #favorites-body .search-result-item,
html body.light-mode #songlist-body .search-result-item,
html body.light-mode #ai-body .search-result-item {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html body.light-mode #lb-song-list .search-result-item:hover,
html body.light-mode #search-body .search-result-item:hover,
html body.light-mode #recommend-body .search-result-item:hover,
html body.light-mode #favorites-body .search-result-item:hover,
html body.light-mode #songlist-body .search-result-item:hover,
html body.light-mode #ai-body .search-result-item:hover {
  background: rgba(15, 23, 42, 0.05) !important;
}

html body.light-mode #lb-song-list .search-result-item.selected,
html body.light-mode #search-body .search-result-item.selected,
html body.light-mode #recommend-body .search-result-item.selected,
html body.light-mode #favorites-body .search-result-item.selected,
html body.light-mode #songlist-body .search-result-item.selected,
html body.light-mode #ai-body .search-result-item.selected {
  background: linear-gradient(90deg, rgba(255, 90, 82, 0.24) 0%, rgba(255, 90, 82, 0.12) 55%, rgba(255, 255, 255, 0.86) 100%) !important;
  border-left: 3px solid #ff5a52 !important;
}

html body.light-mode #lb-song-list .search-result-item.selected .sr-song-name,
html body.light-mode #search-body .search-result-item.selected .sr-song-name,
html body.light-mode #recommend-body .search-result-item.selected .sr-song-name,
html body.light-mode #favorites-body .search-result-item.selected .sr-song-name,
html body.light-mode #songlist-body .search-result-item.selected .sr-song-name,
html body.light-mode #ai-body .search-result-item.selected .sr-song-name {
  color: #7f1d1d !important;
  font-weight: 700 !important;
}

/* ========== Toolbar Action Unification ========== */
.toolbar-action-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--text-base) !important;
  box-shadow: none !important;
}

.toolbar-action-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.light-mode .toolbar-action-btn {
  background: transparent !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #334155 !important;
}

body.light-mode .toolbar-action-btn:hover {
  background: rgba(15, 23, 42, 0.05) !important;
}

/* Mobile: keep essential button, collapse others into more */
@media (max-width: 768px) {
  .search-toolbar-actions,
  .lb-main-actions {
    display: flex;
    align-items: center;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 0;
  }

  .search-toolbar-actions.actions-collapsed .action-collapsible,
  .lb-main-actions.actions-collapsed .action-collapsible {
    display: none !important;
  }

  .search-toolbar-actions.actions-expanded,
  .lb-main-actions.actions-expanded {
    flex-wrap: wrap;
  }

  .search-toolbar-actions.actions-expanded .action-collapsible,
  .lb-main-actions.actions-expanded .action-collapsible {
    display: inline-flex !important;
  }

  .toolbar-more-toggle {
    display: inline-flex;
  }
}

/* ========== Search Toolbar Button Underline Cleanup ========== */
html body #search-toolbar .search-mode-btns {
  border-bottom: none !important;
}

html body #search-toolbar .search-mode-btn {
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

html body #search-toolbar .search-mode-btn.active {
  border-bottom: none !important;
  box-shadow: none !important;
}

html body #search-toolbar .search-toolbar-inner,
html body #songlist-toolbar .search-toolbar-inner {
  border-bottom: none !important;
}

html body #tab-favorites .search-toolbar-inner {
  border-bottom: none !important;
  align-items: center !important;
  min-height: 40px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

html body #tab-favorites .search-toolbar {
  margin-bottom: 8px !important;
  padding-top: 2px !important;
  padding-bottom: 0 !important;
}

html body #songlist-toolbar.search-toolbar {
  margin-bottom: 8px !important;
  padding-top: 2px !important;
  padding-bottom: 0 !important;
}

html body #tab-favorites .songlist-toolbar-title i {
  display: none !important;
}

html body #tab-favorites .songlist-toolbar-title {
  gap: 0 !important;
}

html body #tab-favorites .search-toolbar-inner {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html body #songlist-toolbar .search-toolbar-inner {
  border-bottom: none !important;
  align-items: center !important;
  min-height: 40px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html body #tab-favorites .search-toolbar-actions {
  margin-right: 0 !important;
  padding-right: 0 !important;
  align-items: center !important;
}

html body #songlist-toolbar .search-toolbar-actions {
  margin-right: 0 !important;
  padding-right: 0 !important;
  align-items: center !important;
}

html body #tab-favorites #favorites-body .search-result-list {
  margin-top: 0 !important;
}

html body #tab-favorites .search-toolbar-actions .toolbar-action-btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

html body #songlist-toolbar .search-toolbar-actions .toolbar-action-btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

html body #songlist-toolbar .songlist-toolbar-title i {
  color: var(--text-base) !important;
}

/* ========== Search Toolbar Sync (match favorites/songlist) ========== */
html body #search-toolbar.search-toolbar {
  margin-bottom: 8px !important;
  padding-top: 2px !important;
  padding-bottom: 0 !important;
}

html body #search-toolbar .search-toolbar-inner {
  border-bottom: none !important;
  align-items: center !important;
  min-height: 40px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html body #search-toolbar .search-toolbar-actions {
  margin-right: 0 !important;
  padding-right: 0 !important;
  align-items: center !important;
}

html body #search-toolbar .search-toolbar-actions .toolbar-action-btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

/* ========== Dark Mode: Soften Header/Footer Bright Borders ========== */
html body:not(.light-mode) .topbar {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2) !important;
}

html body:not(.light-mode) .topbar-row-2 {
  border: none !important;
}

html body:not(.light-mode) .player-bar {
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.18) !important;
}

html body:not(.light-mode) #search-wrapper .search-container,
html body:not(.light-mode) .search-container-m {
  border: none !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14) !important;
  background-clip: padding-box !important;
}

html body:not(.light-mode) #search-wrapper .search-container:focus-within,
html body:not(.light-mode) .search-container-m:focus-within {
  border: none !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22) !important;
}

@media (max-width: 768px) {
  .topbar {
    transition: transform 0.24s ease, opacity 0.24s ease !important;
    will-change: transform;
  }

  .player-bar {
    transition: transform 0.24s ease, opacity 0.24s ease !important;
    will-change: transform;
  }

  .main-content {
    transition: padding-top 0.24s ease, padding-bottom 0.24s ease !important;
  }

  body.mobile-topbar-hidden .topbar {
    transform: translateY(-100%);
    opacity: 0.98;
  }

  body.mobile-topbar-hidden .main-content {
    padding-top: 10px !important;
  }

  body.mobile-playerbar-hidden .player-bar {
    transform: translateY(100%);
    opacity: 0.98;
    pointer-events: none;
  }

  body.mobile-playerbar-hidden .main-content {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ========== Mobile Header Harmony: menu + round actions ========== */
.topbar-mobile-row-2 .topbar-mobile-actions {
  padding: 2px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topbar-mobile-row-2 .topbar-mobile-actions .theme-btn-m,
.topbar-mobile-row-2 .topbar-mobile-actions .tool-btn-m {
  width: 32px !important;
  height: 32px !important;
  border: none !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.78) !important;
}

.topbar-mobile-row-2 .topbar-mobile-actions .theme-btn-m:hover,
.topbar-mobile-row-2 .topbar-mobile-actions .tool-btn-m:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

body.light-mode .topbar-mobile-row-2 .topbar-mobile-actions {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-mode .topbar-mobile-row-2 .topbar-mobile-actions .theme-btn-m,
body.light-mode .topbar-mobile-row-2 .topbar-mobile-actions .tool-btn-m {
  color: rgba(15, 23, 42, 0.7) !important;
}

body.light-mode .topbar-mobile-row-2 .topbar-mobile-actions .theme-btn-m:hover,
body.light-mode .topbar-mobile-row-2 .topbar-mobile-actions .tool-btn-m:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  color: rgba(15, 23, 42, 0.9) !important;
}

@media (max-width: 768px) {
  .discover-switch-mobile .discover-switch-btn[title="解析歌单链接"] {
    display: none !important;
  }
}

html body #tab-favorites .search-toolbar-actions .toolbar-action-btn i,
html body #tab-favorites .search-toolbar-actions .toolbar-action-btn .btn-text-full,
html body #tab-favorites .search-toolbar-actions .toolbar-action-btn .btn-text-mobile {
  display: inline-flex !important;
  align-items: center !important;
  line-height: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

html body #tab-favorites .search-toolbar-actions .toolbar-action-btn .btn-text-full {
  display: inline !important;
}

html body #tab-favorites .search-toolbar-actions .toolbar-action-btn .btn-text-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  html body #tab-favorites .search-toolbar-actions .toolbar-action-btn .btn-text-full {
    display: none !important;
  }

  html body #tab-favorites .search-toolbar-actions .toolbar-action-btn .btn-text-mobile {
    display: inline !important;
  }
}

/* ========== Unified Row Action Buttons (All List Pages) ========== */
html body #search-body .sr-action-btn,
html body #recommend-body .sr-action-btn,
html body #leaderboard-body .sr-action-btn,
html body #favorites-body .sr-action-btn,
html body #songlist-body .sr-action-btn,
html body #ai-body .sr-action-btn,
html body #lb-song-list .sr-action-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  flex: 0 0 30px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: none !important;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

html body #search-body .sr-action-btn:hover,
html body #recommend-body .sr-action-btn:hover,
html body #leaderboard-body .sr-action-btn:hover,
html body #favorites-body .sr-action-btn:hover,
html body #songlist-body .sr-action-btn:hover,
html body #ai-body .sr-action-btn:hover,
html body #lb-song-list .sr-action-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
  color: #ffffff !important;
  transform: none !important;
}

html body #search-body .sr-action-btn:active,
html body #recommend-body .sr-action-btn:active,
html body #leaderboard-body .sr-action-btn:active,
html body #favorites-body .sr-action-btn:active,
html body #songlist-body .sr-action-btn:active,
html body #ai-body .sr-action-btn:active,
html body #lb-song-list .sr-action-btn:active {
  transform: none !important;
}

html body #search-body .sr-action-btn-primary,
html body #recommend-body .sr-action-btn-primary,
html body #leaderboard-body .sr-action-btn-primary,
html body #favorites-body .sr-action-btn-primary,
html body #songlist-body .sr-action-btn-primary,
html body #ai-body .sr-action-btn-primary,
html body #lb-song-list .sr-action-btn-primary {
  border-color: transparent !important;
  background: linear-gradient(140deg, #ff6e67, #ff4a61) !important;
  color: #fff !important;
}

html body #search-body .sr-action-btn-primary:hover,
html body #recommend-body .sr-action-btn-primary:hover,
html body #leaderboard-body .sr-action-btn-primary:hover,
html body #favorites-body .sr-action-btn-primary:hover,
html body #songlist-body .sr-action-btn-primary:hover,
html body #ai-body .sr-action-btn-primary:hover,
html body #lb-song-list .sr-action-btn-primary:hover {
  background: linear-gradient(140deg, #ff7a72, #ff5a6f) !important;
  border-color: transparent !important;
}

html body.light-mode #search-body .sr-action-btn,
html body.light-mode #recommend-body .sr-action-btn,
html body.light-mode #leaderboard-body .sr-action-btn,
html body.light-mode #favorites-body .sr-action-btn,
html body.light-mode #songlist-body .sr-action-btn,
html body.light-mode #ai-body .sr-action-btn,
html body.light-mode #lb-song-list .sr-action-btn {
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #334155 !important;
}

html body.light-mode #search-body .sr-action-btn:hover,
html body.light-mode #recommend-body .sr-action-btn:hover,
html body.light-mode #leaderboard-body .sr-action-btn:hover,
html body.light-mode #favorites-body .sr-action-btn:hover,
html body.light-mode #songlist-body .sr-action-btn:hover,
html body.light-mode #ai-body .sr-action-btn:hover,
html body.light-mode #lb-song-list .sr-action-btn:hover {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.22) !important;
  color: #0f172a !important;
}

html body #search-body .sr-action-btn.sr-action-btn-favorited,
html body #recommend-body .sr-action-btn.sr-action-btn-favorited,
html body #leaderboard-body .sr-action-btn.sr-action-btn-favorited,
html body #favorites-body .sr-action-btn.sr-action-btn-favorited,
html body #songlist-body .sr-action-btn.sr-action-btn-favorited,
html body #ai-body .sr-action-btn.sr-action-btn-favorited,
html body #lb-song-list .sr-action-btn.sr-action-btn-favorited {
  background: linear-gradient(140deg, rgba(255, 95, 109, 0.3), rgba(255, 74, 97, 0.18)) !important;
  border-color: rgba(255, 116, 130, 0.5) !important;
  color: #ffd9df !important;
}

html body.light-mode #search-body .sr-action-btn.sr-action-btn-favorited,
html body.light-mode #recommend-body .sr-action-btn.sr-action-btn-favorited,
html body.light-mode #leaderboard-body .sr-action-btn.sr-action-btn-favorited,
html body.light-mode #favorites-body .sr-action-btn.sr-action-btn-favorited,
html body.light-mode #songlist-body .sr-action-btn.sr-action-btn-favorited,
html body.light-mode #ai-body .sr-action-btn.sr-action-btn-favorited,
html body.light-mode #lb-song-list .sr-action-btn.sr-action-btn-favorited {
  background: linear-gradient(140deg, rgba(255, 120, 130, 0.22), rgba(255, 90, 110, 0.16)) !important;
  border-color: rgba(255, 95, 109, 0.4) !important;
  color: #b4233a !important;
}

html body #search-body .sr-action-btn.sr-action-btn-playing,
html body #recommend-body .sr-action-btn.sr-action-btn-playing,
html body #leaderboard-body .sr-action-btn.sr-action-btn-playing,
html body #favorites-body .sr-action-btn.sr-action-btn-playing,
html body #songlist-body .sr-action-btn.sr-action-btn-playing,
html body #ai-body .sr-action-btn.sr-action-btn-playing,
html body #lb-song-list .sr-action-btn.sr-action-btn-playing {
  background: linear-gradient(140deg, #33d17a, #1db954) !important;
  border-color: rgba(59, 210, 130, 0.5) !important;
  color: #ffffff !important;
}

html body.light-mode #search-body .sr-action-btn.sr-action-btn-playing,
html body.light-mode #recommend-body .sr-action-btn.sr-action-btn-playing,
html body.light-mode #leaderboard-body .sr-action-btn.sr-action-btn-playing,
html body.light-mode #favorites-body .sr-action-btn.sr-action-btn-playing,
html body.light-mode #songlist-body .sr-action-btn.sr-action-btn-playing,
html body.light-mode #ai-body .sr-action-btn.sr-action-btn-playing,
html body.light-mode #lb-song-list .sr-action-btn.sr-action-btn-playing {
  background: linear-gradient(140deg, #2fb56e, #19964a) !important;
  border-color: rgba(25, 150, 74, 0.44) !important;
  color: #ffffff !important;
}

/* ========== Row Actions Refine: unified action strip ========== */
html body #search-body .sr-col-actions,
html body #recommend-body .sr-col-actions,
html body #leaderboard-body .sr-col-actions,
html body #favorites-body .sr-col-actions,
html body #songlist-body .sr-col-actions,
html body #ai-body .sr-col-actions,
html body #lb-song-list .sr-col-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html body.light-mode #search-body .sr-col-actions,
html body.light-mode #recommend-body .sr-col-actions,
html body.light-mode #leaderboard-body .sr-col-actions,
html body.light-mode #favorites-body .sr-col-actions,
html body.light-mode #songlist-body .sr-col-actions,
html body.light-mode #ai-body .sr-col-actions,
html body.light-mode #lb-song-list .sr-col-actions {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html body #search-body .sr-action-btn,
html body #recommend-body .sr-action-btn,
html body #leaderboard-body .sr-action-btn,
html body #favorites-body .sr-action-btn,
html body #songlist-body .sr-action-btn,
html body #ai-body .sr-action-btn,
html body #lb-song-list .sr-action-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  flex: 0 0 28px !important;
  border-radius: 999px !important;
}

@media (max-width: 768px) {
  html body #search-body .sr-col-actions,
  html body #recommend-body .sr-col-actions,
  html body #leaderboard-body .sr-col-actions,
  html body #favorites-body .sr-col-actions,
  html body #songlist-body .sr-col-actions,
  html body #ai-body .sr-col-actions,
  html body #lb-song-list .sr-col-actions {
    padding: 2px 5px !important;
    gap: 4px !important;
  }
}

html body .sr-col-actions .sr-extra-action {
  display: none !important;
}

html body .sr-col-actions .sr-action-btn-more {
  color: rgba(255, 255, 255, 0.78) !important;
}

html body.light-mode .sr-col-actions .sr-action-btn-more {
  color: rgba(15, 23, 42, 0.7) !important;
}

html body .sr-col-actions.actions-compact {
  padding: 2px 4px 2px 4px !important;
  gap: 3px !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html body .sr-col-actions.actions-compact .sr-action-btn {
  width: 27px !important;
  min-width: 27px !important;
  height: 27px !important;
  min-height: 27px !important;
  flex: 0 0 27px !important;
  margin: 0 !important;
}

html body.light-mode #search-body .sr-action-btn-primary,
html body.light-mode #recommend-body .sr-action-btn-primary,
html body.light-mode #leaderboard-body .sr-action-btn-primary,
html body.light-mode #favorites-body .sr-action-btn-primary,
html body.light-mode #songlist-body .sr-action-btn-primary,
html body.light-mode #ai-body .sr-action-btn-primary,
html body.light-mode #lb-song-list .sr-action-btn-primary {
  border-color: transparent !important;
  background: linear-gradient(140deg, #ff6e67, #ff4a61) !important;
  color: #fff !important;
}

html body.light-mode #search-body .sr-action-btn-primary:hover,
html body.light-mode #recommend-body .sr-action-btn-primary:hover,
html body.light-mode #leaderboard-body .sr-action-btn-primary:hover,
html body.light-mode #favorites-body .sr-action-btn-primary:hover,
html body.light-mode #songlist-body .sr-action-btn-primary:hover,
html body.light-mode #ai-body .sr-action-btn-primary:hover,
html body.light-mode #lb-song-list .sr-action-btn-primary:hover {
  background: linear-gradient(140deg, #ff7a72, #ff5a6f) !important;
  border-color: transparent !important;
}

.sr-action-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sr-action-sheet-overlay.open {
  opacity: 1;
}

.sr-action-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px;
  padding: 10px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(120%);
  transition: transform 0.2s ease;
}

.sr-action-sheet-overlay.open .sr-action-sheet {
  transform: translateY(0);
}

.sr-action-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  margin: 0 auto 10px;
}

.sr-action-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sr-action-sheet-btn {
  border: none;
  border-radius: 10px;
  min-height: 56px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.sr-action-sheet-btn span {
  font-size: 11px;
  line-height: 1;
}

.sr-action-sheet-cancel {
  margin-top: 10px;
  width: 100%;
  min-height: 42px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

body.light-mode .sr-action-sheet {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode .sr-action-sheet-handle {
  background: rgba(15, 23, 42, 0.2);
}

body.light-mode .sr-action-sheet-btn {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

body.light-mode .sr-action-sheet-cancel {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

@keyframes tabInSmooth {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content.tab-anim-in {
  animation: tabInSmooth 0.2s ease-out;
}

/* ========== List Rhythm Tune: spacing + subtitle tone ========== */
html body .sr-col-actions.actions-compact {
  gap: 6px !important;
  padding: 2px 2px !important;
}

html body .sr-col-actions.actions-compact .sr-action-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  flex: 0 0 28px !important;
}

html body #search-body .sr-col-actions,
html body #recommend-body .sr-col-actions,
html body #leaderboard-body .sr-col-actions,
html body #favorites-body .sr-col-actions,
html body #songlist-body .sr-col-actions,
html body #ai-body .sr-col-actions,
html body #lb-song-list .sr-col-actions {
  justify-self: end !important;
  gap: 6px !important;
  margin-right: 0 !important;
}

html body .sr-col-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

html body .sr-song-name {
  font-size: 0.93rem !important;
  line-height: 1.34 !important;
  font-weight: 620 !important;
  letter-spacing: 0.01em;
}

html body .sr-col-artist,
html body .sr-song-artist-mobile,
html body .sr-songlist-creator-mobile {
  font-size: 0.78rem !important;
  line-height: 1.24 !important;
  color: rgba(255, 255, 255, 0.58) !important;
  font-weight: 500 !important;
}

html body.light-mode .sr-col-artist,
html body.light-mode .sr-song-artist-mobile,
html body.light-mode .sr-songlist-creator-mobile {
  color: rgba(15, 23, 42, 0.52) !important;
}

/* ========== Topbar More Menu ========== */
.topbar-more-wrap {
  position: relative;
}

.topbar-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  z-index: 120;
}

.topbar-more-item {
  width: 100%;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 12px;
}

.topbar-more-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

body.light-mode .topbar-more-menu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

body.light-mode .topbar-more-item {
  color: #0f172a;
}

body.light-mode .topbar-more-item:hover {
  background: rgba(15, 23, 42, 0.08);
}


/* Hide featured carousel dots on recommend first card */
html body .recommend-featured-dots {
  display: none !important;
}

/* ========== Playlist Header Action Buttons ========== */
html body .playlist-header .playlist-clear,
html body .playlist-header .playlist-close {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 0.98rem !important;
}

html body .playlist-header .playlist-clear i,
html body .playlist-header .playlist-close i {
  font-size: 0.95rem !important;
}

@media (max-width: 768px) {
  html body .playlist-header .playlist-clear,
  html body .playlist-header .playlist-close {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
}

/* ========== AI Assistant Redesign ========== */
html body #tab-ai .ai-toolbar.search-toolbar {
  margin-bottom: 12px !important;
  padding-top: 2px !important;
  padding-bottom: 0 !important;
}

html body #tab-ai .ai-toolbar .search-toolbar-inner {
  border-bottom: none !important;
  align-items: center !important;
  min-height: 40px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html body #tab-ai .ai-toolbar .songlist-toolbar-title {
  gap: 0 !important;
  line-height: 1.2 !important;
}

html body #tab-ai .ai-toolbar .songlist-toolbar-title span {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

html body #tab-ai .ai-toolbar .songlist-toolbar-title i {
  display: none !important;
}

html body #tab-ai .ai-toolbar .search-toolbar-actions {
  margin-right: 0 !important;
  padding-right: 0 !important;
  align-items: center !important;
}

html body #tab-ai .songlist-toolbar-title span {
  letter-spacing: 0.01em;
}

html body #tab-ai .ai-hero {
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 120% at 100% -10%, rgba(59, 130, 246, 0.24), transparent 52%),
    radial-gradient(120% 120% at -10% 110%, rgba(16, 185, 129, 0.2), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}

html body #tab-ai .ai-hero-topbar {
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

html body #tab-ai .ai-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 14px 10px;
  position: relative;
}

html body #tab-ai .ai-hero-now {
  display: flex;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

html body #tab-ai .ai-hero-cover {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 96px;
}

html body #tab-ai .ai-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html body #tab-ai .ai-hero-cover i {
  font-size: 1.2rem;
  opacity: 0.8;
}

html body #tab-ai .ai-hero-now-info {
  min-width: 0;
  flex: 1;
}

html body #tab-ai .ai-hero-kicker {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.62);
}

html body #tab-ai .ai-hero-now-song {
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body #tab-ai .ai-hero-now-singer {
  margin-top: 2px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.64);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body #tab-ai .ai-hero-comment {
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
}

html body #tab-ai .ai-hero-judge-label {
  display: inline-flex;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(29, 185, 84, 0.18);
  border: 1px solid rgba(29, 185, 84, 0.34);
  border-radius: 999px;
  padding: 3px 8px;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

html body #tab-ai .ai-hero-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

html body #tab-ai .ai-hero-action-btn {
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  color: rgba(255,255,255,0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

html body #tab-ai .ai-hero-action-btn i {
  font-size: 0.72rem;
  opacity: 0.95;
}

html body #tab-ai .ai-hero-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 185, 84, 0.5);
  background: linear-gradient(135deg, rgba(29,185,84,0.28), rgba(29,185,84,0.12));
  color: #e9fff4;
}

html body #tab-ai .ai-playground {
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

html body #tab-ai .ai-command-panel {
  margin-bottom: 16px !important;
}

html body #tab-ai .ai-voice-card {
  position: relative;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(16, 185, 129, 0.12));
  overflow: hidden;
}

html body #tab-ai .ai-voice-actions {
  display: flex;
  justify-content: flex-start;
}

html body #tab-ai .ai-voice-visual {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 84px;
  height: 48px;
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.24s ease;
}

html body #tab-ai .ai-voice-ring {
  position: absolute;
  right: 2px;
  top: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
}

html body #tab-ai .ai-voice-waves {
  position: absolute;
  left: 0;
  bottom: 4px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

html body #tab-ai .ai-voice-waves span {
  width: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  height: 8px;
  transform-origin: bottom;
}

html body #tab-ai .ai-voice-card.is-listening .ai-voice-visual {
  opacity: 1;
  transform: translateY(0) scale(1);
}

html body #tab-ai .ai-voice-card.is-listening .ai-voice-ring {
  animation: aiVoicePulse 1.2s ease-out infinite;
}

html body #tab-ai .ai-voice-card.is-listening .ai-voice-waves span:nth-child(1) { animation: aiVoiceWave 0.8s ease-in-out infinite; }
html body #tab-ai .ai-voice-card.is-listening .ai-voice-waves span:nth-child(2) { animation: aiVoiceWave 0.9s ease-in-out infinite 0.1s; }
html body #tab-ai .ai-voice-card.is-listening .ai-voice-waves span:nth-child(3) { animation: aiVoiceWave 0.7s ease-in-out infinite 0.2s; }
html body #tab-ai .ai-voice-card.is-listening .ai-voice-waves span:nth-child(4) { animation: aiVoiceWave 0.95s ease-in-out infinite 0.05s; }
html body #tab-ai .ai-voice-card.is-listening .ai-voice-waves span:nth-child(5) { animation: aiVoiceWave 0.85s ease-in-out infinite 0.15s; }

@keyframes aiVoicePulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes aiVoiceWave {
  0%, 100% { height: 8px; opacity: 0.6; }
  50% { height: 24px; opacity: 1; }
}

html body #tab-ai .ai-voice-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html body #tab-ai .ai-voice-status {
  font-size: 0.78rem;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.34);
  border-radius: 10px;
  padding: 6px 10px;
}

html body #tab-ai .ai-voice-hints span {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
}

html body #tab-ai .ai-command-box {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

html body #tab-ai .ai-command-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

html body #tab-ai .ai-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 1280px) {
  html body #tab-ai .ai-template-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

html body #tab-ai .ai-template-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  min-height: 98px;
  padding: 10px 11px;
  color: #fff;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

html body #tab-ai .ai-template-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 70px at 85% 15%, rgba(255, 255, 255, 0.28), transparent 58%);
  pointer-events: none;
}

html body #tab-ai .ai-template-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.44));
  pointer-events: none;
}

html body #tab-ai .ai-template-card > * {
  position: relative;
  z-index: 1;
}

html body #tab-ai .ai-template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

html body #tab-ai .ai-template-badge {
  align-self: flex-start;
  font-size: 0.62rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html body #tab-ai .ai-template-card strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

html body #tab-ai .ai-template-card span {
  font-size: 0.72rem;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.92);
}

html body #tab-ai .ai-template-card .ai-template-badge {
  font-size: 0.62rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.94);
}

html body #tab-ai .ai-template-morning { background: linear-gradient(140deg, #ff9a5a, #f15f79); }
html body #tab-ai .ai-template-commute { background: linear-gradient(140deg, #3f5efb, #6e45e2); }
html body #tab-ai .ai-template-focus { background: linear-gradient(140deg, #1f4037, #2c7744); }
html body #tab-ai .ai-template-night { background: linear-gradient(140deg, #141e30, #243b55); }
html body #tab-ai .ai-template-jpop { background: linear-gradient(140deg, #654ea3, #eaafc8); }
html body #tab-ai .ai-template-heal { background: linear-gradient(140deg, #11998e, #38ef7d); }

@media (max-width: 768px) {
  html body #tab-ai .ai-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html body #tab-ai .ai-command-input {
  flex: 1;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-base);
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}

html body #tab-ai .ai-command-input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

html body #tab-ai .ai-playground-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html body #tab-ai .ai-playground-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-base);
  min-height: 88px;
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.2s ease;
}

html body #tab-ai .ai-playground-btn:hover {
  border-color: rgba(29, 185, 84, 0.42);
  background: rgba(29, 185, 84, 0.08);
}

html body #tab-ai .ai-playground-btn i {
  color: var(--primary);
  font-size: 0.9rem;
}

html body #tab-ai .ai-playground-btn strong {
  font-size: 0.9rem;
  line-height: 1.24;
}

html body #tab-ai .ai-playground-btn span {
  font-size: 0.76rem;
  line-height: 1.24;
  color: rgba(255, 255, 255, 0.62);
}

html body #tab-ai .ai-comment-box {
  border-radius: 16px !important;
  background: rgba(29, 185, 84, 0.08);
  border: 1px solid rgba(29, 185, 84, 0.2);
}

html body #tab-ai .ai-mood-block {
  margin-bottom: 16px;
}

html body #tab-ai .ai-mood-block .songlist-toolbar-title {
  margin-bottom: 8px;
}

html body #tab-ai .ai-mood-block .search-result-item .sr-col-actions {
  justify-content: flex-end !important;
  justify-self: end !important;
  width: 100% !important;
  margin-left: auto !important;
}

html body #tab-ai .ai-reason-chip {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 3px;
  font-size: 0.7rem;
  line-height: 1.1;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(29, 185, 84, 0.14);
  color: rgba(183, 248, 210, 0.98);
  border: 1px solid rgba(29, 185, 84, 0.34);
}

body.light-mode #tab-ai .ai-toolbar.search-toolbar {
  background: rgba(255, 255, 255, 0.78);
}

body.light-mode #tab-ai .ai-hero {
  border-color: rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(120% 120% at 100% -10%, rgba(147, 197, 253, 0.36), transparent 54%),
    radial-gradient(120% 120% at -10% 110%, rgba(110, 231, 183, 0.28), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body.light-mode #tab-ai .ai-hero-topbar {
  border-bottom-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
}

body.light-mode #tab-ai .ai-hero-kicker {
  color: rgba(15, 23, 42, 0.52);
}

body.light-mode #tab-ai .ai-hero-comment {
  color: rgba(15, 23, 42, 0.72);
}

body.light-mode #tab-ai .ai-hero-cover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode #tab-ai .ai-hero-now-singer {
  color: rgba(15, 23, 42, 0.52);
}

body.light-mode #tab-ai .ai-hero-judge-label {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.26);
}

body.light-mode #tab-ai .ai-hero-action-btn {
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.12);
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241,245,249,0.9));
}

body.light-mode #tab-ai .ai-hero-action-btn:hover {
  color: #166534;
  border-color: rgba(29, 185, 84, 0.34);
  background: linear-gradient(135deg, rgba(220,252,231,0.95), rgba(236,253,245,0.92));
}

body.light-mode #tab-ai .ai-playground {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode #tab-ai .ai-voice-card {
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.86), rgba(209, 250, 229, 0.9));
}

body.light-mode #tab-ai .ai-voice-ring {
  border-color: rgba(15, 23, 42, 0.42);
  box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.22);
}

body.light-mode #tab-ai .ai-voice-waves span {
  background: rgba(15, 23, 42, 0.72);
}

body.light-mode #tab-ai .ai-voice-hints span {
  color: rgba(15, 23, 42, 0.72);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode #tab-ai .ai-voice-status {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.3);
}

body.light-mode #tab-ai .ai-command-box {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-mode #tab-ai .ai-command-input {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-mode #tab-ai .ai-command-input::placeholder {
  color: rgba(15, 23, 42, 0.46);
}

body.light-mode #tab-ai .ai-template-card {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

body.light-mode #tab-ai .ai-playground-btn {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode #tab-ai .ai-playground-btn span {
  color: rgba(15, 23, 42, 0.56);
}

body.light-mode #tab-ai .ai-comment-box {
  background: rgba(29, 185, 84, 0.08);
  border-color: rgba(29, 185, 84, 0.22);
}

body.light-mode #tab-ai .ai-reason-chip {
  color: #187044;
  background: rgba(29, 185, 84, 0.12);
}

@media (max-width: 768px) {
  html body #tab-ai .ai-hero-head {
    flex-direction: column;
    gap: 10px;
    padding-top: 34px;
  }

  html body #tab-ai .ai-hero-cover {
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
  }

  html body #tab-ai .ai-playground-grid {
    grid-template-columns: 1fr;
  }

  html body #tab-ai .ai-command-row {
    flex-direction: column;
    align-items: stretch;
  }

  html body #tab-ai .ai-hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body #tab-ai .ai-hero-head {
    padding: 12px 12px 8px;
  }

  html body #tab-ai .ai-hero-actions {
    padding: 0 12px 12px;
  }
}
