@charset "utf-8";
/* -----------------------------------------------------------
 * 리스트 영역
 ----------------------------------------------------------- */

/* 기본 리스트 스타일 모바일 목록 */
@media all and (max-width:767px) {
    .responsive #bo_list .float-left.float-md-none {
        margin-right:1.0rem;
    }
    .responsive #bo_list .na-title {
        margin-bottom:0.14rem;
    }
}

/* 음악 차트 스타일 */
.music-chart-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.music-chart-header .na-table-head,
.music-chart-header .list-head {
    background: transparent !important;
    color: white !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.music-chart-header a {
    color: white !important;
    text-decoration: none;
}

.music-chart-header a:hover {
    color: #f8f9fa !important;
    text-decoration: none;
}

.music-chart-list {
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 컬럼 너비 설정 (공유 열 추가로 조정) */
.music-select-col { width: 50px !important; text-align: center; }
.music-rank-col { width: 60px !important; text-align: center; }
.music-album-col { width: 80px !important; text-align: center; }
.music-title-col { width: auto !important; text-align: left; min-width: 180px; }
.music-artist-col { width: 110px !important; text-align: center; }
.music-actions-col { width: 80px !important; text-align: center; }
.music-scrap-col { width: 60px !important; text-align: center; }
.music-rating-col { width: 70px !important; text-align: center; }
.music-share-col { width: 60px !important; text-align: center; } /* 새로 추가 */
.music-date-col { width: 100px !important; text-align: center; }
.music-views-col { width: 80px !important; text-align: center; }
.music-like-col { width: 80px !important; text-align: center; }

/* 차트 아이템 스타일 - z-index 조정 */
.music-chart-item {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 1;
    min-height: 80px; /* 추가 */
}

/* 새로 추가 */
.music-chart-item .d-md-table-cell {
    vertical-align: middle !important;
    height: 100%;
}

.music-chart-item:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 2; /* 호버 시에도 공유 드롭다운보다 낮은 z-index */
}

.music-chart-item.music-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.music-chart-item.music-current {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #17a2b8;
}

/* 체크박스 스타일 */
.music-checkbox-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.music-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.music-checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.music-checkbox-wrapper:hover .music-checkmark {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: scale(1.1);
}

.music-checkbox-wrapper input:checked ~ .music-checkmark {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #0056b3;
}

.music-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.music-checkbox-wrapper input:checked ~ .music-checkmark::after {
    display: block;
}

/* 순위 스타일 */
.music-rank-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 12px 8px;
    min-height: 80px;
}

.music-rank-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #495057;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    padding: 4px 8px;
    border-radius: 15px;
    min-width: 30px;
    text-align: center;
}

.music-notice-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ff9500 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.music-current-badge {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: bold;
}

/* 앨범 커버 스타일 */
.music-album-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    min-height: 80px;
}

.music-album-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.music-album-wrapper:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.music-album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.music-no-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.2rem;
}

.music-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.music-album-wrapper:hover .music-play-overlay {
    opacity: 1;
}

.youtube-video-badge,
.youtube-shorts-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 6px;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
    line-height: 1;
}

.youtube-video-badge {
    background-color: #ff0000;
    color: white;
}

.youtube-shorts-badge {
    background-color: #ff6600;
    color: white;
}

/* 제목 스타일 */
.music-title-container {
    padding: 12px 8px;
    display: flex;
    align-items: center;
    min-height: 80px;
}

.music-title-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.music-title-main {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.music-title-link:hover .music-title-main {
    color: #007bff;
}

.music-comment-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

.music-comment-count .count-number {
    background: #007bff;
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* 아이콘 스타일 */
.music-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.music-icon.music-hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.music-icon.music-new {
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
    color: white;
}

.music-icon.music-secret {
    background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
    color: white;
}

.music-media-icon {
    color: #28a745;
    font-size: 0.9rem;
}

/* 아티스트 스타일 */
.music-artist-container {
    padding: 12px 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

/* 버튼 스타일 */
.music-playlist-btn,
.music-instant-btn,
.music-scrap-btn,
.music-share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    margin: 2px;
    position: relative;
    z-index: 5; /* 버튼들의 기본 z-index */
}

.music-playlist-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #5a379a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

.music-playlist-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.5);
}

.music-instant-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.music-instant-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.5);
}

