:root {
	--lm-prof-bg: #080706;
	--lm-prof-panel: rgba(17, 13, 11, 0.88);
	--lm-prof-panel-solid: #110d0b;
	--lm-prof-soft: #18110f;
	--lm-prof-line: rgba(240, 232, 219, 0.1);
	--lm-prof-red-line: rgba(237, 42, 28, 0.28);
}

body.lm-profile-page {
	background: var(--lm-prof-bg);
	overflow-x: clip;
}

.lm-profile-page #main-content {
	display: block;
	overflow: visible;
}

.lm-profile-page .footer {
	position: relative;
	border-top: 1px solid rgba(237, 42, 28, 0.16);
	background: #070605;
	z-index: 2;
}

/* ============ Sección raíz ============ */
.lm-profile {
	position: relative;
	width: 100%;
	min-height: 100vh;
	padding: clamp(132px, 10vw, 164px) clamp(22px, 5vw, 86px) 140px;
	background:
		radial-gradient(circle at 84% 9%, rgba(181, 25, 17, 0.16), transparent 27%),
		radial-gradient(circle at 10% 46%, rgba(112, 14, 10, 0.1), transparent 30%),
		linear-gradient(180deg, #0d0908 0%, var(--lm-prof-bg) 34%, #090706 100%);
	color: var(--lm-ivory);
	isolation: isolate;
}

.lm-profile::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
	background-size: 88px 88px;
	mask-image: linear-gradient(to bottom, #000, transparent 76%);
	pointer-events: none;
	z-index: -2;
}

.lm-profile::after {
	content: '';
	position: absolute;
	left: clamp(22px, 5vw, 86px);
	right: clamp(22px, 5vw, 86px);
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(237, 42, 28, 0.72), transparent);
	pointer-events: none;
}

.lm-profile__ambient {
	position: absolute;
	right: -7vw;
	top: 96px;
	width: min(640px, 47vw);
	aspect-ratio: 1;
	border: 1px solid rgba(237, 42, 28, 0.07);
	border-radius: 50%;
	box-shadow:
		0 0 0 78px rgba(237, 42, 28, 0.023),
		0 0 0 156px rgba(237, 42, 28, 0.014);
	pointer-events: none;
	z-index: -1;
}

.lm-profile__ambient::before {
	content: '';
	position: absolute;
	inset: 14%;
	border: 1px solid rgba(237, 42, 28, 0.045);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(237, 42, 28, 0.045), rgba(112, 14, 10, 0.014) 42%, transparent 70%);
}

.lm-profile__module {
	width: min(1180px, 100%);
	min-width: 0;
	margin-inline: auto;
}

/* ============ Header ============ */
.lm-profile__header {
	margin-bottom: clamp(34px, 4vw, 52px);
}

