/* =========================================================
   Solara 音乐播放器 - 基础样式
   设计理念：全屏专辑封面沉浸式 + 大字号居中歌词 + 网易云风底栏
   ========================================================= */

:root {
    --font-main: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-display: 'Playfair Display', 'Noto Sans SC', serif;

    /* 主色调 - 优雅的青绿色系 */
    --primary-color: #1abc9c;
    --primary-color-dark: #12836d;
    --primary-color-light: #48e0c0;

    /* 语义色 */
    --warning-color: #e74c3c;
    --success-color: #2ecc71;
    --success-color-hover: #27ae60;

    /* 背景 */
    --bg-base: #0a0a0f;
    --bg-overlay: rgba(10, 10, 15, 0.72);
    --bg-vignette: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.7) 100%);

    /* 组件背景 - 毛玻璃系 */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.14);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-strong: rgba(255, 255, 255, 0.22);

    /* 文字 */
    --text-primary: rgba(255, 255, 255, 0.96);
    --text-secondary: rgba(255, 255, 255, 0.68);
    --text-tertiary: rgba(255, 255, 255, 0.42);
    --text-on-primary: #ffffff;

    /* 歌词 */
    --lyrics-normal: rgba(255, 255, 255, 0.38);
    --lyrics-passed: rgba(255, 255, 255, 0.55);
    --lyrics-current: #ffffff;
    --lyrics-current-shadow: 0 0 40px rgba(26, 188, 156, 0.55), 0 0 16px rgba(255,255,255,0.25);
    --lyrics-next: rgba(255, 255, 255, 0.48);

    /* 播放器底栏 */
    --player-bar-h: 92px;
    --player-bar-bg: rgba(18, 20, 28, 0.92);
    --player-bar-border: rgba(255, 255, 255, 0.06);
    --player-bar-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);

    /* 搜索下拉 */
    --search-result-bg: rgba(20, 22, 30, 0.96);
    --search-result-hover: rgba(26, 188, 156, 0.14);
    --search-result-selected: rgba(26, 188, 156, 0.22);

    /* 列表项 */
    --item-hover-bg: rgba(26, 188, 156, 0.1);
    --item-current-bg: rgba(26, 188, 156, 0.2);

    /* 滚动条 */
    --scrollbar-thumb: rgba(255, 255, 255, 0.22);
    --scrollbar-thumb-hover: var(--primary-color);
    --scrollbar-track: transparent;

    /* 扇形播放列表 */
    --fan-bg: rgba(16, 18, 26, 0.88);
    --fan-item-bg: rgba(255, 255, 255, 0.06);
    --fan-item-hover: rgba(26, 188, 156, 0.16);
    --fan-item-current: rgba(26, 188, 156, 0.3);

    /* 阴影 */
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.25);
    --shadow-strong: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(26, 188, 156, 0.35);

    /* 过渡 */
    --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: 0.18s;
    --dur-base: 0.32s;
    --dur-slow: 0.55s;

    /* 尺寸 */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 999px;
}

/* 浅色模式 - 保留原有变量兼容旧代码 */
.dark-mode {
    /* 与默认一致，保持统一 */
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== 基础重置 ========== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: var(--bg-base);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
    padding-bottom: var(--player-bar-h);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* ========== 全屏专辑背景 ========== */
.album-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.album-bg__image {
    position: absolute;
    inset: -4%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(48px) saturate(125%) brightness(0.78);
    transform: scale(1.08);
    transition: opacity 0.9s var(--ease-smooth),
                background-image 0.9s var(--ease-smooth),
                filter 0.6s var(--ease-smooth);
    will-change: transform, opacity, filter;
}

.album-bg__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10,10,15,0.45) 0%, rgba(10,10,15,0.15) 25%, rgba(10,10,15,0.35) 60%, rgba(10,10,15,0.88) 100%),
        linear-gradient(90deg, rgba(10,10,15,0.55) 0%, rgba(10,10,15,0.08) 30%, rgba(10,10,15,0.08) 70%, rgba(10,10,15,0.55) 100%);
}

