/* ---------- 音乐悬浮球 ---------- */
.music-ball {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--c-surface);
    color: #b45309;
    font-size: 1.875rem;   /* 音符放大 50% */
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.music-ball:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}

.music-ball.is-playing-area {
    color: #6d28d9;
}

/* 展开时出现在球的上方，右对齐，从右下角放大 */
.global-music-player {
    right: 20px;
    bottom: 84px;
    transform-origin: bottom right;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.global-music-player.is-collapsed {
    display: none;
}

.global-music-player:not(.is-open) {
    opacity: 0;
    transform: scale(0.92);
}

@media (max-width: 768px) {
    .music-ball {
        right: 12px;
        bottom: 35px;      /* 上移半个图标高度（约 21px） */
        width: 42px;
        height: 42px;
        font-size: 1.575rem;   /* 手机上同样放大 50% */
    }

    .global-music-player {
        right: 12px;
        bottom: 78px;
    }
}


/* ---------- 统一各页面容器宽度与左右留白，左边缘与站点标题对齐 ---------- */
.container,
.container-home,
.container-series,
.container-post,
.container-plain {
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}


/* ---------- 系列页：取消正文居中收窄，左边缘与其它页对齐 ---------- */
.container-plain .post-list {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* ---------- 系列页：卡片三列排布 ---------- */
.series-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.series-grid .series-item {
    margin: 0 !important;
    height: 100%;
}

@media (max-width: 900px) {
    .series-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .series-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ---------- 系列页：卡片紧贴标题下方 ---------- */
.container-plain .tag-heading {
    margin-bottom: 6px !important;
    color: #111 !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;   /* 与「测试中心功能」标题一致 */
}

.container-plain .post-list > .series-item {
    margin-top: 0 !important;
}


/* ---------- 统一各页面正文与页头的间距 ---------- */
.blog-layout {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}

/* 各页面容器自身不要再叠加上内边距 */
.container-home,
.container-series,
.container-plain,
.container-post,
.container {
    padding-top: 0 !important;
}

.post-list,
.post-detail {
    padding-top: 0 !important;
}

.post-list > .tag-heading:first-child,
.post-list > h1:first-child,
.post-list > h2:first-child {
    margin-top: 0 !important;
}


/* ---------- 测试中心各页面：与博客页统一顶部间距 ---------- */
.container > .lab-page,
.container > .demo-shell,
.container > .auth-wrap {
    padding-top: 24px;
}


/* ---------- 系列页说明文字 ---------- */
.series-subtitle {
    margin: 0 0 14px;
    color: var(--c-muted);
    font-size: 0.9375rem;
    line-height: 1.8;
}


/* ---------- 系列页卡片：与测试中心卡片一致 ---------- */
.series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 18px;
}

.series-grid .series-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-left: 3px solid #c7d2fe !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.series-grid .series-item:hover {
    background: #f8fafc !important;
}

.series-grid .series-item h2 {
    margin: 0 !important;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.series-grid .series-item h2 a {
    color: #1e293b;
    text-decoration: none;
}

.series-grid .series-item .post-excerpt {
    margin: 0 !important;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--c-muted);
}

.series-grid .series-item .read-more {
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.7;
    color: #2563eb;
    text-decoration: none;
}

.series-grid .series-item .read-more:hover {
    color: #2563eb;
}

@media (max-width: 900px) {
    .series-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .series-grid .series-item {
        padding: 12px 14px !important;
    }

    .series-grid .series-item h2 {
        font-size: 1.0625rem;
    }

    .series-grid .series-item .post-excerpt {
        font-size: 0.75rem;
    }
}


/* ---------- 系列卡片：整卡可点 + 三列 ---------- */
.series-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 18px;
}

.series-card-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.series-card-link h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
}

.series-card-link:hover h2 {
    color: #2563eb;
}

.series-grid .series-item .post-excerpt {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--c-muted);
}

.series-card-meta {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--c-faint);
}

.series-card-link .read-more {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.75rem;
    color: #2563eb;
}

