
/* ====== 主题变量 ====== */
:root {
    /* 背景 */
    --bg-page: #f5f5f7;
    --bg-card: #ffffff;
    --bg-warm: #fafafa;
    --bg-header-user: #f7f7f8;
    --bg-button-gray: #f0f0f0;
    --bg-button-gray-alt: #f5f5f5;
    --bg-selected: #fff5f5;
    --bg-active-episode: #fff0f0;
    --bg-floating-bar: rgba(255,255,255,0.98);

    /* 文字 */
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-subtle: #999999;
    --text-lightest: #bbbbbb;

    /* 边框 */
    --border-light: #e8e8e8;
    --border-mid: #e0e0e0;
    --border-warm: #eeeeee;
    --border-input: #dddddd;

    /* 品牌色 */
    --brand-red: #e31937;
    --brand-red-active: #a81028;
    --brand-red-dark: #c41230;
    --brand-red-hover: #c01730;
    --brand-gold: #ffd700;
    --brand-blue: #007bff;
    --text-on-brand: #ffffff;

    /* 毛玻璃 */
    --glass-strong: rgba(255,255,255,0.85);
    --glass-medium: rgba(255,255,255,0.70);
    --glass-light: rgba(255,255,255,0.92);

    /* 底部状态栏（歌词显示时的半透明背景） */
    --status-bar-overlay: rgba(255,255,255,0.55);
    --now-listening-text: #1a1a1a;

    /* 装饰 / Chrome */
    --chrome-avatar-bg: #d4d4dd;
    --chrome-separator: #d0d0d6;
    --lyrics-time-bg: rgba(0,0,0,0.04);

    /* 阴影 / 遮罩 */
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-elevated: 0 4px 20px rgba(0,0,0,0.14);
    --shadow-floating: 0 -2px 20px rgba(0,0,0,0.15);
    --overlay-bg: rgba(0,0,0,0.5);
}

/* 手动深色切换 */
html[data-theme="dark"] {
    --bg-page: #1a1a1e;
    --bg-card: #1e1e22;
    --bg-warm: #26262a;
    --bg-header-user: #2a2a2e;
    --bg-button-gray: #333333;
    --bg-button-gray-alt: #2e2e32;
    --bg-selected: #2a1a1a;
    --bg-active-episode: #2a1515;
    --bg-floating-bar: rgba(30,30,30,0.96);

    --text-primary: #e0e0e0;
    --text-secondary: #c0c0c0;
    --text-muted: #999999;
    --text-subtle: #aaaaaa;
    --text-lightest: #888888;

    --border-light: #333333;
    --border-mid: #3a3a3a;
    --border-warm: #333333;
    --border-input: #444444;

    --glass-strong: rgba(30,30,30,0.85);
    --glass-medium: rgba(30,30,30,0.70);
    --glass-light: rgba(30,30,30,0.92);

    /* 底部状态栏（歌词显示时的半透明背景） */
    --status-bar-overlay: rgba(0,0,0,0.35);
    --now-listening-text: #ffffff;

    --chrome-avatar-bg: #555555;
    --chrome-separator: #444444;
    --lyrics-time-bg: rgba(255,255,255,0.08);

    --shadow-card: 0 1px 3px rgba(0,0,0,0.30);
    --shadow-elevated: 0 4px 20px rgba(0,0,0,0.50);
    --shadow-floating: 0 -2px 20px rgba(0,0,0,0.50);
    --overlay-bg: rgba(0,0,0,0.7);
}

/* 手动浅色切换（覆盖系统深色） */
html[data-theme="light"] {
    --bg-page: #f5f5f7;
    --bg-card: #ffffff;
    --bg-warm: #fafafa;
    --bg-header-user: #f7f7f8;
    --bg-button-gray: #f0f0f0;
    --bg-button-gray-alt: #f5f5f5;
    --bg-selected: #fff5f5;
    --bg-active-episode: #fff0f0;
    --bg-floating-bar: rgba(255,255,255,0.98);

    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-subtle: #999999;
    --text-lightest: #bbbbbb;

    --border-light: #e8e8e8;
    --border-mid: #e0e0e0;
    --border-warm: #eeeeee;
    --border-input: #dddddd;

    --glass-strong: rgba(255,255,255,0.85);
    --glass-medium: rgba(255,255,255,0.70);
    --glass-light: rgba(255,255,255,0.92);

    /* 底部状态栏（歌词显示时的半透明背景） */
    --status-bar-overlay: rgba(255,255,255,0.55);
    --now-listening-text: #1a1a1a;

    --chrome-avatar-bg: #d4d4dd;
    --chrome-separator: #d0d0d6;
    --lyrics-time-bg: rgba(0,0,0,0.04);

    --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-elevated: 0 4px 20px rgba(0,0,0,0.14);
    --shadow-floating: 0 -2px 20px rgba(0,0,0,0.15);
    --overlay-bg: rgba(0,0,0,0.5);
}

/* ====== 基础样式 ====== */
/* 阻止车机/移动端浏览器自动放大文字（text inflation），保持 CSS 定义的字号 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 16px;
    overflow-x: hidden;
}

h1 {
    text-align: center;
    font-size: 44px;
}

/* ====== 未登录 Header：顶部固定 ====== */
#headerLoggedOut {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px 40px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-light);
    justify-content: center;
    width: auto;
    background: var(--bg-card);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ====== 未登录 Header：绝对居中悬浮 ====== */
#headerLoggedOut.header-centered {
    position: fixed !important;
    top: 38% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 80% !important;
    border-bottom: none !important;
    background: transparent !important;
    flex-wrap: nowrap;
    box-shadow: none;
}
#headerLoggedOut.header-centered .logo-container {
    margin-right: 0 !important;
    margin-bottom: 36px !important;
    width: 100%;
    text-align: center;
}
#headerLoggedOut.header-centered .logo-img {
    height: auto !important;
    width: auto !important;
    margin: 0 auto !important;
}
#headerLoggedOut.header-centered .main-content {
    width: 100% !important;
    padding-top: 0 !important;
    align-items: center !important;
}
#headerLoggedOut.header-centered .top-row {
    position: relative !important;
    width: 100% !important;
    justify-content: center !important;
}
#headerLoggedOut.header-centered .user-info-area {
    position: absolute !important;
    top: 50% !important;
    right: 40px !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    width: auto !important;
    white-space: nowrap;
}
#headerLoggedOut.header-centered .search-form {
    width: 60vw !important;
}
#headerLoggedOut.header-centered .bottom-row {
    justify-content: center !important;
    padding-left: 0 !important;
    margin-top: 24px !important;
}
#headerLoggedOut.header-centered .bottom-row .history-keys {
    display: none !important;
}

/* ====== 已登录 Header：居中模式（刚登录/注册后） ====== */
#headerLoggedIn.header-centered {
    position: fixed !important;
    top: 38% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    flex-wrap: nowrap !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 80% !important;
    border-bottom: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
#headerLoggedIn.header-centered .logo-container {
    margin-right: 0 !important;
    margin-bottom: 36px !important;
    width: 100%;
    text-align: center;
}
#headerLoggedIn.header-centered .logo-img {
    height: auto !important;
    width: auto !important;
    margin: 0 auto !important;
}
#headerLoggedIn.header-centered .main-content {
    width: 100% !important;
    padding-top: 0 !important;
    align-items: center !important;
}
#headerLoggedIn.header-centered .top-row {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100% !important;
}
#headerLoggedIn.header-centered .user-info-area {
    position: static !important;
    grid-column: 3;
    justify-self: end;
    padding-right: 8px;
    margin: 0 !important;
    width: auto !important;
    white-space: nowrap;
}
#headerLoggedIn.header-centered .search-form {
    grid-column: 2;
    width: 60vw !important;
}
#headerLoggedIn.header-centered .bottom-row {
    justify-content: center !important;
    padding-left: 0 !important;
    margin-top: 24px !important;
}

/* ====== 已登录 Header：顶部固定 ====== */
#headerLoggedIn {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px 40px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-light);
    justify-content: center;
    width: auto;
    background: var(--bg-card);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ====== Logo ====== */
.logo-container {
    margin-right: 36px;
    flex-shrink: 0;
}

.logo-img {
    width: auto;
    height: 44px;
    border: none;
    display: block;
    transition: height 0.4s ease;
}

/* 深色模式下切换logo */
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }

/* ====== 搜索 + 用户区域 ====== */
.main-content {
    display: flex;
    align-items: center;
    padding-top: 0;
    width: auto;
}

/* --- 搜索行 --- */
.top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.search-form {
    display: flex;
    align-items: center;
    width: 360px;
    position: relative;
}

.search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-mid);
    border-radius: 22px 0 0 22px;
    font-size: 20px;
    outline: none;
    background: var(--bg-warm);
    transition: all 0.25s ease;
    color: var(--text-secondary);
}

.search-input:focus {
    background: var(--bg-card);
    border-color: #e31937;
    box-shadow: 0 0 0 3px rgba(227, 25, 55, 0.08);
}

