:root {
    --bg-main: #0a0f1d;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-sidebar: rgba(15, 23, 42, 0.45);
    --bg-tab-bar: rgba(10, 15, 29, 0.65);
    --bg-header: rgba(10, 15, 29, 0.6);
    --bg-player: rgba(15, 23, 42, 0.94);
    --input-bg: rgba(0, 0, 0, 0.35);
    --border-color: rgba(240, 246, 252, 0.1);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.35);
    --accent-hover: #60a5fa;
    --text-primary: #f0f6fc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --lyric-inactive: rgba(255, 255, 255, 0.35);
    --lyric-active: #ffffff;
    --lyric-highlight-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    --sidebar-width: clamp(420px, 30vw, 540px);
    --player-height: 84px;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100%;
    height: 100dvh;
    width: 100vw;
    user-select: none;
    margin: 0;
    padding: 0;
}

/* 动态高斯模糊背景层 (GPU 硬解优化，不阻断鼠标事件) */
.dynamic-background {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(35px) brightness(0.22) saturate(125%);
    transform: translate3d(0, 0, 0);
    will-change: opacity, background-image;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
    pointer-events: none;
}

.dynamic-background.loaded {
    opacity: 0.8;
}

/* 主应用容器 */
.app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

/* 顶部导航头（手机端和标题） */
.app-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-header);
    backdrop-filter: blur(16px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.mobile-tabs {
    display: none;
    gap: 8px;
}

.mobile-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.mobile-tab-btn.active {
    background: var(--border-color);
    color: var(--text-primary);
}

/* 主内容双栏布局 */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧：歌单面板 */
.playlist-panel {
    width: var(--sidebar-width);
    min-width: 380px;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    padding: 14px;
    gap: 12px;
    overflow: hidden;
    overflow-x: hidden;
}

/* 顶层主切换 Tabs: 专辑歌单 / 全部歌曲 */
.panel-nav-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-tab-bar);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.nav-tab-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

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

.nav-tab-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

/* 视图容器控制 */
.panel-view-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-x: hidden;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

/* 分类过滤药丸栏 */
.category-filter-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 8px 0;
    flex-shrink: 0;
    scrollbar-width: none;
}

.category-filter-bar::-webkit-scrollbar {
    display: none;
    height: 0;
}

.cat-pill {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cat-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.cat-pill.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    font-weight: 500;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* 专辑卡片流网格 */
.playlists-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    padding-bottom: 16px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.album-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.album-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.album-card-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #161b22;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* 1:1 纯 CSS 兜底占位，彻底杜绝任何浏览器内核中的 flex 尺寸计算坍塌 */
.album-card-cover-wrapper::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.album-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-card:hover .album-card-img {
    transform: scale(1.05);
}

.album-card-play-hover {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.album-card:hover .album-card-play-hover {
    opacity: 1;
    transform: translateY(0);
}

.album-card-category {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #cbd5e1;
    font-weight: 500;
    z-index: 2;
}

.album-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-width: 0;
    max-width: 100%;
    flex-shrink: 0;
}

.album-card-artist {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
    line-height: 1.3;
    min-width: 0;
    max-width: 100%;
    flex-shrink: 0;
}

.album-card-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
    min-width: 0;
    max-width: 100%;
    flex-shrink: 0;
}

/* 专辑详情内页 */
.album-detail-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.back-btn {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

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

.album-hero {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px;
}

.detail-album-cover {
    width: 76px;
    height: 76px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.detail-album-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-meta-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-category-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.detail-album-stats {
    font-size: 11px;
    color: var(--text-muted);
}

.detail-album-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0 0 0;
}

.detail-album-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.detail-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.play-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--accent);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.play-all-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.seamless-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.seamless-play-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.seamless-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
}

/* 全部歌曲工具栏 */
.playlist-toolbar {
    padding: 4px 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.list-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.refresh-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.refresh-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

/* 歌曲列表滚动区 */
.songs-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 12px;
}

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