.music-scrap-btn {
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%);
    border-color: #adb5bd;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}
.music-scrap-btn.scrapped {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-color: #dc3545;
    color: white;
}
.music-scrap-btn.disabled {
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%);
    border-color: #adb5bd;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.music-scrap-btn.scrapped {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.music-scrap-btn.scrapped .fa-heart-o::before {
    content: "\f004"; /* fa-heart */
}

/* 공유 버튼 스타일 (z-index 최고 우선순위) */
.music-share-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10; /* 공유 버튼의 z-index를 높게 설정 */
}

.music-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
    z-index: 10;
}

/* 공유 드롭다운 스타일 - 최고 우선순위 z-index */
.music-share-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
    z-index: 10;
    min-height: 80px;
}

.share-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000; /* 드롭다운 자체의 z-index를 매우 높게 */
}

.share-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25); /* 그림자를 더 진하게 */
    min-width: 150px;
    z-index: 9999; /* 매우 높은 z-index */
    display: none;
    overflow: hidden;
}

.share-dropdown.show .share-dropdown-menu {
    display: block !important;
    animation: fadeInDown 0.2s ease forwards;
    z-index: 9999; /* 보여질 때도 최고 우선순위 */
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.85rem;
    position: relative;
    z-index: 9999;
}

.share-menu-item:hover {
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.share-menu-item i {
    width: 16px;
    text-align: center;
}

/* SNS별 색상 */
.facebook-share:hover { background-color: #3b5998; color: white; }
.twitter-share:hover { background-color: #1da1f2; color: white; }
.kakao-share:hover { background-color: #fee500; color: #333; }
.band-share:hover { background-color: #00d4aa; color: white; }
.copy-url-btn:hover { background-color: #6c757d; color: white; }

/* 모바일 공유 메뉴 - 높은 z-index */
.mobile-share-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.mobile-share-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 8px;
    display: none;
    flex-direction: row;
    gap: 4px;
    z-index: 9999; /* 매우 높은 z-index */
}

.mobile-share-menu.show {
    display: flex !important;
    animation: fadeInUp 0.2s ease forwards;
    z-index: 9999;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-share-menu .share-menu-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    min-width: auto;
    z-index: 9999;
}

/* 복사 완료 알림 - 최고 우선순위 */
.copy-success-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 99999; /* 토스트는 모든 것보다 위에 */
    animation: fadeInOut 2s ease-in-out;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 액션 컨테이너 */
.music-actions-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    gap: 4px;
    min-height: 80px;
}

.music-scrap-container,
.music-rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    min-height: 80px;
}

/* PC 평점 표시 스타일 */
.rating-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-star,
.rating-star-empty {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.rating-star {
    background: linear-gradient(135deg, #ffc107 0%, #ff9500 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.rating-star-empty {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #dee2e6;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(222, 226, 230, 0.2);
}

.rating-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #495057;
}

.no-rating .rating-score {
    color: #adb5bd;
}

/* 모바일 평점 스타일 */
.music-mobile-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.mobile-rating-star,
.mobile-rating-star-empty {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.mobile-rating-star {
    background: linear-gradient(135deg, #ffc107 0%, #ff9500 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.mobile-rating-star-empty {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #dee2e6;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(222, 226, 230, 0.2);
}

.mobile-rating-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #495057;
}

/* 날짜, 조회수, 추천수 스타일 */
.music-date-container,
.music-views-container,
.music-like-container {
    padding: 12px 8px;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

/* 배지 스타일 */
.music-rating-badge,
.music-info-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.music-rating-badge {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.music-info-badge {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

/* 빈 리스트 스타일 */
.music-empty-list {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.music-empty-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 15px;
}

.music-empty-list p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

/* 모바일 반응형 - 리스트형 */
@media (max-width: 768px) {
    /* 헤더는 모바일에서 숨김 */
    .music-chart-header {
        display: none !important;
    }
    
    /* 리스트 컨테이너 초기화 */
    .music-chart-list {
        display: block !important;
        width: 100% !important;
    }
    
    /* 리스트 아이템 모바일 스타일 */
    .music-chart-item {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 8px;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        overflow: hidden;
        z-index: 1; /* 모바일에서도 낮은 z-index */
    }
    
    .music-chart-item:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 2; /* 호버 시에도 공유 레이어보다 낮게 */
    }
    
    /* 모바일 내부 컨테이너 */
    .music-mobile-container {
        padding: 15px;
    }
    
    /* 상단 행: 체크박스 + 순위 + 앨범 + 제목&작성자 */
    .music-mobile-top-row {
        display: flex;
        align-items: flex-start;
        margin-bottom: 10px;
        gap: 10px;
    }
    
    .music-mobile-checkbox {
        flex-shrink: 0;
        width: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 2px;
    }
    
    .music-mobile-rank {
        flex-shrink: 0;
        width: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .music-mobile-album {
        flex-shrink: 0;
        width: 45px;
        height: 45px;
    }
    
    .music-mobile-title {
        flex: 1;
        min-width: 0;
        padding-left: 5px;
    }
    
    /* 제목과 작성자를 함께 배치 */
    .music-mobile-title .music-title-main {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 3px;
        font-weight: 600;
    }
    
    .music-mobile-title .music-comment-count {
        display: inline-block;
        margin-left: 6px;
        font-size: 0.75rem;
    }
    
    .music-mobile-artist {
        font-size: 0.8rem;
        color: #6c757d;
        margin-top: 2px;
        line-height: 1.2;
    }
    
    /* 하단 행: 액션 버튼 + 정보 */
    .music-mobile-bottom-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f0f0f0;
        padding-top: 8px;
    }
    
    .music-mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .music-mobile-info {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 0.8rem;
        color: #6c757d;
    }
    
    .music-mobile-info-item {
        display: flex;
        align-items: center;
        gap: 2px;
        white-space: nowrap;
    }
    
    .music-mobile-info-label {
        font-weight: 500;
        color: #495057;
    }
    
    /* 모든 기존 컬럼들을 숨기고 새로운 구조로 재배치 */
    .music-chart-item .music-select-col,
    .music-chart-item .music-rank-col,
    .music-chart-item .music-album-col,
    .music-chart-item .music-title-col,
    .music-chart-item .music-artist-col,
    .music-chart-item .music-actions-col,
    .music-chart-item .music-scrap-col,
    .music-chart-item .music-rating-col,
    .music-chart-item .music-share-col, /* 공유 열도 모바일에서 숨김 */
    .music-chart-item .music-date-col,
    .music-chart-item .music-views-col,
    .music-chart-item .music-like-col {
        display: none !important;
    }
    
    /* 모바일 전용 요소들만 표시 */
    .music-chart-item .music-mobile-container {
        display: block !important;
    }
    
    /* 모바일 앨범 커버 */
    .music-mobile-album .music-album-wrapper {
        width: 45px !important;
        height: 45px !important;
        margin: 0;
    }
    
    /* 모바일 버튼 크기 조정 */
    .music-mobile-actions .music-playlist-btn,
    .music-mobile-actions .music-instant-btn,
    .music-mobile-actions .music-scrap-btn,
    .music-mobile-actions .music-share-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem;
        z-index: 10; /* 모바일 버튼들도 높은 z-index */
    }
    
    /* 모바일 공유 드롭다운 표시 */
    .mobile-share-dropdown {
        display: block !important;
        z-index: 1000;
    }
    
    /* 모바일 공유 메뉴는 더 높은 z-index */
    .mobile-share-menu {
        z-index: 9999 !important;
    }
}

@media (max-width: 480px) {
    .music-chart-item {
        margin-bottom: 6px;
    }
    
    .music-mobile-container {
        padding: 12px;
    }
    
    .music-mobile-album .music-album-wrapper {
        width: 40px !important;
        height: 40px !important;
    }
    
    .music-mobile-actions .music-playlist-btn,
    .music-mobile-actions .music-instant-btn,
    .music-mobile-actions .music-scrap-btn,
    .music-mobile-actions .music-share-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.75rem;
    }
    
    .music-checkmark {
        height: 15px !important;
        width: 15px !important;
    }
    
    .music-checkmark::after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 6px;
    }
    
    .music-mobile-title .music-title-main {
        font-size: 1.1rem;
    }
    
    .music-mobile-info {
        gap: 10px;
        font-size: 0.75rem;
    }
}

/* 데스크톱에서 모바일 공유 숨김 */
@media (min-width: 769px) {
    .mobile-share-dropdown {
        display: none !important;
    }
}

/* 평점 표시 스타일 */
.rating-display-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 60px;
    height: 100%;
}

.rating-item-badge {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    text-align: center;
    min-width: 50px;
    line-height: 1.1;
    transition: all 0.3s ease;
}

.rating-score-only {
    font-weight: 600;
    font-size: 20px;
    color: #343a40;
    text-align: center;
    transition: all 0.3s ease;
}

/* 평점이 양수일 때 (초록색) */
.rating-display-compact.positive .rating-item-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.rating-display-compact.positive .rating-score-only {
    color: #28a745;
    font-weight: 700;
}

/* 평점이 음수일 때 (빨간색) */
.rating-display-compact.negative .rating-item-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #dc3545;
}

.rating-display-compact.negative .rating-score-only {
    color: #dc3545;
    font-weight: 700;
}

/* 모바일에서도 동일하게 적용 */
.music-mobile-rating .rating-display-compact.positive .rating-item-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.music-mobile-rating .rating-display-compact.positive .rating-score-only {
    color: #28a745;
    font-weight: 700;
}

.music-mobile-rating .rating-display-compact.negative .rating-item-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #dc3545;
}

.music-mobile-rating .rating-display-compact.negative .rating-score-only {
    color: #dc3545;
    font-weight: 700;
}

/* 정렬 중일 때 강조 */
.rating-sort-active .rating-item-badge {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.rating-sort-active .rating-score-only {
    color: #007bff;
    font-weight: 700;
}

/* 모바일에서 */
.music-mobile-rating .rating-display-compact {
    flex-direction: row;
    gap: 6px;
}

.music-mobile-rating .rating-item-badge {
    font-size: 13px;
    padding: 4px 6px;
    min-width: 40px;
}

.music-mobile-rating .rating-score-only {
    font-size: 20px;
}

/* 평점 열 너비 최적화 */
.music-rating-col {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
}

/* 드롭다운이 열렸을 때 행의 호버 효과 비활성화 */
.music-chart-item.dropdown-open:hover {
    background: white !important;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    z-index: 1 !important;
}

/* ===================================================================
 * 평점 정렬 버튼 영역 스타일
 * =================================================================== */

/* 평점 정렬 컨테이너 */
.rating-sort-container {
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    border: 2px solid #e1e8ff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.1);
    margin: 0 0 20px;
    position: relative;
    overflow: hidden;
}

.rating-sort-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.5) 0%, transparent 50%, rgba(255,255,255,0.3) 100%);
    pointer-events: none;
}