.lm-profile__kicker {
	display: block;
	margin-bottom: 12px;
	color: var(--lm-red-bright);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.lm-profile__header h1 {
	margin: 0;
	color: var(--lm-ivory);
	font-family: var(--lm-serif);
	font-size: clamp(34px, 4.6vw, 58px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.lm-profile__header::after {
	content: '';
	display: block;
	width: 92px;
	height: 2px;
	margin-top: 22px;
	background: linear-gradient(90deg, var(--lm-red-bright), transparent);
	box-shadow: 0 0 15px rgba(237, 42, 28, 0.38);
}

.lm-profile__header p {
	margin: 18px 0 0;
	max-width: 52ch;
	color: var(--lm-muted);
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	line-height: 1.65;
}

/* ============ Card base ============ */
.lm-profile__card {
	position: relative;
	border-top: 2px solid var(--lm-red-bright);
	border-right: 1px solid var(--lm-prof-line);
	border-bottom: 1px solid var(--lm-prof-line);
	border-left: 1px solid var(--lm-prof-line);
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 38%),
		var(--lm-prof-panel);
	box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(18px);
}

/* ============ Player card ============ */
.lm-profile__player {
	display: grid;
	grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
	overflow: hidden;
}

.lm-profile__player-side {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: clamp(30px, 4vw, 52px);
	background:
		radial-gradient(circle at 50% 24%, rgba(181, 25, 17, 0.16), transparent 60%),
		rgba(0, 0, 0, 0.26);
	border-right: 1px solid var(--lm-prof-line);
}

.lm-profile__avatar {
	position: relative;
	display: grid;
	place-items: center;
	width: 176px;
	height: 176px;
	border: 1px solid rgba(237, 42, 28, 0.34);
	background: rgba(7, 5, 4, 0.55);
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.45),
		inset 0 0 44px rgba(181, 25, 18, 0.08);
}

.lm-profile__avatar img {
	width: 92%;
	height: 92%;
	object-fit: contain;
	filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
}

.lm-profile__classname {
	display: block;
	color: var(--lm-red-bright);
	font-family: var(--lm-display);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-align: center;
	text-transform: uppercase;
}

.lm-profile__level {
	position: absolute;
	right: -1px;
	bottom: -1px;
	min-width: 66px;
	padding: 9px 14px;
	border: 1px solid rgba(237, 42, 28, 0.5);
	background: rgba(183, 25, 18, 0.86);
	color: var(--lm-ivory);
	font-family: var(--lm-display);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	text-align: center;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.lm-profile__level small {
	display: block;
	margin-bottom: 3px;
	font-size: 8px;
	font-weight: 700;
	letter-spacing: 0.18em;
	opacity: 0.72;
	text-transform: uppercase;
}

.lm-profile__player-main {
	padding: clamp(30px, 4vw, 52px);
	min-width: 0;
}

.lm-profile__playername {
	margin: 0 0 6px;
	color: var(--lm-ivory);
	font-family: var(--lm-serif);
	font-size: clamp(28px, 3.4vw, 44px);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.08;
}

.lm-profile__status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	padding: 6px 12px;
	border: 1px solid rgba(240, 232, 219, 0.14);
	background: rgba(255, 255, 255, 0.018);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.lm-profile__status::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
}

.lm-profile__status.is-online {
	color: var(--lm-green);
}

.lm-profile__status.is-online::before {
	background: var(--lm-green);
	box-shadow: 0 0 10px rgba(85, 214, 101, 0.6);
}

.lm-profile__status.is-offline {
	color: rgba(240, 232, 219, 0.5);
}

.lm-profile__status.is-offline::before {
	background: rgba(240, 232, 219, 0.28);
}

.lm-profile__stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	margin-top: 26px;
	border-top: 1px solid var(--lm-prof-line);
}

.lm-profile__stat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 15px 18px;
	border-bottom: 1px solid var(--lm-prof-line);
}

.lm-profile__stat:nth-child(odd) {
	border-right: 1px solid var(--lm-prof-line);
}

.lm-profile__stat dt {
	margin: 0;
	color: rgba(240, 232, 219, 0.52);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.lm-profile__stat dd {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--lm-ivory);
	font-family: var(--lm-display);
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	text-align: right;
}

.lm-profile__stat dd i {
	color: var(--lm-red-bright);
	font-size: 11px;
}

.lm-profile__stat.is-full {
	grid-column: 1 / -1;
}

.lm-profile__stat.is-full dd {
	font-size: 21px;
}

.lm-profile__stat .lm-profile__guildlink {
	color: var(--lm-ivory);
	text-decoration: none;
	transition: color 180ms ease;
}

.lm-profile__stat .lm-profile__guildlink:hover {
	color: var(--lm-red-bright);
}

/* ============ Guild card ============ */
.lm-profile__guild-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: clamp(24px, 4vw, 44px);
	padding: clamp(30px, 4vw, 48px);
	border-bottom: 1px solid var(--lm-prof-line);
}

.lm-profile__guild-logo {
	display: grid;
	place-items: center;
	width: 148px;
	height: 148px;
	border: 1px solid rgba(237, 42, 28, 0.32);
	background:
		radial-gradient(circle at 50% 30%, rgba(181, 25, 17, 0.14), transparent 62%),
		rgba(0, 0, 0, 0.32);
	box-shadow: 0 24px 54px rgba(0, 0, 0, 0.4);
}

.lm-profile__guild-logo img {
	width: 82%;
	height: 82%;
	object-fit: contain;
}

.lm-profile__guild-name {
	margin: 0 0 12px;
	color: var(--lm-ivory);
	font-family: var(--lm-serif);
	font-size: clamp(30px, 4vw, 52px);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.05;
}

.lm-profile__guild-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 34px;
}