.search-input::placeholder {
    color: var(--text-lightest);
    font-weight: 300;
}

.search-btn {
    height: 44px;
    padding: 0 28px;
    margin-left: 0;
    background: #e31937;
    border: 1px solid #e31937;
    border-radius: 0 22px 22px 0;
    cursor: pointer;
    font-size: 20px;
    color: #fff;
    transition: all 0.25s ease;
    font-weight: 500;
}

.search-btn:active {
    background: #a81028;
    border-color: #a81028;
}

.search-btn::before {
    content: "\e633";
    font-family: "iconfont";
    font-weight: 900;
}

/* 搜索加载等待：悬浮覆盖搜索结果区域 */
.search-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-subtle);
    font-size: 22px;
    user-select: none;
    z-index: 10;
}

html[data-theme="dark"] .search-loading-overlay {
    background: rgba(30, 30, 34, 0.98);
}

.search-loading-overlay.show {
    display: flex;
}

.search-loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(227, 25, 55, 0.15), #e31937);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    animation: searchSpinner 0.8s linear infinite;
}

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

/* 用户信息 */
.user-info-area {
    margin-left: 28px;
    font-size: 22px;
    font-weight: 500;
    flex-shrink: 0;
}

#headerLoggedIn .user-info-area {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-header-user);
    border-radius: 22px;
    padding: 5px 6px 5px 14px;
    margin-left: 28px;
    font-size: 22px;
    font-weight: 500;
    flex-shrink: 0;
}

.user-avatar-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--chrome-avatar-bg);
    flex-shrink: 0;
    margin-right: 8px;
    position: relative;
}

.user-avatar-icon::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--bg-card);
    border-radius: 50%;
}

.user-avatar-icon::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 9px;
    background: var(--bg-card);
    border-radius: 7px 7px 3px 3px;
}

.user-email {
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 450;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.user-sep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--chrome-separator);
    margin: 0 10px;
    flex-shrink: 0;
    border-radius: 1px;
}

.theme-toggle-btn {
    position: fixed;
    top: 14px;
    left: 20px;
    z-index: 100;
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}
.theme-toggle-btn:active {
    background: var(--bg-button-gray);
}
/* 浅色模式：显示月亮图标（点击切换到深色） */
html[data-theme="light"] .theme-toggle-btn .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle-btn .icon-moon { display: inline; }
/* 深色模式：显示太阳图标（点击切换到浅色） */
html[data-theme="dark"] .theme-toggle-btn .icon-sun { display: inline; }
html[data-theme="dark"] .theme-toggle-btn .icon-moon { display: none; }

.logout-text-btn, .login-text-btn {
    background: #e31937;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 450;
    padding: 4px 12px;
    border-radius: 18px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.logout-text-btn:active, .login-text-btn:active {
    background: #a81028;
    color: #fff;
}

#headerLoggedOut .login-btn {
    color: #fff;
    font-size: 22px;
    background: #e31937;
}

#headerLoggedOut .login-btn:active {
    background: #a81028;
    color: #fff;
}

/* --- 推荐词行 --- */
.bottom-row {
    display: flex;
    gap: 32px;
    font-size: 20px;
    color: var(--text-subtle);
    justify-content: center;
    flex-wrap: nowrap;
    flex: 0 0 100%;
    margin-top: 10px;
    max-width: 100%;
    overflow: visible;
}

.hot-keys, .history-keys {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

.hot-keys {
    overflow: visible;
    position: relative;
}

.hot-keys::before {
    content: '热门歌手';
    font-size: 18px;
    color: var(--text-lightest);
    letter-spacing: 1px;
    margin-right: 4px;
    flex-shrink: 0;
}

.history-keys::before {
    content: '搜索记录';
    font-size: 18px;
    color: var(--text-lightest);
    letter-spacing: 1px;
    margin-right: 4px;
    flex-shrink: 0;
}

.hot-keys.empty::before,
.history-keys.empty::before {
    content: none;
}

.hot-keys span, .history-keys span {
    cursor: pointer;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-button-gray);
    transition: all 0.15s ease;
    font-size: 19px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.hot-keys span:active, .history-keys span:active {
    background: #e31937;
    color: #fff;
}

/* 热门歌手展开按钮 */
.hot-keys .hot-singers-expand {
    cursor: pointer;
    color: var(--text-muted);
    padding: 3px 6px;
    border-radius: 12px;
    background: var(--bg-button-gray);
    transition: all 0.15s ease;
    font-size: 18px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.hot-keys .hot-singers-expand.active {
    background: #e31937;
    color: #fff;
}

.hot-keys .hot-singers-expand.active .iconfont {
    transform: rotate(180deg);
    display: inline-block;
}

/* 热门歌手浮层 */
.hot-singers-popup {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px;
    background: var(--bg-floating-bar);
    border-radius: 16px;
    box-shadow: var(--shadow-floating);
    z-index: 1000;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px 10px;
    width: 680px;
    border-bottom: 2px solid var(--brand-red);
}

.hot-singers-popup.show {
    display: grid;
}

.hot-singers-popup span {
    cursor: pointer;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-button-gray);
    transition: all 0.15s ease;
    font-size: 19px;
    white-space: nowrap;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.hot-singers-popup span:active {
    background: #e31937;
    color: #fff;
}

/* ====== 内容区域 ====== */
.content-section {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 24px 32px 280px;
    box-sizing: border-box;
}

.favorite-section {
    position: relative;
    display: none;
}

.search-results-wrapper {
    position: relative;
}

.search-results-section {
    width: 100%;
    display: none;
}

/* ====== 区域标题栏 ====== */
.section-header {
    margin-bottom: 28px;
}

.section-header-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

/* 菱形标记 */
.section-marker {
    display: block;
    width: 14px;
    height: 14px;
    background: var(--brand-red);
    transform: rotate(45deg);
    border-radius: 3px;
    flex-shrink: 0;
}

.section-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    line-height: 1;
}

/* 收藏列数切换按钮 */
.cols-toggle-btn {
    margin-left: auto;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--bg-button-gray);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.cols-toggle-btn:active {
    border-color: #e31937;
}
.cols-dot {
    display: block;
    width: 7px;
    height: 7px;
    background: #e31937;
    border-radius: 1.5px;
}

/* 计数徽章 — 镂空药丸 + 微型菱形 */
.section-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 12px;
    margin-left: 10px;
    border: 1px solid var(--border-mid);
    border-radius: 13px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: 0.04em;
}
.section-count::before {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    background: var(--brand-red);
    transform: rotate(45deg);
    border-radius: 1px;
}

/* 装饰底线 */
.section-header-rule {
    height: 1px;
    background: rgba(227, 25, 55, 0.8);
}

/* ====== 卡片网格 ====== */
.list-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.list-preview.cols-4 { grid-template-columns: repeat(4, 1fr); }
.list-preview.cols-5 { grid-template-columns: repeat(5, 1fr); }
.list-preview.cols-6 { grid-template-columns: repeat(6, 1fr); }

/* 4列 */
.cols-4 .collection-name { flex: 0 0 55%; max-width: 55%; font-size: 22px; }
.cols-4 .edit-playlist-btn, .cols-4 .delete-btn { padding: 5px 8px; font-size: 20px; min-height: 30px; }
.cols-4 .edit-playlist-btn i, .cols-4 .delete-btn i { font-size: 20px; }

/* 5列 */
.cols-5 .collection-name { flex: 0 0 42%; max-width: 42%; font-size: 17px; }
.cols-5 .edit-playlist-btn, .cols-5 .delete-btn { padding: 3px 6px; font-size: 17px; min-height: 24px; }
.cols-5 .edit-playlist-btn i, .cols-5 .delete-btn i { font-size: 17px; }
.cols-5 .playlist-buttons { gap: 2px; }
.cols-5 .preview-subtitle { padding: 8px 8px 0; }

/* 6列：较小按钮 */
.cols-6 .collection-name { flex: 0 0 48%; max-width: 48%; font-size: 16px; }
.cols-6 .edit-playlist-btn, .cols-6 .delete-btn { padding: 2px 5px; font-size: 15px; min-height: 22px; }
.cols-6 .edit-playlist-btn i, .cols-6 .delete-btn i { font-size: 15px; }
.cols-6 .preview-subtitle { padding: 4px 6px 0; }

/* ====== 卡片项 ====== */
.collection-item {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 0 0 12px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.5s ease both;
    -webkit-tap-highlight-color: transparent;
}