.album-bg__vignette {
    position: absolute;
    inset: 0;
    background: var(--bg-vignette);
    opacity: 0.85;
}

/* 原有背景渐变层 - 作为备选 */
.background-stage {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s var(--ease-smooth);
}

.background-stage.show {
    opacity: 1;
}

.background-stage__layer {
    position: absolute;
    inset: 0;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.background-stage__layer--transition {
    opacity: 0;
    transition: opacity 0.85s var(--ease-smooth);
}

body.background-transitioning .background-stage__layer--transition {
    opacity: 1;
}

/* ========== 桌面端：左上角搜索栏 ========== */
.desktop-search {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 100;
    width: min(520px, calc(100vw - 56px));
}

.desktop-search__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    transition: all var(--dur-base) var(--ease-smooth);
    box-shadow: var(--shadow-soft);
}

.desktop-search__bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft), 0 0 0 3px rgba(26, 188, 156, 0.18);
    transform: translateY(-1px);
}

.desktop-search__icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--dur-fast) var(--ease-smooth),
                background var(--dur-fast) var(--ease-smooth);
    flex-shrink: 0;
}

.desktop-search__icon-btn:hover {
    color: var(--primary-color);
    background: rgba(26, 188, 156, 0.1);
}

.desktop-search__icon-btn:focus-visible {
    outline: none;
    color: var(--primary-color);
    background: rgba(26, 188, 156, 0.15);
}

.desktop-search__input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    padding: 10px 4px;
    min-width: 0;
}

.desktop-search__input:focus-visible {
    outline: none;
}

.desktop-search__bar:focus-within .desktop-search__input {
    color: var(--text-primary);
}

.desktop-search__input::placeholder {
    color: var(--text-tertiary);
}

.desktop-search__source {
    position: relative;
    flex-shrink: 0;
}

.source-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.source-select-btn:hover,
.source-select-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(26, 188, 156, 0.08);
}

.source-select-btn .caret-icon {
    font-size: 10px;
    transition: transform var(--dur-fast) var(--ease-smooth);
}

.source-select-btn.active .caret-icon {
    transform: rotate(180deg);
}

.source-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--search-result-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
    min-width: 150px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--dur-fast) var(--ease-smooth);
    z-index: 200;
    pointer-events: none;
}

.source-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.source-option {
    padding: 11px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.source-option:hover,
.source-option.active {
    background: var(--primary-color);
    color: var(--text-on-primary);
}

.source-option i {
    font-size: 11px;
    opacity: 0.6;
}

.desktop-search__submit {
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: var(--text-on-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    box-shadow: 0 6px 18px rgba(26, 188, 156, 0.3);
    flex-shrink: 0;
}

.desktop-search__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(26, 188, 156, 0.4);
    filter: brightness(1.05);
}

.desktop-search__submit:active {
    transform: translateY(0);
}

.desktop-search__submit:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========== 桌面端：搜索结果下拉 ========== */
.desktop-search__dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    max-height: 42vh;
    background: var(--search-result-bg);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: dropdownIn var(--dur-base) var(--ease-bounce);
    transform-origin: top left;
}

.desktop-search__dropdown[hidden] {
    display: none;
}

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

.desktop-search__toolbar {
    padding: 12px 18px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.import-dropdown {
    position: relative;
    display: inline-flex;
}

.import-selected-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: var(--text-on-primary);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    box-shadow: 0 6px 18px rgba(26, 188, 156, 0.28);
}

.import-selected-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(26, 188, 156, 0.36);
    filter: brightness(1.05);
}

.import-selected-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-tertiary);
    cursor: not-allowed;
    box-shadow: none;
}

.import-dropdown-caret {
    font-size: 10px;
}

.import-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--search-result-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
    min-width: 170px;
    padding: 6px 0;
    z-index: 200;
}

.import-dropdown-menu[hidden] {
    display: none;
}

.import-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.import-dropdown-item:hover {
    background: var(--search-result-hover);
    color: var(--text-primary);
}

.desktop-search__results {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    background: transparent;
    border: 1px solid transparent;
}

.search-result-item:hover:not(.selected) {
    background: var(--search-result-hover);
}