@media (max-width: 900px) {
    .series-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .series-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .series-card-link h2 {
        font-size: 1.0625rem;
    }
}


/* ---------- 系列卡片：任何状态下都不显示下划线 ---------- */
.series-card-link,
.series-card-link:hover,
.series-card-link:focus,
.series-card-link:active,
.series-card-link h2,
.series-card-link h2 a,
.series-card-link .post-excerpt,
.series-card-link .series-card-meta,
.series-card-link .read-more {
    text-decoration: none !important;
}


/* ---------- 文章页恢复为今天之前的 1400px ---------- */
.container.container-post {
    max-width: 1400px !important;
}


/* ---------- 文章页左侧系列导航：跟随页面滚动，不再吸附 ---------- */
.container-post .post-nav-inner {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
}


/* ---------- 文章页：左侧系列导航与右侧目录都跟随正文滚动 ---------- */
.container-post .post-nav,
.container-post .post-nav-inner,
.container-post .sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    align-self: flex-start !important;
}


/* ---------- 文章页两侧栏：跟随页面滚动，内容过长时自己滚动 ---------- */
.container-post .post-nav,
.container-post .sidebar {
    position: static !important;
    top: auto !important;
    align-self: flex-start !important;
}

.container-post .post-nav-inner,
.container-post .sidebar .widget-list {
    position: static !important;
    top: auto !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-right: 4px;
}


/* ---------- 文章页两侧栏：滚动时始终可见（吸附在视口） ---------- */
.container-post .post-nav,
.container-post .sidebar {
    position: sticky !important;
    top: 16px !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.container-post .post-nav-inner {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0;
}


/* ---------- 文章底部「回到顶部」 ---------- */
.post-back-top-wrap {
    display: flex;
    justify-content: center;
    padding: 22px 0 8px;
}

.post-back-top {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: var(--c-muted);
    text-decoration: none;
    background: var(--c-surface);
}

.post-back-top:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #f8fbff;
}


/* ---------- 回到顶部：位置由 JS 贴着音乐球计算 ---------- */
.back-to-top {
    right: 76px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 60px;
        bottom: 14px;
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }
}


/* ---------- 播放器新外观：封面 + 进度 ---------- */
.mp-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.mp-cover {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.25rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    user-select: none;
}

.mp-meta {
    flex: 1;
    min-width: 0;
}

.mp-meta .music-info {
    margin: 0 0 6px;
    padding: 0;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
}

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

.mp-time {
    font-size: 0.6875rem;
    color: var(--c-faint);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
}

.mp-progress {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 999px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
}

.mp-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b45309;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mp-progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #b45309;
}

.music-controls .mp-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fed7aa;
    font-size: 1.125rem;
}

.music-controls .mp-play:hover {
    background: #ffedd5;
}

/* ---------- 桌面端：右侧抽屉，歌单常驻 ---------- */
@media (min-width: 769px) {
    .global-music-player {
        top: 88px;          /* 与正文起始高度对齐（页头 64px + 24px 间距） */
        /* 固定位置：距右侧 48px，与右侧导航拉开一点 */
        right: 48px;
        bottom: auto;
        left: auto;
        width: 340px;
        height: auto;
        max-height: calc(100vh - 100px);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: -8px 0 28px rgba(15, 23, 42, 0.14);
        transform: translateX(100%);
        transition: transform 0.22s ease;
        z-index: 900;
    }

    .global-music-player.is-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .global-music-player.is-collapsed {
        display: none;
    }

    .music-player-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 18px;
    }

    .mp-cover {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        font-size: 1.5rem;
    }

    /* 桌面端：歌单常驻显示 */
    .music-playlist {
        display: flex;
        flex-direction: column;
        margin-top: 12px;
        border-top: 1px solid var(--c-border);
        padding-top: 10px;
    }

    #btn-playlist {
        display: none;
    }

    .music-list {
        height: calc(36px * 15);
        max-height: calc(36px * 15);
        overflow-y: auto;
    }

    .music-list li {
        height: 36px;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        padding: 0 10px;
        border-radius: 6px;
    }
}