.collection-item:active {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* 排序交换：淡入淡出 + 轻微缩放，位置对调后柔和过渡 */
@keyframes sortSwap {
    0%   { opacity: 0.4; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}
.collection-item.sort-flip {
    animation: sortSwap 0.3s ease both !important;
    transition: none !important;
}

/* 排序完成后：背景闪烁高亮被操作的那张卡片（background-color 可平滑动画） */
@keyframes sortBorderFlash {
    0%, 100% { background-color: var(--bg-card); }
    30%, 70% { background-color: rgba(0, 0, 0, 0.12); }
}
.collection-item.sort-flash {
    animation: sortBorderFlash 0.8s ease 2 !important;
}

/* 卡片交错入场动画 */
.collection-item:nth-child(1) { animation-delay: 0.00s; }
.collection-item:nth-child(2) { animation-delay: 0.04s; }
.collection-item:nth-child(3) { animation-delay: 0.08s; }
.collection-item:nth-child(4) { animation-delay: 0.12s; }
.collection-item:nth-child(5) { animation-delay: 0.16s; }
.collection-item:nth-child(6) { animation-delay: 0.05s; }
.collection-item:nth-child(7) { animation-delay: 0.09s; }
.collection-item:nth-child(8) { animation-delay: 0.13s; }
.collection-item:nth-child(9) { animation-delay: 0.17s; }
.collection-item:nth-child(10) { animation-delay: 0.21s; }
.collection-item:nth-child(n+11) { animation-delay: 0.22s; }

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

/* ====== 封面 ====== */
.preview-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
    background: var(--bg-button-gray);
}

/* ====== 标题区域 ====== */
.preview-title {
    font-weight: 600;
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    padding: 10px 12px 0;
    box-sizing: border-box;
}

.preview-title span {
    text-align: left;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ====== 搜索结果类型徽章 — 覆盖于封面右上角 ====== */
.type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    z-index: 2;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}

/* 合集徽章 */
.badge-collection {
    background: rgba(227, 25, 55, 0.88);
    color: #fff;
    box-shadow: 0 2px 8px rgba(227, 25, 55, 0.35);
}
.badge-collection .type-badge-icon {
    width: 12px; height: 12px;
    border: 2px solid #fff;
    border-radius: 2px;
    position: relative;
}
.badge-collection .type-badge-icon::after {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    border: 2px solid #fff;
    border-radius: 2px;
    top: -4px; left: 4px;
    background: rgba(227, 25, 55, 0.88);
}

/* 单曲徽章 */
.badge-single {
    background: rgba(227, 25, 55, 0.88);
    color: #fff;
    box-shadow: 0 2px 8px rgba(227, 25, 55, 0.35);
}
.badge-single .type-badge-icon {
    width: 10px; height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
}

/* ====== 副标题区域 ====== */
.preview-subtitle {
    font-size: 18px;
    color: var(--text-subtle);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 0;
    box-sizing: border-box;
}

.collection-name {
    flex: 0 0 52%;
    max-width: 52%;
    font-weight: 600;
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.playlist-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* 编辑按钮 */
.edit-playlist-btn {
    background: #e31937 !important;
    border: none !important;
    color: #ffffff;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 19px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(227, 25, 55, 0.25);
    min-height: 28px;
}

.edit-playlist-btn:active,
.edit-playlist-btn:focus {
    background: #a81028 !important;
    outline: none;
    box-shadow: 0 1px 2px rgba(227, 25, 55, 0.3);
    transform: scale(0.95);
}

/* 可删除按钮（专辑失效时显示），与编辑按钮尺寸一致 */
.delete-btn {
    background: #e31937 !important;
    border: none !important;
    color: #ffffff;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 19px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(227, 25, 55, 0.25);
    min-height: 28px;
    -webkit-tap-highlight-color: transparent;
}
.delete-btn:active,
.delete-btn:focus {
    background: #a81028 !important;
    outline: none;
    box-shadow: 0 1px 2px rgba(227, 25, 55, 0.3);
    transform: scale(0.95);
}

.edit-playlist-btn i {
    font-size: 19px;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

/* ====== 收藏标记 ====== */
.collection-item.favorited {
    border-color: rgba(227, 25, 55, 0.2);
}

.collection-item.favorited::before {
    content: "❤️";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    background: rgba(227, 25, 55, 0.92);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 3;
}

/* ====== 加载/空/错误状态 ====== */
.collection-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.collection-item.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: loading 1.5s infinite;
}

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

.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 22px;
    color: var(--text-lightest);
    grid-column: 1 / -1;
}

.loading, .error {
    text-align: center;
    padding: 40px 20px;
    font-size: 23px;
}

/* 首页收藏加载过渡 */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 23px;
    color: var(--text-subtle);
}
.loading::before {
    content: "";
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 18px;
    border: 3px solid var(--text-lightest);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}
@keyframes loading-spin {
    to { transform: rotate(360deg); }
}
.no-results { color: var(--text-lightest); display: none; }
.error { color: #dc3545; display: none; }

/* ====== 分页 ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 36px 0;
    padding: 0;
    gap: 12px;
}

.page-btn {
    padding: 10px 24px;
    background: #e31937;
    color: #fff;
    border: 1px solid #e31937;
    border-radius: 20px;
    cursor: pointer;
    font-size: 20px;
    min-width: 80px;
    transition: all 0.25s ease;
    font-weight: 500;
}

.page-btn:active:not(:disabled) {
    background: #a81028;
    color: #fff;
    border-color: #a81028;
}

.page-btn:disabled {
    background: var(--bg-button-gray-alt);
    color: var(--text-lightest);
    cursor: not-allowed;
    border-color: #eee;
}

.page-info {
    font-size: 20px;
    color: var(--text-subtle);
    font-weight: 400;
}

/* ====== 选中/禁用/错误状态 ====== */
.collection-item.selected {
    background: var(--bg-selected);
    border-color: #e31937;
    box-shadow: 0 0 0 2px rgba(227, 25, 55, 0.12);
}

.collection-item.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.collection-item.error {
    border-color: #dc3545;
    background: var(--bg-selected);
}

.collection-item.error::before {
    content: "⚠️";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    background: #dc3545;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* ====== 响应式 ====== */
@media (max-width: 1400px) {
    .list-preview {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .list-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .content-section {
        padding: 20px 20px 250px;
    }

    .search-form {
        width: 340px;
    }
}

@media (max-width: 768px) {
    .list-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .content-section {
        padding: 16px 12px 200px;
    }

    .collection-item {
        border-radius: 10px;
    }

    .collection-item .collection-name {
        font-size: 19px;
    }

    .collection-item .preview-subtitle {
        font-size: 17px;
        padding: 8px 10px 0;
    }

    .preview-cover {
        border-radius: 10px 10px 0 0;
    }

    .search-form {
        width: 100%;
    }

    #headerLoggedIn {
        padding: 12px 16px;
    }

    .logo-img {
        height: 44px;
    }
}

@media (max-width: 480px) {
    .list-preview {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .content-section {
        padding: 12px 8px 180px;
    }

    .search-input {
        font-size: 20px;
        height: 40px;
    }

    .search-btn {
        height: 40px;
        padding: 0 20px;
    }
}

/* ====== C区域：歌单详情 ====== */
.collection-detail-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    height: calc(var(--window-height, 100vh) - 16px);
    margin: 0;
    flex-direction: row;
    background: var(--bg-page);
}

/* 加载占位层：覆盖在播放界面结构上，避免显示残缺内容/404/空列表 */
.collection-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 30;
    background: var(--bg-page);
}
.collection-loading-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(128, 128, 128, 0.25);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: collection-spin 0.8s linear infinite;
}
@keyframes collection-spin {
    to { transform: rotate(360deg); }
}
.collection-loading-text {
    font-size: 18px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* 点击专辑后立即展开：翻页滑入 + 阴影遮挡（数据到位后由 JS 移除 entering） */
/* 场景一：点击专辑即自动播放 → 整页翻页进入，阴影从强到持续遮挡 */
.collection-detail-section.entering {
    animation: page-flip-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -18px 0 56px rgba(0, 0, 0, 0.28);
}
@keyframes page-flip-in {
    from { transform: translateX(100%); box-shadow: -64px 0 128px rgba(0, 0, 0, 0.45); }
    to   { transform: translateX(0); box-shadow: -18px 0 56px rgba(0, 0, 0, 0.28); }
}

/* 场景二：已有歌曲在播放 → 浮层滑入（更轻、带淡入），与整页翻页区分 */
.collection-detail-section.entering-preview {
    animation: preview-float-in 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 36px rgba(0, 0, 0, 0.22);
}
@keyframes preview-float-in {
    from { transform: translateX(40%); opacity: 0.6; box-shadow: -44px 0 92px rgba(0, 0, 0, 0.4); }
    to   { transform: translateX(0); opacity: 1; box-shadow: -10px 0 36px rgba(0, 0, 0, 0.22); }
}

/* 数据到位后内容淡入，避免骨架→真实内容的瞬间闪跳 */
.collection-detail-section.content-fade .collection-header,
.collection-detail-section.content-fade .player-left,
.collection-detail-section.content-fade .player-right {
    animation: content-fade-in 0.3s ease;
}
@keyframes content-fade-in {
    from { opacity: 0.55; }
    to   { opacity: 1; }
}

/* ====== 左侧面板 A区 ====== */
.player-left {
    flex: 0 0 38%;
    max-width: 38%;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 12px 0 0 12px;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
    z-index: 2;
    overflow: hidden;
    min-width: 0;
    transition: max-width 0.35s ease, flex-basis 0.35s ease, opacity 0.3s ease;
}

/* ====== 右侧面板 B区 ====== */
.player-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-warm);
    border-radius: 0 12px 12px 0;
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition: border-radius 0.35s ease;
}

