 /* 导航栏Logo适配 */
.navbar-brand {
    padding: 5px 0;
    margin-right: 1rem;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-nav .btn {
        margin-right: 0.5rem;
        padding: 0.375rem 0.75rem;
    }
}
.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制行数 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 可选 - 根据字体大小设置准确高度 */
    line-height: 1.5em;      /* 假设行高 */
    max-height: 3em;         /* 行高 × 行数 */
  }
  .truncate-5-lines {
    display: -webkit-box;
    -webkit-line-clamp: 5; /* 限制行数 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 可选 - 根据字体大小设置准确高度 */
    line-height: 1.5em;      /* 假设行高 */
    max-height: 7.5em;
    
  }
  
 /* 自定义样式 */
 .template-card {
     transition: transform 0.2s;
     cursor: pointer;
     border-radius: 12px;
     overflow: hidden;
     box-shadow: 0 2px 8px rgba(54, 52, 52, 0.2);
 }

 .template-card:hover {

     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
 }

 .stats-badge {
     background: rgba(0, 0, 0, 0.7);
     color: white;
     padding: 4px 8px;
     border-radius: 20px;
     font-size: 0.85em;
 }

 .search-header {
     background: linear-gradient(135deg, #6B8DD6 0%, #8E37D7 100%);
     padding: 1rem 2rem;
 }

 .progress-bar {
     transition: width 0.3s ease-in-out;
 }

 #imagePreview {
     position: absolute;
     top: 0px;
     right: 10px;
     width: 60px;
     height: 60px;
 }

 #imagePreview img {
     border-radius: 8px;
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
 }

 .template-card {
     position: relative;
     transition: transform 0.2s;
     cursor: pointer;
     border-radius: 12px;
     overflow: hidden;
 }

 .card-img-container {
     height: 150px;
     /* 固定容器高度 */
     display: flex;
     justify-content: center;
     align-items: center;
     overflow: hidden;
     /* 隐藏超出部分 */
     position: relative;
     border-radius: 12px 12px 0 0;
 }

 .card-img-top {
     width: 100%;
     height: 100%;
     object-fit: cover;
     /* 保持比例填充容器 */
     object-position: center;
     /* 始终显示图片中间部分 */
     transition: transform 0.3s ease;
 }

 .template-card:hover .card-img-top {
     transform: scale(1.05);
     /* 悬停时轻微放大 */
 }

 /* 新增悬浮信息容器 */
 .card-meta-overlay {
     position: absolute;
     bottom: 0;
     left: 0;
     right: 0;
     padding: 12px;
     background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
     color: white;
     opacity: 0.6;
     transition: opacity 0.3s ease;
     transform: translateY(0);
 }

 .template-card:hover .card-meta-overlay {
     opacity: 1;
     transform: translateY(0);
 }

 .template-card.selected{
     box-shadow: 0 0 10px rgba(28, 214, 3, 0.9);
     transform: scale(1.05);
     z-index: 10;
 }

 /* 调整原有card-body样式 */
 .card-body {
     padding: 0.3rem;
     background: #f8f9fa;
     border-radius: 0 0 12px 12px;
 }

 .card-title {
     margin-bottom: 0.5rem;
     font-size: 1rem;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
     text-align: center;
 }

 /* 新增播放按钮样式 */
 .play-button {
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     width: 48px;
     height: 48px;
     background: rgba(0, 0, 0, 0.7);
     border-radius: 50%;
     opacity: 0;
     transition: opacity 0.3s ease;
     display: flex;
     align-items: center;
     justify-content: center;
     color: white;
     border: 2px solid white;
 }

 .template-card:hover .play-button {
     opacity: 1;
 }

 .playing .play-button {
     background: #28a745;
     opacity: 1;
 }

 /* 新增图片选择器样式 */
 .image-selector {
     border: 1px solid #dee2e6;
     border-radius: 8px;
     padding: 1rem;
 }

 .thumbnail-item {
     cursor: pointer;
     transition: all 0.2s;
     position: relative;
     overflow: hidden;
     border-radius: 6px;
 }

 .thumbnail-item img {
     width: 100%;
     height: 50px;
     object-fit: cover;
     border: 2px solid transparent;
 }

 .thumbnail-item.selected img {
     border-color: #0d6efd;
     box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
 }

 .thumbnail-item::after {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     border: 2px solid transparent;
     transition: all 0.2s;
 }

 .thumbnail-item:hover::after {
     border-color: rgba(13, 110, 253, 0.5);
 }

 /* 修改图片选择器容器样式 */
 #defaultImages {
     max-height: 120px;
     /* 两行高度（80px*2 + 间距） */
     overflow-y: auto;
     /* 启用垂直滚动 */
     display: flex;
     flex-wrap: wrap;
     gap: 8px;
     /* 图片间距 */
     padding: 4px;
 }
 #defaultAudios {
    max-height: 500px;
    /* 两行高度（80px*2 + 间距） */
    overflow-y: auto;
    /* 启用垂直滚动 */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* 图片间距 */
    padding: 9px;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}
/* 自定义滚动条样式 */
#defaultAudios::-webkit-scrollbar {
    width: 6px;
}

#defaultAudios::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#defaultAudios::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#defaultAudios::-webkit-scrollbar-thumb:hover {
    background: #555;
}

 /* 调整缩略图容器尺寸 */


 .thumbnail-item img {
     transition: transform 0.2s;
 }

 .thumbnail-item:hover img {
     transform: scale(1.05);
 }

 /* 自定义滚动条样式 */
 #defaultImages::-webkit-scrollbar {
     width: 6px;
 }

 #defaultImages::-webkit-scrollbar-track {
     background: #f1f1f1;
     border-radius: 4px;
 }

 #defaultImages::-webkit-scrollbar-thumb {
     background: #888;
     border-radius: 4px;
 }

 #defaultImages::-webkit-scrollbar-thumb:hover {
     background: #555;
 }

 #addTemplateModal .modal-dialog {
     width: 95%;
     max-width: 100%;
     margin: 0.3rem auto;
 }

 #addTemplateModal .modal-content {
     width: 100%;
     max-width: 100%;
 }

 /* 加入其他分辨率自适应样式 */
 @media screen and (min-width: 1100px) {
     #addTemplateModal .modal-dialog {
         width: 1000px;
     }

     #addTemplateModal .modal-content {
         width: 1000px;
     }
 }

 /* 增强版播放器样式 */
.custom-audio-player {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: box-shadow 0.3s;
}

.play-btn {
    width: 45px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-btn {
    width: 45px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-audio-player:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.custom-audio-player:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 0.9em;
    line-height: 1.4;
    border-top: 1px dashed #eee;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    color: #666;
}

.current-time {
    color: #007bff;
    font-weight: 500;
}

.duration {
    color: #6c757d;
}