/* ds-music css */

/* ds-music 分类模板 */
.ds-music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 15px;
    margin: 40px 0;
}

.ds-music-post {
    background: #F7F7F7;
    padding: 15px;
    height: 340px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease-in-out; /* 添加整体过渡效果 */
}

.ds-music-post:hover {
    background: #333333;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.ds-music-cover {
    height: 300px;
    overflow: hidden;
    transition: transform 0.5s ease-in-out; /* 添加平滑过渡效果，时间设为0.5秒 */
}

.ds-music-post:hover .ds-music-cover {
    transform: scale(1.05);
}

.ds-music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-in-out; /* 图片添加更平滑的过渡，时间设为0.7秒 */
}

.ds-music-post:hover .ds-music-cover img {
    transform: scale(1.1);
}

.ds-music-title {
    padding: 15px 0;
    font-size: 1.1em;
    text-align: left; /* 从 center 改为 left，正常左对齐 */
    transition: color 0.3s ease-in-out; /* 标题颜色过渡 */
}

.ds-music-post:hover .ds-music-title {
    color: #FFFFFF;
}

.ds-music-post:hover .ds-music-title a {
    color: #FFFFFF;
    transition: color 0.3s ease-in-out; /* 链接颜色过渡 */
}

.ds-music-post:hover .ds-music-title a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ds-music-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .ds-music-post,
    .ds-music-cover {
        height: auto;
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .ds-music-grid {
        grid-template-columns: 1fr;
    }
}

/* ds-music 内容页模板 */
.post-music-info {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    background: #F7F7F7;
}

.music-cover {
    flex: 0 0 300px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

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

.music-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.music-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    
}

/* 桌面端和移动端统一使用flex布局 */
.music-detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    line-height: 1.5;
}

.music-detail-item:last-child {
    margin-bottom: 0;
}

.music-detail-label {
    flex: 0 0 70px;
    display: inline-block;
    color: #666;
    font-weight: normal;
    text-align: right;
    padding-right: 10px;
    box-sizing: border-box;
    line-height: 1.5;
    white-space: nowrap;
}

.music-detail-value {
    flex: 1;
    min-width: 0;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: left;
    line-height: 1.5;
}

.music-detail-item.tracklist {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.music-detail-item.tracklist .music-detail-value {
    margin-top: 5px;
    line-height: 1.8;
    color: #444;
}

/* 移动端优化 - 保持flex布局，但调整宽度和字体 */
@media screen and (max-width: 1000px) {
    .post-music-info {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .music-cover {
        flex: none;
        width: 100%;
        max-width: 300px;
        height: 260px;
        margin: 0 auto;
    }
    
    .music-details {
        text-align: left;
        width: 100%;
    }
    
    /* 移动端保持flex布局，标签和值在同一行 */
    .music-detail-item {
        display: flex;
        flex-wrap: nowrap; /* 禁止换行 */
        align-items: flex-start;
        margin-bottom: 10px;
    }
    
    .music-detail-label {
        flex: 0 0 auto; /* 自动宽度 */
        width: auto;
        text-align: left;
        padding-right: 8px;
        margin-bottom: 0;
        font-weight: 500;
        color: #555;
        font-size: 14px;
    }
    
    .music-detail-value {
        flex: 1;
        min-width: 0;
        text-align: left;
        color: #333;
        font-size: 14px;
        line-height: 1.6;
    }
}

/* 针对更小的移动端屏幕优化 */
@media screen and (max-width: 768px) {
    .music-detail-item {
        margin-bottom: 12px;
        align-items: center; /* 垂直居中 */
    }
    
    .music-detail-label {
        flex-shrink: 0; /* 防止标签被压缩 */
        padding-right: 10px;
        font-weight: 600;
    }
    
    .music-detail-value {
        overflow: hidden; /* 隐藏溢出 */
        text-overflow: ellipsis; /* 显示省略号 */
        white-space: nowrap; /* 不换行 */
    }
    
    /* 对于特别长的值，允许换行但保持紧凑 */
    .music-detail-item:nth-child(4) .music-detail-value,
    .music-detail-item:nth-child(5) .music-detail-value,
    .music-detail-item:nth-child(6) .music-detail-value {
        white-space: normal; /* 允许换行 */
        word-break: break-word; /* 允许单词内换行 */
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 480px) {
    .post-music-info {
        padding: 12px;
        margin: 20px 0;
    }

    .music-cover {
        height: 200px;
    }
    
    .music-detail-item {
        margin-bottom: 14px;
    }
    
    .music-detail-label {
        font-size: 13px;
        padding-right: 8px;
    }
    
    .music-detail-value {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* 在小屏幕上，特别长的内容可以折行显示 */
    .music-detail-item:nth-child(4),
    .music-detail-item:nth-child(5),
    .music-detail-item:nth-child(6) {
        flex-wrap: wrap; /* 允许换行 */
    }
    
    .music-detail-item:nth-child(4) .music-detail-value,
    .music-detail-item:nth-child(5) .music-detail-value,
    .music-detail-item:nth-child(6) .music-detail-value {
        white-space: normal;
        line-height: 1.6;
    }
}

/* AList 音频播放器样式 */
.alist-play-section-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.alist-play-section-wrapper h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.alist-play-section {
    margin: 30px 0;
    padding: 20px;
    background: #F7F7F7;
    border-radius: 8px;
}

.alist-play-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

/* 文章内容包裹器样式 */
.post-content-wrapper {
    position: relative;
    transition: max-height 0.3s ease;
    overflow: hidden;
    margin-bottom: 15px;
}

/* 阅读全部按钮样式 - 精简版 */
.read-more-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f7f7f7;
    border: none;
    border-radius: 0;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    text-align: center;
}

.alist-audio-player {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alist-track-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.alist-track-item:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alist-track-item.alist-track-active {
    border-color: #4CAF50;
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.2);
}

.alist-track-info {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
}

.alist-track-info:hover {
    background: #f5f5f5;
}

.alist-track-item.alist-track-active .alist-track-info {
    background: #e8f5e9;
}

.alist-track-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.alist-track-item.alist-track-active .alist-track-name {
    color: #2E7D32;
    font-weight: 500;
}

.alist-track-status {
    font-size: 16px;
    color: #666;
    margin-left: 12px;
}

.alist-track-item.alist-track-active .alist-track-status {
    color: #4CAF50;
    transform: rotate(90deg);
}

.alist-track-audio {
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.alist-track-audio audio {
    width: 100%;
    display: block;
}

@media screen and (max-width: 768px) {
    .alist-play-section {
        padding: 15px;
        margin: 20px 0;
    }

    .alist-play-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .alist-track-info {
        padding: 10px 12px;
    }

    .alist-track-name {
        font-size: 13px;
    }
}