/* ====== 歌单头部（A区顶部） ====== */
.collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    padding: 0 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-warm);
    flex-shrink: 0;
    gap: 10px;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

.collection-header-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.collection-header-btn {
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.collection-header-btn:active {
    background: #a81028;
    color: #fff;
    transform: scale(0.93);
}

.collection-header-btn.favorite-btn::before {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    background-color: currentColor;
    -webkit-mask: url('/images/favorite-star-header.svg') no-repeat center / contain;
    mask: url('/images/favorite-star-header.svg') no-repeat center / contain;
}

.collection-header-btn.favorite-btn.favorited {
    display: none;
}

.collection-header-btn.favorite-btn.favorited::before {
    background-color: #ffd700;
}

/* 3-dot 更多按钮 */
.more-btn {
    font-size: 22px;
    color: #fff;
    position: relative;
}

/* 弹出菜单 */
.playlist-menu {
    position: absolute;
    top: 100%;
    right: 8px;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: 10px;
    box-shadow: var(--shadow-elevated);
    z-index: 100;
    min-width: 160px;
    padding: 6px 0;
    overflow: hidden;
}

.playlist-menu-item {
    padding: 14px 20px;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.playlist-menu-item:active {
    background: var(--bg-button-gray-alt);
}

.playlist-menu-item-danger {
    color: #e31937;
    border-top: 1px solid #f0f0f0;
}

/* 歌单封面（A区头部内联） */
.collection-header-cover {
    height: 55px;
    width: 55px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 歌单标题（A区头部内联） */
.collection-title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 22px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ====== 播放器区域（B区） ====== */
.music-player {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.music-player.has-episodes,
.music-player.no-episodes {
    flex-shrink: 0;
}

/* ====== 分集列表（A区） ====== */
.episode-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    min-height: 0;
    flex-direction: row;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    gap: 6px 0;
    background: var(--bg-warm);
}

.episode-list::-webkit-scrollbar {
    width: 6px;
}
.episode-list::-webkit-scrollbar-track {
    background: transparent;
}
.episode-list::-webkit-scrollbar-thumb {
    background: var(--border-mid);
    border-radius: 3px;
}
.episode-list::-webkit-scrollbar-thumb:active {
    background: var(--text-subtle);
}

.episode-list.layout-1 li {
    flex: 0 0 100%;
}

.episode-list.layout-2 li {
    flex: 0 0 100%;
}

.episode-list.layout-3 li {
    flex: 0 0 32%;
}

.episode-list li {
    margin: 0;
    padding: 12px 10px;
    border: 1px solid var(--border-warm);
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 48px;
    font-size: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: var(--bg-warm);
    -webkit-tap-highlight-color: transparent;
}

.episode-list li:active {
    background: var(--bg-active-episode);
    border-color: rgba(227, 25, 55, 0.3);
}

.episode-list li .song-title {
    flex: 1 1 0%;
    min-width: 0;
    width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 22px;
}

.episode-list li .song-edit-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    color: #fff;
    background: #e31937;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
    margin: 0 2px;
}

.episode-list li.active .song-edit-btn {
    opacity: 1;
}

.episode-list li .song-edit-btn:active {
    background: #a81028;
}

.episode-list li .song-delete-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    color: #fff;
    background: #e31937;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
    margin: 0 2px;
}

.episode-list li.active .song-delete-btn {
    opacity: 1;
}

.episode-list li .song-delete-btn:active {
    background: #a81028;
}

/* 行内编辑输入框 */
.episode-list li .song-title-edit-input {
    flex: 1 1 0%;
    min-width: 0;
    width: 0;
    border: 1px solid #e31937;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 20px;
    font-family: inherit;
    color: var(--text-secondary);
    outline: none;
    background: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(227, 25, 55, 0.1);
}

.episode-list li .duration {
    font-size: 18px;
    color: var(--text-lightest);
    background: var(--bg-button-gray);
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    min-width: 48px;
    text-align: center;
}

.episode-list li.favorite-episode {
    border-color: rgba(227, 25, 55, 0.2);
}

.episode-list li.active {
    background: var(--bg-card);
    border-color: #e31937;
    box-shadow: 0 2px 8px rgba(227, 25, 55, 0.1);
}

.episode-list li.active .song-title {
    color: #e31937 !important;
    font-weight: 600;
}

.episode-list li.active .duration {
    color: #e31937;
    background: rgba(227, 25, 55, 0.08);
}

.episode-list li.next-to-play {
    border-color: rgba(227, 25, 55, 0.25);
}

/* ====== 控制按钮条（A区底部） ====== */
.left-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 10px 14px 10px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-warm);
    flex-shrink: 0;
}

.control-btns-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

