/**
 * Poster 海报轮播 — 对齐 web 主题（dj-theme / dj-beautify）
 */
.poster-module {
    --pm-bg: var(--dj-surface, var(--bs-body-bg, #fff));
    --pm-border: var(--dj-border, rgba(124, 58, 237, 0.22));
    --pm-text: var(--dj-text, var(--bs-body-color, #1a1625));
    --pm-sub: var(--dj-text-muted, #6b6578);
    --pm-tab-bg: var(--dj-surface-2, rgba(124, 58, 237, 0.06));
    --pm-tab-bd: var(--dj-border, rgba(124, 58, 237, 0.2));
    --pm-tab-active-bg: var(--dj-primary-soft, #ede9fe);
    --pm-tab-active-bd: var(--dj-primary-muted, #a78bfa);
    --pm-row-border: var(--dj-border, rgba(124, 58, 237, 0.12));
    --pm-link-hover: var(--dj-primary, #7c3aed);
    width: 100%;
}

.poster-module .poster-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    min-height: 380px;
}

.poster-module .poster-banner {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 380px;
    height: auto;
    overflow: hidden;
    background: var(--dj-surface-2, #efedf5);
    display: block;
}

.poster-module .poster-banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.poster-module .poster-banner-item {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.poster-module .poster-banner-item.is-active {
    z-index: 2;
}

.poster-module .poster-banner-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.poster-module .poster-banner-item a img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    position: absolute !important;
    inset: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-width: none !important;
    border: 0;
    border-radius: 0;
}

.poster-module .poster-banner-indicator {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.poster-module .poster-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, background 0.2s ease;
    border: 0;
    padding: 0;
}

.poster-module .poster-indicator-dot.active {
    background: #fff;
    transform: scale(1.15);
}

.poster-module .poster-rank {
    flex: 0 0 clamp(280px, 34%, 360px);
    width: clamp(280px, 34%, 360px);
    background: var(--pm-bg);
    border-left: 1px dashed var(--pm-border);
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.poster-module .poster-rank-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px dashed var(--pm-border);
    flex-shrink: 0;
}

.poster-module .poster-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.poster-module .poster-tab {
    padding: 4px 12px;
    border: 1px solid var(--pm-tab-bd);
    border-radius: 999px;
    background: var(--pm-tab-bg);
    color: var(--pm-text);
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.poster-module .poster-tab:hover {
    border-color: var(--pm-tab-active-bd);
    color: var(--pm-link-hover);
}

.poster-module .poster-tab.active {
    border-color: var(--pm-tab-active-bd);
    background: var(--pm-tab-active-bg);
    color: var(--pm-link-hover);
    font-weight: 600;
}

.poster-module .poster-refresh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 0;
    color: var(--pm-sub);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 0;
    transition: color 0.18s ease;
}

.poster-module .poster-refresh:hover {
    color: var(--pm-link-hover);
}

.poster-module .poster-refresh-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    transform-origin: center;
    transition: transform 0.25s ease;
}

.poster-module .poster-refresh:hover .poster-refresh-icon {
    transform: rotate(180deg);
}

.poster-module .poster-rank-bd {
    padding: 6px 12px 10px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.poster-module .poster-list-wrap {
    display: none;
    height: 100%;
}

.poster-module .poster-list-wrap.active {
    display: block;
}

.poster-module .poster-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.poster-module .poster-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--pm-row-border);
}

.poster-module .poster-list li:last-child {
    border-bottom: none;
}

.poster-module .poster-song {
    flex: 1;
    min-width: 0;
}

.poster-module .poster-song a {
    display: block;
    color: var(--pm-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    line-height: 1.35;
}

.poster-module .poster-song a:hover {
    color: var(--pm-link-hover);
}

.poster-module .poster-date {
    flex-shrink: 0;
    color: var(--pm-sub);
    font-size: 12px;
}

.poster-module .poster-empty {
    color: var(--pm-sub);
    font-size: 13px;
}

/* 首页虚线卡片内：贴边铺满、去掉内层多余边框 */
.dj-home-poster .poster-module {
    margin: 0;
    padding: 0;
}

.dj-home-poster .poster-layout {
    min-height: 400px;
}

.dj-home-poster .poster-banner,
.dj-home-poster .poster-rank {
    min-height: 400px;
}

.dj-home-poster .poster-rank {
    border-left: 1px dashed var(--dj-dash-color, var(--pm-border));
    background: var(--dj-card-bg, var(--pm-bg));
}

@media (max-width: 768px) {
    .poster-module .poster-layout {
        flex-direction: column;
        min-height: 0;
    }

    .poster-module .poster-banner {
        width: 100%;
        min-height: 220px;
        height: 220px;
        flex: none;
    }

    .poster-module .poster-rank {
        width: 100%;
        flex: none;
        min-height: 0;
        border-left: 0;
        border-top: 1px dashed var(--pm-border);
    }

    .poster-module .poster-indicator-dot {
        background: rgba(0, 0, 0, 0.25);
    }

    .poster-module .poster-indicator-dot.active {
        background: var(--dj-primary, #7c3aed);
    }

    .dj-home-poster .poster-banner,
    .dj-home-poster .poster-rank {
        min-height: 0;
    }
}