.search-result-item.selected {
    background: var(--search-result-selected);
    border-color: rgba(26, 188, 156, 0.35);
}

.search-result-select {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--dur-fast) var(--ease-smooth);
    cursor: pointer;
}

.search-result-item.selected .search-result-select {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

.search-result-select i {
    font-size: 11px;
    transform: scale(0.5);
    transition: transform var(--dur-fast) var(--ease-bounce);
}

.search-result-item.selected .search-result-select i {
    transform: scale(1);
}

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

.search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.search-result-item.selected .search-result-title {
    color: var(--primary-color-light);
    font-weight: 600;
}

.search-result-artist {
    font-size: 12.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.search-result-actions .action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.search-result-actions .action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: scale(1.08);
}

.search-result-actions .action-btn.favorite:hover,
.search-result-actions .action-btn.favorite.is-active {
    color: #ff4d67;
}

.search-result-actions .action-btn.play:hover {
    color: var(--primary-color-light);
}

.search-result-actions .action-btn.download:hover {
    color: var(--success-color);
}

.action-btn {
    background: var(--primary-color);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--dur-fast) var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.desktop-search__pagination {
    padding: 10px 18px 16px;
    border-top: 1px solid var(--glass-border);
}

.load-more-btn {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.load-more-btn:hover:not(:disabled) {
    background: rgba(26, 188, 156, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color-light);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.load-more-btn i {
    font-size: 11px;
}

/* ========== 桌面端：右上角设置/雷达按钮组 ========== */
.desktop-header-actions {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-button {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--primary-color-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all var(--dur-base) var(--ease-smooth);
    box-shadow: var(--shadow-soft);
}

.theme-toggle-button:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.theme-toggle-button:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft), 0 0 0 3px rgba(26, 188, 156, 0.22);
}

.theme-toggle-button .theme-icon {
    position: absolute;
    font-size: 17px;
    transition: all var(--dur-base) var(--ease-smooth);
    opacity: 0;
    transform: scale(0.6) rotate(-20deg);
}

.theme-toggle-button .theme-icon--sun {
    color: #f5a623;
}

.theme-toggle-button .theme-icon--moon {
    color: #a29bfe;
    transform: scale(0.6) rotate(20deg);
}

.theme-toggle-button:not(.is-dark) .theme-icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-toggle-button.is-dark .theme-icon--moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.desktop-radar-btn {
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.2), rgba(26, 188, 156, 0.06));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--primary-color-light);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--dur-base) var(--ease-smooth);
    box-shadow: var(--shadow-soft);
}

.desktop-radar-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: var(--text-on-primary);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.desktop-radar-btn i {
    font-size: 14px;
}

/* ========== 中央歌词舞台 ========== */
.lyrics-stage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--player-bar-h);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 8vw 80px;
    pointer-events: none;
}

.lyrics-stage > * {
    pointer-events: auto;
}

.lyrics-stage__song-info {
    text-align: center;
    margin-bottom: clamp(24px, 4vh, 48px);
    max-width: 900px;
    width: 100%;
}

.lyrics-stage__title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.2vw, 46px);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    line-height: 1.2;
    text-wrap: balance;
    text-shadow: 0 4px 30px rgba(0,0,0,0.45);
}

.lyrics-stage__artist {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(14px, 1.2vw, 17px);
    color: var(--text-secondary);
}

.favorite-toggle {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--dur-fast) var(--ease-smooth),
                transform var(--dur-fast) var(--ease-smooth);
}

.favorite-toggle:hover {
    color: var(--primary-color-light);
    transform: scale(1.15);
}

.favorite-toggle.is-active {
    color: #ff4d67;
}

.current-favorite-btn {
    font-size: 17px;
}

/* ========== 歌词视口 ========== */
.lyrics-stage__viewport {
    width: 100%;
    max-width: 1000px;
    height: 56vh;
    max-height: 600px;
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(180deg,
        transparent 0%,
        rgba(0,0,0,0.85) 14%,
        rgba(0,0,0,1) 28%,
        rgba(0,0,0,1) 72%,
        rgba(0,0,0,0.85) 86%,
        transparent 100%);
    -webkit-mask-image: linear-gradient(180deg,
        transparent 0%,
        rgba(0,0,0,0.85) 14%,
        rgba(0,0,0,1) 28%,
        rgba(0,0,0,1) 72%,
        rgba(0,0,0,0.85) 86%,
        transparent 100%);
    scrollbar-width: none;
}