/* ====== B区 顶部栏（按钮 + 歌名 + 捐赠按钮） ====== */
.now-playing {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    padding: 0 14px;
    color: var(--text-primary);
    font-weight: 600;
    box-sizing: border-box;
    z-index: 4;
    background: var(--glass-strong);
    flex-shrink: 0;
    gap: 10px;
    border-bottom: 1px solid var(--border-warm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.now-playing-btns {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.now-playing-center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.now-playing-text {
    font-size: 24px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 底部状态栏：音频来源 + 其他用户在听 + 在线人数（横向胶囊，歌词显示时出现半透明背景） */
.player-right > .bottom-status-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    box-sizing: border-box;
    pointer-events: auto;
}

/* 歌词显示时，状态栏出现半透明背景区域（浅色白底 / 深色黑底） */
.player-right.lyrics-visible > .bottom-status-bar {
    background: var(--status-bar-overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* 单曲预览模式：left-controls 移到 player-right 底部占位，
   状态栏上移让出播放控制按钮位置，避免重叠 */
.preview-mode.single-preview .player-right > .bottom-status-bar {
    bottom: 130px;
}

/* 在线人数角标：横向胶囊 */
.player-right > .bottom-status-bar .online-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 13px;
    box-sizing: border-box;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: #e31937;
    box-shadow: 0 2px 10px rgba(227, 25, 55, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 音频来源角标：横向胶囊（纯图标），与在线人数高度一致 */
.player-right > .bottom-status-bar .cache-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--glass-strong);
    border: 1px solid var(--border-warm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    flex-shrink: 0;
}

/* 图标 SVG 在胶囊内固定尺寸，避免撑高胶囊 */
.player-right > .bottom-status-bar .cache-badge svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* 达到缓存标准：图标下方绿色短横线标识 */
.player-right > .bottom-status-bar .cache-badge::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: #30ba78;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-right > .bottom-status-bar .cache-badge.cache-eligible::after {
    opacity: 1;
}

/* 车友在听标签：紧跟音频来源角标右侧。
   黑胶唱片显示时用亮色+阴影，歌词显示时切回浅灰 */
.player-right > .bottom-status-bar .now-listening-label {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}

/* 单个音符：紧跟"车友在听"四字右侧，与文字垂直居中对齐 */
.player-right > .bottom-status-bar .now-listening-label::after {
    content: "♪";
    display: inline-block;
    line-height: 1;
    font-size: 16px;
    letter-spacing: 3px;
    opacity: 0.5;
    white-space: nowrap;
}

/* 正在播放歌曲（最多3个"歌手 - 歌名"，单行逗号分隔、居中）。
   黑胶唱片显示时用白色+阴影，歌词显示时切回主题色 */
.player-right > .bottom-status-bar .now-listening {
    display: none;
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

/* 有数据时显示"车友在听"标签与歌名（黑胶/歌词两种状态都显示） */
.player-right > .bottom-status-bar.has-now-listening .now-listening-label {
    display: inline-flex;
}
.player-right > .bottom-status-bar.has-now-listening .now-listening {
    display: block;
}

/* 歌词显示（有半透明背景）时，文字切回主题色、去掉阴影 */
.player-right.lyrics-visible > .bottom-status-bar.has-now-listening .now-listening-label {
    color: var(--text-lightest);
    text-shadow: none;
}
.player-right.lyrics-visible > .bottom-status-bar.has-now-listening .now-listening {
    color: var(--now-listening-text);
    text-shadow: none;
}

/* 用爱发电提示条（用爽了时机触发） */
.donate-prompt {
    position: absolute;
    left: 50%;
    bottom: 72px;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 30px;
    border-radius: 18px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-warm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 70%;
}
.donate-prompt.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.donate-prompt-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.donate-prompt-heart {
    font-size: 56px;
    color: #e31937;
    flex-shrink: 0;
}
.donate-prompt-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    white-space: normal;
    text-align: left;
}
.donate-prompt-btn {
    padding: 11px 30px;
    border: none;
    border-radius: 999px;
    background: #e31937;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}
.donate-prompt-countdown {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.donate-prompt-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--glass-strong);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* 常驻赞助入口（底部状态栏） */
.player-right > .bottom-status-bar .donate-entry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #e31937;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(227, 25, 55, 0.35);
}
.player-right > .bottom-status-bar .donate-entry .icon-heart-donate:before {
    font-size: 14px !important;
}

/* ====== 车友在听抽屉 ====== */
.now-listening-drawer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.now-listening-drawer.show {
    opacity: 1;
    pointer-events: auto;
}

.now-listening-drawer-panel {
    width: 100%;
    max-width: 640px;
    margin: 0 24px 80px;
    max-height: 60%;
    overflow-y: auto;
    background: var(--glass-strong);
    border: 1px solid var(--border-warm);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.now-listening-drawer.show .now-listening-drawer-panel {
    transform: translateY(0);
}

.now-listening-drawer-header {
    padding: 16px 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-warm);
}

.now-listening-drawer-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.now-listening-drawer-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.now-listening-drawer-list li .drawer-song {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-listening-drawer-list li .drawer-time {
    flex-shrink: 0;
    font-size: 15px;
    color: var(--text-subtle);
}

.now-listening-drawer-list li.now-listening-drawer-empty {
    color: var(--text-subtle);
    text-align: center;
    justify-content: center;
}

/* 左面板折叠时歌名加大 4px，展开时恢复 */
.collection-detail-section:not(.panel-collapsed) .now-playing-text {
    font-size: 24px;
}
.collection-detail-section.panel-collapsed .now-playing-text {
    font-size: 28px;
}

/* 单曲预览：返回和收藏按钮固定在 player-right 左上角 */
.player-right > .preview-actions {
    position: absolute;
    top: 12px;
    left: 14px;
    z-index: 10;
    display: flex;
    gap: 6px;
}
.player-right > .preview-actions .collection-header-btn {
    width: 55px;
    height: 55px;
    font-size: 22px;
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.player-right > .preview-actions .collection-header-btn:active {
    background: #a81028;
    color: #fff;
    transform: scale(0.93);
}
.player-right > .preview-actions .collection-header-btn.favorited {
    color: #ffd700;
}

/* 折叠/展开按钮（now-playing 内左侧） */
.lyrics-expand-btn {
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.lyrics-expand-btn:active {
    background: #a81028;
    transform: scale(0.93);
}

/* 单曲预览模式隐藏展开/折叠按钮，显示返回按钮 */
.preview-mode.single-preview .lyrics-expand-btn,
.preview-mode.single-preview .player-right > .preview-actions {
    display: none;
}

.now-playing-back-btn {
    display: none;
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}
.now-playing-back-btn:active {
    background: #a81028;
    transform: scale(0.93);
}
.preview-mode.single-preview .now-playing-back-btn {
    display: flex;
}

/* 左面板折叠状态（过渡动画） */
.collection-detail-section.panel-collapsed .player-left {
    max-width: 0;
    flex-basis: 0;
    opacity: 0;
    padding: 0;
}

.collection-detail-section.panel-collapsed .player-right {
    border-radius: 12px;
    transition: border-radius 0.35s ease;
}

/* 展开右侧面板：歌词字体整体+2px，当前播放行+4px */
.collection-detail-section.panel-collapsed .player-right .lyrics-content {
    font-size: 38px;
}
.collection-detail-section.panel-collapsed .player-right .lyrics-line.active,
.collection-detail-section.panel-collapsed .player-right .lyrics-line.adjust-active {
    font-size: 40px;
}
/* 单曲预览模式同样适用 */
.preview-mode.single-preview .player-right.lyrics-visible .lyrics-content {
    font-size: 38px;
}
.preview-mode.single-preview .player-right.lyrics-visible .lyrics-line.active,
.preview-mode.single-preview .player-right.lyrics-visible .lyrics-line.adjust-active {
    font-size: 40px;
}


.now-playing .donate-btn-inline {
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.now-playing .donate-btn-inline:active {
    background: #a81028;
    transform: scale(0.93);
}

/* ====== B区 播放器内容 ====== */
.player-right .music-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.player-right .music-player.no-episodes {
    display: none;
}

/* 共享进度条（left-controls 内部按钮上方） */
#sharedProgressBar {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

/* 单曲预览：进度条随 left-controls 迁移到 player-right */
.preview-mode.single-preview .player-right > .left-controls > #sharedProgressBar {
    width: 100%;
    padding: 4px 4px;
}

.progress-bar-container {
    flex: 1;
    min-width: 100px;
    height: 50px;
    position: relative;
    cursor: pointer;
    touch-action: none;
}
/* 轨道：绝对定位垂直居中，视觉仍是 6px 细条，容器 30px 高作为真实点击热区 */
.progress-bar-container::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 3px;
    background: rgba(0,0,0,0.08);
}
html[data-theme="dark"] .progress-bar-container::before {
    background: #f4f4f4;
}

.progress-buffer {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(128, 128, 128, 0.35);
    width: 0%;
    border-radius: 3px;
    pointer-events: none;
}

/* 来自 R2 缓存播放时，缓冲条用深红色提示 */
.progress-buffer.from-cache {
    background: #8b0000;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: #e31937;
    width: 0%;
    border-radius: 3px;
    pointer-events: none;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #e31937;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
    z-index: 2;
    touch-action: none;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
}

.current-time, .total-time {
    color: var(--text-subtle);
    font-weight: 500;
    line-height: 1;
    font-size: 22px;
    flex-shrink: 0;
}

/* 封面区域 */
.cover-section {
    position: relative;
    background: var(--bg-card);
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-section.hide {
    flex: 0;
}

.cover-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(60px) brightness(0.3);
    opacity: 1;
    z-index: 1;
    transform: scale(2.15);
}

/* ====== 黑胶唱片 ====== */
.vinyl-container {
    position: relative;
    z-index: 2;
    width: 50%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: inherit;
}

/* 封面放大背景光晕 */
.vinyl-container::before {
    content: '';
    position: absolute;
    inset: -35%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.55);
    z-index: 0;
}

.vinyl-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at center,
        #1d1d1d 0%,
        #1a1a1a 60%,
        #151515 100%
    );
    box-shadow:
        0 0 0 3px rgba(255,255,255,0.1),
        0 0 0 1px rgba(255,255,255,0.05),
        0 4px 24px rgba(0,0,0,0.4),
        0 2px 8px rgba(0,0,0,0.25);
}

/* 黑胶唱片沟槽纹理 */
.vinyl-grooves {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px,
        transparent 2px,
        rgba(0,0,0,0.30) 2px,
        rgba(0,0,0,0.30) 3px,
        rgba(255,255,255,0.04) 3px,
        rgba(255,255,255,0.04) 4px,
        transparent 4px,
        transparent 6px
    );
    pointer-events: none;
    z-index: 1;
}

.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 65%;
    border-radius: 50%;
    overflow: hidden;
    background-color: #111;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 0 2px #0a0a0a, inset 0 0 0 1px rgba(255,255,255,0.06);
    z-index: 2;
    /* 旧版 Chromium overflow:hidden + border-radius 裁剪兜底 */
    -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
    mask-image: radial-gradient(circle, white 100%, black 100%);
}

/* 标签内模糊背景，填充长方形封面的黑色区域 */
.vinyl-label::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(15px) brightness(0.55);
    z-index: 0;
}

/* 晕染：径向渐变从边缘暗化，融合矩形封面到圆形 */
.vinyl-label::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 58%, rgba(0,0,0,0.55) 100%);
    z-index: 2;
    pointer-events: none;
}

.vinyl-cover-img {
    display: block;
    width: 100%;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.vinyl-sheen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.06) 0%,
        transparent 30%,
        transparent 50%,
        rgba(255,255,255,0.03) 55%,
        transparent 70%,
        rgba(0,0,0,0.08) 100%
    );
    pointer-events: none;
    z-index: 3;
}

.vinyl-hole {
    display: none;
}

/* ====== 唱臂探针（SVG路径来自原始设计稿） ====== */
.tonearm {
    position: absolute;
    top: -32%;
    left: 43%;
    height: 54%;
    z-index: 9;
    transform-origin: 12.61% 2.08%;
    transform: rotate(-22deg);
    transition: transform 0.35s ease-out;
    pointer-events: none;
}

.tonearm-svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 3px 6px rgba(0,0,0,0.5));
}

/* 播放时探针落到唱片右侧沟槽 */
.vinyl-container.playing .tonearm {
    transform: rotate(0deg);
}

/* 唱片旋转动画 */
.vinyl-container.playing .vinyl-disc {
    animation: vinylSpin 20s linear infinite;
}

/* 暂停时探针弹起，唱片冻结旋转 */
.vinyl-container.paused .vinyl-disc {
    animation-play-state: paused;
}

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

