/* THEME: Frostbite — Eternal Winter / Ice & Snow / Frozen Tundra */
/* Effects: Falling snowflakes, frost-rimmed borders, ice crystal shimmer, frozen breath fog, glacial glow, blizzard pulse */

.psyern-lb.psyern-lb--frostbite {
	--psyern-bg: #060a12;
	background: #060a12;
	color: #c8ddf0;
	font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
	border: 2px solid #1a3050;
	border-radius: 4px;
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

/* All direct content children sit above the effect layers */
.psyern-lb.psyern-lb--frostbite .psyern-lb__header,
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction-bar,
.psyern-lb.psyern-lb--frostbite .psyern-lb__mode-wrap,
.psyern-lb.psyern-lb--frostbite .psyern-lb__top3,
.psyern-lb.psyern-lb--frostbite .psyern-lb__separator,
.psyern-lb.psyern-lb--frostbite .psyern-lb__table-wrap,
.psyern-lb.psyern-lb--frostbite .psyern-lb__pagination,
.psyern-lb.psyern-lb--frostbite .psyern-lb__loading {
	position: relative;
	z-index: 3;
}

/* ─── Snowfall Layer ─── */
.psyern-lb.psyern-lb--frostbite::before {
	content: '';
	position: absolute;
	inset: -20px;
	z-index: 1;
	pointer-events: none;
	background-image:
		radial-gradient(2px 2px at 10% 10%, rgba(255, 255, 255, 0.8), transparent),
		radial-gradient(2px 2px at 25% 30%, rgba(200, 220, 255, 0.7), transparent),
		radial-gradient(1px 1px at 40% 15%, rgba(255, 255, 255, 0.9), transparent),
		radial-gradient(3px 3px at 55% 5%, rgba(180, 210, 255, 0.5), transparent),
		radial-gradient(1px 1px at 65% 25%, rgba(255, 255, 255, 0.8), transparent),
		radial-gradient(2px 2px at 80% 12%, rgba(200, 230, 255, 0.6), transparent),
		radial-gradient(1px 1px at 90% 20%, rgba(255, 255, 255, 0.7), transparent),
		radial-gradient(2px 2px at 15% 50%, rgba(255, 255, 255, 0.6), transparent),
		radial-gradient(1px 1px at 35% 45%, rgba(200, 220, 255, 0.8), transparent),
		radial-gradient(3px 3px at 50% 55%, rgba(180, 210, 255, 0.4), transparent),
		radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.7), transparent),
		radial-gradient(2px 2px at 85% 50%, rgba(200, 230, 255, 0.5), transparent),
		radial-gradient(1px 1px at 5% 65%, rgba(255, 255, 255, 0.8), transparent),
		radial-gradient(2px 2px at 20% 70%, rgba(200, 220, 255, 0.6), transparent),
		radial-gradient(1px 1px at 45% 75%, rgba(255, 255, 255, 0.9), transparent),
		radial-gradient(2px 2px at 60% 68%, rgba(180, 210, 255, 0.5), transparent),
		radial-gradient(1px 1px at 75% 72%, rgba(255, 255, 255, 0.7), transparent),
		radial-gradient(3px 3px at 95% 65%, rgba(200, 230, 255, 0.4), transparent),
		radial-gradient(2px 2px at 30% 85%, rgba(255, 255, 255, 0.6), transparent),
		radial-gradient(1px 1px at 55% 90%, rgba(200, 220, 255, 0.8), transparent),
		radial-gradient(2px 2px at 82% 88%, rgba(255, 255, 255, 0.5), transparent);
	background-size: 100% 200%;
	animation: psyern-frost-snowfall 12s linear infinite;
	opacity: 0.6;
}

@keyframes psyern-frost-snowfall {
	0% { background-position: 0 -100%; }
	100% { background-position: 0 100%; }
}

