/* 1. 确保所有图片容器都有overflow: hidden - 扩展视频支持 */
.article-item img,
.article-item figure,
.article-item [data-type="gallery"],
.article-item [data-type="gallery-group"],
.article-item [data-aspect-ratio],
.article-item div:has(img),
.article-item p:has(img),
.article-item video,
.article-item figure[data-content-type="video"],
.article-item figure[data-content-type="audio"] {
    overflow: hidden;
    border-radius: 6px;
}

/* 2. 为文章内容中所有图片设置基础样式 - 扩展视频支持 */
.article-item img,
.article-item figure[data-content-type="video"] video {
    cursor: zoom-in;
    transition: transform 0.3s ease !important;
}

/* 3. 修复图片集内图片的样式 */
.article-item [data-type="gallery-image"] {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover !important;
    border-radius: 4px;
}
.article-item figcaption {
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 6px 0 0;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 100%;
    display: block;

    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 12px; 
    color: #bbbbbb !important; 
    text-align: left; 
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0) 100%
    ); /* 渐变遮罩 */
    backdrop-filter: blur(2px); 
    box-sizing: border-box;
    z-index: 1; 
}
/* 4. 修复figure内的图片 */
.article-item figure img {
    width: 100%;
    height: auto;
    margin: 0;
}

/* 5. 图片悬停效果 - 统一应用 */
.article-item img:hover,
.article-item figure[data-content-type="video"] video:hover {
    transform: scale(1.02) !important;
}

/* 6. 对于普通单张图片和figure内的图片，使用稍小的缩放 */
.article-item img:not([data-type="gallery-image"]):hover {
    transform: scale(1.02) !important;
}

/* 7. 移除可能的父元素margin冲突 */
.article-item figure {
    /*margin: 10px auto;*/
  margin: 0px 0px 10px 0px;
    max-width: 100%;
  position: relative;
}

.article-item [data-type="gallery"] {
    /*margin: 10px auto;*/margin: 0px 0px 10px 0px;
    max-width: 100%;
}

/* 8. 对于display: inline-block的图片容器 */
.article-item p img[style*="display: inline-block"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}

/* 9. 新增：视频包装器和视频样式（与另一个CSS保持一致） */
.article-item figure[data-content-type="video"] {
    position: relative;
    width: 100%;
    /*margin: 10px auto;*/margin: 0px 0px 10px 0px;
    cursor: pointer;
    aspect-ratio: 16/9; /* 设置视频的宽高比 */
  cursor: zoom-in;
}

.article-item figure[data-content-type="video"] video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 与图片集图片样式一致 */
    border-radius: 6px;
    background: #000;
    /* 隐藏播放控件 */
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* 修复Safari的border-radius问题 */
}