.lyrics-stage__viewport::-webkit-scrollbar {
    display: none;
}

.lyrics-stage__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 18% 0;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.lyrics-stage__content > div {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    font-size: clamp(20px, 2.4vw, 34px);
    font-weight: 700;
    line-height: 1.55;
    color: var(--lyrics-normal);
    transition: color 0.4s var(--ease-smooth),
                font-size 0.4s var(--ease-smooth),
                font-weight 0.4s var(--ease-smooth),
                opacity 0.4s var(--ease-smooth),
                text-shadow 0.4s var(--ease-smooth),
                transform 0.4s var(--ease-smooth),
                letter-spacing 0.4s var(--ease-smooth);
    word-break: break-word;
    white-space: pre-wrap;
    text-wrap: balance;
    opacity: 0.75;
    transform: scale(0.96);
    letter-spacing: 0.01em;
}

.lyrics-stage__content > div.lyric--passed {
    color: var(--lyrics-passed);
    opacity: 0.5;
    transform: scale(0.94);
}

.lyrics-stage__content > div.lyric--next {
    color: var(--lyrics-next);
    opacity: 0.65;
    transform: scale(0.95);
}

.lyrics-stage__content > div.current {
    color: var(--lyrics-current);
    font-size: clamp(30px, 4.2vw, 62px);
    font-weight: 900;
    opacity: 1;
    transform: scale(1);
    text-shadow: var(--lyrics-current-shadow);
    letter-spacing: 0.03em;
    padding: 22px 24px;
}

/* 空状态提示 */
.lyrics-stage__viewport.empty::before {
    content: "选择一首歌曲开始播放，歌词将在此同步显示…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
}

/* ========== 底部播放器控制栏（网易云风格） ========== */
.player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    height: var(--player-bar-h);
    background: var(--player-bar-bg);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-top: 1px solid var(--player-bar-border);
    box-shadow: var(--player-bar-shadow);
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(480px, 2.4fr) minmax(280px, 1fr);
    align-items: center;
    gap: 20px;
    padding: 0 28px;
    padding-bottom: env(safe-area-inset-bottom);
    color-scheme: dark;
}

/* 左：当前歌曲缩略信息 */
.player-bar__left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.player-bar__cover {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
}

.player-bar__cover-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s var(--ease-smooth);
}

.player-bar__cover-icon {
    font-size: 22px;
    color: rgba(255,255,255,0.85);
}

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

.player-bar__song-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-bar__song-artist {
    font-size: 12.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 中：播放控制 + 进度 */
.player-bar__center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.player-bar__transport {
    display: flex;
    align-items: center;
    gap: 14px;
}

.transport-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-smooth);
    flex-shrink: 0;
}

.transport-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.transport-btn:focus-visible {
    outline: none;
    color: var(--primary-color-light);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.22);
}

.transport-btn--mode {
    font-size: 15px;
}

.transport-btn--prev,
.transport-btn--next,
.transport-btn--shuffle,
.transport-btn--queue {
    font-size: 16px;
}

.transport-btn--play {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: var(--text-on-primary);
    font-size: 17px;
    box-shadow: 0 8px 22px rgba(26, 188, 156, 0.35);
}

.transport-btn--play:hover {
    background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(26, 188, 156, 0.45);
    color: var(--text-on-primary);
}

/* 光学居中 */
.transport-btn--play .fa-play {
    margin-left: 3px;
}
.transport-btn--prev .fa-backward-step {
    margin-right: 1px;
}
.transport-btn--next .fa-forward-step {
    margin-left: 1px;
}

.transport-btn--shuffle .shuffle-icon {
    transition: all var(--dur-fast) var(--ease-smooth);
}

.transport-btn--shuffle .shuffle-icon--on {
    color: var(--primary-color-light);
}

