@charset "utf-8";

/* gogojuso 메인(#mainContent) — SNS 바로가기와 동일 계열: paper, ink, accent #ff3300 / #5e81e7 */

.popular-rank-card {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, #e4e5f5 0%, #f4f4f0 100%);
	border: 1px solid #c8c8c0;
	border-radius: 1rem;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.95) inset,
		0 2px 0 rgba(17, 17, 17, 0.06),
		0 10px 28px -14px rgba(17, 17, 17, 0.14);
	padding: 1rem 1.125rem 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}
.popular-rank-card:hover {
	border-color: #a8a89e;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.95) inset,
		0 8px 28px -12px rgba(17, 17, 17, 0.18);
}

/* 상단 포인트 바 (기존 어두운 그라데이션 대신) */
.popular-rank-header_top {
	position: absolute;
	z-index: 0;
	left: 0;
	top: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, #5e81e7 0%, #ff3300 100%);
	border-radius: 1rem 1rem 0 0;
	pointer-events: none;
}

.popular-rank-header {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding-bottom: 0.75rem;
	margin-bottom: 0.5rem;
	border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}

.popular-rank-icon {
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #a8a89e;
	border-radius: 0.5rem;
	flex-shrink: 0;
	color: #5e81e7;
	font-size: 0.9rem;
	box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06);
}

.popular-rank-title {
	flex: 1;
	min-width: 0;
	font-size: 0.9375rem;
	font-weight: 800;
	margin: 0;
	letter-spacing: -0.02em;
}
.popular-rank-title a {
	color: #0f172a;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
	transition: color 0.2s ease;
}
.popular-rank-title a:hover {
	color: #ff3300;
}

.popular-rank-more {
	color: #64748b;
	padding: 0.25rem 0.35rem;
	border-radius: 0.375rem;
	font-size: 0.85rem;
	transition: color 0.2s ease, background 0.2s ease;
}
.popular-rank-more:hover {
	color: #ff3300;
	background: rgba(255, 51, 0, 0.06);
}

.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.45rem 0;
	border-bottom: 1px solid rgba(17, 17, 17, 0.08);
	min-height: 2.65rem;
	transition: background-color 0.15s ease;
	border-radius: 0.375rem;
	margin: 0 -0.25rem;
	padding-left: 0.25rem;
	padding-right: 0.25rem;
}
.popular-rank-item:last-child {
	border-bottom: none;
}
.popular-rank-item:hover {
	background-color: #dfe1f9;
}
/* 1~3위: 배경 GIF는 latest.skin.php에서 지정 — 글자·메달은 위에 표시 */
.popular-rank-item--top3 {
	position: relative;
	z-index: 0;
}
.popular-rank-item--top3 > * {
	position: relative;
	z-index: 1;
}

.popular-rank-badge {
	flex-shrink: 0;
	width: 2.75rem;
	min-width: 2.75rem;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* 1~3위 메달 이모지 — 크게 표시 */
.popular-rank-medal {
	display: inline-block;
	font-size: 1.875rem;
	line-height: 1;
	font-style: normal;
	vertical-align: middle;
	-webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) {
	.popular-rank-medal {
		font-size: 2.125rem;
	}
}
.popular-rank-medal--1,
.popular-rank-medal--2,
.popular-rank-medal--3 {
	/* 이모지 자체 색상 사용 */
	filter: drop-shadow(0 1px 1px rgba(17, 17, 17, 0.12));
}

.popular-rank-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.2rem;
	font-size: 0.65rem;
	font-weight: 800;
	color: #334155;
	background: #e7e5e4;
	border: 1px solid #c8c8c0;
	border-radius: 0.35rem;
}

.popular-rank-subject {
	flex: 1;
	min-width: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #1e293b;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.2s ease;
}
.popular-rank-subject.rank_top {
	color: #c2410c;
	font-weight: 700;
}
.popular-rank-subject.rank_mid {
	color: #1d4ed8;
	font-weight: 600;
}
.popular-rank-subject:hover {
	color: #ff3300;
}

.popular-rank-link-icon {
	flex-shrink: 0;
	color: #5e81e7;
	font-size: 0.75rem;
	opacity: 0.85;
}
.popular-rank-good {
	flex-shrink: 0;
	font-size: 0.72rem;
	font-weight: 700;
	color: #dc2626;
}
.popular-rank-good i {
	margin-right: 3px;
	font-size: 0.68rem;
	opacity: 0.9;
}

.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: 0.875rem 0.875rem 0.875rem;
	}
	.popular-rank-link-icon {
		display: inline-flex;
	}
	.popular-rank-good {
		display: none;
	}
}
@media (min-width: 768px) {
	.popular-rank-link-icon {
		display: none;
	}
	.popular-rank-good {
		display: inline;
	}
}

.popular-rank-empty {
	padding: 1.75rem 0.5rem;
	text-align: center;
	color: #64748b;
	font-size: 0.875rem;
	font-weight: 500;
}

.popular-rank-footer {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.625rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(17, 17, 17, 0.1);
	font-size: 0.8125rem;
	font-weight: 700;
	color: #5e81e7;
	text-decoration: none;
	transition: color 0.2s ease;
}
.popular-rank-footer:hover {
	color: #ff3300;
}
.popular-rank-footer .fa-arrow-right {
	font-size: 0.65rem;
	opacity: 0.85;
}

.ellipsis {
	display: block;
	text-overflow: ellipsis;
	white-space: nowrap;
	word-wrap: normal;
	overflow: hidden;
}