/* 隐藏所有播放控件 */
.article-item figure[data-content-type="video"] video::-webkit-media-controls {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-enclosure {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-panel {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-play-button {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-timeline {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-mute-button {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.article-item figure[data-content-type="video"] video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* 10. 视频播放图标覆盖层（与另一个CSS完全一致） */
.article-item figure[data-content-type="video"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

/* 视频播放图标 */
.article-item figure[data-content-type="video"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 132, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

/* 播放图标三角形 */
.article-item figure[data-content-type="video"]::after {
    background: rgba(0, 0, 0, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center center;
    background-size: 20px 20px;
}

/* 悬停时加深覆盖层 */
.article-item figure[data-content-type="video"]:hover::before {
    background: rgba(0, 0, 0, 0.5);
}

.article-item figure[data-content-type="video"]:hover::after {
    background-color: rgba(0, 132, 255, 1);
    /*transform: translate(-50%, -50%) scale(1.1);*/
}



/* 12. 响应式调整 */
@media (max-width: 768px) {
    .article-item figure[data-content-type="video"] {
        aspect-ratio: 4/3; /* 移动端使用更方的比例 */
    }
}

/* 13. 对于display: inline-block的图片容器（已存在） */
.article-item p img[style*="display: inline-block"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
























/* 标题样式 */
.article-item h1,
.article-item h2,
.article-item h3,
.article-item h4,
.article-item h5,
.article-item h6 {
    margin-top: 4px;
    margin-bottom: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: #fff;
    position: relative;
}

.article-item h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    border-bottom: none;
}
.article-item h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--halo-cw-primary-1-color, #0084ff);
    border-radius: 2px;
}
.article-item h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
    border-bottom: none;
}

.article-item h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 2px;
    background: var(--halo-cw-primary-1-color, #0084ff);
    border-radius: 2px;
}

.article-item h3 {
    font-size: 1.3rem;
}

.article-item h4 {
    font-size: 1.1rem;
}

/* 段落样式 */
.article-item p {
    margin-bottom: 0px;
    text-align: justify;
}
/* 基本文本对齐 */
.article-item .post-content p {
    text-align: justify;
}

/* 当段落后面不是另一个段落时，添加下边距 */
.article-item .post-content p:not(:has(+ p)) {
    margin-bottom: 10px;
}

/* 当段落后面是另一个段落时，没有下边距 */
.article-item .post-content p:has(+ p) {
    margin-bottom: 0;
}
/* 重要：为包含图片的段落添加溢出隐藏 */
.article-item p:has(img) {
    overflow: hidden;
    border-radius: 6px;
    margin: 20px auto;
    max-width: 100%;
}

/* 链接样式 */
.article-item a {
    color: #0084ff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-item a:hover {
    color: #3399ff;
    text-decoration: underline;
}

/* ===================== */
/* 编辑器特殊元素样式 */
/* ===================== */

/* 1. 分栏布局样式 */
.article-item .columns {
    display: flex;
    width: 100%;
    gap: 1em;
    /*margin: 10px auto;*/margin: 0px 0px 10px 0px;
    flex-wrap: wrap;
}

.article-item .column {
    min-width: 0;
    flex: 1 1;
    box-sizing: border-box;
    padding: 10px;
    background-color: #333333;
    border-radius: 8px;
}

/* 响应式：移动端分栏改为垂直排列 */
@media (max-width: 768px) {
    .article-item .columns {
        /*flex-direction: column;*/
        gap: 0.8em;
    }
    
    .article-item .column {
        width: 100%;
    }
}



/* 3. 待办事项列表 - 只读模式 */
.article-item ul[data-type="taskList"] {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 10px;
    background-color: #333333;
    border-radius: 6px;
}

.article-item li[data-type="taskItem"] {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    background-color: transparent;
    padding: 12px 16px;
    border-radius: 6px;
}

/* 禁用复选框交互 */
.article-item li[data-type="taskItem"] label {
    display: flex;
    align-items: center;
    margin-right: 12px;
    margin-top: 3px;
    cursor: default;
    pointer-events: none;
    position: relative;
    min-height: 20px;
}

/* 隐藏原生的input和span元素 */
.article-item li[data-type="taskItem"] label input[type="checkbox"],
.article-item li[data-type="taskItem"] label span {
    display: none !important;
}

/* 使用自定义复选框 */
.article-item li[data-type="taskItem"] label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 0px;
    background-color: #383838;
    border-radius: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* 勾选状态的复选框 */
.article-item li[data-type="taskItem"][data-checked="true"] label::before {
    background-color: #0084ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.article-item li[data-type="taskItem"] div {
    flex: 1;
}

.article-item li[data-type="taskItem"] p {
    margin: 0;
}

/* 完成的任务项样式 */
.article-item li[data-type="taskItem"][data-checked="true"] {
    opacity: 0.8;
    background-color: transparent;
}

.article-item li[data-type="taskItem"][data-checked="true"] p {
    text-decoration: line-through;
    color: #999;
}

/* 4. 折叠面板 */
.article-item .details {
    /*margin: 10px auto;*/margin: 0px 0px 10px 0px;
    background-color: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
}

.article-item .details summary {
    padding: 16px 20px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    user-select: none;
    list-style: none;
    position: relative;
    transition: background-color 0.2s ease;
    background-color: #333333;
    padding-right: 50px;
    display: block;
    line-height: 1.5;
}

.article-item .details summary:hover {
    background-color: #333333;
}

/* 箭头垂直对齐 */
.article-item .details summary::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s ease;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%23888'%3E%3Cpath d='M11.5 22L18 16 11.5 10 13.5 8l8 8-8 8-2-2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.article-item .details[open] summary::after {
    transform: translateY(-50%) rotate(90deg);
}

.article-item .details[open] summary {
    border-bottom: none;
}

.article-item .details div[data-type="detailsContent"] {
    padding: 20px;
    background-color: #282828;
}

/* 5. 列表样式增强 */
.article-item ul:not([data-type="taskList"]),
.article-item ol {
    margin-left: 24px;
    margin-bottom: 18px;
}

.article-item li {
    margin-bottom: 8px;
}

/* 引用块样式 */
.article-item blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 4px solid #0084ff;
    background-color: #2d2d2d;
    color: #ccc;
    border-radius: 4px;
    font-style: italic;
}

/* 代码样式 */
.article-item code {
    background-color: #2d2d2d;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
    color: #e0e0e0;
}

.article-item pre {
    background-color: #333333;
    color: #e0e0e0;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    /*margin: 10px auto;*/margin: 0px 0px 10px 0px;
}

.article-item pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    color: inherit;
}

/* 表格样式 */
.article-item table {
    width: 100% !important;
    border-collapse: collapse;
    /*margin: 10px auto;*/margin: 0px 0px 10px 0px;
    background-color: #2d2d2d;
    border-radius: 6px;
    overflow: hidden;
}

.article-item th,
.article-item td {
    padding: 12px 16px;
    border: 1px solid #333;
    text-align: left;
}

.article-item th {
    background-color: #383838;
    font-weight: 500;
    color: #fff;
}

.article-item tr:nth-child(even) {
    background-color: #282828;
}

/* 分隔线 */
.article-item hr {
    border: none;
    height: 1px;
    background-color: #333;
    margin: 30px 0;
}





























/* ===================== */
/* .article-item中的音频播放器样式 */
/* ===================== */

/* 移除原来的音频样式 */
.article-item figure[data-content-type="audio"] {
    margin: 0px;
    padding: 0;
    background: transparent;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* 隐藏原生音频控件 */
.article-item figure[data-content-type="audio"] audio {
    display: none;
}

/* 音频播放器容器 */
.article-item .audio-player {
    width: 100%;
    background: #313131;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0%);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.article-item .audio-player:hover {
    border-color: #444;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0%);
}

/* ===================== */
/* 音频头部 - 包含封面、信息和控制按钮 */
/* ===================== */

.article-item .audio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

/* 音频信息区域 */
.article-item .audio-info-area {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* 音频封面 */
.article-item .audio-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #383838;
    position: relative;
}

.article-item .audio-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-item .audio-cover-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 24px;
}

/* 音频基本信息 */
.article-item .audio-basic-info {
    flex: 1;
    min-width: 0;
}

.article-item .audio-name-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.article-item .audio-icon {
    color: #0084ff;
    font-size: 16px;
    flex-shrink: 0;
}

.article-item .audio-name {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.article-item .audio-artist {
    font-size: 13px;
    color: #aaa;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===================== */
/* 控制按钮区域 */
/* ===================== */

.article-item .top-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 重新播放按钮 */
.article-item .restart-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #383838;
    border: 1px solid #44444400;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 0;
}

.article-item .restart-btn:hover {
    background: #444;
    color: #fff;
    border-color: #55555500;
}

/* ===================== */
/* 进度条区域 */
/* ===================== */

.article-item .progress-area {
    margin-bottom: 16px;
}

.article-item .time-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #aaa;
    font-family: 'SFMono-Regular', monospace;
}

/* 进度条容器 */
.article-item .progress-container {
    position: relative;
    height: 6px;
    background: #383838;
    border-radius: 3px;
    overflow: visible;
    cursor: pointer;
    touch-action: none;
}

/* 进度条轨道 */
.article-item .progress-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #383838;
    border-radius: 3px;
    overflow: hidden;
}

/* 进度条填充 */
.article-item .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0084ff, #00a2ff);
    border-radius: 3px;
    pointer-events: none;
}

/* 进度条滑块 - 圆点样式 */
.article-item .progress-slider {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: transform 0.1s ease, opacity 0.2s ease;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
    pointer-events: none;
}

/* 显示滑块 */
.article-item .progress-container:hover .progress-slider,
.article-item .progress-container.dragging .progress-slider {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* 拖拽状态 */
.article-item .progress-slider.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 6px rgba(0, 132, 255, 0.3);
    opacity: 1;
}

/* ===================== */
/* 播放器底部 - 保持在同一行 */
/* ===================== */

.article-item .player-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #333;
    gap: 16px;
}

/* 左下角：音量控制 */
.article-item .volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.article-item .volume-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #383838;
    border: 1px solid #44444400;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.article-item .volume-btn:hover {
    background: #444;
    color: #fff;
    border-color: #55555500;
}

/* ===================== */
/* 音量条样式 - 优化宽度 */
/* ===================== */

.article-item .volume-slider-container {
    width: 200px; /* 固定宽度，不随容器伸缩 */
    height: 6px;
    background: #383838;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: visible;
    touch-action: none;
    flex-shrink: 0;
}

.article-item .volume-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #383838;
    border-radius: 3px;
}

