@charset "utf-8";

/* 📍[wrap] — sample_scorll + kp-infinite-scroll/infinite-scroll.css 와 동일 계열 (mask 제거: --mask 미정의 시 일부 브라우저에서 숨김) */



.ifslider-wrap {
    --gap:14px;
    position:relative;
    overflow:hidden;
    width:100%;
    max-width:600px;
    padding:10px 0;
	mask: linear-gradient(90deg, transparent, #fff 10%, #fff 90%, transparent);
	-webkit-mask:linear-gradient(90deg, transparent, #fff 10%, #fff 90%, transparent);
}
/* 📍[slider] */
.ifslider {
    display:flex;
    flex-flow:row nowrap;
    gap:var(--gap);
    position:relative;
    width:max-content;
    margin:0;
    padding:0;
    list-style:none;
    will-change:transform;
}

.ifslider {
    animation: move-infinite-scroll var(--data-speed, 50s) linear infinite forwards;
}
[data-direction="right"] .ifslider {
    animation: move-infinite-scroll var(--data-speed, 50s) linear infinite backwards reverse;
}

.ifslider:hover {
    animation-play-state: paused;
}

/* 📍[item] */
.ifslider-item {
    /*padding:8em 2em;*/
    /*background:#363b4e;*/
    /*border-radius:4px;*/
	padding: 3px 16px !important;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 999px;
    /*color: #38bdf8;*/
    font-size: 12px;
    font-weight: bold;
    /* margin-bottom: 24px; */
    /* letter-spacing: 0.05em; */
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}
/* 1~3위: PHP 가 li 에 부여 — cloneNode(true) 로 복제본에도 동일 클래스 복사 (JS·data-cloned 불필요) */
.ifslider-item--top1 {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35) 0%, rgba(202, 138, 4, 0.2) 100%);
    border-color: rgba(234, 179, 8, 0.65);
    box-shadow: 0 0 18px rgba(234, 179, 8, 0.25);
}
.ifslider-item--top2 {
    background: linear-gradient(135deg, rgba(207, 131, 9, 0.35) 0%, rgba(178, 95, 14, 0.22) 100%);
    border-color: rgba(200, 125, 28, 0.58);
    box-shadow: 0 0 16px rgba(192, 115, 20, 0.23);
}
.ifslider-item--top3 {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.35) 0%, rgba(154, 52, 18, 0.22) 100%);
    border-color: rgba(217, 119, 6, 0.55);
    box-shadow: 0 0 14px rgba(217, 119, 6, 0.2);
}
.ifslider-item a {
	color:var(--text-primary);
}

/* 📍 animation */
@keyframes move-infinite-scroll {
    to{
        transform:translateX(calc(-50% - (var(--gap) / 2)));
    }
}

/* juso79 메인(#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;
}


/* 인기검색어 */
#popular {position:relative;margin:10px 0 0}
#popular h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
/* 기존 height:20px 는 무한스크롤·ifslider 와 충돌하여 잘림 — 필요 시 max-height 만 제한 */
#popular .popular_inner {width:100%;max-width:600px;min-height:auto;overflow:visible}
/* 구 스킨: 가로 나열용 float — .ifslider(flex)와 충돌하여 무한스크롤이 멈춤 → ifslider 전용 리셋 */
#popular .ifslider {
	display: flex !important;
	flex-flow: row nowrap;
}
#popular .ifslider li.ifslider-item {
	float: none !important;
	width: auto !important;
	height: auto !important;
	line-height: normal !important;
	padding: 0.8em 2em;
}
#popular ul {padding:0;margin:0}
#popular ul:after {display:block;visibility:hidden;clear:both;content:""}
/* 구 스킨: ifslider 항목은 flex — float 대상에서 제외 */
#popular li:not(.ifslider-item) {float:left;width:auto !important;height:18px;line-height:18px;padding-right:20px}
#popular li:not(.ifslider-item) a {color:#8d8c8c}
#popular li:not(.ifslider-item):first-child {border-left:0}
#popular li:not(.ifslider-item) a:hover {text-decoration:underline}

.popular_inner .popular_btns{display:none}
.popular_btns .pp-next {position:absolute;top:68%;right:0px;width:18px;height:18px;line-height:15px;text-align:center;border:1px solid #53555a;margin-top:-12px;color:#d3d2d2}
.popular_btns .pp-prev {position:absolute;top:68%;right:17px;width:18px;height:18px;line-height:15px;text-align:center;border:1px solid #53555a;margin-top:-12px;color:#d3d2d2}
