/* KrDance player recommendations */
.hd-recommend-section {
    margin-top: 30px;
}

.hd-recommend-section + .hd-recommend-section {
    margin-top: 34px;
}

.hd-recommend-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.hd-recommend-head h2 {
    margin: 0;
    font-size: clamp(20px, 2vw, 28px);
}

.hd-recommend-head p {
    margin: 5px 0 0;
    color: var(--hd-muted);
    font-size: 12px;
}

.hd-recommend-empty {
    padding: 24px;
    border: 1px solid var(--hd-line);
    border-radius: 14px;
    color: var(--hd-muted);
    background: var(--hd-panel);
}

.hd-collaborative-section {
    padding-top: 4px;
}

.hd-star-recommend-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.hd-star-recommend-card {
    min-width: 0;
}

.hd-star-recommend-card > a {
    display: flex;
    min-height: 150px;
    padding: 16px 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--hd-line);
    border-radius: 15px;
    background: var(--hd-panel);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.hd-star-recommend-card > a:hover {
    transform: translateY(-2px);
    border-color: rgba(72, 198, 255, .42);
    background: var(--hd-panel-hover, rgba(255, 255, 255, .045));
}

.hd-star-recommend-avatar {
    position: relative;
    width: 68px;
    height: 68px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(36, 184, 255, .2), rgba(155, 92, 255, .18));
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--hd-text);
}

.hd-star-recommend-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hd-star-recommend-name {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
}

.hd-star-recommend-meta {
    color: var(--hd-muted);
    font-size: 10px;
}

.hd-history-content {
    min-width: 0;
}

.hd-history-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
}

.hd-history-card .hd-video-title {
    min-height: 38px;
}

.hd-history-progress {
    height: 4px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.hd-history-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(50, 190, 255, .95), rgba(139, 92, 246, .95));
}

.hd-history-meta,
.hd-history-time {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--hd-muted);
    font-size: 10px;
}

.hd-history-meta span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hd-history-time {
    display: block;
    margin-top: 5px;
}

.hd-history-empty {
    margin-top: 22px;
}

@media (max-width: 1400px) {
    .hd-star-recommend-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .hd-history-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .hd-star-recommend-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hd-history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .hd-recommend-section {
        margin-top: 24px;
    }

    .hd-recommend-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .hd-star-recommend-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 2px 1px 8px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .hd-star-recommend-card {
        flex: 0 0 138px;
        scroll-snap-align: start;
    }

    .hd-star-recommend-card > a {
        min-height: 140px;
    }

    .hd-history-grid {
        grid-template-columns: 1fr;
    }
}