/* ====== 控制按钮 ====== */
.control-btn {
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 58px;
    height: 58px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    transition: transform 0.1s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    background: #a81028;
    transform: scale(0.92);
}

.play-control-btn::before {
    content: "\e64f";
    font-family: "iconfont";
    font-weight: 600;
}

.play-control-btn.pause::before {
    content: "\e63e";
    font-family: "iconfont";
    font-weight: 600;
}

/* 缓冲卡顿中：播放按钮脉冲动画，表示加载中 */
@keyframes btn-buffering-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}
.play-control-btn.buffering {
    animation: btn-buffering-pulse 0.9s ease-in-out infinite;
    pointer-events: none;  /* 双重保险：CSS 层面也禁止点击 */
}

.prev-btn::before {
    content: "\f300";
    font-family: "iconfont";
    font-weight: 900;
}

.next-btn::before {
    content: "\f2ff";
    font-family: "iconfont";
    font-weight: 900;
}

.to-player-btn::before {
    content: "\e6e4";
    font-family: "iconfont";
    font-weight: 900;
}

.lyrics-toggle-btn::before {
    content: "\e682";
    font-family: "iconfont";
    font-weight: 900;
}

.lyrics-toggle-btn.active {
    background: #c41230;
}

.player-favorite-btn::before {
    content: "";
    display: block;
    width: 60%;
    height: 60%;
    background-color: currentColor;
    -webkit-mask: url('/images/favorite-star.svg') no-repeat center / contain;
    mask: url('/images/favorite-star.svg') no-repeat center / contain;
}

/* 播放页底部收藏单曲按钮：图标与旁边「上一曲」按钮（30px iconfont）一致 */
.control-btns-row .player-favorite-btn::before {
    width: 30px;
    height: 30px;
}

.player-right .cover-section .vinyl-container {
    width: 55%;
    max-width: 320px;
    margin: 0 auto;
}

/* ====== 抽屉按钮组（左侧面板折叠时悬浮于右侧面板左下角） ====== */
.fan-controls {
    position: absolute;
    bottom: 24px;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    max-width: 36px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
}
.panel-collapsed .fan-controls {
    opacity: 1;
    pointer-events: auto;
}
.fan-controls.expanded {
    max-width: 345px;
}
.fan-ear {
    width: 36px;
    height: 52px;
    background: #e31937;
    border: none;
    border-radius: 0 10px 10px 0;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.fan-controls.expanded .fan-ear {
    width: 0;
    min-width: 0;
    opacity: 0;
    pointer-events: none;
}
.fan-ear:active {
    background: #a81028;
}
.fan-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    flex-shrink: 0;
}
.fan-controls .control-btn {
    width: 55px;
    height: 55px;
    font-size: 28px;
    flex-shrink: 0;
}
/* 预览模式单曲时隐藏 */
.preview-mode .fan-controls {
    display: none;
}
/* 预览模式单曲时隐藏按钮组 */
.preview-mode .fan-controls {
    display: none;
}

.music-player.no-episodes .vinyl-container {
    width: 30%;
}

.player-favorite-btn.favorited::before {
    background-color: #ffd700;
    -webkit-mask: url('/images/favorite-star-filled.svg') no-repeat center / contain;
    mask: url('/images/favorite-star-filled.svg') no-repeat center / contain;
}

.floating-controls .player-favorite-btn.favorited::before {
    background-color: #ffd700;
    -webkit-mask: url('/images/favorite-star-filled.svg') no-repeat center / contain;
    mask: url('/images/favorite-star-filled.svg') no-repeat center / contain;
}

/* ====== 歌词区域（与封面同级，共享 flex 空间） ====== */
.lyrics-section {
    display: none;
    flex-direction: column;
    background: var(--bg-warm);
    border-top: 1px solid var(--border-warm);
    min-height: 0;
    overflow: hidden;
}

.player-right.lyrics-visible .lyrics-section {
    flex: 1;
    display: flex;
}

.player-right.lyrics-visible .lyrics-content {
    padding-top: 20px;
}

.lyrics-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-warm);
    color: var(--text-muted);
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 0;
}

.lyrics-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lyrics-content {
    flex: 1;
    overflow-y: auto;
    padding: 60px 20px;
    text-align: center;
    font-size: 39px;
    line-height: 2.2;
    height: 100%;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.lyrics-line {
    padding: 6px 0;
    transition: all 0.3s ease;
    opacity: 0.35;
    min-height: 1.2em;
    box-sizing: border-box;
    color: var(--text-primary);
    font-weight: 400;
}

.lyrics-line.active {
    opacity: 1;
    color: var(--text-primary);
    font-weight: 600;
    transform: scale(1.08);
    position: relative;
}

/* 当前播放行超80%容器宽度：自动换行+变色 */
.lyrics-line.active.lyrics-long-line {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #e31937;
    font-weight: 700;
}

.lyrics-line.adjust-active {
    opacity: 1;
    color: #e31937;
    font-weight: 600;
    transform: scale(1.08);
    background: rgba(227, 25, 55, 0.06);
    position: relative;
}

.lyrics-line.adjust-active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 10px solid #e31937;
    opacity: 0.7;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}

.is-adjusting .lyrics-line.active::after {
    opacity: 0.3;
}

.no-lyrics {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 23px;
    color: var(--text-lightest);
}

/* 歌词加载等待状态 */
.lyrics-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 18px;
    color: var(--text-subtle);
    font-size: 22px;
    user-select: none;
}

.lyrics-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e8e8e8;
    border-top-color: #e31937;
    border-radius: 50%;
    animation: lyricsSpinner 0.8s linear infinite;
}

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

/* 歌词控制栏（左侧悬浮竖条） */
.lyrics-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 8px;
    background: var(--glass-light);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.lyrics-controls.visible {
    display: flex;
}

.lyrics-adjust-btn {
    background: #e31937;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    transition: transform 0.1s ease, background 0.1s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lyrics-adjust-btn:active {
    background: #a81028;
    transform: scale(0.9);
}

.lyrics-time-display {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    padding: 6px 10px;
    background: var(--lyrics-time-bg);
    border-radius: 6px;
    min-width: 80px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    white-space: nowrap;
}

/* 多集预览：左侧全屏、隐藏控制栏，右侧隐藏 */
.preview-mode:not(.single-preview) .player-left { flex: 1; max-width: 100%; transition: none; }
.preview-mode:not(.single-preview) .player-right { display: none; }
.preview-mode:not(.single-preview) .left-controls { display: none !important; }

/* 单曲预览：player-left 由 JS 隐藏，left-controls 迁移到 player-right 底部 */
.preview-mode.single-preview { flex-direction: column; }
.preview-mode.single-preview .player-right { flex: 1; min-height: 0; position: relative; }
.preview-mode.single-preview .player-right .music-player.no-episodes { display: flex; }
.preview-mode.single-preview .lyrics-section { display: none; }
.preview-mode.single-preview .player-right.lyrics-visible .lyrics-section { display: flex; }
.preview-mode.single-preview .now-playing { height: 84px; padding: 0 14px; }
.preview-mode.single-preview .player-right > .preview-actions { top: 16px; left: 20px; gap: 16px; }
/* left-controls 在 player-right 内时，放在音乐播放器下方 */
.preview-mode.single-preview .player-right > .left-controls {
    flex-shrink: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
}

/* 预览模式下分集列表一行2个紧凑布局 */
.episode-list.layout-preview {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
}
.episode-list.layout-preview li {
    flex: 0 0 calc(33.33% - 6px);
    min-width: 0;
    font-size: 18px;
    padding: 10px 8px;
}

.player-right .lyrics-content {
    font-size: 36px;
    padding: 40px 16px;
}

/* ====== 歌词拖拽 ====== */
.lyrics-content.dragging {
    user-select: none;
    pointer-events: auto;
}

.lyrics-line.center-highlight {
    color: #e31937 !important;
    font-weight: 600;
    transform: scale(1.08);
    transition: all 0.2s ease;
}

