/* ============================================================
   MusicHub - mh-home.css
   P1 方形封面网格卡 + P2 首页五段式 + 每日精选轮播（dsding 规格）
   依赖 theme.css 的设计令牌（--mh-gold-, --mh-night-, --mh-site-width 这类变量）
   加载顺序在 theme.css 之后，因此本文件内的同权重规则生效
   ============================================================ */

/* ------------------------------------------------------------
   P1 · 方形封面网格卡（对齐 dsding AlbumCard）
   ------------------------------------------------------------ */
.mh-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}
.mh-sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--mh-text);
}
.mh-sec-bar { display: inline-block; width: 4px; height: 20px; flex: none; }
.mh-sec-bar-gold { background: var(--mh-gold-500, #f0c040); }
.mh-sec-bar-brand { background: #6d5df0; }
.mh-sec-more { font-size: 14px; color: var(--mh-text-secondary); }
.mh-sec-more:hover { color: var(--mh-gold-600, #d4a017); }
[data-theme='dark'] .mh-sec-more:hover { color: var(--mh-gold-400, #f2c94c); }

.mh-album-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}
.mh-album-card { display: block; text-decoration: none; }
.mh-album-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--mh-border-light, #f3f4f6);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
[data-theme='dark'] .mh-album-cover { background: var(--mh-night-800, #1e293b); }
.mh-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.mh-album-card:hover .mh-album-cover img { transform: scale(1.05); }
.mh-album-format {
    position: absolute;
    left: 8px;
    top: 8px;
    background: rgba(0, 0, 0, 0.60);
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--mh-gold-400, #f2c94c);
}
.mh-album-caption { margin-top: 8px; padding: 0 2px; }
.mh-album-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--mh-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mh-album-card:hover .mh-album-title { color: var(--mh-gold-600, #d4a017); }
[data-theme='dark'] .mh-album-card:hover .mh-album-title { color: var(--mh-gold-400, #f2c94c); }
.mh-album-artist {
    margin: 0 0 2px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--mh-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mh-album-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--mh-text-muted);
    /* 对齐 dsding AlbumCard 第三行：flex + gap 6px，规格文本自己省略号截断，HR 角标 shrink-0 不被裁。
       原来用 -webkit-line-clamp:1 把整行（含角标）一起裁，规格补全后长取值会把角标挤没，故改结构。 */
    display: flex;
    align-items: center;
    gap: 6px;
}
.mh-album-meta-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mh-album-hr {
    flex: none;
    display: inline-block;
    background: var(--mh-gold-500, #f0c040);
    padding: 1px 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

@media (max-width: 1023px) { .mh-album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .mh-album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .mh-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------
   P2 · 首页五段式：主体单列（无侧栏）+ 段间 40px
   ------------------------------------------------------------ */
body.mh-front-page .main-container {
    display: block;
    width: 100%;
    max-width: var(--mh-site-width, 1150px);
    margin: 0 auto;
}
body.mh-front-page .content-area { width: 100%; max-width: none; }
.mh-home-stack > .mh-sec + .mh-sec { margin-top: 40px; }

/* 精选厂牌：带边框白底区块，桌面 6 个一行 */
.mh-sec-boxed {
    border: 1px solid var(--mh-border);
    background: var(--mh-surface);
    padding: 20px;
}
.mh-labelcard-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}
.mh-labelcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    padding: 12px;
    border: 1px solid transparent;
    text-align: center;
    text-decoration: none;
}
.mh-labelcard:hover { border-color: rgba(240, 192, 64, 0.40); background: var(--mh-surface-hover); }
.mh-labelcard-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    width: 100%;
    flex: none;
    overflow: hidden;
}
.mh-labelcard-logo img {
    height: 64px;
    width: auto;
    max-width: 140px;
    min-width: 0;
    object-fit: contain;
    display: block;
    border: none;
    border-radius: 0;
    background: transparent;
}
.mh-labelcard-ph { font-size: 24px; color: var(--mh-text-muted); }
.mh-labelcard-text { min-width: 0; display: block; }
.mh-labelcard-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--mh-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mh-labelcard:hover .mh-labelcard-name { color: var(--mh-gold-600, #d4a017); }
[data-theme='dark'] .mh-labelcard:hover .mh-labelcard-name { color: var(--mh-gold-400, #f2c94c); }
.mh-labelcard-intro {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--mh-text-secondary);
    white-space: normal;
    max-width: none;
}
@media (max-width: 1023px) { .mh-labelcard-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .mh-labelcard-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 独家 Hi-Res 专辑库通栏：满铺整行，底边与页脚上边框相接
   （页脚 margin-top 为 48px，这里用 -48px 抵消，实测与 dsding 一致＝零间隙） */
.mh-hires-band {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 40px;
    margin-bottom: -48px;
    border-top: 1px solid var(--mh-border);
    background: var(--mh-surface);
}
.mh-hires-inner {
    max-width: var(--mh-site-width, 1150px);
    margin: 0 auto;
    padding: 16px var(--mh-site-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.mh-hires-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mh-hires-icon { width: 40px; height: 40px; flex: none; display: block; }
.mh-hires-copy { min-width: 0; }
.mh-hires-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--mh-text); }
.mh-hires-desc { margin: 2px 0 0; font-size: 14px; color: var(--mh-text-secondary); }
.mh-hires-btn {
    flex: none;
    border: 1px solid var(--mh-border);
    padding: 10px 24px;
    font-size: 14px;
    color: var(--mh-text-secondary);
    text-decoration: none;
}
.mh-hires-btn:hover { border-color: var(--mh-gold-500, #f0c040); color: var(--mh-gold-600, #d4a017); }
[data-theme='dark'] .mh-hires-btn:hover { color: var(--mh-gold-400, #f2c94c); }

/* ------------------------------------------------------------
   P2 · 每日精选轮播：改为 dsding 首页轮播规格（通栏、桌面定高 530px）
   沿用主题既有类名与 theme.js 分页逻辑，仅重画外观
   ------------------------------------------------------------ */
.daily-featured {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 530px;
    min-height: 530px;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 24px;
    isolation: isolate;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.daily-featured-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(10, 10, 18, 0.35);
}
.daily-featured-inner {
    position: relative;
    z-index: 2;
    max-width: 1118px;
    margin: 0 auto;
    height: 100%;
    padding: 74px 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.daily-featured-header {
    position: absolute;
    top: 30px;
    left: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 6;
}
.daily-featured-title {
    position: static;
    padding: 0;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.daily-featured-title::before {
    content: "";
    position: static;
    display: inline-block;
    width: 5px;
    height: 24px;
    border-radius: 3px;
    background: var(--mh-gold-500, #f0c040);
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.5);
    transform: none;
}
.daily-featured-track { position: relative; width: 100%; }
.daily-featured-grid {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
}
.daily-featured-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 12px 10px 10px;
    border-radius: 0;
    background: rgba(15, 15, 25, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.daily-featured-card:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 168, 76, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: #fff;
}
.daily-featured-card-glass { padding: 0; background: transparent; }
.daily-featured-meta { margin: 0; }
.daily-featured-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--mh-gold-400, #f2c94c);
    letter-spacing: 0.5px;
}
.daily-featured-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.daily-featured-excerpt {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.daily-featured-cover {
    position: relative;
    width: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin: 0 -10px -10px;
}
.daily-featured-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.daily-featured-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 2px));
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.30);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.daily-featured-arrow:hover {
    background: rgba(201, 168, 76, 0.7);
    border-color: rgba(201, 168, 76, 0.7);
}
.daily-featured-prev { left: calc(50% - 615px); right: auto; }
.daily-featured-next { right: calc(50% - 615px); left: auto; }
.daily-featured-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 6;
}
.daily-featured-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    transition: background 0.25s ease, width 0.25s ease, border-radius 0.25s ease;
}
.daily-featured-dot:hover { background: rgba(255, 255, 255, 0.7); }
.daily-featured-dot.active {
    width: 42px;
    height: 14px;
    border-radius: 999px;
    background: #c9a84c;
    box-shadow: none;
}

/* 窄视口：箭头收进轮播图内侧，避免超出屏幕被裁切 */
@media (max-width: 1280px) {
    .daily-featured-prev { left: 12px; }
    .daily-featured-next { right: 12px; }
    .daily-featured-arrow { width: 48px; height: 48px; font-size: 40px; }
}

/* 平板/手机：高度自适应，标题与分页点回到文档流（避免定高留白）
   每屏张数（4/3/2）由 theme.js 按视口写入行内 grid-template-columns，此处不再覆盖列数 */
@media (max-width: 1024px) {
    .daily-featured { height: auto; min-height: 0; }
    .daily-featured-inner { height: auto; padding: 24px 14px; }
    .daily-featured-header { position: static; align-self: flex-start; margin-bottom: 14px; }
    .daily-featured-dots { position: static; margin-top: 18px; }
    .daily-featured-card { min-width: 0; }
}