.rating-sort-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.rating-sort-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #495057;
}

.rating-sort-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-sort-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.rating-sort-subtitle {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
    color: #6c757d;
}

.current-sort-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.current-sort-indicator i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.rating-sort-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* 평점 버튼 기본 스타일 */
.rating-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 8px 12px;
    color: #495057 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.1), transparent);
    transition: left 0.6s;
}

.rating-btn:hover::before {
    left: 100%;
}

.rating-btn:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.2);
    color: #1976d2 !important;
    text-decoration: none !important;
}

/* 활성화된 버튼 스타일 */
.rating-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffc107;
    color: #333 !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    transform: translateY(-1px);
}

.rating-btn.active:hover {
    color: #333 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, #ffdc00 0%, #fff176 100%);
}

.rating-btn.active::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #28a745;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.rating-btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.rating-btn-text {
    font-size: 1rem;
    white-space: nowrap;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.rating-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.rating-btn:hover i {
    transform: scale(1.1);
}

.rating-btn.active i {
    color: #333;
}

/* 참고용 버튼 스타일 */
.rating-btn.reference {
    opacity: 0.8;
    border-style: dashed;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.rating-btn.reference:hover {
    opacity: 1;
    background: linear-gradient(135deg, #ffcc80 0%, #ffb74d 100%);
}

.reference-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-6px,0);
    }
    70% {
        transform: translate3d(0,-3px,0);
    }
    90% {
        transform: translate3d(0,-1px,0);
    }
}