/* ---------- 手机端：球上方的小卡片 ---------- */
@media (max-width: 768px) {
    .global-music-player {
        /* 手机端水平居中，不再贴右 */
        left: 50%;
        right: auto;
        bottom: 92px;      /* 抬高，避开底部音乐球 */
        top: auto;
        width: 80vw;
        max-width: 340px;
        border-radius: 14px;
        padding: 0;
        transform: translateX(-50%);
    }

    .global-music-player.is-open {
        transform: translateX(-50%);
    }

    .music-player-inner {
        padding: 12px 14px;
    }

    .global-music-player.is-collapsed {
        display: none;
    }
}


/* ---------- 首页文章区：恢复昨天（b8309c6）的位置与间距 ---------- */
.container-home .blog-layout {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
}

.container-home .post-list {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
}


/* ---------- 播放中的迷你条（音乐球左侧） ---------- */
.mp-mini-bar {
    position: fixed;
    right: 80px;
    bottom: 24px;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 262px;
    height: 44px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--c-surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
    overflow: hidden;
}

.mp-mini-bar[hidden] {
    display: none;
}

.mp-mini-title {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-mini-btn {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #fff7ed;
    color: #b45309;
    font-size: 0.8125rem;
    cursor: pointer;
}

.mp-mini-btn:hover {
    background: #ffedd5;
}

.mp-mini-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--c-bg-soft);
}

.mp-mini-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: #f59e0b;
    transition: width 0.25s linear;
}

@media (max-width: 768px) {
    .mp-mini-bar {
        left: auto;
        right: 60px;
        bottom: 13px;
        width: 236px;
        height: 45px;
        padding: 0 11px;
        gap: 7px;
        border-radius: 999px;
    }

    .mp-mini-title {
        font-size: 0.8125rem;
    }

    .mp-mini-btn {
        width: 28px;
        height: 28px;
    }

    .mp-mini-btn svg {
        width: 15px;
        height: 15px;
    }
}


/* ---------- 迷你条停止按钮 ---------- */
.mp-mini-stop {
    background: var(--c-bg-soft);
    color: var(--c-text-2);
}

.mp-mini-stop:hover {
    background: #e2e8f0;
    color: #b91c1c;
}


/* ---------- 全屏播放层 ---------- */
.mp-stage {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 50% 20%, hsl(var(--mp-h1, 30), 70%, 42%), transparent 60%),
        linear-gradient(160deg, hsl(var(--mp-h2, 260), 45%, 18%), #0b1020 70%);
    overflow-y: auto;
    overflow-x: hidden;
}

.mp-stage[hidden] {
    display: none;
}

.mp-stage-back {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.8125rem;
    cursor: pointer;
}

.mp-stage-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mp-stage-body {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.mp-stage-disc {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, 0.06) 0 3px,
            rgba(0, 0, 0, 0.08) 3px 6px),
        linear-gradient(135deg, hsl(var(--mp-h1, 30), 75%, 58%), hsl(var(--mp-h2, 260), 70%, 42%));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), inset 0 0 0 10px rgba(255, 255, 255, 0.06);
}

.mp-stage-disc::after {
    content: '';
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.18);
}

.mp-stage-disc.is-spinning {
    animation: mp-spin 8s linear infinite;
}

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

.mp-stage-title {
    margin: 4px 0 0;
    font-size: 1.375rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
}