/* 进度条 */
.player-bar__progress {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 720px;
}

.player-bar__time {
    font-size: 12px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    min-width: 42px;
    text-align: center;
    flex-shrink: 0;
}

.player-bar__slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 20px;
    margin: 0;
    position: relative;
}

.player-bar__slider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 4px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12);
}

.player-bar__slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(to right,
        var(--primary-color) 0%,
        var(--primary-color) var(--progress, 0%),
        transparent var(--progress, 0%),
        transparent 100%);
}

.player-bar__slider::-moz-range-track {
    height: 4px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12);
}

.player-bar__slider::-moz-range-progress {
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
}

.player-bar__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: var(--text-on-primary);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.5);
    cursor: pointer;
    margin-top: -5px;
    transition: transform var(--dur-fast) var(--ease-smooth),
                box-shadow var(--dur-fast) var(--ease-smooth);
}

.player-bar__slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: var(--text-on-primary);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.5);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-smooth),
                box-shadow var(--dur-fast) var(--ease-smooth);
}

.player-bar__slider:hover::-webkit-slider-thumb,
.player-bar__slider:active::-webkit-slider-thumb {
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(26, 188, 156, 0.6);
}

.player-bar__slider:hover::-moz-range-thumb,
.player-bar__slider:active::-moz-range-thumb {
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(26, 188, 156, 0.6);
}

.player-bar__slider:focus-visible {
    outline: none;
}

.player-bar__slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.25), 0 2px 8px rgba(26, 188, 156, 0.5);
}

/* 右：音量 + 音质 + 队列 */
.player-bar__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-width: 0;
}

.player-bar__quality {
    position: relative;
}

.quality-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quality-btn:hover,
.quality-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color-light);
}

.player-quality-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--search-result-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all var(--dur-fast) var(--ease-smooth);
    z-index: 400;
    pointer-events: none;
}

.player-quality-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.quality-option {
    padding: 11px 16px;
    font-size: 13.5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quality-option small {
    color: var(--text-tertiary);
    font-size: 11.5px;
    font-weight: 400;
}

.quality-option:hover,
.quality-option.active {
    background: var(--primary-color);
    color: var(--text-on-primary);
}

.quality-option:hover small,
.quality-option.active small {
    color: rgba(255,255,255,0.75);
}

.player-bar__volume {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.volume-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--dur-fast) var(--ease-smooth);
    flex-shrink: 0;
}

.volume-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.volume-slider {
    width: 100px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 20px;
    flex-shrink: 1;
}

.volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(to right,
        var(--primary-color) 0%,
        var(--primary-color) var(--volume-progress, 80%),
        rgba(255, 255, 255, 0.12) var(--volume-progress, 80%),
        rgba(255, 255, 255, 0.12) 100%);
}

.volume-slider::-moz-range-track {
    height: 4px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12);
}

.volume-slider::-moz-range-progress {
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--text-on-primary);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    margin-top: -4px;
    transition: transform var(--dur-fast) var(--ease-smooth);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--text-on-primary);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-smooth);
}

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

.volume-slider:hover::-moz-range-thumb,
.volume-slider:active::-moz-range-thumb {
    transform: scale(1.2);
}

.volume-slider:focus-visible {
    outline: none;
}

.volume-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.22), 0 1px 6px rgba(0,0,0,0.4);
}

.volume-slider:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.22), 0 1px 6px rgba(0,0,0,0.4);
}

/* transport-btn--queue 移动端专用，桌面端也可用 */
.transport-btn--queue {
    display: none;
}