.song-item.active {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.song-index {
    width: 24px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.song-item.active .song-index {
    color: var(--accent);
    font-weight: bold;
}

.song-cover-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.song-cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.song-item:hover .song-cover-thumb img {
    transform: scale(1.06);
}

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

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

.song-item.active .song-title {
    color: var(--accent-hover);
}

.song-meta {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.badge {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-lrc {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-fmt {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.badge-track {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 10px;
    font-weight: 700;
}

.song-index.is-track {
    color: #818cf8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.song-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.song-duration {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-swap-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-item:hover .item-swap-btn {
    opacity: 0.7;
}

.item-swap-btn:hover {
    color: var(--accent);
    opacity: 1 !important;
    background: rgba(59, 130, 246, 0.15);
}

/* 右侧：播放与歌词面板 */
.player-panel {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 专辑封面大图区域 */
.album-visual-area {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.cover-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    background: #161b22;
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.22s ease, filter 0.22s ease, transform 0.4s ease;
}

.cover-img.cover-loading {
    opacity: 0.65;
    filter: blur(6px);
    transform: scale(0.97);
}

.track-detail-info {
    margin-top: 24px;
    text-align: center;
    max-width: 320px;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.current-title {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.swap-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: none; /* 播放歌曲时动态显示 */
    align-items: center;
    justify-content: center;
}

.swap-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.08);
}

.current-artist {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 滚动歌词区域 */
.lyrics-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 20px 40px 20px 20px;
}

.lyrics-container {
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 160px 0;
    scrollbar-width: none;
    /* 使用基于 Alpha 透明度的蒙版，彻底消除黑色背景色块，完美融合动态背景 */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

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

.lyric-row, .lyric-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
    color: var(--lyric-inactive);
    border-radius: 12px;
    cursor: pointer;
    transition: color 0.25s ease, background 0.2s ease, transform 0.25s ease;
    transform-origin: left center;
    position: relative;
    margin-bottom: 4px;
}

.lyric-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    transition: inherit;
}

.lyric-text {
    flex: 1;
    transition: inherit;
}

.lyric-original {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--lyric-inactive);
    transition: color 0.25s ease, font-size 0.25s ease, text-shadow 0.25s ease;
    word-break: break-word;
}

.lyric-translation {
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--lyric-inactive);
    opacity: 0.72;
    transition: color 0.25s ease, opacity 0.25s ease, font-size 0.25s ease, text-shadow 0.25s ease;
    word-break: break-word;
}

.lyric-jump-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s;
    pointer-events: auto;
    white-space: nowrap;
}

.lyric-row:hover, .lyric-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.lyric-row:hover .lyric-original, .lyric-line:hover {
    color: rgba(255, 255, 255, 0.88);
}

.lyric-row:hover .lyric-translation {
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.75);
}

.lyric-row:hover .lyric-jump-btn, .lyric-line:hover .lyric-jump-btn {
    opacity: 1;
    transform: translateX(0);
}

.lyric-jump-btn:hover {
    background: var(--accent);
    color: #fff;
}

.lyric-row:active, .lyric-line:active {
    transform: scale(0.99);
}

/* 激活高亮状态：双语协同高亮，原文放大耀眼，翻译字号适度缩小并同步高亮 */
.lyric-row.active, .lyric-line.active {
    background: rgba(255, 255, 255, 0.03);
    transform: scale(1.02);
}

.lyric-row.active .lyric-original, .lyric-line.active {
    color: var(--lyric-active);
    font-size: 22px;
    font-weight: 700;
    text-shadow: var(--lyric-highlight-shadow);
}

.lyric-row.active .lyric-translation {
    color: var(--accent-hover);
    opacity: 0.96;
    font-size: 14.5px;
    font-weight: 500;
    text-shadow: 0 0 10px var(--accent-glow);
}

.lyric-row.active .lyric-jump-btn, .lyric-line.active .lyric-jump-btn {
    display: none;
}


.empty-lyrics {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 16px;
}

/* 底部常驻播放控制栏 */
.bottom-player {
    height: var(--player-height);
    background: var(--bg-player);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 10;
    backdrop-filter: blur(16px);
}

/* 左侧：当前歌曲简略卡片 */
.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 250px;
    min-width: 180px;
}

.mini-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #21262d;
}

.mini-info {
    overflow: hidden;
}