/* ─── Frost Border Rim (inner ice crystals) ─── */
.psyern-lb.psyern-lb--frostbite::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	border-radius: 3px;
	box-shadow:
		inset 0 0 30px rgba(120, 180, 255, 0.12),
		inset 0 0 60px rgba(100, 160, 230, 0.06),
		inset 0 2px 4px rgba(200, 230, 255, 0.15),
		inset 0 -2px 4px rgba(200, 230, 255, 0.1),
		inset 2px 0 4px rgba(200, 230, 255, 0.08),
		inset -2px 0 4px rgba(200, 230, 255, 0.08);
	background:
		linear-gradient(180deg, rgba(180, 220, 255, 0.1) 0%, transparent 8%),
		linear-gradient(0deg, rgba(160, 200, 240, 0.08) 0%, transparent 6%),
		linear-gradient(90deg, rgba(160, 200, 240, 0.06) 0%, transparent 5%),
		linear-gradient(270deg, rgba(160, 200, 240, 0.06) 0%, transparent 5%);
	animation: psyern-frost-rimglow 6s ease-in-out infinite;
}

@keyframes psyern-frost-rimglow {
	0%, 100% { opacity: 0.8; }
	50% { opacity: 1; }
}

/* Scrollbar */
.psyern-lb.psyern-lb--frostbite .psyern-lb__table-wrap::-webkit-scrollbar-thumb { background: #1a3050; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__table-wrap::-webkit-scrollbar-thumb:hover { background: #5ba8e0; }

/* ::selection */
.psyern-lb.psyern-lb--frostbite ::selection { background: rgba(91, 168, 224, 0.35); color: #e8f4ff; }

/* ─── Header ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__header {
	border-bottom: 1px solid #152540;
}

/* Ice crystal shimmer title */
.psyern-lb.psyern-lb--frostbite .psyern-lb__title {
	font-weight: 700;
	color: #e8f4ff;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	position: relative;
	text-shadow: 0 0 12px rgba(91, 168, 224, 0.6), 0 0 40px rgba(91, 168, 224, 0.2), 0 1px 2px rgba(0, 0, 0, 0.5);
	animation: psyern-frost-shimmer 5s ease-in-out infinite;
}

@keyframes psyern-frost-shimmer {
	0%, 100% { text-shadow: 0 0 12px rgba(91, 168, 224, 0.6), 0 0 40px rgba(91, 168, 224, 0.2); }
	25% { text-shadow: 0 0 16px rgba(140, 200, 255, 0.8), 0 0 50px rgba(91, 168, 224, 0.3), 2px 0 8px rgba(180, 220, 255, 0.3); }
	50% { text-shadow: 0 0 20px rgba(180, 220, 255, 0.7), 0 0 60px rgba(91, 168, 224, 0.25), -2px 0 8px rgba(140, 200, 255, 0.3); }
	75% { text-shadow: 0 0 14px rgba(120, 190, 255, 0.7), 0 0 45px rgba(91, 168, 224, 0.25); }
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__title::before {
	content: '\2744  ';
	color: #8ec8f0;
	text-shadow: 0 0 6px rgba(142, 200, 240, 0.5);
	animation: psyern-frost-flake-spin 8s linear infinite;
	display: inline-block;
}

@keyframes psyern-frost-flake-spin {
	0% { transform: rotate(0deg); opacity: 0.8; }
	50% { opacity: 1; }
	100% { transform: rotate(360deg); opacity: 0.8; }
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__meta {
	color: #3a6080;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ─── Mode Buttons ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__mode-btn {
	color: #3a6080;
	border: 1px solid #152540;
	border-radius: 3px;
	letter-spacing: 0.06em;
	transition: all 0.25s ease, box-shadow 0.3s;
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__mode-btn.active {
	color: #8ec8f0;
	border-color: #5ba8e0;
	background: rgba(91, 168, 224, 0.1);
	text-shadow: 0 0 6px rgba(91, 168, 224, 0.4);
	box-shadow: 0 0 12px rgba(91, 168, 224, 0.15), inset 0 0 8px rgba(91, 168, 224, 0.05);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__mode-btn:hover {
	border-color: #3a6080;
	background: rgba(91, 168, 224, 0.06);
}

/* ─── Limit Buttons ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__limit-btn { color: #3a6080; border-color: #152540; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__limit-btn.active { color: #a0d4ff; border-color: #a0d4ff; }

/* ─── Top 3 Cards ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card {
	background: #0a1220;
	border: 1px solid #152540;
	border-radius: 4px;
	position: relative;
	overflow: hidden;
}

/* Frost top-edge on all cards */
.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, rgba(180, 220, 255, 0.3) 20%, rgba(200, 235, 255, 0.5) 50%, rgba(180, 220, 255, 0.3) 80%, transparent);
	pointer-events: none;
}

/* #1 — Glacial glow */
.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card--1 {
	border-color: #5ba8e0;
	box-shadow: 0 0 25px rgba(91, 168, 224, 0.25), 0 0 60px rgba(91, 168, 224, 0.08), inset 0 0 20px rgba(91, 168, 224, 0.05);
	animation: psyern-frost-glacial 5s ease-in-out infinite;
}

@keyframes psyern-frost-glacial {
	0%, 100% { box-shadow: 0 0 25px rgba(91, 168, 224, 0.25), 0 0 60px rgba(91, 168, 224, 0.08); transform: scale(1.04); }
	50% { box-shadow: 0 0 35px rgba(140, 200, 255, 0.35), 0 0 80px rgba(91, 168, 224, 0.12); transform: scale(1.05); }
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card--1 .psyern-lb__top3-name {
	color: #e8f4ff;
	text-shadow: 0 0 10px rgba(91, 168, 224, 0.6), 0 0 20px rgba(140, 200, 255, 0.3);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card--2 {
	border-color: #a0d4ff;
	box-shadow: 0 0 15px rgba(160, 212, 255, 0.15);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card--2 .psyern-lb__top3-name {
	color: #a0d4ff;
	text-shadow: 0 0 6px rgba(160, 212, 255, 0.4);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card--3 {
	border-color: #3a6080;
	box-shadow: 0 0 10px rgba(58, 96, 128, 0.12);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-card--3 .psyern-lb__top3-name { color: #8eb8d8; }

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-rank {
	font-weight: 700;
	color: #a0d4ff;
	text-shadow: 0 0 8px rgba(160, 212, 255, 0.5);
}

/* Frozen filter on avatars */
.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-avatar {
	border: 2px solid #1a3050;
	filter: brightness(0.95) contrast(1.1) saturate(0.6) hue-rotate(10deg);
	box-shadow: 0 0 8px rgba(91, 168, 224, 0.2);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__top3-stats { color: #3a6080; }

/* ─── Table ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__table th {
	color: #3a6080;
	border-bottom: 1px solid #152540;
	letter-spacing: 0.1em;
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__table td { border-bottom: 1px solid #0c1828; }

/* Ice hover — frosty highlight with cold breath effect */
.psyern-lb.psyern-lb--frostbite .psyern-lb__table tbody tr {
	position: relative;
	transition: all 0.2s ease;
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__table tbody tr:hover {
	background: rgba(91, 168, 224, 0.06);
	text-shadow: 0 0 4px rgba(140, 200, 255, 0.25);
}

/* Frost edge on hover */
.psyern-lb.psyern-lb--frostbite .psyern-lb__table tbody tr:hover::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, rgba(91, 168, 224, 0.8), rgba(160, 212, 255, 0.4), rgba(91, 168, 224, 0.8));
	box-shadow: 0 0 8px rgba(91, 168, 224, 0.4);
	animation: psyern-frost-icicle 0.4s ease-out forwards;
}

@keyframes psyern-frost-icicle {
	0% { opacity: 0; height: 0; }
	100% { opacity: 1; height: 100%; }
}

/* Rank colors — ice crystal tiers */
.psyern-lb.psyern-lb--frostbite .psyern-lb__table tbody tr:nth-child(1) .psyern-lb__rank {
	color: #e8f4ff;
	text-shadow: 0 0 10px rgba(200, 235, 255, 0.7), 0 0 20px rgba(91, 168, 224, 0.4);
}
.psyern-lb.psyern-lb--frostbite .psyern-lb__table tbody tr:nth-child(2) .psyern-lb__rank {
	color: #a0d4ff;
	text-shadow: 0 0 6px rgba(160, 212, 255, 0.5);
}
.psyern-lb.psyern-lb--frostbite .psyern-lb__table tbody tr:nth-child(3) .psyern-lb__rank { color: #8eb8d8; }

.psyern-lb.psyern-lb--frostbite .psyern-lb__rank { color: #3a6080; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__name { color: #c8ddf0; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__kd { color: #5ba8e0; text-shadow: 0 0 4px rgba(91, 168, 224, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__avatar { border: 1px solid #1a3050; filter: brightness(0.95) saturate(0.7); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__boss-kills { color: #a0d4ff; text-shadow: 0 0 4px rgba(160, 212, 255, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__reputation { color: #8ec8f0; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__playtime { color: #1a3050; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__loading { color: #1a3050; }

/* ─── Badges ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__badge-online {
	background: #5ba8e0;
	box-shadow: 0 0 6px rgba(91, 168, 224, 0.6), 0 0 12px rgba(91, 168, 224, 0.2);
}
.psyern-lb.psyern-lb--frostbite .psyern-lb__badge-offline { background: #152540; }

/* ─── Faction ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction--east { background: rgba(91, 168, 224, 0.12); color: #5ba8e0; border-color: rgba(91, 168, 224, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction--west { background: rgba(160, 212, 255, 0.12); color: #a0d4ff; border-color: rgba(160, 212, 255, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction--neutral { background: rgba(58, 96, 128, 0.15); color: #3a6080; border-color: rgba(58, 96, 128, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction-bar-track { background: #0a1220; border: 1px solid #152540; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction-bar-east { background: linear-gradient(90deg, #2a6090, #5ba8e0); box-shadow: 0 0 8px rgba(91, 168, 224, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction-bar-west { background: linear-gradient(90deg, #6bb8e8, #a0d4ff); box-shadow: 0 0 8px rgba(160, 212, 255, 0.3); }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction-label-east { color: #5ba8e0; }
.psyern-lb.psyern-lb--frostbite .psyern-lb__faction-label-west { color: #a0d4ff; }

/* ─── Separator — Frozen crack line ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__separator {
	border: none;
	height: 2px;
	background: linear-gradient(90deg, transparent, rgba(91, 168, 224, 0.2) 15%, rgba(160, 212, 255, 0.5) 30%, rgba(200, 235, 255, 0.6) 50%, rgba(160, 212, 255, 0.5) 70%, rgba(91, 168, 224, 0.2) 85%, transparent);
	margin: 20px 0;
	position: relative;
	animation: psyern-frost-crack 4s ease-in-out infinite;
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__separator::before {
	content: '';
	position: absolute;
	inset: -2px 0;
	background: linear-gradient(90deg, transparent, rgba(200, 235, 255, 0.15) 30%, rgba(200, 235, 255, 0.25) 50%, rgba(200, 235, 255, 0.15) 70%, transparent);
	filter: blur(4px);
	pointer-events: none;
}

@keyframes psyern-frost-crack {
	0%, 100% { opacity: 0.6; }
	50% { opacity: 1; }
}

/* ─── Pagination ─── */
.psyern-lb.psyern-lb--frostbite .psyern-lb__page-btn {
	color: #3a6080 !important;
	border: 1px solid #152540;
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__page-btn.active {
	color: #e8f4ff !important;
	border-color: #5ba8e0;
	background: rgba(91, 168, 224, 0.15);
	box-shadow: 0 0 8px rgba(91, 168, 224, 0.2);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__page-btn:hover:not([disabled]) {
	color: #5ba8e0 !important;
	border-color: #3a6080;
	background: rgba(91, 168, 224, 0.06);
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__page-btn[disabled] {
	color: #152540 !important;
	opacity: 0.4;
}

.psyern-lb.psyern-lb--frostbite .psyern-lb__table td { color: #b0c8e0; }
