@charset "utf-8";

/* 인기순위 그리드 카드 (참고 이미지 스타일) */
.popular-rank-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.4);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.popular-rank-card:hover {
    background: rgba(31, 41, 55, 0.7);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}
.popular-rank-header_top {
	position: absolute;z-index: 0;left: 0px;top: 1px;padding: 10px;width: 100%;height: 56px;background: linear-gradient(180deg, #0e0e0e 0%, #2d2c2c14 100%);
}
.popular-rank-header {
	z-index: 1;
	overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}
.popular-rank-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    flex-shrink: 0;
}
.popular-rank-title {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}
.popular-rank-title a {
    color: #E2E8F0;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.popular-rank-title a:hover {
    color: rgb(96 165 250);
}
.popular-rank-more {
    color: #6B7280;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: color .2s;
}
.popular-rank-more:hover {
    color: rgb(96 165 250);
}

.popular-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}
.popular-rank-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(75, 85, 99, 0.15);
    min-height: 2rem;
}
.popular-rank-item:last-child {
    border-bottom: none;
}
.popular-rank-badge {
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}
.popular-rank-badge .fa-medal,
.popular-rank-badge .fa-trophy {
    font-size: 1.4rem;
}

.popular-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
}
.popular-rank-subject {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    color: #E2E8F0;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank_top {
	color : #4ADE80;
}
.rank_mid {
	color : #22D3EE;
}
.popular-rank-subject:hover {
    color: rgb(96 165 250);
}
/* 모바일: 링크 아이콘 | PC/태블릿: 좋아요 숫자 */
.popular-rank-link-icon {
    flex-shrink: 0;
    color: rgb(96 165 250);
    font-size: 0.75rem;
}
.popular-rank-good {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #e76565; /*EF4444*/
	font-weight: 600;
}
.popular-rank-good i {
    margin-right: 2px;
    font-size: 0.7rem;
}
.subject-mobile { display: inline; }
.subject-desktop { display: none; }
@media (min-width: 768px) {
    .subject-mobile { display: none; }
    .subject-desktop { display: inline; }
}
@media (max-width: 767px) {	/*모바일*/
	.popular-rank-card { padding: 1rem 0.75rem; }
    .popular-rank-link-icon { display: inline-flex; }
    .popular-rank-good { display: none; }
	/* 모바일: 제목 영역 폭 제한 → 말줄임 자동 적용 (기기마다 비율로 제한) */
    /*.popular-rank-subject { max-width: 50%; }	*/	
}
@media (min-width: 768px) { /* 테블릿,pc*/
    .popular-rank-link-icon { display: none; }
    .popular-rank-good { display: inline; }
}

.popular-rank-empty {
    padding: 2rem 0;
    text-align: center;
    color: #6B7280;
    font-size: 0.9rem;
}

.popular-rank-footer {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
    font-size: 0.85rem;
    color: rgb(96 165 250);
    text-decoration: none;
    transition: color .2s;
}
.popular-rank-footer:hover {
    color: rgb(147 197 253);
}
.ellipsis {
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
    overflow: hidden;
}