/* Discord popup v12 */
html.l2-discord-v2-on [class*="index-home-discord"] {
	display: none !important;
}

body.l2dc-open { overflow: hidden; }

.l2dc {
	position: fixed;
	inset: 0;
	z-index: 10000080;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(0.75rem, 3vw, 1.5rem);
	box-sizing: border-box;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.l2dc.is-on {
	opacity: 1;
	pointer-events: auto;
}

.l2dc__shade {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 14, 0.82);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	pointer-events: none;
}

.l2dc__card {
	position: relative;
	width: min(100%, 28.5rem);
	max-height: min(96vh, 52rem);
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 0;
	border-radius: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: linear-gradient(180deg, #1a1c28 0%, #0f1118 100%);
	box-shadow:
		0 1.75rem 4rem rgba(0, 0, 0, 0.65),
		0 0 0 1px rgba(88, 101, 242, 0.2);
	transform: translateY(14px) scale(0.98);
	transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
	overflow: hidden;
}

.l2dc.is-on .l2dc__card {
	transform: translateY(0) scale(1);
}

.l2dc__headbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem 0;
	min-height: 2.75rem;
}

.l2dc__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #e8ecff;
	background: linear-gradient(135deg, #5865f2, #4752c4);
	box-shadow: 0 0.2rem 0.75rem rgba(88, 101, 242, 0.35);
}

.l2dc__x {
	flex-shrink: 0;
	width: 2.375rem;
	height: 2.375rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
	color: #f3f5ff;
	cursor: pointer;
	display: grid;
	place-items: center;
	line-height: 1;
}

.l2dc__x:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.l2dc__x:not(:disabled):hover {
	background: rgba(255, 255, 255, 0.12);
}

.l2dc__x-ico {
	width: 1.05rem;
	height: 1.05rem;
	display: block;
	pointer-events: none;
}

.l2dc__body {
	padding: 0 1rem;
	text-align: center;
}

.l2dc__title {
	margin: 0 0 0.35rem;
	font-family: var(--font-2, 'ChelseaCYR', 'Cinzel', Georgia, serif);
	font-size: clamp(1.25rem, 4.2vw, 1.65rem);
	font-weight: 700;
	color: #fff;
	line-height: 1.15;
}

.l2dc__text {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: rgba(215, 222, 245, 0.9);
}

.l2dc__perks {
	margin: 0.45rem 0 0;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(232, 195, 115, 0.95);
}

.l2dc__widget-shell {
	margin: 0.75rem 1rem 0;
	border-radius: 0.55rem;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.35);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.l2dc__widget-cap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.45rem 0.75rem;
	padding: 0.65rem 0.85rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(180deg, #5b6bf2 0%, #5865f2 100%);
}

.l2dc__widget-cap::before {
	content: "";
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
	margin-right: -0.25rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 127 96' fill='%23fff'%3E%3Cpath d='M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.91 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0 105.89 105.89 0 0 0 19.39 8.09C2.79 32.65-1.71 56.6.54 80.21h0A105.73 105.73 0 0 0 32.71 96.1a77.7 77.7 0 0 0 6.89-11.29 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.59 75.59 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.29 105.25 105.25 0 0 0 32.17-15.87h0C129.24 52 122.09 28.11 107.7 8.07Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.l2dc__guild {
	flex: 1 1 8rem;
	min-width: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.l2dc__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	font-size: 0.6875rem;
	font-weight: 600;
	opacity: 0.98;
}

.l2dc__stat {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.l2dc__stat strong {
	font-size: 0.8125rem;
	font-weight: 800;
}

.l2dc__dot {
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	flex-shrink: 0;
}

.l2dc__dot--on {
	background: #3ba55d;
	box-shadow: 0 0 0 2px rgba(59, 165, 93, 0.35);
}

.l2dc__widget-body {
	background: #2b2d31;
}

.l2dc__preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.35rem 1.1rem 1.5rem;
	background:
		radial-gradient(circle at 50% 0%, rgba(88, 101, 242, 0.22), transparent 55%),
		#313338;
}

.l2dc__preview-icon {
	width: 5rem;
	height: 5rem;
	border-radius: 1.15rem;
	object-fit: cover;
	box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.45);
	background: #1e1f22;
}

.l2dc__preview-name {
	margin: 0.85rem 0 0;
	font-size: 1.05rem;
	font-weight: 800;
	color: #f2f3f5;
	line-height: 1.2;
	max-width: 100%;
}

.l2dc__preview-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.85rem 1.25rem;
	margin-top: 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: rgba(220, 224, 235, 0.9);
}

.l2dc__preview-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.l2dc__preview-stat strong {
	font-size: 0.875rem;
	font-weight: 800;
	color: #fff;
}

.l2dc__preview-sub {
	margin: 0.85rem 0 0;
	max-width: 19rem;
	font-size: 0.6875rem;
	line-height: 1.45;
	color: rgba(185, 192, 210, 0.88);
}

.l2dc__members {
	margin: 0;
	padding: 0.35rem 0;
	max-height: 22rem;
	overflow: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.l2dc__member {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.45rem 0.85rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.l2dc__member:last-child {
	border-bottom: 0;
}

.l2dc__ava {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #1e1f22;
}

.l2dc__member-name {
	flex: 1;
	min-width: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #f2f3f5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.l2dc__status {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	flex-shrink: 0;
	background: #3ba55d;
}

.l2dc__status--idle { background: #faa81a; }
.l2dc__status--dnd { background: #ed4245; }
.l2dc__status--off { background: #747f8d; }

.l2dc__foot {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.85rem 1rem 1.1rem;
	margin-top: 0.35rem;
	background: rgba(0, 0, 0, 0.22);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.l2dc__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	border-radius: 0.45rem;
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: linear-gradient(180deg, #6d7aff 0%, #5865f2 50%, #4752c4 100%);
	box-shadow: 0 0.4rem 1.1rem rgba(88, 101, 242, 0.45);
	transition: transform 0.15s ease, filter 0.15s ease;
}

.l2dc__btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.06);
	color: #fff;
}

.l2dc__ghost {
	min-height: 2.85rem;
	border-radius: 0.45rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.03);
	color: rgba(240, 242, 255, 0.92);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.l2dc__ghost:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.l2dc__ghost:not(:disabled):hover {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.3);
	color: #fff;
}

@media (min-width: 480px) {
	.l2dc__card { width: min(100%, 30rem); }
	.l2dc__members { max-height: 24rem; }
}

@media (prefers-reduced-motion: reduce) {
	.l2dc, .l2dc__card, .l2dc__btn { transition: none; }
}
