/*
 * 首页推荐专用样式 — 4 个数据区块：热门歌手、歌曲飙升榜、推荐歌单、流行趋势榜
 * 作用域限定在 .homepage-recommend 内，不污染全局
 */

/* ================================
   容器
   ================================ */
.homepage-recommend {
    max-width: 1200px;
    margin: 0 auto;
}

/* ================================
   加载 & 错误状态
   ================================ */
.homepage-loading,
.homepage-error {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

.homepage-loading .layui-icon {
    font-size: 32px;
    color: #5FB878;
    animation: homepage-spin 1s linear infinite;
    display: inline-block;
}

@keyframes homepage-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.homepage-error {
    color: #FF5722;
}

.homepage-error .layui-icon {
    font-size: 32px;
    color: #FF5722;
}

/* ================================
   区块卡片
   ================================ */
.homepage-section {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

/* ================================
   横向并排行榜容器
   ================================ */
.homepage-chart-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.homepage-chart-col {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .homepage-chart-row {
        flex-direction: column;
        gap: 0;
    }
    .homepage-chart-col {
        margin-bottom: 20px;
    }
}

.homepage-section-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.homepage-section-header .layui-icon {
    font-size: 20px;
    margin-right: 8px;
    color: #5FB878;
}

.homepage-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.homepage-section-body {
    padding: 12px 20px;
}

/* ================================
   热门歌手 — 标签列表
   ================================ */
.homepage-singers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

.homepage-singer-tag {
    display: inline-block;
    padding: 6px 18px;
    background-color: #f6f6f6;
    color: #555;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}

.homepage-singer-tag:hover {
    background-color: #5FB878;
    color: #fff;
    border-color: #5FB878;
    text-decoration: none;
}

/* ================================
   歌曲榜单 — 排名列表
   ================================ */
.homepage-song-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.homepage-song-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s ease;
}

.homepage-song-item:last-child {
    border-bottom: none;
}

.homepage-song-item:hover {
    background-color: #fafafa;
}

.homepage-song-rank {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    margin-right: 12px;
    flex-shrink: 0;
}

.homepage-song-rank.rank-1 { background-color: #FF5722; }
.homepage-song-rank.rank-2 { background-color: #FF8A65; }
.homepage-song-rank.rank-3 { background-color: #FFB74D; }
.homepage-song-rank.rank-other { background-color: #ccc; color: #666; }

.homepage-song-info {
    flex: 1;
    min-width: 0;
}

.homepage-song-name {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.homepage-song-artist {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.homepage-song-link {
    color: inherit;
    text-decoration: none;
}

.homepage-song-link:hover {
    color: #5FB878;
}

/* ================================
   推荐歌单 — 卡片网格
   ================================ */
.homepage-playlists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 4px 0;
}

.homepage-playlist-card {
    display: block;
    padding: 14px 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eee;
    text-decoration: none;
    transition: all 0.2s ease;
}

.homepage-playlist-card:hover {
    background-color: #e8f5e9;
    border-color: #5FB878;
    text-decoration: none;
}

.homepage-playlist-card .layui-icon {
    font-size: 16px;
    color: #5FB878;
    margin-right: 6px;
}

.homepage-playlist-title {
    font-size: 14px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.5;
}

/* ================================
   分页容器（榜单下方的分页条）
   ================================ */
.homepage-chart-page {
    padding-top: 10px;
    text-align: center;
}

.homepage-chart-page .layui-laypage {
    margin: 0;
}

/* 覆盖 laypage 默认分页按钮样式，匹配绿色主题 */
.homepage-chart-page .layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #5FB878 !important;
}

.homepage-chart-page .layui-laypage a:hover {
    color: #5FB878 !important;
}

/* ================================
   搜索结果页样式
   ================================ */
.search-loading,
.search-error,
.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

.search-loading .layui-icon {
    font-size: 32px;
    color: #5FB878;
    animation: homepage-spin 1s linear infinite;
    display: inline-block;
}

.search-error {
    color: #FF5722;
}
.search-error .layui-icon {
    font-size: 32px;
    color: #FF5722;
}

.search-empty {
    color: #bbb;
}

.search-summary {
    margin-bottom: 20px;
}

.search-summary h2 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #333;
}

.search-summary p {
    margin: 0;
    font-size: 14px;
    color: #999;
}

.search-summary strong {
    color: #5FB878;
}

.search-result-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.search-result-item {
    display: block;
    padding: 14px 18px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: #5FB878;
    box-shadow: 0 2px 8px rgba(95, 184, 120, 0.15);
    text-decoration: none;
}

.search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-artist {
    font-size: 13px;
    color: #999;
}

/* 搜索结果分页 */
.search-pagination {
    text-align: center;
    padding: 24px 0 8px;
}

.search-pagination .layui-laypage {
    margin: 0;
}

.search-pagination .layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #5FB878 !important;
}

.search-pagination .layui-laypage a:hover {
    color: #5FB878 !important;
}

/* ================================
   空数据提示
   ================================ */
.homepage-empty {
    text-align: center;
    padding: 30px 0;
    color: #bbb;
    font-size: 14px;
}

/* ================================
   响应式
   ================================ */
@media screen and (max-width: 768px) {
    .homepage-section-body {
        padding: 8px 14px;
    }

    .homepage-playlists {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .homepage-singer-tag {
        padding: 4px 14px;
        font-size: 13px;
    }
}

/* ================================
   歌手详情 & 歌曲详情 — 通用
   ================================ */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

.detail-loading {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 15px;
}

.detail-loading .layui-icon {
    font-size: 36px;
    color: #5FB878;
    animation: homepage-spin 1s linear infinite;
    display: inline-block;
}

.detail-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

.detail-error {
    color: #FF5722;
}

.detail-error .layui-icon {
    font-size: 32px;
    color: #FF5722;
}

.detail-section {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.detail-section-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.detail-section-body {
    padding: 12px 20px;
}

.detail-link {
    color: #5FB878;
    text-decoration: none;
}

.detail-link:hover {
    text-decoration: underline;
}

/* ================================
   歌手详情
   ================================ */
.detail-header {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
}

.detail-avatar {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-avatar .layui-icon {
    font-size: 48px;
    color: #ccc;
}

.detail-header-info {
    flex: 1;
    min-width: 0;
}

.detail-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #222;
}

.detail-bio {
    font-size: 13px;
    line-height: 1.8;
    color: #666;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
}

.detail-count {
    margin: 10px 0 0;
    font-size: 13px;
    color: #999;
}

.detail-count strong {
    color: #5FB878;
}

.detail-song-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.detail-song-item {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: background-color 0.15s;
}

.detail-song-item:last-child {
    border-bottom: none;
}

.detail-song-item:hover {
    background-color: #fafafa;
    text-decoration: none;
}

.detail-song-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-song-item:hover .detail-song-name {
    color: #5FB878;
}

.detail-song-artist {
    margin-left: 12px;
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.detail-pagination {
    padding: 16px 20px;
    text-align: center;
}

.detail-pagination .layui-laypage {
    margin: 0;
}

.detail-pagination .layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #5FB878 !important;
}

.detail-pagination .layui-laypage a:hover {
    color: #5FB878 !important;
}

/* ================================
   歌曲详情
   ================================ */
.detail-song-layout {
    display: flex;
    gap: 28px;
    padding: 24px;
}

.detail-song-left {
    width: 320px;
    flex-shrink: 0;
    text-align: center;
}

.detail-cover-wrap {
    width: 280px;
    height: 280px;
    margin: 0 auto 16px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.detail-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-cover-placeholder .layui-icon {
    font-size: 64px;
    color: #ccc;
}

.detail-song-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.detail-song-meta {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.detail-song-meta-item {
    display: block;
}

.detail-audio-wrap {
    margin-top: 16px;
}

.detail-audio {
    width: 100%;
    height: 40px;
    border-radius: 4px;
}

.detail-audio-placeholder {
    margin-top: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 13px;
    color: #999;
}

.detail-audio-placeholder p {
    margin: 0;
}

.detail-song-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.detail-song-right .detail-section-header {
    padding: 0 0 12px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-lrc {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
    padding: 12px 0;
}

.detail-lrc-line {
    padding: 4px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    transition: color 0.2s;
}

.detail-lrc-line:hover {
    color: #5FB878;
}

/* 每日推荐 */
.detail-rec-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    padding: 4px 0;
}

.detail-rec-item {
    display: block;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}

.detail-rec-item:hover {
    background: #e8f5e9;
    border-color: #5FB878;
    color: #5FB878;
    text-decoration: none;
}

/* 歌曲详情响应式 */
@media screen and (max-width: 768px) {
    .detail-song-layout {
        flex-direction: column;
        padding: 16px;
    }
    .detail-song-left {
        width: 100%;
    }
    .detail-cover-wrap {
        width: 200px;
        height: 200px;
    }
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-avatar {
        width: 100px;
        height: 100px;
    }
    .detail-lrc {
        max-height: 300px;
    }
}

/* ================================
   线路2 首页推荐样式
   ================================ */

/* 大家都在搜 - 彩色标签 */
.hs-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

.hs-keyword-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.hs-keyword-tag:nth-child(2n) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hs-keyword-tag:nth-child(3n) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.hs-keyword-tag:nth-child(4n) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #333;
}

.hs-keyword-tag:nth-child(5n) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

.hs-keyword-tag:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
    text-decoration: none;
}

/* 本周搜索榜 */
.hs-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hs-rank-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: background-color 0.15s;
}

.hs-rank-item:last-child {
    border-bottom: none;
}

.hs-rank-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.hs-rank-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    background: #f0f0f0;
    margin-right: 12px;
    flex-shrink: 0;
}

.hs-rank-top .hs-rank-num {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.hs-rank-top:nth-child(2) .hs-rank-num {
    background: linear-gradient(135deg, #fca475, #e17055);
}

.hs-rank-top:nth-child(3) .hs-rank-num {
    background: linear-gradient(135deg, #fdcb6e, #f39c12);
}

.hs-rank-keyword {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-rank-item:hover .hs-rank-keyword {
    color: #5FB878;
}

/* 网友最近动态 */
.hs-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hs-activity-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: background-color 0.15s;
}

.hs-activity-item:last-child {
    border-bottom: none;
}

.hs-activity-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.hs-activity-icon {
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

.hs-activity-type {
    font-size: 12px;
    color: #999;
    margin-right: 8px;
    flex-shrink: 0;
}

.hs-activity-text {
    flex: 1;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-activity-item:hover .hs-activity-text {
    color: #5FB878;
}

/* 搜索页 - 大家都在搜 */
.search-hot-keywords {
    margin-top: 24px;
    padding: 16px 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.search-hot-keywords h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #666;
}

/* ================================
   歌词滚动高亮
   ================================ */
.detail-lrc-line {
    transition: color 0.2s, font-weight 0.2s;
}

.detail-lrc-line.detail-lrc-active {
    color: #5FB878;
    font-weight: 700;
    font-size: 16px;
}
