body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
    padding: 100px 20px 40px;
}

/* ===== 블러 배경 이미지 (z-index: -2) ===== */
.background-div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("./images/dance_background.png");
    background-size: cover;
    background-position: center;
    filter: blur(1.5px);
    z-index: -2;
}

/* ===== 휘날리는 컨페티 (z-index: 1) ===== */
.falling-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #fff311 0%, #ffeb15 50%, #fff980 100%);
    opacity: 0.6;
    animation: fall linear infinite;
}

/* 각 컨페티의 위치와 애니메이션 시간을 다르게 설정 */
.petal:nth-child(1) {
    left: 10%;
    animation-duration: 8s;
    animation-delay: 0s;
}

.petal:nth-child(2) {
    left: 25%;
    animation-duration: 10s;
    animation-delay: 1s;
}

.petal:nth-child(3) {
    left: 40%;
    animation-duration: 12s;
    animation-delay: 2s;
}

.petal:nth-child(4) {
    left: 55%;
    animation-duration: 9s;
    animation-delay: 3s;
}

.petal:nth-child(5) {
    left: 70%;
    animation-duration: 11s;
    animation-delay: 4s;
}

.petal:nth-child(6) {
    left: 85%;
    animation-duration: 10s;
    animation-delay: 5s;
}

.petal:nth-child(7) {
    left: 20%;
    animation-duration: 13s;
    animation-delay: 2.5s;
}

.petal:nth-child(8) {
    left: 60%;
    animation-duration: 9.5s;
    animation-delay: 1.5s;
}

@keyframes fall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(20px) rotate(90deg);
    }

    50% {
        transform: translateX(-20px) rotate(180deg);
    }

    75% {
        transform: translateX(20px) rotate(270deg);
    }

    100% {
        top: 110%;
        transform: translateX(0) rotate(360deg);
    }
}

/* ===== Navigation Bar (z-index: 100) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #030ea7;
    box-shadow: 0 2px 15px rgba(255, 105, 180, 0.1);
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2159ff;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: #4a4a4a;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
    padding: 5px 10px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2159ff;
}

/* ===== 메인 컨테이너 (z-index: 2) ===== */
.container {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    max-width: 900px;
    width: 100%;
    padding: 60px 50px;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.15);
    position: relative;
    opacity: 0.;
    z-index: 2;
    box-sizing: border-box;
    /* 패딩을 너비에 포함시켜 가로 스크롤 방지 */
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main_title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2159ff;
    letter-spacing: 0.05em;
}

p {
    text-align: left;
}

/*전체 구조*/
.recommand_page {
    /*수직분할 (아티스트/곡)*/
    display: flex;
    flex-direction: column;
}

.artist_section {
    display: flex;
    align-items: center;
    gap: 50px;
    /*아티스트 사진, 텍스트 간격*/
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px;
    /*recommand_page의 패딩과 중복 막음*/
    margin-bottom: 40px;
    /*songs_section과 띄우기*/
}

/*아티스트 사진 크기*/
.artist_photo {
    width: auto;
    height: 200px;
    flex-shrink: 0;
    /*flex item 크기가 줄어들지 않도록 보호*/
    overflow: hidden;
    /* 이미지가 넘치는 부분 자르기 */
}

.artist_photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5%;
}

/*아티스트 소개*/
.artist_info {
    flex-grow: 1;
    /*아티스트 사진 제외 남은 공간 텍스트가 채우도록 함*/
}

.artist_info h4,
.artist_info p {
    margin: 0;
}

.songs_section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /*2열*/
    margin-top: 40px;
    /*artist_section과 띄우기*/
    column-gap: 15px;
    /*열 간격*/
    row-gap: 60px;
    /*행 간격*/

    margin-left: auto;
    margin-right: auto;
    /* ******************************************* */

    /* 이 Grid의 최대 너비를 설정하여 중앙 정렬할 여백을 만듭니다. */
    max-width: 800px;
    width: 100%;
}

.song_item {
    width: auto;
    height: auto;
    align-items: center;
    flex-shrink: 0;
    /*flex item 크기가 줄어들지 않도록 보호*/
    overflow: visible;

    display: flex;
    gap: 15px;
}

.song_photo {
    width: 100px;
    /* 이미지 고정 크기 */
    height: 100px;
    overflow: hidden;
    /* 이미지가 넘치는 부분 자르기 */
    flex-shrink: 0;
    /* 텍스트가 길어도 이미지 크기가 줄어들지 않도록 보호 */
    border-radius: 50%;
    /* LP판처럼 원형으로 만들려면 추가 */
}

.song_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* 텍스트가 길어져도 이미지가 작아지지 않도록 보호 */
    flex-shrink: 0;
}

.song_info {
    flex-grow: 1;
    /*앨범 사진 제외 남은 공간 텍스트가 채우도록 함*/
}

/* 노래 제목 링크 스타일 */
.song_info strong a {
    text-decoration: none;
    color: #2159ff;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.song_info strong a:hover {
    color: #0039d6;
    transform: translateY(-2px);
}

/* 앨범 회전 애니메이션 */
.song_photo.spinning {
    animation: spin 12s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== 다른 아티스트 섹션 ===== */
.other-artists-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #2159ff;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2159ff;
    text-align: center;
    margin-bottom: 30px;
}

.other-artists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.other-artist-card {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #2159ff;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.other-artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.25);
    border-color: #2159ff;
    background: rgba(198, 234, 255, 0.9);
}

.other-artist-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #2159ff;
    transition: all 0.3s ease;
}



.other-artist-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2159ff;
    text-align: center;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    body {
        padding: 140px 15px 30px;
    }

    .container {
        padding: 40px 25px;
    }

    .main_title {
        font-size: 2.5rem;
    }

    .artist_section {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 30px;
    }

    .artist_photo {
        width: 100%;
        max-width: 400px;
        height: 250px;
    }

    .songs_section {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .other-artists-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-menu a {
        font-size: 0.9rem;
        padding: 5px 8px;
    }

    .main_title {
        font-size: 2rem;
    }

    .container {
        padding: 30px 20px;
    }

    .song_item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .song_photo {
        width: 120px;
        height: 120px;
    }
}

/* ===== 아티스트 정보 섹션 (데이터베이스 연동) - 파란색 테마 ===== */
.artist_detail_table {
    margin: 40px auto 50px;
    max-width: 650px;
    width: 100%;
}

.section-title-small {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2159ff;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(33, 89, 255, 0.3);
}

/* 기본 정보 테이블 스타일 - 파란색 테마 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.95) 0%, rgba(224, 240, 255, 0.95) 100%);
    border: 2px solid #5b9bd5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(33, 89, 255, 0.2);
}

.info-table th,
.info-table td {
    padding: 14px 20px;
    text-align: left;
    color: #2c3e50;
    border-bottom: 1px solid rgba(91, 155, 213, 0.4);
}

.info-table th {
    width: 30%;
    background: linear-gradient(135deg, #2159ff 0%, #4a7fff 100%);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.info-table td {
    background-color: rgba(255, 255, 255, 0.8);
}

.info-table tr:hover td {
    background-color: rgba(173, 216, 230, 0.4);
    transition: background-color 0.3s ease;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

/* DB 연결 오류 메시지 스타일 - 파란색 테마 */
.db-error-msg {
    color: #c62828;
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4ff 100%);
    padding: 15px;
    margin: 20px auto;
    max-width: 800px;
    border: 2px solid #2159ff;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 3px 15px rgba(33, 89, 255, 0.15);
}