/* ===================================================================
   style-view-comm.css - 댓글 및 평점 시스템 스타일시트
   
   목차:
   1. 댓글 기본 영역
   2. 댓글 내용 및 레이아웃
   3. 댓글 상호작용 (추천/비추천/신고)
   4. ★★★ 평점 시스템 (RATING SYSTEM) ★★★
   5. 모달 및 팝업
   6. 반응형 미디어 쿼리
   7. 기타 유틸리티
=================================================================== */

/* ===================================================================
   SECTION 1: 댓글 기본 영역 (Comment Basic Layout)
=================================================================== */

/* 1-1. 댓글 전체 컨테이너 */
.comment-ratings {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment-content {
    margin-top: 15px;
    word-break: break-word;
}

.comment-ratings + .comment-content {
    margin-top: 0;
}

/* 1-2. 댓글 항목 기본 구조 */
.rating-item {
    margin-bottom: 10px;
}

.rating-item:last-child {
    margin-bottom: 0;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 1-3. 댓글 상세 영역 */
.rating-details {
    display: none;
    padding-top: 15px;
}

.rating-details.active {
    display: block;
}

/* ===================================================================
   SECTION 2: 댓글 내용 및 레이아웃 (Comment Content Layout)
=================================================================== */

/* 2-1. 기본 텍스트 스타일 */
.score-text {
    color: #495057;
    white-space: nowrap;
    font-weight: normal;
}

.item-title {
    color: #495057;
}

.rating-comment {
    margin-top: 5px;
    padding: 8px;
    background: #fff;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* 2-2. 평점 완료 상태 표시 */
.rated-result {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

.rated-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.rated-title {
    font-weight: 500;
    color: #495057;
}

.rated-score {
    color: #ffd700;
}

.rated-score .fa {
    margin-right: 2px;
}

.rated-score span {
    color: #495057;
}

.rated-comment {
    font-size: 0.9rem;
    padding: 8px;
    background: #fff;
    border-radius: 3px;
}

/* ===================================================================
   SECTION 3: 댓글 상호작용 (Comment Interactions)
=================================================================== */

/* 3-1. 평점 평균 표시 영역 */
.rating-average {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    background: #fff;
    margin: -15px -15px 0;
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
    font-weight: 500;
}

.rating-average .average-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.rating-average .label {
    color: #495057;
    white-space: nowrap;
    margin-right: 10px;
}

.rating-average .score {
    color: #ffd700;
}

.rating-average .score .ml-2 {
    color: #495057;
}

.rating-average .toggle-icon {
    margin-left: auto;
    color: #adb5bd;
    transition: transform 0.3s;
}

/* ===================================================================
   ★★★ SECTION 4: 평점 시스템 (RATING SYSTEM) ★★★
=================================================================== */

/* 🌟🌟🌟 4-1. PC 모드 - 단방향 평점 (PC Unidirectional Rating) 🌟🌟🌟 */

/* PC 단방향 평점 입력 */
.rating-content .rating-stars {
    display: flex;
    flex-direction: row-reverse; /* hover 효과를 위해 역순 유지 */
    justify-content: center;
    gap: 3px; /* 양방향과 동일한 간격 */
    margin: 15px 0; /* 양방향과 동일한 여백 */
}

.rating-content .rating-stars label {
    position: relative;
    cursor: pointer;
    font-size: 36px; /* 24px에서 36px로 대폭 증가 */
    color: #dee2e6;
    transition: all 0.2s ease;
}

.rating-content .rating-stars label:hover,
.rating-content .rating-stars label:hover ~ label,
.rating-content .rating-stars input:checked ~ label {
    color: #ffd700;
    transform: scale(1.1); /* hover 효과 추가 */
}

/* PC 단방향 별 위의 숫자 표시 - 양방향과 동일한 스타일 */
.rating-content .rating-stars .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    pointer-events: none;
    z-index: 2;
    margin-left: -1px;
}

.rating-content .rating-stars label:hover .star-number,
.rating-content .rating-stars input:checked ~ label .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

/* PC 단방향 평점 표시 */
.rating-stars {
    display: flex;
    flex-direction: row;
    gap: 5px;
    justify-content: center;
    color: #ffd700;
    flex-shrink: 0;
}

.comment-ratings .rating-stars {
    flex-direction: row;
}

.rating-stars .fa {
    margin-right: 2px;
}

/* 표시용 별점은 정순으로 배치 */
.comment-ratings .rating-stars,
.total-ratings .rating-stars,
.rated-result .rating-stars {
    flex-direction: row;
}

/* 개별 댓글의 단방향 별점 크기 */
.comment-ratings .rating-stars {
    font-size: 36px;
    position: relative;
}

.comment-ratings .rating-stars .fa {
    margin-right: 2px;
}

/* 평가 완료된 단방향 별점에도 숫자 표시 */
.rated-result .rating-stars {
    position: relative;
    font-size: 36px; /* 크기 확대 */
}

.rated-result .rating-stars .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
    margin-left: -1px;
}

/* 통합평점의 단방향 별점도 크기 확대 */
.total-ratings .rating-stars {
    font-size: 36px; /* 기존보다 크게 */
}

/* 🌟🌟🌟 4-2. PC 모드 - 양방향 평점 (PC Bidirectional Rating) 🌟🌟🌟 */

/* 양방향 평점 입력 UI - 별점 방식 */
.bidirectional-rating {
    text-align: center;
    padding: 15px 0;
}

.rating-scale-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* 15px에서 20px로 증가 */
    padding: 0 15px; /* 10px에서 15px로 증가 */
}

.scale-label {
    font-size: 1.1rem; /* 0.8rem에서 1.1rem으로 대폭 증가 */
    color: #6c757d;
    font-weight: 600; /* 500에서 600으로 증가 */
}

.scale-label.negative {
    color: #f06292;
}

.scale-label.neutral {
    color: #6c757d;
}

.scale-label.positive {
    color: #ffd700;
}

/* 양방향 별점 입력 - 간격 줄임 */
.bidirectional-stars {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 3px; /* 8px에서 3px로 줄임 */
    margin: 15px 0;
}

.bidirectional-stars input {
    display: none;
}

.bidirectional-stars label {
    position: relative;
    cursor: pointer;
    font-size: 36px;
    transition: all 0.2s ease;
    color: #dee2e6;
}

.bidirectional-stars label i {
    display: inline-block !important;
    color: inherit;
}

/* 양방향 별 위의 숫자 - 별 내부에 위치 */
.bidirectional-stars .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    pointer-events: none;
    z-index: 2;
    margin-left: -1px; /* 별과 정확히 중앙 맞춤 */
}