.mp-stage-artist {
    margin: 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.mp-stage-progress {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.mp-stage-progress input {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.mp-stage-progress input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--c-surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mp-stage-controls {
    display: flex;
    align-items: center;
    gap: 22px;
}

.mp-stage-btn {
    border: 0;
    background: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.85;
}

.mp-stage-btn:hover {
    opacity: 1;
}

.mp-stage-play {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--c-surface);
    color: #0b1020;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.mp-stage-extra {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.mp-stage-chip {
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
}

.mp-stage-vol {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mp-stage-vol input {
    width: 84px;
}

.mp-stage-playlist {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    padding: 56px 14px 18px;
    background: rgba(10, 14, 30, 0.94);
    backdrop-filter: blur(8px);
    transform: translateX(100%);
    transition: transform 0.2s ease, visibility 0.2s;
    overflow-y: auto;
    visibility: hidden;
}

.mp-stage-playlist.show {
    transform: translateX(0);
    visibility: visible;
}

.mp-stage-playlist ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp-stage-playlist li {
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
}

.mp-stage-playlist li:hover {
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .mp-stage-disc {
        width: 168px;
        height: 168px;
    }

    .mp-stage-title {
        font-size: 1.125rem;
    }

    .mp-stage-play {
        width: 60px;
        height: 60px;
    }
}


/* ---------- 播放器按钮：文字不竖排 ---------- */
.music-btn,
.music-btn-text {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .music-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .music-btn-text {
        min-width: 52px;
        padding: 0 10px;
        font-size: 0.75rem;
    }
}


/* ---------- 播放器控制区：统一圆键 + 文字胶囊 ---------- */
.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.music-controls .music-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    background: var(--c-surface);
    color: var(--c-text-2);
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.music-controls .music-btn:hover {
    background: #eef2f7;
    color: #0f172a;
}

/* 主播放键：更大的实心圆 */
.music-controls .mp-play {
    width: 46px;
    height: 46px;
    border: 0;
    background: #f59e0b;
    color: #fff;
    font-size: 1.0625rem;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.music-controls .mp-play:hover {
    background: #ea8a06;
    color: #fff;
}

/* 文字按钮：圆角胶囊，弱化存在感 */
.music-controls .music-btn-text {
    width: auto;
    min-width: 0;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
}

.music-controls .music-btn-text:hover {
    background: var(--c-bg);
    border-color: #fed7aa;
    color: #b45309;
}

.music-controls .music-btn-list {
    border-color: #ddd6fe;
    background: #faf5ff;
    color: #6d28d9;
}

.music-controls .music-btn-list:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}

/* 歌名一行更清爽 */
.mp-meta .music-info {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

@media (max-width: 768px) {
    .music-controls {
        flex-wrap: wrap;
        gap: 8px 8px;
    }

    .music-controls .music-btn {
        width: 34px;
        height: 34px;
    }

    .music-controls .mp-play {
        width: 44px;
        height: 44px;
    }

    .music-controls .music-btn-text {
        height: 28px;
        padding: 0 12px;
        font-size: 0.6875rem;
    }
}


/* ---------- 声明页面为浅色，避免华为等浏览器的「强制深色」把背景染灰 ---------- */
html {
    color-scheme: light;
}


/* ---------- 播放器 SVG 图标 ---------- */
.music-btn svg,
.mp-mini-btn svg,
.mp-stage-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}

.music-controls .mp-play svg,
.mp-stage-play svg {
    width: 20px;
    height: 20px;
}

.music-btn .ico-pause,
.mp-mini-btn .ico-pause,
.mp-stage-btn .ico-pause {
    display: none;
}

.is-playing .ico-play {
    display: none !important;
}

.is-playing .ico-pause {
    display: block !important;
}


/* ---------- 桌面端：音乐球放在右下角靠内一点，迷你条在它左侧 ---------- */
@media (min-width: 769px) {
    .music-ball {
        left: auto;
        right: 48px;
        bottom: 124px;      /* 抬高到页脚上方，与内容卡片底部平齐 */
    }

    .mp-mini-bar {
        left: auto;
        right: 108px;
        bottom: 96px;
    }
}


/* ---------- 手机端首页：压缩卡片，保证一屏放下文章 + 分页 ---------- */
@media (max-width: 768px) {
    .container-home .home-hero {
        padding: 14px 16px;
        margin-bottom: 10px;
    }

    .container-home .home-hero h1 {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }

    .container-home .home-hero p {
        font-size: 0.8125rem;
        line-height: 1.6;
    }

    .container-home .home-stats {
        margin-top: 6px;
        gap: 6px;
    }

    .container-home .post-item {
        padding: 12px 14px;
        margin-bottom: 10px;
    }

    .container-home .post-item h2 {
        font-size: 1rem;
        line-height: 1.45;
        margin-bottom: 6px;
    }

    .container-home .post-meta {
        gap: 4px 8px;
        margin-bottom: 6px;
        font-size: 0.75rem;
    }

    /* 手机端首页摘要只显示一行 */
    .container-home .post-item .post-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.8125rem;
        line-height: 1.5;
        margin-bottom: 6px;
    }

    .container-home .read-more {
        font-size: 0.8125rem;
    }

    .container-home .pager {
        padding-top: 8px;
        gap: 8px;
    }
}


/* ---------- 手机端首页：缩小首个卡片与顶部的距离 ---------- */
@media (max-width: 768px) {
    .container-home .blog-layout {
        padding-top: 20px !important;
    }

    .container-home .post-list {
        padding-top: 0 !important;
    }

    .container-home .home-hero {
        margin-top: 0;
    }
}


/* ---------- 手机端分页：条数与按钮同一行 ---------- */
@media (max-width: 768px) {
    .pager {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .pager .pager-info {
        font-size: 0.75rem;
        white-space: nowrap;
        order: 0;
        flex: 0 0 auto !important;   /* 之前是 flex: 1 1 100%，会独占整行 */
    }

    .pager .pager-btn {
        font-size: 0.75rem;
        padding: 4px 10px;
        white-space: nowrap;
        flex: 0 0 auto;
        min-width: 0 !important;
    }
}


/* ---------- 手机端首页：分页紧跟卡片，不再被推到屏幕底部 ---------- */
@media (max-width: 768px) {
    .container-home .post-list > .pager {
        margin-top: 12px !important;
        padding-top: 0 !important;
    }
}


/* ---------- 手机端不显示迷你播放条 ---------- */
@media (max-width: 768px) {
    .mp-mini-bar {
        display: none !important;
    }
}


/* ---------- 页脚：贴底，上方两角圆角 ---------- */
.site-footer {
    margin: 0;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .site-footer {
        margin: 0;
        border-radius: 12px 12px 0 0;
    }
}




/* ---------- 桌面端歌单常驻，隐藏无意义的关闭按钮 ---------- */
@media (min-width: 769px) {
    #btn-close-playlist {
        display: none;
    }
}


/* ---------- 测试设计等宽页面：恢复宽版布局 ---------- */
.container.container-wide {
    max-width: 1760px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.container.container-wide > .lab-page {
    padding-top: 24px;
}


/* ---------- 播放器歌名滚动（超出时来回滚动） ---------- */
.music-info,
.mp-mini-title {
    overflow: hidden;
    position: relative;
}

.music-info > span,
.mp-mini-title {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.music-info > span.is-scrolling,
.mp-mini-title.is-scrolling {
    animation: mp-marquee 9s linear infinite alternate;
}

@keyframes mp-marquee {
    0%, 15% { transform: translateX(0); }
    85%, 100% { transform: translateX(var(--mp-shift, 0)); }
}


/* ---------- 全屏播放页歌词 ---------- */
.mp-stage-lyrics {
    width: 100%;
    height: 132px;
    overflow: hidden;
    position: relative;
    margin: 6px 0 2px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.mp-stage-lyrics-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.25s ease;
    will-change: transform;
}

.mp-lyric-line {
    margin: 0;
    padding: 2px 8px;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mp-lyric-line:hover {
    color: rgba(255, 255, 255, 0.75);
}

.mp-lyric-line.is-active {
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    transform: scale(1.02);
}

.mp-lyric-empty {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .mp-stage-lyrics {
        height: 96px;
    }

    .mp-lyric-line {
        font-size: 0.8125rem;
    }

    .mp-lyric-line.is-active {
        font-size: 0.875rem;
    }
}


/* ---------- 系列页容器宽度与文章详情页一致 ---------- */
.container.container-series {
    max-width: 1400px !important;
}
