/* ===== 랭킹 페이지 (이미지 UI) ===== */

.ranking-page .ranking-content { padding-top: 0; }

/* 헤더: 하늘색→흰색 그라데이션 */
.ranking-header {
	background: linear-gradient(180deg, #b8d4e8 0%, #e8f2f8 40%, #fff 100%);
	padding: 1rem 1rem 1.25rem;
	border-radius: 0 0 1.5rem 1.5rem;
	margin-bottom: 0;
	box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.ranking-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 1rem 0;
	text-align: center;
}

/* 탭: 둥근 버튼, 선택 시 흰 배경 */
.ranking-tabs {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
}

.ranking-tab {
	padding: 0.5rem 1.25rem;
	border-radius: 2rem;
	border: none;
	background: rgba(255,255,255,0.6);
	color: #888;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.ranking-tab.active {
	background: #fff;
	color: #1a1a1a;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ranking-tab:not(.active):hover { background: rgba(255,255,255,0.9); color: #555; }

/* 히어로: 물결 짙은 파란 영역, 상위 3명 */
.ranking-hero {
	background: linear-gradient(165deg, #2a5a8a 0%, #3d7ab8 50%, #2d6ba3 100%);
	border-radius: 1.25rem;
	padding: 1.5rem 0.75rem 1.75rem;
	margin: -0.5rem 1rem 1rem;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 0.5rem;
	box-shadow: 0 8px 24px rgba(42,90,138,0.35);
	position: relative;
	min-height: 200px;
}

.ranking-hero::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 0;
	right: 0;
	height: 12px;
	background: #fff;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	opacity: 0.9;
}

.ranking-hero-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 auto;
}

.ranking-hero-item.rank-1 { order: 2; }
.ranking-hero-item.rank-2 { order: 1; }
.ranking-hero-item.rank-3 { order: 3; }

.ranking-hero-avatar-wrap {
	position: relative;
	margin-bottom: 0.35rem;
}

.ranking-hero-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid rgba(255,255,255,0.9);
	display: block;
}

.ranking-hero-item.rank-1 .ranking-hero-avatar { width: 80px; height: 80px; border-width: 4px; }
.ranking-hero-item.rank-2 .ranking-hero-avatar,
.ranking-hero-item.rank-3 .ranking-hero-avatar { width: 56px; height: 56px; }

.ranking-crown {
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 1.1rem;
}

.ranking-hero-item.rank-1 .ranking-crown { font-size: 1.4rem; top: -8px; }

.ranking-crown.gold { color: #ffd700; }
.ranking-crown.silver { color: #c0c0c0; }
.ranking-crown.bronze { color: #cd7f32; }

.ranking-hero-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: rgba(255,255,255,0.95);
	color: #2a5a8a;
	font-size: 0.75rem;
	font-weight: 700;
	margin-bottom: 0.25rem;
}

.ranking-hero-points {
	font-size: 0.8rem;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.ranking-hero-points i { color: #ffd93d; }

/* 목록: 흰 카드 */
.ranking-list-wrap {
	background: #fff;
	padding: 0 1rem 2rem;
	min-height: 120px;
}

.ranking-list { display: flex; flex-direction: column; gap: 0.6rem; }

.ranking-list-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.9rem;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.06);
	text-decoration: none;
	color: #1a1a1a;
	transition: box-shadow .2s;
}

.ranking-list-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.1); color: #1a1a1a; }

.ranking-list-rank {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: #f0f0f0;
	color: #333;
	font-size: 0.8rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ranking-list-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.ranking-list-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.ranking-list-flag {
	position: absolute;
	bottom: -2px;
	left: -2px;
	font-size: 0.7rem;
	line-height: 1;
}

.ranking-list-info {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
}

.ranking-list-name {
	font-size: 0.95rem;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ranking-list-sex {
	font-size: 0.8rem;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	flex-shrink: 0;
}

.ranking-list-sex.sex-f { color: #e91e8c; }
.ranking-list-sex.sex-f i { color: #e91e8c; }
.ranking-list-sex.sex-m { color: #2196f3; }
.ranking-list-sex.sex-m i { color: #2196f3; }

.ranking-loading,
.ranking-empty {
	text-align: center;
	padding: 1.5rem;
	color: #888;
	font-size: 0.9rem;
}

/* 하단 메뉴 여백 */
.ranking-page .menubar-area { padding-bottom: env(safe-area-inset-bottom, 0); }