.article-item .volume-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 70%;
    background: #00a2ff;
    border-radius: 3px;
    pointer-events: none;
}

/* 音量滑块 - 圆点样式 */
.article-item .volume-slider {
    position: absolute;
    top: 50%;
    left: 70%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: transform 0.1s ease, opacity 0.2s ease;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    pointer-events: none;
}

/* 显示音量滑块 */
.article-item .volume-slider-container:hover .volume-slider,
.article-item .volume-slider-container.dragging .volume-slider {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
}

/* 音量滑块拖拽状态 */
.article-item .volume-slider.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 0 4px rgba(0, 162, 255, 0.3);
    opacity: 1;
}

/* ===================== */
/* 中间区域：播放控制 */
/* ===================== */

.article-item .center-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

/* ===================== */
/* 右下角控制区域 */
/* ===================== */

.article-item .right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 播放速度按钮 */
.article-item .speed-btn {
    padding: 8px 12px;
    background: #383838;
    border: 1px solid #44444400;
    border-radius: 8px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    flex-shrink: 0;
}

.article-item .speed-btn:hover {
    background: #444;
    color: #fff;
}

.article-item .speed-btn.active {
    background: rgba(0, 132, 255, 0.2);
    color: #0084ff;
    border-color: rgb(0 132 255 / 0%);
}

