/* ==================== 千千音乐大师修复版样式表 ==================== */
:root {
    --primary-color: #ff2d55;
    --bg-deep: #121215;
    --bg-card: #1c1c21;
    --text-main: #ffffff;
    --text-dim: #999999;
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: sans-serif;
    padding-top: 80px;
    padding-bottom: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(18, 18, 21, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 2000;
}

.header .container {
    display: flex !important;
    align-items: center;
    height: 100%;
    justify-content: space-between;
}

.nav {
    display: flex !important;
    gap: 25px;
    margin-left: 30px;
    flex: 1;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
    font-weight: 600;
}

.nav-link.active {
    opacity: 1;
    color: var(--primary-color);
}

/* 巨幕 Banner */
.hero-banner {
    width: 100%;
    height: 350px;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    margin-bottom: 40px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #121215, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* 核心网格修复 */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.song-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    /* 强制5列 */
    gap: 20px;
}

.artist-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    /* 强制6列 */
    gap: 20px;
}

/* 卡片样式 */
.song-card {
    width: 100%;
    cursor: pointer;
}

.song-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.song-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 12px;
    color: var(--text-dim);
}

/* 歌手样式 */
.artist-card {
    text-align: center;
}

.artist-avatar-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
}

.artist-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 底部播放器 (修复水平布局) */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: #18181b;
    border-top: 1px solid var(--border-color);
    z-index: 2000;
}

.player-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.player-info {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 250px;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
}

.player-controls {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-buttons {
    display: flex !important;
    align-items: center;
    gap: 25px;
}

.progress-bar {
    width: 100%;
    max-width: 600px;
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    border-radius: 2px;
}

.player-extra {
    width: 250px;
    display: flex !important;
    justify-content: flex-end;
    gap: 15px;
}

/* ==================== 新版播放器样式 (Image 2 风格) ==================== */
#fullPlayer {
    background: #121215;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

#lyricScroll {
    user-select: none;
}

.lyric-line {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.25);
    margin: 28px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    cursor: pointer;
    transform-origin: left center;
}

.lyric-line:hover {
    color: rgba(255, 255, 255, 0.6);
}

.lyric-line.active {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* 进度条增强 */
#progressBarContainer:hover #progressFill::after {
    display: block;
}

#progressFill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
}

/* 轨道样式适配 */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* 隐藏播放列表详情滚动条 */
#playlistDetail::-webkit-scrollbar {
    width: 6px;
}

#playlistDetail::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ==================== 首页新增四大版块样式 ==================== */
.home-section-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.more-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
}

/* 精选歌单网格 */
.featured-playlists-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.featured-main-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.featured-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-main-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.featured-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
}

.featured-sub-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.featured-sub-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 热门榜单 */
.chart-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chart-item {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    align-items: center;
}

.chart-box {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    text-align: center;
    flex-shrink: 0;
}

.chart-songs {
    flex: 1;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-song-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-song-row span {
    color: var(--text-dim);
    margin-right: 5px;
}

/* 新歌首发网格 */
.new-songs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.new-song-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.new-song-cover {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    margin-right: 15px;
    object-fit: cover;
}

.new-song-info {
    flex: 1;
}

.new-song-title {
    font-weight: 600;
    font-size: 14px;
}

.new-song-artist {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.new-song-actions {
    display: flex;
    gap: 15px;
    color: var(--text-dim);
}

.new-song-actions i {
    cursor: pointer;
    transition: 0.3s;
}

.new-song-actions i:hover {
    color: var(--primary-color);
}

/* 推荐MV */
.mv-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mv-main-card {
    border-radius: 8px;
    overflow: hidden;
}

.mv-main-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.mv-info {
    margin-top: 10px;
}

.mv-title {
    font-size: 14px;
    font-weight: 600;
}

.mv-artist {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.mv-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 1024px) {
    .home-section-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .song-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .nav,
    .player-extra {
        display: none !important;
    }

    .player-container {
        justify-content: center;
    }

    .inner-container {
        flex-direction: column !important;
        gap: 40px !important;
        padding-top: 60px !important;
    }

    #fullPlayer .inner-container>div:first-child {
        width: 200px !important;
    }

    #fullPlayer .inner-container>div:first-child>div {
        width: 200px !important;
        height: 200px !important;
    }
}