/* 음수 별 hover 및 checked 상태 */
.bidirectional-stars .negative-star:hover {
    color: #f06292;
    transform: scale(1.1);
}

.bidirectional-stars .negative-star:hover .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

.bidirectional-stars input:checked + .negative-star {
    color: #f06292;
    transform: scale(1.1);
}

.bidirectional-stars input:checked + .negative-star .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

/* 0점 별 hover 및 checked 상태 */
.bidirectional-stars .neutral-star:hover {
    color: #6c757d;
    transform: scale(1.1);
}

.bidirectional-stars .neutral-star:hover .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

.bidirectional-stars input:checked + .neutral-star {
    color: #6c757d;
    transform: scale(1.1);
}

.bidirectional-stars input:checked + .neutral-star .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

/* 양수 별 hover 및 checked 상태 */
.bidirectional-stars .positive-star:hover {
    color: #ffd700;
    transform: scale(1.1);
}

.bidirectional-stars .positive-star:hover .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

.bidirectional-stars input:checked + .positive-star {
    color: #ffd700;
    transform: scale(1.1);
}

.bidirectional-stars input:checked + .positive-star .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

/* 양방향 평점 표시 스타일 - 간격 줄임 */
.bidirectional-stars-display {
    display: inline-flex;
    gap: 2px; /* 3px에서 2px로 줄임 */
    align-items: center;
    justify-content: center;
}

/* 큰 양방향 별점 */
.bidirectional-stars-display.large .bidirectional-star {
    font-size: 28px;
    position: relative;
    display: inline-block;
}

.bidirectional-stars-display.large .bidirectional-star .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