/* 播放按钮 */
.article-item .play-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, #0084ff, #0066cc);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-item .play-btn:hover {
    background: linear-gradient(135deg, #3399ff, #0084ff);
    transform: scale(1.02);
}

.article-item .play-btn.playing {
    background: linear-gradient(135deg, #ff444477, #cc000077);
}

.article-item .play-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===================== */
/* 移动端适配 */
/* ===================== */

@media (max-width: 768px) {
    .article-item .audio-player {
        padding: 14px;
        border-radius: 8px;
    }
    
    /* 音频头部移动端适配 */
    .article-item .audio-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 14px;
    }
    
    .article-item .audio-info-area {
        gap: 12px;
    }
    
    .article-item .audio-cover {
        width: 50px;
        height: 50px;
        border-radius: 6px;
    }
    
    .article-item .audio-name {
        font-size: 14px;
    }
    
    .article-item .audio-artist {
        font-size: 12px;
    }
    
    /* 控制按钮移动端适配 */
    .article-item .top-controls {
        margin-top: 0;
    }
    
    /* 进度条区域移动端适配 */
    .article-item .time-display {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .article-item .progress-container {
        height: 5px;
    }
    
    .article-item .progress-slider {
        width: 14px;
        height: 14px;
    }
    
    /* 播放器底部移动端适配 - 保持在同一行 */
    .article-item .player-footer {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        padding-top: 14px;
    }
    
    /* 音量控制移动端适配 */
    .article-item .volume-control {
        flex-shrink: 0;
        gap: 8px;
    }
    
    .article-item .volume-slider-container {
        width: 180px; /* 移动端稍微短一些 */
        height: 5px;
    }
    
    /* 中间区域移动端适配 */
    .article-item .center-controls {
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }
    
    /* 速度控制和播放按钮移动端适配 */
    .article-item .right-controls {
        flex-shrink: 0;
        gap: 6px;
    }
    
    .article-item .speed-btn {
        padding: 6px 10px;
        height: 32px;
        min-width: 45px;
        font-size: 11px;
    }
    
    .article-item .play-btn {
        width: 32px;
        height: 32px;
    }
    
    .article-item .play-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* 控制按钮大小调整 */
    .article-item .restart-btn,
    .article-item .volume-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    /* 超小屏幕适配 */
    @media (max-width: 480px) {
        .article-item .audio-player {
            padding: 12px;
            border-radius: 6px;
        }
        
        .article-item .audio-header {
            gap: 10px;
        }
        
        .article-item .audio-info-area {
            gap: 10px;
        }
        
        .article-item .audio-cover {
            width: 44px;
            height: 44px;
        }
        
        .article-item .audio-name {
            font-size: 13px;
        }
        
        .article-item .audio-artist {
            font-size: 11px;
        }
        
        .article-item .player-footer {
            gap: 6px;
        }
        
        .article-item .volume-slider-container {
            width: 40px; /* 超小屏幕再短一些 */
        }
        
        .article-item .right-controls {
            gap: 4px;
        }
        
        .article-item .speed-btn {
            padding: 4px 8px;
            height: 30px;
            min-width: 40px;
            font-size: 10px;
        }
        
        .article-item .play-btn {
            width: 30px;
            height: 30px;
        }
        
        .article-item .volume-control {
            gap: 6px;
        }
    }
}





























/* ===================== */
/* 隐藏所有需要被替换的原生音频元素 - 通用规则 */
/* ===================== */

/* 情况1: figure[data-content-type="audio"]中的音频 */
figure[data-content-type="audio"] audio {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 情况2: .audio-wrapper中的音频 */
.audio-wrapper > audio {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 隐藏figcaption */
figure[data-content-type="audio"] figcaption {
    display: none !important;
    visibility: hidden !important;
}

/* ===================== */
/* 音频播放器容器 - 通用样式 */
/* ===================== */

/* 通用音频播放器样式 */
.audio-player {
    width: 100%;
    background: #333333;
    border-radius: 10px;
    padding: 16px;
    margin: 0px;
    box-sizing: border-box;
    position: relative;
}

/* ===================== */
/* 音频头部 - 包含封面、信息和控制按钮 */
/* ===================== */

.audio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

/* 音频信息区域 */
.audio-info-area {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* 音频封面 */
.audio-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #383838;
    position: relative;
}

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

.audio-cover-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 24px;
}

/* 音频基本信息 */
.audio-basic-info {
    flex: 1;
    min-width: 0;
}

.audio-name {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.audio-artist {
    font-size: 13px;
    color: #aaa;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===================== */
/* 控制按钮区域 */
/* ===================== */

.top-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 重新播放按钮 */
.restart-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #383838;
    border: 1px solid #44444400;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 0;
}

.restart-btn:hover {
    background: #444;
    color: #fff;
    border-color: #55555500;
}

/* ===================== */
/* 进度条区域 */
/* ===================== */

.progress-area {
    margin-bottom: 16px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #aaa;
    font-family: 'SFMono-Regular', monospace;
}

/* 进度条容器 */
.progress-container {
    position: relative;
    height: 6px;
    background: #383838;
    border-radius: 3px;
    overflow: visible;
    cursor: pointer;
    touch-action: none;
}

/* 进度条轨道 */
.progress-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #383838;
    border-radius: 3px;
    overflow: hidden;
}

/* 进度条填充 */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0084ff, #00a2ff);
    border-radius: 3px;
    pointer-events: none;
}

/* 进度条滑块 - 圆点样式 */
.progress-slider {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: transform 0.1s ease, opacity 0.2s ease;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
    pointer-events: none;
}

/* 显示滑块 */
.progress-container:hover .progress-slider,
.progress-container.dragging .progress-slider {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* 拖拽状态 */
.progress-slider.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 6px rgba(0, 132, 255, 0.3);
    opacity: 1;
}

/* ===================== */
/* 播放器底部 - 保持在同一行 */
/* ===================== */

.player-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #333;
    gap: 16px;
}