.lm-profile__guild-meta span {
	color: rgba(240, 232, 219, 0.5);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.lm-profile__guild-meta strong {
	margin-left: 8px;
	color: var(--lm-ivory);
	font-family: var(--lm-display);
	font-size: 18px;
	font-weight: 600;
}

.lm-profile__guild-meta strong.lm-profile__accent {
	color: var(--lm-red-bright);
}

.lm-profile__guild-meta a {
	color: var(--lm-ivory);
	text-decoration: none;
	transition: color 180ms ease;
}

.lm-profile__guild-meta a:hover {
	color: var(--lm-red-bright);
}

.lm-profile__members {
	padding: clamp(30px, 4vw, 48px);
}

.lm-profile__members-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--lm-prof-line);
}

.lm-profile__members-title h2 {
	margin: 0;
	color: var(--lm-ivory);
	font-family: var(--lm-serif);
	font-size: clamp(22px, 2.6vw, 30px);
	font-weight: 600;
	letter-spacing: -0.02em;
}

.lm-profile__members-title span {
	color: var(--lm-red-bright);
	font-family: var(--lm-display);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.1em;
}

.lm-profile__members-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.lm-profile__member {
	display: block;
	padding: 14px 16px;
	border: 1px solid var(--lm-prof-line);
	background: rgba(255, 255, 255, 0.014);
	color: rgba(240, 232, 219, 0.78) !important;
	font-family: var(--lm-display);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	text-decoration: none;
	transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.lm-profile__member:hover,
.lm-profile__member:focus-visible {
	border-color: rgba(237, 42, 28, 0.44);
	background: rgba(183, 25, 18, 0.1);
	color: var(--lm-ivory) !important;
	transform: translateY(-2px);
}

/* ============ Alertas ============ */
.lm-profile-page #main-content > .alert,
.lm-profile__module > .alert {
	margin: 0 auto 0;
	padding: 16px 22px;
	width: min(1180px, 100%);
	border: 1px solid var(--lm-prof-line);
	border-left: 3px solid rgba(237, 42, 28, 0.9);
	border-radius: 0;
	background: linear-gradient(90deg, rgba(183, 25, 18, 0.14), rgba(13, 10, 9, 0.42));
	color: var(--lm-ivory);
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	line-height: 1.55;
	letter-spacing: 0.02em;
}

.lm-profile__module > .alert-success {
	border-left-color: rgba(85, 214, 101, 0.9);
	border-color: rgba(85, 214, 101, 0.35);
	background: linear-gradient(90deg, rgba(85, 214, 101, 0.1), rgba(13, 10, 9, 0.42));
}

.lm-profile__module > .alert-warning {
	border-left-color: rgba(240, 173, 78, 0.9);
	border-color: rgba(240, 173, 78, 0.35);
	background: linear-gradient(90deg, rgba(240, 173, 78, 0.12), rgba(13, 10, 9, 0.42));
}

.lm-profile__module > .alert:first-child {
	margin-bottom: 28px;
}

/* ============ Reveal ============ */
html.js [data-profile-reveal] {
	transition:
		opacity 700ms cubic-bezier(0.22, 0.75, 0.2, 1),
		transform 700ms cubic-bezier(0.22, 0.75, 0.2, 1);
}

html.js body.lm-profile-entering .lm-profile__module [data-profile-reveal] {
	opacity: 0;
	transform: translateY(26px);
}

html.js .lm-profile__module>[data-profile-reveal]:nth-child(2) {
	transition-delay: 120ms;
}

html.js .lm-profile__module>[data-profile-reveal]:nth-child(3) {
	transition-delay: 240ms;
}

@media (prefers-reduced-motion: reduce) {
	html.js [data-profile-reveal] {
		transition: none;
	}

	html.js body.lm-profile-entering .lm-profile__module [data-profile-reveal] {
		opacity: 1;
		transform: none;
	}

	html.js .lm-profile__module>[data-profile-reveal] {
		transition-delay: 0ms;
	}
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
	.lm-profile__player {
		grid-template-columns: 1fr;
	}

	.lm-profile__player-side {
		border-right: 0;
		border-bottom: 1px solid var(--lm-prof-line);
	}

	.lm-profile__guild-head {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.lm-profile__guild-meta {
		justify-content: center;
	}
}

@media (max-width: 600px) {
	.lm-profile {
		padding-top: 124px;
		padding-bottom: 92px;
	}

	.lm-profile__stats {
		grid-template-columns: 1fr;
	}

	.lm-profile__stat:nth-child(odd) {
		border-right: 0;
	}
}