@charset "utf-8";

/* 모던 랭킹 위젯 */
.rank-widget-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 280px;
}

/* 헤더 */
.rank-header-compact {
    text-align: center;
    margin-bottom: 12px;
}

.rank-title-compact {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 랭킹 리스트 */
.rank-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 랭킹 아이템 */
.rank-item-compact {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.rank-item-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* 상위 3위 스타일 */
.rank-item-compact.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.rank-item-compact.rank-2 {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
}

.rank-item-compact.rank-3 {
    background: linear-gradient(135deg, #FFE4B5 0%, #CD853F 100%);
}

/* 순위 배지 */
.rank-badge-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    flex-shrink: 0;
}

.rank-medal-compact {
    font-size: 24px;
    line-height: 1;
    animation: medalRotate 3s infinite ease-in-out;
}

@keyframes medalRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-8deg) scale(1.05); }
    75% { transform: rotate(8deg) scale(1.05); }
}

.rank-num-compact {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 유저 정보 - 가로 배치로 레벨아이콘+닉네임이미지+닉네임 */
.rank-user-compact {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.user-name-compact {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: inline-block;
    line-height: 1.3;
    word-break: break-word;
}

.rank-item-compact.top-rank .user-name-compact {
    color: #1a1a1a;
    font-weight: 700;
}

/* 포인트 표시 - 오른쪽 상단에 겹쳐서 배치 */
.rank-points-compact {
    position: absolute;
    top: 6px;
    right: 10px;
    display: flex;
    align-items: baseline;
    gap: 2px;
    background: rgba(102, 126, 234, 0.95);
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.points-num-compact {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.rank-item-compact.top-rank .points-num-compact {
    font-size: 12px;
    color: #fff;
}

.points-label-compact {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.rank-item-compact.rank-1 .rank-points-compact {
    background: rgba(255, 107, 107, 0.95);
}

.rank-item-compact.rank-2 .rank-points-compact {
    background: rgba(78, 205, 196, 0.95);
}

.rank-item-compact.rank-3 .rank-points-compact {
    background: rgba(240, 147, 251, 0.95);
}

/* 푸터 */
.rank-footer-compact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.period-compact {
    color: rgba(255, 255, 255, 0.95);
    font-size: 10px;
    font-weight: 500;
}

/* 애니메이션 */
.rank-item-compact {
    animation: fadeSlideIn 0.4s ease-out;
    animation-fill-mode: both;
}

.rank-item-compact:nth-child(1) { animation-delay: 0.05s; }
.rank-item-compact:nth-child(2) { animation-delay: 0.1s; }
.rank-item-compact:nth-child(3) { animation-delay: 0.15s; }
.rank-item-compact:nth-child(4) { animation-delay: 0.2s; }
.rank-item-compact:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