/* 左下角：音量控制 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.volume-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #383838;
    border: 1px solid #44444400;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.volume-btn:hover {
    background: #444;
    color: #fff;
    border-color: #55555500;
}

/* ===================== */
/* 音量条样式 - 优化宽度 */
/* ===================== */

.volume-slider-container {
    width: 200px;
    height: 6px;
    background: #383838;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: visible;
    touch-action: none;
    flex-shrink: 0;
}

.volume-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #383838;
    border-radius: 3px;
}

.volume-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 70%;
    background: #00a2ff;
    border-radius: 3px;
    pointer-events: none;
}

/* 音量滑块 - 圆点样式 */
.volume-slider {
    position: absolute;
    top: 50%;
    left: 70%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: transform 0.1s ease, opacity 0.2s ease;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    pointer-events: none;
}

/* 显示音量滑块 */
.volume-slider-container:hover .volume-slider,
.volume-slider-container.dragging .volume-slider {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
}

/* 音量滑块拖拽状态 */
.volume-slider.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 0 4px rgba(0, 162, 255, 0.3);
    opacity: 1;
}

/* ===================== */
/* 右下角控制区域 */
/* ===================== */

.right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 播放速度按钮 */
.speed-btn {
    padding: 8px 12px;
    background: #383838;
    border: 1px solid #44444400;
    border-radius: 8px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    flex-shrink: 0;
}

