/* ===== 아티스트 전용 페이지 ===== */

/* ---------- 배너 ---------- */
.artist-banner {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

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

.artist-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

.artist-banner__content {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.artist-banner__name {
    margin: 0;
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
}

/* ---------- 메인 ---------- */
.artist-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 40px 48px;
}

.artist-section__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-800, #1f2937);
    margin: 0 0 14px 0;
    letter-spacing: -0.03em;
}

/* ---------- TOP 5 + 소개 ---------- */
.artist-top-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 70px;
}

.artist-top5__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.artist-top5__card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #f3f4f6;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.artist-top5__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.artist-top5__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artist-top5__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.artist-top5__title {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 소개 박스 */
.artist-intro {
    position: relative;
    border: 1px solid #d6ddd9;
    border-radius: 14px;
    padding: 22px 20px;
    background: linear-gradient(160deg, #fafcfb 0%, #f0f5f2 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.artist-intro::before {
    content: "\201C";
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 60px;
    font-family: 'Playfair Display', serif;
    color: rgba(46, 125, 50, 0.08);
    line-height: 1;
    pointer-events: none;
}

.artist-intro .artist-section__title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 12px;
    font-size: 16px;
}

.artist-intro .artist-section__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--forest, #2e7d32);
}

.artist-intro__text {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--gray-700, #374151);
    word-break: keep-all;
    flex: 1;
    letter-spacing: -0.01em;
}

/* ---------- 추천 + 노래 숲 ---------- */
.artist-bottom-row {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: stretch;
}

/* 추천 악보 */
.artist-recommend {
    display: flex;
}

.artist-recommend__bg {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.artist-recommend__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

.artist-recommend__content {
    position: relative;
    z-index: 1;
    padding: 24px;
    color: #fff;
}

.artist-recommend__label {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
    margin: 0 0 8px;
}

.artist-recommend__song {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.artist-recommend__artist {
    font-size: 15px;
    opacity: 0.8;
    margin: 0 0 20px;
}

.artist-recommend__btn {
    display: inline-block;
    padding: 10px 22px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.artist-recommend__btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* 노래 숲 */
.artist-song-tree {
    position: relative;
    border: 1px solid #e5e7e6;
    border-radius: 14px;
    padding: 22px;
    background: #fafcfb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.artist-song-tree__header {
    position: relative;
    z-index: 2;
}

.artist-song-tree__desc {
    font-size: 12px;
    color: var(--gray-400, #9ca3af);
    margin: -8px 0 0;
}

.artist-song-tree__body {
    position: relative;
    flex: 1;
    min-height: 260px;
}

.artist-song-tree__bg {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    max-height: 280px;
    object-fit: contain;
    opacity: 1;
    pointer-events: none;
    user-select: none;
}

.artist-song-tree__list {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 10px 0;
}

.artist-song-tree__leaf {
    position: absolute;
}

/* 곡명 8글자 초과 시 말줄임 */
.artist-song-tree__leaf {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 곡 위치 - 나뭇가지에 열매처럼 배치 (최대 20개) */
.artist-song-tree__leaf:nth-child(1)  { top: 8%;   left: 18%; }
.artist-song-tree__leaf:nth-child(2)  { top: 5%;   right: 22%; }
.artist-song-tree__leaf:nth-child(3)  { top: 22%;  left: 5%; }
.artist-song-tree__leaf:nth-child(4)  { top: 18%;  right: 8%; }
.artist-song-tree__leaf:nth-child(5)  { top: 38%;  left: 12%; }
.artist-song-tree__leaf:nth-child(6)  { top: 35%;  right: 5%; }
.artist-song-tree__leaf:nth-child(7)  { top: 52%;  left: 2%; }
.artist-song-tree__leaf:nth-child(8)  { top: 50%;  right: 15%; }
.artist-song-tree__leaf:nth-child(9)  { top: 68%;  left: 20%; }
.artist-song-tree__leaf:nth-child(10) { top: 65%;  right: 10%; }
.artist-song-tree__leaf:nth-child(11) { top: 80%;  left: 8%; }
.artist-song-tree__leaf:nth-child(12) { top: 82%;  right: 25%; }
.artist-song-tree__leaf:nth-child(13) { top: 12%;  left: 48%; }
.artist-song-tree__leaf:nth-child(14) { top: 28%;  right: 28%; }
.artist-song-tree__leaf:nth-child(15) { top: 30%;  left: 32%; }
.artist-song-tree__leaf:nth-child(16) { top: 45%;  left: 30%; }
.artist-song-tree__leaf:nth-child(17) { top: 48%;  right: 35%; }
.artist-song-tree__leaf:nth-child(18) { top: 60%;  left: 5%; }
.artist-song-tree__leaf:nth-child(19) { top: 72%;  right: 30%; }
.artist-song-tree__leaf:nth-child(20) { top: 88%;  left: 35%; }

/* 20개 초과 시 숨김 */
.artist-song-tree__leaf:nth-child(n+21) { display: none; }

.artist-song-tree__leaf {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--gray-700, #374151);
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.artist-song-tree__leaf:hover {
    background: var(--forest, #2e7d32);
    border-color: var(--forest, #2e7d32);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.3);
}

/* ===== 반응형 ===== */

@media (max-width: 1024px) {
    .artist-banner { height: 300px; }
    .artist-banner__name { font-size: 36px; }

    .artist-top-row {
        grid-template-columns: 1fr;
    }

    .artist-top5__grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .artist-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .artist-banner { height: 240px; }
    .artist-banner__name { font-size: 28px; }
    .artist-banner__content { padding: 0 24px; bottom: 32px; }

    .artist-main { padding: 28px 20px 40px; }

    .artist-top5__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .artist-recommend__song { font-size: 22px; }

    .artist-song-tree__list { gap: 8px; }
    .artist-song-tree__leaf {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .artist-banner { height: 200px; }
    .artist-banner__name { font-size: 24px; }

    .artist-main { padding: 20px 16px 32px; }

    .artist-top5__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .artist-recommend__bg { min-height: 260px; }
    .artist-recommend__song { font-size: 20px; }
    .artist-recommend__content { padding: 24px; }
}