.bidirectional-star {
    position: relative;
    display: inline-block;
    font-size: 16px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.bidirectional-star.selected {
    opacity: 1;
    transform: scale(1.2);
}

.bidirectional-star.negative-star i {
    color: #f06292;
}

.bidirectional-star.neutral-star i {
    color: #6c757d;
}

.bidirectional-star.positive-star i {
    color: #ffd700;
}

.bidirectional-star .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 7px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

/* 통합평점의 양방향 표시 개선 */
.total-ratings .bidirectional-stars-display {
    justify-content: center;
    gap: 4px; /* 간격 추가 */
}

.total-ratings .bidirectional-star {
    font-size: 32px; /* 22px에서 32px로 대폭 증가 */
    position: relative;
    display: inline-block;
}

.total-ratings .bidirectional-star .star-number {
    font-size: 12px; /* 8px에서 12px로 증가 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

/* 개별 댓글의 양방향 평점 표시 - 별 크기 확대 */
.comment-ratings .bidirectional-stars-display {
    justify-content: flex-start;
    gap: 4px; /* 간격 추가 */
}

.comment-ratings .bidirectional-star {
    font-size: 36px; /* 24px에서 36px로 대폭 증가 */
    display: inline-block;
    position: relative;
}

.comment-ratings .bidirectional-star .star-number {
    font-size: 13px; /* 9px에서 13px로 증가 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
}

/* 🌟🌟🌟 4-3. 모바일 모드 - 단방향 세로바 (Mobile Unidirectional Bars) 🌟🌟🌟 */

/* 모바일 단방향 세로바 기본 */
.unidirectional-bars-mobile {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    padding: 15px;
    height: 80px;
}

.unidirectional-bars-mobile .rating-bar {
    width: 38px; /* 32px에서 28px로 줄임 */
    height: 40px;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.4;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.unidirectional-bars-mobile .rating-bar.selected {
    opacity: 1;
    height: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 단방향 모바일 바를 양방향과 동일한 크기로 */
.unidirectional-bars-mobile.large {
    height: 80px;
    gap: 4px;
    padding: 10px;
}

.unidirectional-bars-mobile.large .rating-bar {
    width: 30px;
    height: 40px;
}

.unidirectional-bars-mobile.large .rating-bar.selected {
    height: 60px;
}

.unidirectional-bars-mobile.large .bar-number {
    font-size: 11px;
}

/* 단방향 바에도 medium 크기 적용 */
.unidirectional-bars-mobile.medium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    padding: 12px;
    height: 65px;
}

.unidirectional-bars-mobile.medium .rating-bar {
    width: 30px;
    height: 35px;
}

.unidirectional-bars-mobile.medium .rating-bar.selected {
    height: 50px;
}

.unidirectional-bars-mobile.medium .bar-number {
    font-size: 11px;
}

/* 🌟🌟🌟 4-4. 모바일 모드 - 양방향 세로바 (Mobile Bidirectional Bars) 🌟🌟🌟 */

/* 모바일 전용 세로 바 스타일 */
.bidirectional-bars-mobile {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    padding: 10px;
    height: 80px;
}

.bidirectional-bars-mobile.small {
    height: 60px;
    gap: 3px;
}

/* 통합평점 상세 항목용 중간 크기 바 */
.bidirectional-bars-mobile.medium {
    height: 70px;
    gap: 3px;
    padding: 8px;
}

.bidirectional-bars-mobile.medium .rating-bar {
    width: 28px;
    height: 35px;
}

.bidirectional-bars-mobile.medium .rating-bar.selected {
    height: 55px;
}

.bidirectional-bars-mobile.medium .bar-number {
    font-size: 11px;
}

/* 🌟🌟🌟 4-5. 모바일 세로바 공통 스타일 (Mobile Bar Common Styles) 🌟🌟🌟 */

.rating-bar {
    width: 40px; /* 36px에서 30px로 줄임 */
    height: 50px;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.4;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bidirectional-bars-mobile.small .rating-bar {
    width: 26px; /* 30px에서 26px로 줄임 */
    height: 30px;
}

.rating-bar.selected {
    opacity: 1;
    height: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.bidirectional-bars-mobile.small .rating-bar.selected {
    height: 45px;
}

/* 세로바 색상 시스템 */
.rating-bar.negative-bar {
    background: linear-gradient(to top, #f06292, #e85d6d);
    align-items: flex-start; /* 음수 바는 아래쪽에서 위로 성장 */
}

.rating-bar.neutral-bar {
    background: linear-gradient(to top, #6c757d, #8a9299);
}

.rating-bar.positive-bar {
    background: linear-gradient(to top, #ffd700, #ffd700);
}

/* 세로바 숫자 표시 */
.bar-number {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    margin-bottom: 2px;
    line-height: 1;
}

/* 기본 상태(평가 안된 흐린 바) - 검은색 숫자만 */
.rating-bar.positive-bar .bar-number {
    color: #000 !important; /* 검은색 */
    text-shadow: none !important; /* 그림자 없음 */
    font-weight: 900 !important;
    font-size: 13px !important;
}

/* 선택된 상태(진한 노란 바) - 흰색 숫자 + 남색 그림자 */
.rating-bar.positive-bar.selected .bar-number {
    color: #fff !important; /* 흰색 */
    text-shadow: 1px 1px 2px rgba(26, 35, 126, 0.8) !important; /* 남색 그림자 */
    font-weight: 900 !important;
    font-size: 13px !important;
}

.bidirectional-bars-mobile.small .bar-number {
    font-size: 10px;
}

/* 음수 바는 아래쪽에서 위로 성장 */
.rating-bar.negative-bar .bar-number {
    margin-bottom: 0;
    margin-top: 2px;
}

/* 🌟🌟🌟 4-6. 모바일 평점 라벨 및 헤더 (Mobile Rating Labels & Headers) 🌟🌟🌟 */

.badge-scale-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.scale-text-badge {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.scale-text-badge.negative {
    background-color: #f8d7da;
    color: #f06292;
}

.scale-text-badge.neutral {
    background-color: #e9ecef;
    color: #6c757d;
}

.scale-text-badge.positive {
    background-color: #d4edda;
    color: #ffd700;
}

/* 모바일 전용 평점 헤더 */
.mobile-total-rating-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-comment-rating-header {
    background-color: #ffffff; /* 흰색 배경 */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 5px 15px;
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-comment-rating-header span {
    flex-grow: 1;
}

.mobile-comment-rating-header .toggle-icon {
    color: #007bff; /* 파란색 아이콘으로 강조 */
    margin-left: 10px;
    cursor: pointer;
}

/* 모바일 평점 헤더 클릭 가능하게 */
.mobile-rating-clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-rating-clickable:hover {
    background: #e9ecef;
}

.mobile-rating-clickable:active {
    background: #dee2e6;
}

/* 모바일 평점 컨테이너 */
.mobile-rating-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 70%;
    max-width: 400px;
}

/* 새로운 모바일 평점 정보 박스 */
.mobile-total-rating-info-new {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
}

.mobile-participants-box {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 80px;
    text-align: center;
}

/* 모바일 토글 화살표 */
.mobile-toggle-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 30px;
    margin-top: 5px;
    cursor: pointer;
}

.mobile-toggle-arrow i {
    font-size: 20px;
    color: #939dff;
    transition: transform 0.3s ease;
}

.mobile-toggle-arrow:hover i {
    color: #7c85fc;
}

.mobile-toggle-arrow.open i {
    transform: rotate(180deg);
}

/* ===================================================================
   SECTION 5: 평점 입력 폼 및 탭 시스템 (Rating Input Form & Tab System)
=================================================================== */

/* 5-1. 평점 입력 폼 영역 */
.rating-section {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
}

.rating-wrap {
    position: relative;
}

/* 5-2. 평점 탭 네비게이션 영역 */
.rating-tabs {
    display: flex;
    align-items: start;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.rating-current {
    padding: 12px 15px;
    min-width: 140px;
    width: auto;
    font-weight: bold;
    color: #495057;
    display: flex;
    align-items: center;
}

.rating-current .fa-refresh {
    cursor: pointer;
    margin-right: 0px;
}

.rating-current .fa-refresh:hover {
    opacity: 0.7;
}

.rating-current .fa-star-o {
    margin-right: 5px;
}

.rating-tab-list {
    display: flex;
    padding: 8px 15px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rating-tab-list::-webkit-scrollbar {
    display: none;
}

.rating-tab-btn {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 30px;
    padding: 4px 28px 4px 12px;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.2s ease; /* 부드러운 전환 효과 */
}

/* 탭 hover 효과 */
.rating-tab-btn:hover {
    background: #4a5568;
    border-color: #4a5568;
    color: #fff;
}

.rating-tab-btn.active {
    background: #4a5568;
    border-color: #4a5568;
    color: #fff;
}

/* 양방향 평점 배지가 있는 탭도 동일한 크기 적용 */
.rating-tab-btn.rating-type-badge {
    padding: 4px 28px 4px 12px; /* 단방향과 동일한 패딩 */
    font-size: 0.9rem; /* 단방향과 동일한 폰트 크기 */
    background: none;
    color: #495057;
}

/* 양방향 탭 hover 효과도 동일하게 적용 */
.rating-tab-btn.rating-type-badge:hover {
    background: #4a5568;
    border-color: #4a5568;
    color: #fff;
}

/* active와 rated 상태 스타일 분리 */
.rating-tab-btn.active {
    background: #4a5568 !important;
    border-color: #4a5568 !important;
    color: #fff !important;
}

/* 평점 입력 완료된 탭 - 연한 하늘색 */
.rating-tab-btn.rated:not(.active) {
    background-color: #e7f1ff;
    border-color: #b8daff;
    color: #495057;
    position: relative;
    padding-right: 28px;
}

/* 양방향 평점 탭도 동일한 스타일 적용 */
.rating-tab-btn.rated:not(.active).rating-type-badge {
    background-color: #e7f1ff;
    border-color: #b8daff;
    color: #495057;
    position: relative;
    padding-right: 28px;
}

.rating-tab-btn .required {
    color: #ff6b6b;
    margin-left: 2px;
}

/* 체크마크 스타일 추가 */
.rating-tab-btn .check-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    color: #ff6b6b;
    transition: opacity 0.2s ease-in-out;
    font-size: 0.85em;
}

.rating-tab-btn.rated .check-icon {
    opacity: 1;
}

/* 5-3. 평점 입력 컨텐츠 영역 */
.rating-content {
    display: none;
    padding: 15px;
}

.rating-content.active {
    display: block;
}

.rating-comment textarea {
    border: 1px solid #dee2e6;
    resize: none;
}

/* 단방향 평점의 불필요한 여백 제거 */
.unidirectional-rating {
    text-align: center;
    padding: 15px 0; /* 양방향과 동일한 패딩으로 수정 */
}

/* 5-4. 평가방식 배지 - 탭 내부가 아닌 별도 표시용 */
.rated-title .rating-type-badge {
    display: inline-block;
    background: #17a2b8;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
    font-weight: normal;
}

/* ===================================================================
   SECTION 6: 통합평점 영역 (Total Ratings Section)
=================================================================== */

/* 6-1. 통합평점 컨테이너 */
.total-ratings {
    background: linear-gradient(145deg, #f8f9ff, #f0f3ff);
    border: 1px solid rgba(147, 157, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: #555;
    box-shadow: 0 3px 10px rgba(147, 157, 255, 0.08);
}

/* 6-2. 통합평점 헤더 */
.total-ratings-header h5 {
    color: #555;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.total-participants {
    color: #939dff;
    font-size: 0.85rem;
    font-weight: 400;
}

/* 6-3. 통합평점 평균 영역 */
.total-ratings-average {
    text-align: center;
    padding: 15px 0 5px;
    cursor: pointer;
}

.total-ratings-average .average-score {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.7);
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(147, 157, 255, 0.08);
}

/* 통합평점 별점 스타일 */
.total-ratings .rating-stars .partial-stars {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #939dff;
}

.total-ratings .rating-stars .empty-stars {
    color: #ddd;
}

/* 평균 평점의 별 크기 */
.total-ratings-average .rating-stars {
    font-size: 40px; /* 32px에서 40px로 증가 */
    position: relative;
    display: inline-flex;
}

.total-ratings-average .rating-stars .fa {
    margin-right: 3px; /* 2px에서 3px로 증가 */
}

/* 항목별 별점 크기도 조정 */
.total-ratings .rating-item-row .rating-stars {
    font-size: 28px; /* 24px에서 28px로 증가 */
}

.total-ratings .rating-item-row .rating-stars .fa {
    margin-right: 2px; /* 1px에서 2px로 증가 */
}

.total-ratings-average .score-text {
    font-size: 20px;
    font-weight: 600;
    color: #555;
    line-height: 1;
}

.total-ratings-average .toggle-icon {
    margin-left: 5px;
    color: #939dff;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.total-ratings-average.open .toggle-icon {
    transform: rotate(180deg);
}

/* 6-4. 통합평점 항목별 평점 리스트 */
.total-ratings-items {
    display: none;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.rating-item-row {
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-align: center;
}

.rating-item-row:hover {
    background: rgba(255,255,255,0.8);
}

.rating-item-row .item-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rating-item-row .score-text {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.rating-item-row .participants-count {
    color: #939dff;
    font-size: 0.85rem;
}

.rating-item-row .item-title {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.total-ratings .rating-info-icon {
    color: #939dff;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    margin-left: 2px;
}

.total-ratings .rating-info-icon:hover {
    opacity: 1;
}

/* ===================================================================
   SECTION 7: 평점 항목 연결 고리 디자인 (Rating Item Connectors)
=================================================================== */

/* 7-1. 평점 항목 연결 고리 */
.rating-item-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-left: 40px;
}

.rating-item-wrapper:last-child {
    margin-bottom: 0;
}

.rating-connector {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.connector-line-top {
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, transparent, #ddd);
}

.connector-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    margin: 2px 0;
    flex-shrink: 0;
}

.connector-circle i {
    color: white;
    font-size: 6px;
}

.connector-line-bottom {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, #ddd, transparent);
    min-height: 15px;
}

/* 첫 번째 아이템은 위쪽 선 제거 */
.rating-item-wrapper:first-child .connector-line-top {
    display: none;
}

/* 마지막 아이템은 아래쪽 선 제거 */
.rating-item-wrapper:last-child .connector-line-bottom {
    display: none;
}

.rating-item-content {
    flex: 1;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.rating-item-content:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.rating-bars-section {
    margin-top: 5px;
    padding-top: 0px;
}

/* 7-2. 통합평점 연결 고리 스타일 */
.total-rating-wrapper {
    margin-bottom: 25px;
}

.total-rating-wrapper:last-child {
    margin-bottom: 0;
}

.total-connector {
    background: linear-gradient(135deg, #ffd700 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.total-rating-content {
    background: #f0f8f0;
    border: 1px solid #d1ecf1;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.total-rating-content:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

/* 첫 번째 통합평점 아이템은 위쪽 선 제거 */
.total-rating-wrapper:first-child .connector-line-top {
    display: none;
}

/* 마지막 통합평점 아이템은 아래쪽 선 제거 */
.total-rating-wrapper:last-child .connector-line-bottom {
    display: none;
}

/* ===================================================================
   SECTION 8: 항목명 및 스타일링 (Item Titles & Styling)
=================================================================== */

/* 8-1. 항목명 배경박스 스타일 */
.item-title-box,
.rated-title-box {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    margin-right: 10px;
}

.item-title-box:hover,
.rated-title-box:hover {
    background: #e9ecef;
}

/* PC 전용 항목명 박스 - 너비 제한 */
.item-title-box-pc {
    background: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 150px;
    max-width: 250px;
    margin-right: 15px;
}

.item-title-box-pc .item-score-badge {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 8-2. 항목 정보 스타일 개선 - 한 줄로 배치 */
.rating-item .item-info {
    margin-bottom: 10px;
}

.rating-item .item-title-box {
    background: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 200px;
    width: 100%;
    max-width: 100%;
}

.rating-item .item-score-badge {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===================================================================
   SECTION 9: 모달 및 팝업 (Modals & Popups)
=================================================================== */

/* 9-1. 평점 정보 아이콘과 모달 */
.rating-info-icon {
    display: inline-block;
    margin-left: 4px;
    color: #adb5bd;
    cursor: pointer;
    font-size: 0.9em;
    vertical-align: middle;
}

.rating-info-icon:hover {
    color: #495057;
}

.rating-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1060;
}

.rating-info-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rating-info-text {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    word-break: keep-all;
    text-align: center;
}

.rating-info-close {
    display: block;
    width: 100%;
    padding: 8px;
    background: #e9ecef;
    border: none;
    border-radius: 4px;
    color: #495057;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.rating-info-close:hover {
    background: #dee2e6;
}

/* 9-2. 평점 도움말 아이콘 */
.rating-help-icon {
    color: #007bff;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.rating-help-icon:hover {
    color: #0056b3;
}

/* 9-3. 평점 도움말 모달 */
.rating-help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1070;
}

.rating-help-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.rating-help-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.rating-help-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.help-section {
    margin-bottom: 20px;
}

.device-info {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.pc-info {
    background: #f8f9ff;
    border-color: #c3d4ff;
}

.mobile-info {
    background: #fff8f0;
    border-color: #ffcc80;
}

.device-info h5 {
    color: #495057;
    margin-bottom: 12px;
    font-weight: 600;
}

.help-content {
    text-align: center;
}

.star-demo {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: starPulse 2s infinite;
}

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

.bar-demo {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 10px;
    height: 40px;
}

.demo-bar {
    width: 20px;
    height: 20px;
    background: #dee2e6;
    border-radius: 3px 3px 0 0;
    transition: all 0.3s ease;
}

.demo-bar.selected {
    height: 35px;
    background: linear-gradient(to top, #ffd700, #ffd700);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: barBounce 2s infinite;
}

@keyframes barBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.help-content p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}

.help-tip {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-tip span {
    color: #856404;
    font-weight: 500;
    font-size: 0.9rem;
}

/* 9-4. 단계별 설명 스타일 */
.step-info {
    background: #e8f4fd;
    border: 2px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.step-info h5 {
    color: #0066cc;
    margin-bottom: 15px;
    font-weight: 600;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important; /* 둥근 사각형으로 변경 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    transition: transform 0.2s ease !important;
}

.step-number:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.step-text {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.4;
}

.step-text strong {
    color: #007bff;
    font-weight: 600;
}

/* ===================================================================
   SECTION 10: 공통 입력 요소 (Common Input Elements)
=================================================================== */

/* 10-1. 별 아이콘 기본 상태 - 모든 별을 기본적으로 보이게 수정 */
.rating-stars label {
    cursor: pointer;
    font-size: 24px;
    color: #dee2e6; /* 기본 색상 설정 */
    display: inline-block;
}

.rating-stars label i {
    color: inherit; /* 부모의 색상 상속 */
    display: inline-block !important; /* 모든 별 아이콘을 항상 보이도록 강제 */
}

/* 입력용 별점 - 기본적으로 빈 별 표시 */
.rating-content .rating-stars label {
    color: #dee2e6;
}

/* 별 아이콘 전환 효과 제거 - 단순화 */
.rating-stars input,
.bidirectional-stars input {
    display: none;
}

/* ===================================================================
   SECTION 11: 반응형 미디어 쿼리 (Responsive Media Queries)
=================================================================== */

/* 11-1. 태블릿 크기 (768px 이하) */
@media (max-width: 768px) {
    /* 댓글 평점 영역 */
    .comment-ratings {
        padding: 10px;
    }
    
    .rating-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    /* 평점 탭 시스템 */
    .rating-tabs {
        flex-direction: column;
    }
    
    .rating-current {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        padding: 8px 15px;
        font-size: 0.9rem;
        text-align: center;
    }

    .rating-tab-list {
        width: 100%;
        max-width: 100%;
        padding: 8px 3px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .rating-tab-btn {
        padding: 3px 24px 3px 10px;
        font-size: 0.85rem;
        flex: 0 0 auto;
    }

    .rating-tab-btn .check-icon {
        right: 8px;
        font-size: 0.8em;
    }

    .rating-average {
        gap: 5px;
    }
    
    .score-text,
    .item-title {
        font-size: 0.9rem;
    }
    
    /* 모바일에서 항목명 박스 크기 조정 */
    .item-title-box,
    .rated-title-box,
    .item-title-box-pc {
        font-size: 0.9rem;
        padding: 4px 8px;
        margin-right: 0;
        margin-bottom: 0;
    }

    /* 개별 댓글 평점 세로 배치 */
    .rating-details .item-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }
    
    /* 개별 댓글도 항목명과 점수를 한 줄로 */
    .rating-details .item-info {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        white-space: nowrap;
        order: 1;
    }
    
    .rating-details .rating-stars,
    .rating-details .bidirectional-stars-display {
        order: 2;
    }

    /* 평점 바 크기 조정 */
    .rating-item {
        flex-wrap: nowrap;
    }
    
    .rating-stars {
        min-width: 120px;
    }

    /* 통합평점 크기 조정 */
    .total-ratings {
        padding: 12px;
    }
    
    .total-ratings-average .rating-stars {
        font-size: 20px;
    }
    
    .total-ratings-average .rating-stars .fa {
        margin-right: 0;
    }
    
    .total-ratings .rating-item-row .rating-stars {
        font-size: 16px;
    }
    
    .total-ratings .rating-item-row .rating-stars .fa {
        margin-right: -1px;
    }
    
    .total-ratings-items {
        padding: 10px;
    }
    
    .rating-item-row {
        padding: 5px;
    }
    
    .rating-item-row .item-content {
        gap: 4px;
    }

    /* 통합평점 개별 항목 세로 배치 */
    .rating-item-row .item-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }
    
    /* 항목명, 점수, 인원을 한 줄로 */
    .rating-item-row .item-info {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        white-space: nowrap;
        order: 1;
    }
    
    .rating-item-row .rating-stars,
    .rating-item-row .bidirectional-stars-display {
        order: 2;
    }

    /* PC 양방향 별점 크기 조정 */
    .rating-scale-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
        margin-bottom: 10px;
        padding: 0 15px;
    }
    
    .rating-scale-info .scale-label {
        font-size: 0.8rem;
        font-weight: 500;
    }
    
    .bidirectional-stars {
        gap: 2px; /* 모바일에서도 간격 줄임 */
    }
    
    .bidirectional-stars label {
        font-size: 20px;
    }
    
    .bidirectional-stars .star-number {
        font-size: 8px;
    }
    
    .bidirectional-stars-display {
        gap: 1px; /* 모바일에서도 간격 줄임 */
    }
    
    .bidirectional-star {
        font-size: 14px;
    }
    
    .bidirectional-star .star-number {
        font-size: 7px;
    }
    
    .unidirectional-rating {
        padding: 8px 0; /* 조금 늘림 */
    }

    /* 연결고리 크기 조정 */
    .rating-item-wrapper {
        padding-left: 35px;
        margin-bottom: 15px;
    }
    
    .rating-connector {
        width: 25px;
    }
    
    .connector-circle {
        width: 14px;
        height: 14px;
    }
    
    .connector-circle i {
        font-size: 5px;
    }
    
    .connector-line-top,
    .connector-line-bottom {
        width: 1.5px;
    }
    
    .connector-line-top {
        height: 12px;
    }
    
    .connector-line-bottom {
        min-height: 12px;
    }
    
    .rating-item-content {
        padding: 12px;
        border-radius: 10px;
    }
    
    .rating-bars-section {
        margin-top: 3px;
        padding-top: 0px;
    }

    /* 통합평점 연결고리 크기 조정 */
    .total-rating-wrapper {
        margin-bottom: 18px;
    }
    
    .total-rating-content {
        padding: 15px;
        border-radius: 10px;
    }

    /* 모달 크기 조정 */
    .rating-info-modal-content {
        max-width: 280px;
        padding: 15px;
    }
    
    .rating-info-text {
        font-size: 0.9rem;
    }

    .rating-help-modal-content {
        max-width: 350px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h4 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .device-info {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .star-demo {
        font-size: 1.5rem;
    }
    
    .bar-demo {
        height: 35px;
    }
    
    .demo-bar {
        width: 18px;
        height: 18px;
    }
    
    .demo-bar.selected {
        height: 28px;
    }

    .step-info {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .step-content {
        gap: 10px;
    }
    
    .step-number {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }
    
    .step-text {
        font-size: 0.9rem;
    }
}

/* 11-2. 모바일 크기 (480px 이하) */
@media (max-width: 480px) {
    /* PC 별점 더 작게 */
    .bidirectional-stars label {
        font-size: 18px;
    }
    
    .bidirectional-stars .star-number {
        font-size: 7px;
    }
    
    .bidirectional-star {
        font-size: 12px;
    }
    
    .bidirectional-star .star-number {
        font-size: 6px;
    }
    
    /* 모바일 세로바 크기 조정 */
    .bidirectional-bars-mobile {
        gap: 3px;
        height: 70px;
    }
    
    .bidirectional-bars-mobile.small {
        height: 50px;
        gap: 2px;
    }
    
    .unidirectional-bars-mobile {
        gap: 5px;
        height: 70px;
    }
    
    .rating-bar {
        width: 26px; /* 30px에서 26px로 줄임 */
        height: 35px;
    }
    
    .bidirectional-bars-mobile.small .rating-bar {
        width: 22px; /* 26px에서 22px로 줄임 */
        height: 25px;
    }
    
    .unidirectional-bars-mobile .rating-bar {
        width: 24px; /* 28px에서 24px로 줄임 */
        height: 30px;
    }
    
    .rating-bar.selected {
        height: 50px;
    }
    
    .bidirectional-bars-mobile.small .rating-bar.selected {
        height: 50px;
    }
    
    .unidirectional-bars-mobile .rating-bar.selected {
        height: 55px;  /* 35px → 60px = 1.7배로 증가 */
    }
    
    .bar-number {
        font-size: 10px;
    }
    
    .bidirectional-bars-mobile.small .bar-number {
        font-size: 9px;
    }

    .rating-item .item-title-box {
        font-size: 0.9rem;
        padding: 4px 8px;
        min-width: 150px;
    }
    
    .rating-item .item-score-badge {
        font-size: 0.75rem;
        padding: 1px 6px;
        margin-left: 6px;
    }

    .unidirectional-bars-mobile.large {
        height: 70px;
        gap: 3px;
    }
    
    .unidirectional-bars-mobile.large .rating-bar {
        width: 26px;
        height: 35px;
    }
    
    .unidirectional-bars-mobile.large .rating-bar.selected {
        height: 50px;
    }
    
    .unidirectional-bars-mobile.large .bar-number {
        font-size: 10px;
    }
    
    .bidirectional-bars-mobile.medium {
        height: 60px;
        gap: 2px;
        padding: 6px;
    }
    
    .bidirectional-bars-mobile.medium .rating-bar {
        width: 24px;
        height: 30px;
    }
    
    .bidirectional-bars-mobile.medium .rating-bar.selected {
        height: 45px;
    }
    
    .bidirectional-bars-mobile.medium .bar-number {
        font-size: 10px;
    }
    
    .unidirectional-bars-mobile.medium {
        height: 55px;
        gap: 2px;
        padding: 6px;
    }
    
    .unidirectional-bars-mobile.medium .rating-bar {
        width: 22px;
        height: 30px;
    }
    
    .unidirectional-bars-mobile.medium .rating-bar.selected {
        height: 40px;
    }

    .mobile-total-rating-info-new {
        font-size: 1rem;
        padding: 10px 16px;
    }
    
    .mobile-participants-box {
        font-size: 1rem;
        padding: 10px 16px;
    }

    .rating-item-wrapper {
        padding-left: 30px;
        margin-bottom: 12px;
    }
    
    .rating-connector {
        width: 20px;
    }
    
    .connector-circle {
        width: 12px;
        height: 12px;
    }
    
    .connector-circle i {
        font-size: 4px;
    }
    
    .rating-item-content {
        padding: 10px;
        border-radius: 8px;
    }

    .total-rating-wrapper {
        margin-bottom: 15px;
    }
    
    .total-rating-content {
        padding: 12px;
        border-radius: 8px;
    }

    .unidirectional-rating {
        padding: 5px 0;
    }
}

/* 11-3. 작은 모바일 크기 (400px 이하) */
@media (max-width: 400px) {
    .total-ratings-average .rating-stars {
        font-size: 18px;
    }
    
    .total-ratings .rating-item-row .rating-stars {
        font-size: 15px;
    }
    
    .rating-item-row .score-text,
    .rating-item-row .participants-count,
    .rating-item-row .item-title {
        font-size: 0.85rem;
    }
}

/* 11-4. 매우 작은 모바일 (375px 이하) */
@media (max-width: 375px) {
    .rating-current {
        width: 100%;
        min-width: auto;
        font-size: 0.85rem;
        padding: 6px 15px;
    }
    
    .rating-tab-list {
        padding: 6px 2px;
    }
}

/* 11-5. 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
    .rating-bar {
        width: 24px;
    }
    
    .bidirectional-bars-mobile.small .rating-bar {
        width: 20px;
    }
    
    .unidirectional-bars-mobile .rating-bar {
        width: 22px;
        height: 28px; /* 기본 높이 명시 */
    }
    
    /* selected 높이 추가 - 정상적인 비율로 */
    .unidirectional-bars-mobile .rating-bar.selected {
        height: 60px; /* 35px → 60px = 1.7배 비율 */
    }
    
    .bidirectional-bars-mobile {
        gap: 2px;
    }
    
    .bidirectional-bars-mobile.small {
        gap: 1px;
    }
    
    .unidirectional-bars-mobile {
        gap: 2px;
    }

    .rating-item .item-title-box {
        font-size: 0.85rem;
        padding: 3px 6px;
        min-width: 120px;
    }
    
    .rating-item .item-score-badge {
        font-size: 0.7rem;
        padding: 1px 4px;
        margin-left: 4px;
    }

    .unidirectional-bars-mobile.large .rating-bar {
        width: 24px;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .mobile-total-rating-info-new {
        font-size: 0.95rem;
        padding: 8px 14px;
    }
}

/* ===================================================================
   SECTION 12: 기타 유틸리티 및 공통 스타일 (Utilities & Common Styles)
=================================================================== */

/* 12-1. 단방향 평점 - 중앙정렬 강화 */
.rating-stars.unidirectional-large {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1px;
    font-size: 40px;
    width: 100% !important;
    text-align: center !important;
}

.rating-stars.unidirectional-large[data-max-score="10"] {
    gap: 0px;
}

.rating-stars.unidirectional-large .unidirectional-star {
    position: relative;
    display: inline-block;
    font-size: 40px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.rating-stars.unidirectional-large .unidirectional-star.selected {
    opacity: 1;
}

.rating-stars.unidirectional-large .unidirectional-star i {
    color: #ffd700;
}

/* 단방향 별 숫자 - 모든 경우에 별 내부에 위치 */
.rating-stars.unidirectional-large .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
    margin-left: -1px; /* 별과 정확히 중앙 맞춤 */
}

/* 별이 10개일 때는 숫자 크기만 조정 */
.rating-stars.unidirectional-large[data-max-score="10"] .star-number {
    font-size: 11px;
}

/* 12-2. 단방향 입력 별점 - 중앙정렬 강화 */
.rating-stars.unidirectional-input-large {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px;
    width: 100% !important;
    text-align: center !important;
}

.rating-stars.unidirectional-input-large[data-max-score="10"] {
    gap: 0px;
}

.rating-stars.unidirectional-input-large label {
    position: relative;
    cursor: pointer;
    font-size: 36px;
    color: #dee2e6;
    transition: all 0.2s ease;
}

.rating-stars.unidirectional-input-large label:hover,
.rating-stars.unidirectional-input-large input:checked ~ label {
    color: #ffd700;
}

/* 단방향 입력 별 숫자 - 모든 경우에 별 내부에 위치 */
.rating-stars.unidirectional-input-large .star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    pointer-events: none;
    z-index: 2;
    margin-left: -1px; /* 별과 정확히 중앙 맞춤 */
}

/* 별이 10개일 때는 숫자 크기만 조정 */
.rating-stars.unidirectional-input-large[data-max-score="10"] .star-number {
    font-size: 10px;
}

.rating-stars.unidirectional-input-large label:hover .star-number,
.rating-stars.unidirectional-input-large input:checked ~ label .star-number {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

/* ===================================================================
   파일 끝 - 총 라인수: 약 1500+ 라인
   마지막 수정: 평점 시스템 완전 통합 정리 완료
=================================================================== */