.mini-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 中间：主控制与进度条 */
.player-center {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

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

.play-toggle-btn {
    background: var(--text-primary);
    color: #000;
    width: 42px;
    height: 42px;
    font-size: 20px;
}

.play-toggle-btn:hover {
    background: #fff;
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

/* 进度条 */
.progress-area {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-label {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 38px;
    font-variant-numeric: tabular-nums;
}

.progress-bar-wrapper {
    flex: 1;
    height: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.progress-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: height 0.15s ease;
}

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

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    border-radius: 2px;
    position: relative;
}

/* 右侧：音量与功能选项 */
.player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 250px;
    min-width: 180px;
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    transition: transform 0.1s;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 响应式移动端断点适配 (Mobile Responsive) */
@media (max-width: 860px) {
    .app-header {
        height: 50px;
        padding: 0 14px;
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 15px;
    }

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

    .mobile-tab-btn {
        padding: 5px 12px;
        font-size: 12px;
        border-radius: 14px;
    }

    .main-content {
        position: relative;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .playlist-panel {
        width: 100%;
        min-width: unset;
        max-width: unset;
        border-right: none;
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        padding: 8px;
        gap: 8px;
    }

    .playlists-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .player-panel {
        display: none;
        width: 100%;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }

    /* 手机端 Tab 切换逻辑 */
    body.show-lyrics .playlist-panel {
        display: none;
    }

    body.show-lyrics .player-panel {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    /* 手机端播放页面：展示精美封面、歌曲信息与平滑歌词 */
    .album-visual-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 14px 4px 14px;
        flex-shrink: 0;
        gap: 6px;
    }

    .cover-wrapper {
        width: 130px;
        height: 130px;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
        overflow: hidden;
    }

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

    .track-detail-info {
        width: 100%;
        text-align: center;
    }

    .title-row {
        justify-content: center;
        gap: 6px;
    }

    .current-title {
        font-size: 15px;
        max-width: 85%;
        margin-bottom: 2px;
    }

    .current-artist {
        font-size: 12px;
        color: var(--text-secondary);
    }

    .lyrics-area {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 8px 14px;
    }

    .lyric-line {
        font-size: 14px;
        padding: 6px 0;
    }

    .lyric-line.active {
        font-size: 17px;
    }

    /* 手机端底部常驻控制栏：紧凑且绝对不超出屏幕 */
    .bottom-player {
        height: auto;
        min-height: 68px;
        padding: 6px 14px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        flex-shrink: 0;
        background: var(--bg-player);
    }

    .player-left {
        display: none; /* 移动端播放页顶部有专属封面展示，底部空间全留给播放按钮与进度条 */
    }

    .player-center {
        width: 100%;
        max-width: 100%;
        gap: 4px;
    }

    .control-buttons {
        gap: 20px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }

    .play-toggle-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .progress-area {
        gap: 8px;
    }

    .time-label {
        font-size: 10px;
        min-width: 32px;
    }

    .player-right {
        display: none; /* 移动端隐藏音量条 */
    }
}

/* 针对较小屏幕手机（高度 <= 700px）更紧凑适配 */
@media (max-width: 860px) and (max-height: 700px) {
    .cover-wrapper {
        width: 96px;
        height: 96px;
        border-radius: 10px;
    }
    .album-visual-area {
        padding: 6px 10px 2px 10px;
        gap: 3px;
    }
    .current-title {
        font-size: 14px;
    }
    .current-artist {
        font-size: 11px;
    }
    .lyric-line {
        font-size: 13px;
        padding: 4px 0;
    }
    .lyric-line.active {
        font-size: 15px;
    }
}

/* ========================================================
   主题色彩与外观方案定义 (Theme & Mode Presets)
   ======================================================== */

/* 1. 暗色模式预设 (Dark Mode - 默认或跟随系统为深色时) */
[data-theme="blue"], :root {
    --bg-main: #0a0f1d;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-sidebar: rgba(15, 23, 42, 0.45);
    --bg-tab-bar: rgba(10, 15, 29, 0.65);
    --bg-header: rgba(10, 15, 29, 0.6);
    --bg-player: rgba(15, 23, 42, 0.94);
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.35);
    --border-color: rgba(59, 130, 246, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

[data-theme="red"] {
    --bg-main: #180808;
    --bg-card: rgba(38, 14, 14, 0.75);
    --bg-card-hover: rgba(54, 20, 20, 0.85);
    --bg-sidebar: rgba(38, 14, 14, 0.45);
    --bg-tab-bar: rgba(24, 8, 8, 0.65);
    --bg-header: rgba(24, 8, 8, 0.6);
    --bg-player: rgba(38, 14, 14, 0.94);
    --accent: #ef4444;
    --accent-hover: #f87171;
    --accent-glow: rgba(239, 68, 68, 0.35);
    --border-color: rgba(239, 68, 68, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

[data-theme="green"] {
    --bg-main: #06150e;
    --bg-card: rgba(10, 36, 24, 0.75);
    --bg-card-hover: rgba(16, 52, 34, 0.85);
    --bg-sidebar: rgba(10, 36, 24, 0.45);
    --bg-tab-bar: rgba(6, 21, 14, 0.65);
    --bg-header: rgba(6, 21, 14, 0.6);
    --bg-player: rgba(10, 36, 24, 0.94);
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-glow: rgba(16, 185, 129, 0.35);
    --border-color: rgba(16, 185, 129, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

[data-theme="purple"] {
    --bg-main: #13081e;
    --bg-card: rgba(30, 15, 48, 0.75);
    --bg-card-hover: rgba(45, 22, 70, 0.85);
    --bg-sidebar: rgba(30, 15, 48, 0.45);
    --bg-tab-bar: rgba(19, 8, 30, 0.65);
    --bg-header: rgba(19, 8, 30, 0.6);
    --bg-player: rgba(30, 15, 48, 0.94);
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.35);
    --border-color: rgba(139, 92, 246, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

[data-theme="amber"] {
    --bg-main: #160e05;
    --bg-card: rgba(38, 24, 10, 0.75);
    --bg-card-hover: rgba(56, 35, 14, 0.85);
    --bg-sidebar: rgba(38, 24, 10, 0.45);
    --bg-tab-bar: rgba(22, 14, 5, 0.65);
    --bg-header: rgba(22, 14, 5, 0.6);
    --bg-player: rgba(38, 24, 10, 0.94);
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.35);
    --border-color: rgba(245, 158, 11, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

[data-theme="pink"] {
    --bg-main: #170712;
    --bg-card: rgba(38, 14, 30, 0.75);
    --bg-card-hover: rgba(56, 20, 44, 0.85);
    --bg-sidebar: rgba(38, 14, 30, 0.45);
    --bg-tab-bar: rgba(23, 7, 18, 0.65);
    --bg-header: rgba(23, 7, 18, 0.6);
    --bg-player: rgba(38, 14, 30, 0.94);
    --accent: #ec4899;
    --accent-hover: #f472b6;
    --accent-glow: rgba(236, 72, 153, 0.35);
    --border-color: rgba(236, 72, 153, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

[data-theme="cyan"] {
    --bg-main: #051419;
    --bg-card: rgba(8, 34, 44, 0.75);
    --bg-card-hover: rgba(12, 48, 62, 0.85);
    --bg-sidebar: rgba(8, 34, 44, 0.45);
    --bg-tab-bar: rgba(5, 20, 25, 0.65);
    --bg-header: rgba(5, 20, 25, 0.6);
    --bg-player: rgba(8, 34, 44, 0.94);
    --accent: #06b6d4;
    --accent-hover: #22d3ee;
    --accent-glow: rgba(6, 182, 212, 0.35);
    --border-color: rgba(6, 182, 212, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

[data-theme="teal"] {
    --bg-main: #051513;
    --bg-card: rgba(8, 34, 32, 0.75);
    --bg-card-hover: rgba(12, 50, 46, 0.85);
    --bg-sidebar: rgba(8, 34, 32, 0.45);
    --bg-tab-bar: rgba(5, 21, 19, 0.65);
    --bg-header: rgba(5, 21, 19, 0.6);
    --bg-player: rgba(8, 34, 32, 0.94);
    --accent: #14b8a6;
    --accent-hover: #2dd4bf;
    --accent-glow: rgba(20, 184, 166, 0.35);
    --border-color: rgba(20, 184, 166, 0.15);
    --lyric-highlight-shadow: 0 0 15px rgba(20, 184, 166, 0.5);
}

[data-theme="night"] {
    --bg-main: #020408;
    --bg-card: rgba(18, 20, 24, 0.8);
    --bg-card-hover: rgba(28, 32, 38, 0.9);
    --bg-sidebar: rgba(14, 16, 20, 0.5);
    --bg-tab-bar: rgba(8, 10, 14, 0.7);
    --bg-header: rgba(8, 10, 14, 0.7);
    --bg-player: rgba(16, 18, 22, 0.95);
    --accent: #94a3b8;
    --accent-hover: #cbd5e1;
    --accent-glow: rgba(148, 163, 184, 0.35);
    --border-color: rgba(255, 255, 255, 0.1);
    --lyric-highlight-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* 2. 浅色模式预设 (Light Mode) */
[data-color-scheme="light"] {
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --input-bg: rgba(255, 255, 255, 0.9);
    --lyric-inactive: rgba(15, 23, 42, 0.35);
    --lyric-active: #0f172a;
    --border-color: rgba(15, 23, 42, 0.1);
}

[data-color-scheme="light"][data-theme="blue"],
[data-color-scheme="light"]:not([data-theme]) {
    --bg-main: #edf4fe;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(238, 245, 255, 0.75);
    --bg-tab-bar: rgba(225, 238, 255, 0.85);
    --bg-header: rgba(238, 245, 255, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(59, 130, 246, 0.18);
    --accent: #2563eb;
    --accent-hover: #3b82f6;
    --accent-glow: rgba(37, 99, 235, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

[data-color-scheme="light"][data-theme="red"] {
    --bg-main: #fef2f2;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(255, 241, 242, 0.75);
    --bg-tab-bar: rgba(254, 226, 226, 0.85);
    --bg-header: rgba(255, 241, 242, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(239, 68, 68, 0.18);
    --accent: #dc2626;
    --accent-hover: #ef4444;
    --accent-glow: rgba(220, 38, 38, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(220, 38, 38, 0.3);
}

[data-color-scheme="light"][data-theme="green"] {
    --bg-main: #f0fdf4;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(236, 253, 243, 0.75);
    --bg-tab-bar: rgba(220, 252, 231, 0.85);
    --bg-header: rgba(236, 253, 243, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(16, 185, 129, 0.18);
    --accent: #059669;
    --accent-hover: #10b981;
    --accent-glow: rgba(5, 150, 105, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(5, 150, 105, 0.3);
}

[data-color-scheme="light"][data-theme="purple"] {
    --bg-main: #faf5ff;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(248, 240, 255, 0.75);
    --bg-tab-bar: rgba(243, 232, 255, 0.85);
    --bg-header: rgba(248, 240, 255, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(139, 92, 246, 0.18);
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --accent-glow: rgba(124, 58, 237, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

[data-color-scheme="light"][data-theme="amber"] {
    --bg-main: #fffbeb;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(255, 248, 230, 0.75);
    --bg-tab-bar: rgba(254, 243, 199, 0.85);
    --bg-header: rgba(255, 248, 230, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(245, 158, 11, 0.18);
    --accent: #d97706;
    --accent-hover: #f59e0b;
    --accent-glow: rgba(217, 119, 6, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(217, 119, 6, 0.3);
}

[data-color-scheme="light"][data-theme="pink"] {
    --bg-main: #fdf2f8;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(254, 238, 248, 0.75);
    --bg-tab-bar: rgba(252, 231, 243, 0.85);
    --bg-header: rgba(254, 238, 248, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(236, 72, 153, 0.18);
    --accent: #db2777;
    --accent-hover: #ec4899;
    --accent-glow: rgba(219, 39, 119, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(219, 39, 119, 0.3);
}

[data-color-scheme="light"][data-theme="cyan"] {
    --bg-main: #ecfeff;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(230, 253, 255, 0.75);
    --bg-tab-bar: rgba(207, 250, 254, 0.85);
    --bg-header: rgba(230, 253, 255, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(6, 182, 212, 0.18);
    --accent: #0891b2;
    --accent-hover: #06b6d4;
    --accent-glow: rgba(8, 145, 178, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(8, 145, 178, 0.3);
}

[data-color-scheme="light"][data-theme="teal"] {
    --bg-main: #f0fdfa;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(233, 253, 249, 0.75);
    --bg-tab-bar: rgba(204, 251, 241, 0.85);
    --bg-header: rgba(233, 253, 249, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(20, 184, 166, 0.18);
    --accent: #0d9488;
    --accent-hover: #14b8a6;
    --accent-glow: rgba(13, 148, 136, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(13, 148, 136, 0.3);
}

[data-color-scheme="light"][data-theme="night"] {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-hover: #ffffff;
    --bg-sidebar: rgba(241, 245, 249, 0.75);
    --bg-tab-bar: rgba(226, 232, 240, 0.85);
    --bg-header: rgba(241, 245, 249, 0.85);
    --bg-player: rgba(255, 255, 255, 0.96);
    --border-color: rgba(15, 23, 42, 0.12);
    --accent: #475569;
    --accent-hover: #334155;
    --accent-glow: rgba(71, 85, 105, 0.22);
    --lyric-highlight-shadow: 0 0 12px rgba(71, 85, 105, 0.3);
}

/* 浅色模式特定视觉适配 */
[data-color-scheme="light"] .dynamic-background {
    filter: blur(40px) brightness(1.15) saturate(120%);
    opacity: 0.22;
}

[data-color-scheme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-color-scheme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.28);
}

[data-color-scheme="light"] .theme-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-color-scheme="light"] .theme-card:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--accent);
}

[data-color-scheme="light"] .theme-card.active {
    background: var(--accent-glow);
}

[data-color-scheme="light"] .song-item.active {
    background: var(--accent-glow);
}

/* 顶部 Logo 与设置按钮 */
.logo-favicon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    box-shadow: 0 2px 8px var(--accent-glow);
    transition: transform 0.4s ease;
    flex-shrink: 0;
}

.logo-area:hover .logo-favicon {
    transform: rotate(360deg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--accent);
}

@media (max-width: 600px) {
    .settings-btn-text {
        display: none;
    }
    .header-action-btn {
        padding: 6px 8px;
        font-size: 16px;
    }
}

/* 设置模态弹窗 */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.settings-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.settings-modal-card {
    width: 90%;
    max-width: 480px;
    background: var(--bg-card, #161b22);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease;
}

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

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.settings-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.settings-section-hint {
    font-size: 11px;
    font-weight: normal;
    color: var(--text-muted);
}

.theme-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .theme-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.theme-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-card.active {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 12px var(--accent-glow);
}

.theme-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.theme-card:hover .theme-color-dot {
    transform: scale(1.1);
}

.theme-card.active .theme-color-dot::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.theme-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.theme-card.active .theme-name {
    color: var(--text-primary);
    font-weight: 600;
}


/* 外观模式选择器 (跟随系统 / 深色 / 浅色) */
.mode-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
}

.mode-card i {
    font-size: 20px;
}

.mode-card:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.mode-card.active {
    border-color: var(--accent);
    background: var(--accent-light, rgba(56, 189, 248, 0.12));
    color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    font-weight: 600;
}

/* 播放显示设置 (开关项) */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.toggle-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.switch-control {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.18);
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.switch-control input:checked + .switch-slider {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.switch-control input:checked + .switch-slider:before {
    transform: translateX(20px);
}

/* 个人主页链接卡片 */
.settings-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.settings-link-card:hover {
    background: var(--accent-light, rgba(56, 189, 248, 0.08));
    border-color: var(--accent);
    transform: translateY(-2px);
}

.settings-link-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-link-icon {
    font-size: 24px;
    color: var(--accent);
}

.settings-link-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-link-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-link-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

.settings-link-arrow {
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.settings-link-card:hover .settings-link-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* 浅色模式细节微调 */
[data-color-scheme="light"] .mode-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-color-scheme="light"] .mode-card:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-color-scheme="light"] .theme-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-color-scheme="light"] .theme-card:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-color-scheme="light"] .settings-toggle-row,
[data-color-scheme="light"] .settings-link-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--border-color);
}

[data-color-scheme="light"] .switch-slider {
    background-color: rgba(0, 0, 0, 0.16);
}