.lyrics-line.center-background {
    border-radius: 8px;
    padding: 10px 8px !important;
    margin: 4px 0 !important;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.center-indicator {
    position: fixed;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(227, 25, 55, 0.5);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.center-indicator .time-display {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: auto;
}

.center-indicator .indicator-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e31937;
    transform: translateX(-50%);
}

.center-indicator .play-icon {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: auto;
}

.lyrics-content.waiting {
    cursor: pointer;
}

.lyrics-line.wait-highlight {
    animation: pulseHighlight 2s infinite;
}

@keyframes pulseHighlight {
    0%, 100% { background-color: rgba(227, 25, 55, 0.05); }
    50% { background-color: rgba(227, 25, 55, 0.12); }
}

/* ====== 播放器响应式 ====== */
@media (max-width: 768px) {
    .player-left {
        flex: 0 0 42%;
    }

    .lyrics-content {
        font-size: 30px;
        padding: 30px 12px;
    }

    .lyrics-adjust-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .lyrics-time-display {
        min-width: 44px;
        height: 30px;
        font-size: 18px;
    }

    .now-playing {
        font-size: 20px;
        height: 76px;
        padding: 0 16px;
    }

    .episode-list.layout-3 li {
        flex: 0 0 100%;
    }

    .collection-header-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn {
        width: 42px;
        height: 42px;
        font-size: 25px;
    }

    .collection-header-cover {
        height: 45px;
        width: 45px;
    }
}

@media (max-width: 480px) {
    .collection-detail-section {
        flex-direction: column;
    }

    .player-left {
        flex: 0 0 auto;
        max-height: 45%;
    }

    .player-right {
        flex: 1;
    }

    .lyrics-content {
        font-size: 28px;
        padding: 20px 10px;
        line-height: 1.8;
    }

    .lyrics-adjust-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .lyrics-time-display {
        min-width: 40px;
        height: 28px;
        font-size: 16px;
    }
}

@media (prefers-contrast: more) {
    .lyrics-container {
        background: var(--bg-card);
    }

    .lyrics-line.active {
        color: var(--text-primary);
        text-shadow: none;
    }

    .lyrics-adjust-btn {
        background: #e31937;
        border: 1px solid #333;
    }
}

@media (hover: none) and (pointer: coarse) {
    .lyrics-controls.visible {
        opacity: 1;
    }

    .lyrics-adjust-btn:active {
        background: rgba(227, 25, 55, 1);
        transform: scale(0.85);
    }
}

/* ====== 其他组件样式 ====== */
/* 全局播放器 */
#globalPlayerContainer {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -9999;
}

/* ========== 悬浮控制条主容器 ========== */
.floating-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-floating-bar);
    border-top: 2px solid var(--brand-red);
    padding: 12px 20px;
    box-shadow: var(--shadow-floating);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    height: 130px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

@keyframes flowLight {
    0% { left: -100%; }
    100% { left: 100%; }
}

.floating-controls.show {
    display: flex;
    animation: slideUpIn 0.3s ease;
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 歌词区域 ========== */
.floating-controls .lyrics-display-wrapper {
    display: none;
    max-height: 120px;
    overflow: hidden;
}

/* 关键：当显示歌词时，启用 flex 布局 */
.floating-controls.show-lyrics .lyrics-display-wrapper {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

/* 让歌词内容占据全部可用空间，并允许内部滚动 */
.floating-controls .lyrics-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 0;
    text-align: center;
    font-size: 34px;
    line-height: 1.6;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.floating-controls .lyrics-content::-webkit-scrollbar {
    display: none;
}

.floating-controls .lyrics-line {
    padding: 6px 0;
    transition: all 0.3s ease;
    opacity: 0.6;
    min-height: 1.2em;
    box-sizing: border-box;
    color: var(--text-primary);
}

.floating-controls .lyrics-line.active {
    opacity: 1;
    color: var(--text-primary);
    font-weight: bold;
    transform: scale(1.3);
}

/* ========== 控制内容（左右布局） ========== */
.floating-controls .controls-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

.floating-controls .control-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.floating-controls .now-playing-info {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.floating-controls .now-playing-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-controls .now-playing-collection {
    font-size: 28px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-controls .control-btn {
    background: #e31937;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 75px;
    height: 75px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    transition: all 0.2s ease;
}

.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center; /* 这行确保垂直居中 */
    z-index: 1000;
}

/* 确保 auth-form 在弹性布局中正确对齐 */
.auth-form {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 0; /* 移除margin: auto，让flex布局控制居中 */
    display: none;
}

/* 关闭按钮样式保持不变 */
.close-auth {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #e31937;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    color: #fff;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.close-auth:active {
    background: #a81028;
}

/* 捐赠按钮样式 */
.donate-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #e31937;
    font-size: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    padding: 0;
    opacity: 1;
}

.donate-btn:active {
    background: #e31937;
    color: #fff;
    transform: scale(0.93);
}

.donate-btn .iconfont {
    font-size: 23px;
}


/* ====== 专辑加载失败遮罩层 ====== */
.error-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}
.error-overlay-card {
    background: #1e1e1e;
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    max-width: 360px;
    width: 85%;
}
.error-overlay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e31937;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}
.error-overlay-msg {
    color: #fff;
    font-size: 20px;
    margin: 0 0 8px;
}
.error-overlay-hint {
    color: #999;
    font-size: 15px;
    margin: 0 0 28px;
}
.error-overlay-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.error-overlay-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.error-delete-btn {
    background: #e31937;
    color: #fff;
}
.error-delete-btn:active {
    background: #a81028;
}
.error-back-btn {
    background: #333;
    color: #ccc;
}
.error-back-btn:active {
    background: #444;
}

/* ====== 捐赠对话框 ====== */
.donate-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.donate-dialog.show {
    display: flex;
    opacity: 1;
}

.donate-dialog-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0;
    width: 800px;
    max-width: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
    display: flex;
    flex-direction: row;
    max-height: 96vh;
}

.donate-dialog.show .donate-dialog-content {
    transform: translateY(0) scale(1);
}

/* 左侧面板：QR码 */
.donate-left-panel {
    flex: 0 0 34%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    background: var(--bg-warm);
    border-right: 1px solid #f0f0f0;
}

.donate-heart {
    width: 60px;
    height: 60px;
    display: inline-block;
    margin-bottom: 16px;
    vertical-align: middle;
}

.donate-qrcode-frame {
    position: relative;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.donate-qrcode-frame img {
    width: 160px;
    height: 160px;
    display: block;
    border-radius: 6px;
}

.donate-qrcode-hint {
    margin: 14px 0 0;
    font-size: 19px;
    color: var(--text-subtle);
    letter-spacing: 1px;
}
.donate-alipay {
    color: #1677FF;
    font-weight: 700;
}
.donate-android {
    color: #3ddc84;
    font-weight: 700;
}
.donate-app-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 右侧面板：信息 */
.donate-right-panel {
    flex: 1;
    min-height: 0;
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    overflow-y: auto;
}

/* 关闭按钮 */
.donate-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.12);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: #444;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.donate-close-btn:active {
    background: #e31937;
    color: #fff;
}

html[data-theme="dark"] .donate-close-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
html[data-theme="dark"] .donate-close-btn:active {
    background: #e31937;
    color: #fff;
}

.donate-title {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
}

