/**
 * 前端文章标题后置 MP3 时长微型小标签样式
 * 统一主题红色高亮、解决手机端偏上基准线差异、跨平台精准居中
 */

.mp3-duration-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    position: relative;
    top: -1px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 3px;
    background-color: #fff3f2;
    color: #ea4335 !important; /* 柔和雅致红，清晰且不刺眼 */
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none !important;
    border: 1px solid rgba(234, 67, 53, 0.25);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* 针对文章正文页的大标题 (h1.article-title) 电脑端适度匹配 */
.article-header h1 .mp3-duration-badge,
h1.article-title .mp3-duration-badge,
.article-title .mp3-duration-badge {
    font-size: 12px;
    height: 20px;
    padding: 0 7px;
    margin-left: 8px;
    top: -1.5px;
}

/* 列表页文章标题 (.excerpt h2) */
.excerpt header h2 .mp3-duration-badge {
    font-size: 11px;
    height: 17px;
    top: -1px;
}

/* 针对排行/随机/单行列表项 (.likes-ranking li a, .random-posts li a) */
.likes-ranking li .mp3-duration-badge,
.random-posts li .mp3-duration-badge {
    font-size: 11px;
    height: 17px;
    top: -1px;
}

/* 确保排行榜和随机文章列表链接无下划线 */
.likes-ranking li a,
.random-posts li a {
    text-decoration: none !important;
}
.likes-ranking li a:hover,
.random-posts li a:hover {
    text-decoration: none !important;
}

/* 鼠标悬浮微交互：稍微加深一点质感 */
.mp3-duration-badge:hover,
a:hover .mp3-duration-badge {
    background-color: #fde2df;
    color: #d32f2f !important;
    border-color: rgba(211, 47, 47, 0.4);
}

/* 适配 DUX 主题暗黑夜间模式 */
.darking .mp3-duration-badge {
    background-color: #2b1c1e;
    color: #ff756b !important;
    border-color: rgba(255, 117, 107, 0.35);
}

.darking .mp3-duration-badge:hover,
.darking a:hover .mp3-duration-badge {
    background-color: #382225;
    color: #ff9188 !important;
    border-color: rgba(255, 117, 107, 0.55);
}

/* 手机移动端针对真实浏览器（iOS Safari/Android微信）进行对齐补偿与防偏上修复 */
@media (max-width: 768px) {
    .mp3-duration-badge {
        font-size: 10px;
        height: 15px;
        line-height: 1;
        padding: 0 4px;
        margin-left: 4px;
        top: 1.5px !important; /* 正向下沉补偿：彻底解决中文字体 baseline 导致的视觉悬浮靠上问题 */
        vertical-align: middle !important;
    }

    .article-header h1 .mp3-duration-badge,
    h1.article-title .mp3-duration-badge,
    .article-title .mp3-duration-badge {
        font-size: 11px;
        height: 17px;
        top: 1px !important;
        vertical-align: middle !important;
    }

    .excerpt header h2 .mp3-duration-badge {
        top: 1.5px !important;
    }

    .likes-ranking li .mp3-duration-badge,
    .random-posts li .mp3-duration-badge,
    .relates ul li .mp3-duration-badge,
    .sidebar .widget-posts ul li .mp3-duration-badge {
        top: 1.5px !important;
    }
}