/* ========== 右侧扇形播放列表（桌面端）========== */
.side-panel-trigger {
    position: fixed;
    top: 0;
    right: 0;
    bottom: var(--player-bar-h);
    width: 40px;
    z-index: 200;
    pointer-events: auto;
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: var(--player-bar-h);
    width: min(520px, 48vw);
    z-index: 210;
    background: var(--fan-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-left: 1px solid var(--glass-border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s var(--ease-smooth);
    opacity: 0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    overflow: hidden;
}

.side-panel.visible,
body.side-panel-open .side-panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.side-panel__header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.side-panel__tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.side-panel__tab {
    padding: 9px 18px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.side-panel__tab i {
    font-size: 12px;
}

.side-panel__tab:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.side-panel__tab.active {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.25), rgba(26, 188, 156, 0.08));
    color: var(--primary-color-light);
    border-color: rgba(26, 188, 156, 0.35);
    box-shadow: 0 4px 14px rgba(26, 188, 156, 0.18);
}

.side-panel__actions {
    display: flex;
    justify-content: flex-end;
}

.side-actions-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.side-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-tertiary);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.side-action-btn:hover:not(:disabled) {
    background: rgba(26, 188, 156, 0.1);
    border-color: rgba(26, 188, 156, 0.3);
    color: var(--primary-color-light);
    transform: translateY(-1px);
}

.side-action-btn--clear:hover:not(:disabled) {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    color: #ff7a6e;
}

.side-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.playlist-import-input {
    display: none;
}

/* ========== 扇形列表容器 ========== */
.fan-container {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.fan-scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 18px 24px 80px;
    overscroll-behavior: contain;
}

.fan-track {
    position: relative;
    min-height: 100%;
}

.fan-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.fan-list::before {
    content: "";
    position: absolute;
    left: -56px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--glass-border) 8%,
        var(--glass-border) 92%,
        transparent 100%);
}

/* 扇形项目 - 半圆形排列效果 */
.fan-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 12px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: all var(--dur-base) var(--ease-smooth);
    background: var(--fan-item-bg);
    border: 1px solid transparent;
    transform-origin: left center;
    will-change: transform, background-color;
}

/* 扇形弧度 - 基于位置偏移 */
.fan-item:nth-child(odd) {
    transform: perspective(800px) rotateY(2deg);
}

.fan-item:nth-child(even) {
    transform: perspective(800px) rotateY(-2deg);
}

.fan-item:hover {
    background: var(--fan-item-hover);
    transform: perspective(800px) rotateY(0deg) translateX(6px);
    border-color: var(--glass-border);
}

.fan-item.current,
.fan-item.highlighted {
    background: var(--fan-item-current);
    border-color: rgba(26, 188, 156, 0.45);
    transform: perspective(800px) rotateY(0deg) translateX(10px);
    box-shadow: -6px 0 0 var(--primary-color),
                0 8px 24px rgba(26, 188, 156, 0.25);
}

/* 扇形左侧半圆装饰 */
.fan-item::before {
    content: "";
    position: absolute;
    left: -62px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--fan-item-bg);
    border: 1px solid var(--glass-border);
    opacity: 0.6;
    transition: all var(--dur-base) var(--ease-smooth);
}

.fan-item:hover::before,
.fan-item.current::before,
.fan-item.highlighted::before {
    opacity: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(26, 188, 156, 0.45);
}

.fan-item__index {
    position: absolute;
    left: -54px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    z-index: 1;
    transition: color var(--dur-fast) var(--ease-smooth);
}

.fan-item.current .fan-item__index,
.fan-item.highlighted .fan-item__index {
    color: var(--text-on-primary);
}

.fan-item__info {
    flex: 1;
    min-width: 0;
}

.fan-item__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.fan-item.current .fan-item__title,
.fan-item.highlighted .fan-item__title {
    color: var(--primary-color-light);
    font-weight: 600;
}

.fan-item__artist {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fan-item__actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease-smooth);
    flex-shrink: 0;
}

.fan-item:hover .fan-item__actions,
.fan-item.current .fan-item__actions,
.fan-item.highlighted .fan-item__actions {
    opacity: 1;
}