.speed-btn:hover {
    background: #444;
    color: #fff;
}

.speed-btn.active {
    background: rgba(0, 132, 255, 0.2);
    color: #0084ff;
    border-color: rgb(0 132 255 / 0%);
}

/* 播放按钮 */
.play-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, #0084ff, #0066cc);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.play-btn:hover {
    background: linear-gradient(135deg, #3399ff, #0084ff);
    transform: scale(1.02);
}

.play-btn.playing {
    background: linear-gradient(135deg, #ff444477, #cc000077);
}

.play-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===================== */
/* 移动端适配 */
/* ===================== */

@media (max-width: 768px) {
    .audio-player {
        padding: 14px;
        border-radius: 8px;
    }
    
    /* 音频头部移动端适配 */
    .audio-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 14px;
    }
    
    .audio-info-area {
        gap: 12px;
    }
    
    .audio-cover {
        width: 50px;
        height: 50px;
        border-radius: 6px;
    }
    
    .audio-name {
        font-size: 14px;
    }
    
    .audio-artist {
        font-size: 12px;
    }
    
    /* 控制按钮移动端适配 */
    .top-controls {
        margin-top: 0;
    }
    
    /* 进度条区域移动端适配 */
    .time-display {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .progress-container {
        height: 5px;
    }
    
    .progress-slider {
        width: 14px;
        height: 14px;
    }
    
    /* 播放器底部移动端适配 */
    .player-footer {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        padding-top: 14px;
    }
    
    /* 音量控制移动端适配 */
    .volume-control {
        flex-shrink: 0;
        gap: 8px;
    }
    
    .volume-slider-container {
        width: 200px;
        height: 5px;
    }
    
    /* 速度控制和播放按钮移动端适配 */
    .right-controls {
        flex-shrink: 0;
        gap: 6px;
    }
    
    .speed-btn {
        padding: 6px 10px;
        height: 32px;
        min-width: 45px;
        font-size: 11px;
    }
    
    .play-btn {
        width: 32px;
        height: 32px;
    }
    
    .play-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* 控制按钮大小调整 */
    .restart-btn,
    .volume-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    /* 超小屏幕适配 */
    @media (max-width: 480px) {
        .audio-player {
            padding: 12px;
            border-radius: 6px;
        }
        
        .audio-header {
            gap: 10px;
        }
        
        .audio-info-area {
            gap: 10px;
        }
        
        .audio-cover {
            width: 44px;
            height: 44px;
        }
        
        .audio-name {
            font-size: 13px;
        }
        
        .audio-artist {
            font-size: 11px;
        }
        
        .player-footer {
            gap: 6px;
        }
        
        .volume-slider-container {
            width: 120px;
        }
        
        .right-controls {
            gap: 4px;
        }
        
        .speed-btn {
            padding: 4px 8px;
            height: 30px;
            min-width: 40px;
            font-size: 10px;
        }
        
        .play-btn {
            width: 30px;
            height: 30px;
        }
        
        .volume-control {
            gap: 6px;
        }
    }
}