/* 개별 버튼 색상 (밝게 조정) */
.rating-btn-total:not(.active) {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ffc107;
    color: #ff8f00 !important;
}

.rating-btn-melody:not(.active) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    color: #1976d2 !important;
}

.rating-btn-lyrics:not(.active) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-color: #9c27b0;
    color: #7b1fa2 !important;
}

.rating-btn-vocal:not(.active) {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #d32f2f !important;
}

.rating-btn-sound:not(.active) {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
    color: #388e3c !important;
}

.rating-btn-completeness:not(.active) {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ff9800;
    color: #f57c00 !important;
}

.rating-btn-video:not(.active) {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-color: #9e9e9e;
    color: #616161 !important;
}

.rating-btn-addiction:not(.active) {
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
    border-color: #cddc39;
    color: #9e9d24 !important;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .rating-sort-container {
        margin: 0 -15px 20px;
        border-radius: 0;
    }
    
    .rating-sort-wrapper {
        padding: 0 15px;
    }
}

/* 큰 화면에서 버튼 간격 더 넓게 */
@media (min-width: 1200px) {
    .rating-sort-buttons {
        gap: 16px;
    }
    
    .rating-btn {
        padding: 10px 16px;
    }
    
    .rating-btn-text {
        font-size: 1.1rem;
    }
    
    .rating-btn i {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .rating-sort-container {
        padding: 15px;
        margin: 0 0 15px;
        border-radius: 8px;
    }
    
    .rating-sort-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .rating-sort-title {
        font-size: 1.1rem;
    }
    
    .rating-sort-subtitle {
        font-size: 0.8rem;
    }
    
    .current-sort-indicator {
        font-size: 0.8rem;
        padding: 6px 12px;
        border-radius: 15px;
    }
    
    .rating-sort-buttons {
        gap: 8px;
        justify-content: flex-start;
    }
    
    .rating-btn {
        padding: 8px 12px;
        border-radius: 10px;
        flex: 1;
        min-width: calc(25% - 6px);
        max-width: calc(25% - 6px);
    }
    
    .rating-btn-content {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }
    
    .rating-btn-text {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .rating-btn i {
        font-size: 0.9rem;
    }
    
    .reference-badge {
        font-size: 0.5rem;
        padding: 1px 3px;
        top: -4px;
        right: -4px;
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .rating-sort-container {
        padding: 12px;
        border-radius: 8px;
    }
    
    .rating-sort-title {
        font-size: 1rem;
    }
    
    .rating-sort-subtitle {
        font-size: 0.75rem;
    }
    
    .rating-sort-buttons {
        gap: 6px;
    }
    
    .rating-btn {
        padding: 6px 8px;
        min-width: calc(25% - 5px);
        max-width: calc(25% - 5px);
        border-radius: 8px;
        min-height: 50px;
    }
    
    .rating-btn-content {
        gap: 1px;
    }
    
    .rating-btn-text {
        font-size: 0.7rem;
    }
    
    .rating-btn i {
        font-size: 0.8rem;
    }
    
    .current-sort-indicator {
        width: 100%;
        justify-content: center;
        font-size: 0.75rem;
        padding: 6px 10px;
        border-radius: 12px;
    }
}

@media (max-width: 360px) {
    .rating-btn {
        min-width: calc(25% - 4px);
        max-width: calc(25% - 4px);
        padding: 5px 6px;
        min-height: 45px;
        border-radius: 6px;
    }
    
    .rating-btn-text {
        font-size: 0.65rem;
    }
    
    .rating-btn i {
        font-size: 0.75rem;
    }
    
    .rating-sort-buttons {
        gap: 4px;
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .rating-btn {
        border-width: 1px;
    }
    
    .reference-badge {
        border: 1px solid rgba(255,255,255,0.3);
    }
}

/* 접근성 향상 */
.rating-btn:focus {
    outline: 3px solid rgba(33, 150, 243, 0.5);
    outline-offset: 2px;
}

.rating-btn.active:focus {
    outline-color: rgba(255, 193, 7, 0.7);
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .rating-btn {
        min-height: 48px;
    }
    
    .rating-btn:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .rating-btn:active {
        transform: scale(0.95);
    }
}

/* 애니메이션 줄이기 설정 지원 */
@media (prefers-reduced-motion: reduce) {
    .rating-btn,
    .rating-btn::before,
    .rating-btn i,
    .reference-badge,
    .current-sort-indicator i {
        animation: none;
        transition: none;
    }
    
    .rating-btn:hover {
        transform: none;
    }
}