.fan-item-action {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.fan-item-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.fan-item-action.is-active,
.fan-item-action.favorite:hover {
    color: #ff4d67;
}

.fan-item-action.add:hover {
    color: var(--primary-color-light);
}

.fan-item-action.remove:hover {
    color: var(--warning-color);
}

.fan-item-action.download:hover {
    color: var(--success-color);
}

/* ========== 播放列表和收藏夹（移动端抽屉用，兼容JS渲染） ========== */
.playlist {
    background: transparent;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 auto;
}

.playlist[hidden],
.playlist.favorites[hidden] {
    display: none !important;
}

.playlist-header {
    display: none;
}

.playlist-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 12px;
    overscroll-behavior: contain;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.playlist-item {
    padding: 11px 90px 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: all var(--dur-fast) var(--ease-smooth);
}

.playlist-item:hover {
    background: var(--item-hover-bg);
    color: var(--text-primary);
}

.playlist-item.current {
    color: var(--text-primary);
    font-weight: 600;
    background: var(--item-current-bg);
}

.playlist-item-favorite,
.playlist-item-download,
.playlist-item-remove,
.favorite-item-action {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.playlist-items .playlist-item:hover .playlist-item-favorite,
.playlist-items .playlist-item:hover .playlist-item-download,
.playlist-items .playlist-item:hover .playlist-item-remove,
.favorites .playlist-item:hover .favorite-item-action {
    opacity: 1;
}

.playlist-item-favorite { right: 62px; }
.playlist-item-download { right: 34px; }
.playlist-item-remove { right: 8px; }

.favorite-item-action--add { right: 86px; }
.favorite-item-action--download { right: 58px; }
.favorite-item-action--remove { right: 8px; }

.playlist-item-favorite.is-active { color: #ff4d67; opacity: 1; }

.playlist-item-favorite:hover { color: #ff4d67; transform: translateY(-50%) scale(1.1); }
.playlist-item-download:hover { color: var(--success-color); transform: translateY(-50%) scale(1.1); }
.playlist-item-remove:hover { color: var(--warning-color); transform: translateY(-50%) scale(1.1); }

.favorite-item-action--add:hover { color: var(--primary-color-light); transform: translateY(-50%) scale(1.1); }
.favorite-item-action--download:hover { color: var(--success-color); transform: translateY(-50%) scale(1.1); }
.favorite-item-action--remove:hover { color: var(--warning-color); transform: translateY(-50%) scale(1.1); }

.playlist-tabs {
    display: flex;
    gap: 6px;
}

.playlist-tab {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.playlist-tab:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color-light);
}

.playlist-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: var(--text-on-primary);
    border-color: transparent;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--dur-base) var(--ease-smooth);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content.settings-content {
    width: min(500px, 92vw);
    max-height: 85vh;
    background: var(--search-result-bg);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: all var(--dur-base) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-content.settings-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-color-light);
}

.close-modal-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-smooth);
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.modal-body {
    padding: 22px 26px;
    overflow-y: auto;
    flex: 1;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-hint {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--text-tertiary);
}

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

.genre-grid__item {
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    transition: all var(--dur-fast) var(--ease-smooth);
    user-select: none;
}

.genre-grid__item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color-light);
}

.genre-grid__item.selected {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.25), rgba(26, 188, 156, 0.08));
    border-color: rgba(26, 188, 156, 0.45);
    color: var(--primary-color-light);
    font-weight: 600;
}

.modal-footer {
    padding: 16px 26px 22px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
}

.save-settings-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: var(--text-on-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-smooth);
    box-shadow: 0 6px 18px rgba(26, 188, 156, 0.3);
}

.save-settings-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(26, 188, 156, 0.4);
    filter: brightness(1.05);
}

/* ========== 通知 ========== */
.notification {
    position: fixed;
    top: 96px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    padding: 12px 22px;
    border-radius: var(--radius-md);
    background: var(--success-color);
    color: var(--text-on-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-strong);
    z-index: 20000;
    opacity: 0;
    pointer-events: none;
    transition: all var(--dur-base) var(--ease-bounce);
}

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

.notification.error {
    background: var(--warning-color);
}

.notification.warning {
    background: #f39c12;
}

/* ========== 通用 Loader ========== */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-bottom-color: transparent;
    border-radius: var(--radius-full);
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 0.9s linear infinite;
}

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

/* ========== 移动端元素（基础层默认隐藏，由 mobile.css 覆盖） ========== */
.mobile-toolbar,
.mobile-stage,
.mobile-search-mask,
.mobile-panel,
.mobile-overlay-scrim {
    display: none;
}