.donate-subtitle {
    margin: 0 0 20px;
    font-size: 20px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* 统计卡片 */
.donate-stats-card {
    background: linear-gradient(135deg, #fef5f5 0%, #fff8f8 100%);
    border: 1px solid rgba(227, 25, 55, 0.08);
    border-radius: 14px;
    padding: 14px 24px;
    text-align: center;
}
html[data-theme="dark"] .donate-stats-card {
    background: linear-gradient(135deg, rgba(227, 25, 55, 0.08) 0%, rgba(227, 25, 55, 0.04) 100%);
    border-color: rgba(227, 25, 55, 0.12);
}

.donate-stats-divider {
    width: 40px;
    height: 2px;
    background: #e31937;
    border-radius: 1px;
    margin: 10px auto 0;
    opacity: 0.4;
}

/* 月度目标进度条 */
.donate-monthly-card {
    margin-top: 14px;
    background: linear-gradient(135deg, #fef5f5 0%, #fff8f8 100%);
    border: 1px solid rgba(227, 25, 55, 0.08);
    border-radius: 14px;
    padding: 14px 20px;
}
html[data-theme="dark"] .donate-monthly-card {
    background: linear-gradient(135deg, rgba(227, 25, 55, 0.08) 0%, rgba(227, 25, 55, 0.04) 100%);
    border-color: rgba(227, 25, 55, 0.12);
}
.donate-monthly-text {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.donate-monthly-text strong {
    font-size: 20px;
    font-weight: 800;
    color: #e31937;
}
.donate-progress-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(227, 25, 55, 0.12);
    overflow: hidden;
}
.donate-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #e31937, #ff5a6e);
    transition: width 0.4s ease;
}

.donate-stats-info {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.donate-stats-label {
    font-size: 20px;
    color: var(--text-muted);
}

.donate-stats-count {
    font-size: 48px;
    font-weight: 800;
    color: #e31937;
    line-height: 1;
    letter-spacing: -2px;
}

/* 说明条目 */
.donate-note-section {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.donate-note-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-warm);
    border-radius: 12px;
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
}

.donate-note-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
    color: #e31937;
    background: rgba(227, 25, 55, 0.08);
}

/* 感恩墙 */
.donate-records-section {
    margin-top: 20px;
    flex: 1;
    min-height: 0;
}

.donate-records-header {
    margin-bottom: 10px;
}

.donate-records-title {
    font-size: 18px;
    color: var(--text-lightest);
    letter-spacing: 2px;
}

.donate-records-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.donate-records-list::-webkit-scrollbar {
    width: 3px;
}

.donate-records-list::-webkit-scrollbar-track {
    background: transparent;
}

.donate-records-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

.donate-records-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.donate-records-list li:active {
    background: var(--bg-warm);
}

.donation-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.donor-name {
    font-size: 19px;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donation-amount {
    font-size: 19px;
    font-weight: 600;
    color: #e31937;
    flex-shrink: 0;
}

.donation-time {
    font-size: 17px;
    color: var(--text-lightest);
    flex-shrink: 0;
}

/* 捐赠档位标识 */
.donor-tier {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
}
.tier-gold .donor-name { color: #d4a017; font-weight: 700; }
.tier-gold .donor-tier { background: #f5c518; color: #7a5c00; }
.tier-iron .donor-tier { background: #dfe3e8; color: #5a6a7a; }
.tier-supporter .donor-tier { background: #ffe0e5; color: #e31937; }

/* 捐赠留言（整行展示） */
.donation-record { flex-wrap: wrap; }
.donation-message {
    flex-basis: 100%;
    font-size: 13px;
    color: var(--text-lightest);
    margin-top: 2px;
}

/* 捐赠对话框响应式 */
@media (max-width: 768px) {
    .donate-dialog-content {
        flex-direction: column;
        width: 90%;
        max-height: 90vh;
    }

    .donate-left-panel {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 28px 20px;
    }

    .donate-qrcode-frame img {
        width: 130px;
        height: 130px;
    }

    .donate-right-panel {
        padding: 20px;
    }

    .donate-title {
        font-size: 25px;
    }

    .donate-stats-count {
        font-size: 34px;
    }
}

/* 重命名歌单对话框 */
.rename-dialog {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
}
.rename-dialog.show {
    display: flex;
}
.rename-dialog-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 36px 32px 28px;
    width: 420px;
    max-width: 90vw;
    margin-top: 18vh;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}
.rename-dialog-content h2 {
    text-align: center;
    margin: 0 0 24px;
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: 600;
}
.rename-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 22px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}
.rename-input:focus {
    border-color: #e31937;
}
.rename-dialog-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.rename-cancel-btn,
.rename-confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.rename-cancel-btn {
    background: #e31937;
    color: #fff;
}
.rename-confirm-btn {
    background: #e31937;
    color: #fff;
}
.rename-cancel-btn:active {
    background: #a81028;
}
.rename-confirm-btn:active {
    background: #c41530;
}
.rename-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: #e31937;
    border-radius: 50%;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.rename-close-btn:active {
    background: #a81028;
}
.rename-close-btn::before,
.rename-close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--bg-card);
}
.rename-close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.rename-close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.rename-dialog-content .auth-error,
.rename-dialog-content .auth-success {
    text-align: center;
    margin-top: 14px;
    font-size: 18px;
}
.rename-dialog-content .auth-error {
    color: #e31937;
}
.rename-dialog-content .auth-success {
    color: #28a745;
}

/* ====== 自定义确认对话框 ====== */
.confirm-dialog {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}
.confirm-dialog.show {
    display: flex;
}
.confirm-dialog-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 36px 32px 28px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    text-align: center;
}
.confirm-dialog-content p {
    margin: 0 0 28px;
    font-size: 22px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}
.confirm-dialog-actions {
    display: flex;
    gap: 12px;
}
.confirm-cancel-btn,
.confirm-ok-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.confirm-cancel-btn {
    background: var(--bg-button-gray);
    color: var(--text-secondary);
}
.confirm-cancel-btn:active {
    background: var(--border-mid);
}
.confirm-ok-btn {
    background: #e31937;
    color: #fff;
}
.confirm-ok-btn:active {
    background: #a81028;
}

/* ====== 合集选择弹窗 ====== */
.collection-picker-dialog {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--overlay-bg, rgba(0, 0, 0, 0.5));
    z-index: 10002;
    align-items: center;
    justify-content: center;
}
.collection-picker-dialog.show {
    display: flex;
}
.collection-picker-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 36px 24px 24px;
    width: 480px;
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-elevated, 0 4px 20px rgba(0,0,0,0.14));
}
.collection-picker-content h2 {
    margin: 0 0 20px;
    font-size: 22px;
    color: var(--text-secondary);
    text-align: center;
}
.collection-picker-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.collection-picker-close-btn::before {
    content: '\2715';
    font-size: 20px;
    color: var(--text-subtle);
}
.collection-picker-close-btn:active::before {
    color: #e31937;
}
.collection-picker-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.collection-picker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-section);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 56px;
    transition: background 0.15s ease;
}
.collection-picker-item.selected {
    background: var(--bg-floating-bar);
    border: 2px solid var(--brand-red);
}
.collection-picker-item:active {
    background: var(--border-mid);
}
.collection-picker-item-pic {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-button-gray);
}
.collection-picker-item-info {
    flex: 1;
    min-width: 0;
}
.collection-picker-item-title {
    font-size: 18px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.collection-picker-item-count {
    font-size: 13px;
    color: var(--text-subtle);
    margin-top: 3px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border-input);
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 23px;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: #e31937;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 23px;
    margin-top: 10px;
}

.auth-form button:hover {
    background: #c01730;
}

.auth-links {
    text-align: center;
    margin-top: 15px;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-error {
    color: #e31937;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.auth-success {
    color: #28a745;
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* 更简洁的无背景版本 */
.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: none;
    align-items: center;
    z-index: 1000;
    gap: 12px;
    font-size: 28px;
}

.user-email {
    color: var(--text-secondary);
    font-weight: 500;
}



.login-btn {
    background: #e31937;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 22px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn:active {
    background: #a81028;
}
/* 添加入场动画 */
@keyframes slideInUser {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-info[style*="display: block"] {
    animation: slideInUser 0.4s ease-out;
}

/* 添加退出动画 */
@keyframes slideOutUser {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

.user-info.hiding {
    animation: slideOutUser 0.3s ease-in;
}

.logout-btn {
    background: #e31937;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 22px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn::before {
    content: "\e688";
    font-family: "iconfont";
    font-size: 22px;
    line-height: 1;
}

.login-btn::before {
    content: "\e68a";
    font-family: "iconfont";
    font-size: 22px;
    line-height: 1;
}

.logout-btn:active {
    background: #a81028;
    color: #fff;
}

.close-auth {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #e31937;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    color: #fff;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.close-auth:active {
    background: #a81028;
}

/* 确保按钮内的文本居中 */
.close-auth:before {
    content: "×";
    display: block;
    width: 100%;
    text-align: center;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .list-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-input {
        width: 70%;
    }

    .music-player {
        height: 500px;
    }

    .episode-list.layout-3 li {
        flex: 0 0 100%;
    }
}

@media (max-width: 480px) {
    .list-preview {
        grid-template-columns: 2fr;
    }

    .search-input {
        width: 100%;
        margin-bottom: 10px;
    }

    .search-btn {
        width: 100%;
        margin-left: 0;
    }
}

/* Toast遮罩层 */
.toast-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: overlayFadeIn 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

/* Toast基础样式 - 居中显示 */
.toast {
    position: relative;
    background: #333;
    color: white !important;
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 23px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    min-width: 300px;
    text-align: center;
    animation: toastPopIn 0.3s ease;
    line-height: 1.5;
    z-index: 100000 !important;
}

/* Toast类型颜色 */
.toast-overlay .toast.success {
    background: #4CAF50;
    color: white !important;
}

.toast-overlay .toast.error {
    background: #f44336 !important;
    color: white !important;
    border: 2px solid #d32f2f;
    display: block !important;  /* 强制覆盖全局的 .error { display: none } */
}

.toast-overlay .toast.warning {
    background: #ff9800;
    color: white !important;
}

.toast-overlay .toast.info {
    background: #2196F3;
    color: white !important;
}

/* 动画效果 */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes toastPopIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes toastPopOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.toast.hiding {
    animation: toastPopOut 0.3s ease forwards;
}

.toast-overlay.hiding {
    animation: overlayFadeOut 0.3s ease forwards;
}

/* ====== 搜索态布局 ====== */
/* 搜索结果显示时，内容区顶部紧贴 header（搜索框 + 热门歌手），去掉默认 24px 顶部内边距 */
.content-section.search-active {
    padding-top: 0;
}

/* 搜索结果列表：默认 4 列，可通过 cols-4/5/6 切换 */
.search-results-section .list-preview {
    grid-template-columns: repeat(4, 1fr);
}
.search-results-section .list-preview.cols-4 { grid-template-columns: repeat(4, 1fr); }
.search-results-section .list-preview.cols-5 { grid-template-columns: repeat(5, 1fr); }
.search-results-section .list-preview.cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ====== 搜索骨架屏占位 ====== */
.search-skeleton {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}
.search-skeleton .sk-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bg-button-gray);
}
.search-skeleton .sk-line {
    height: 18px;
    margin: 10px 12px 0;
    border-radius: 4px;
    background: var(--bg-button-gray);
}
.search-skeleton .sk-line.short {
    width: 60%;
}
/* shimmer 扫光动画 */
.search-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}
html[data-theme="dark"] .search-skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
@keyframes skeletonShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
