/*!
 * EternalsMU - capa visual del template DefaultV2 (WebEngine CMS)
 * Se carga AL FINAL (despues de override.css). Para volver al diseño anterior basta con
 * sacar el <link> a eternals.css de index.php.
 * Paleta: azul marino + plata, tipografia Cinzel / PT Sans.
 */
:root {
	--e-bg: #060a13;
	--e-panel: rgba(9, 15, 29, .82);
	--e-panel-solid: #0b1220;
	--e-line: rgba(160, 185, 230, .18);
	--e-line-strong: rgba(160, 190, 240, .38);
	--e-blue: #4d93ff;
	--e-blue-soft: #8bbcff;
	--e-glow: rgba(77, 147, 255, .42);
	--e-silver-1: #f4f6fb;
	--e-silver-2: #b9c0d0;
	--e-silver-3: #7f879a;
	--e-text: #dfe5f2;
	--e-muted: #8a94ab;
}

/* ---------- base ----------
   Foto de fondo: fondo-eternals.jpg = original (con "MU Online"). Para la version azul y plateada
   cambia 'fondo-eternals.jpg' por 'fondo-eternals-azul.jpg' en la linea 'background' de abajo. */
html.dark-mode body,
html body {
	background: var(--e-bg) url('../img/fondo-eternals.jpg') center top / cover no-repeat fixed !important;
	color: var(--e-text);
	font-family: 'PT Sans', system-ui, sans-serif;
}
body::before { /* oscurece la foto para que el logo y el menu se lean */
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(ellipse 60% 55% at 50% 22%, rgba(5, 9, 18, .74) 0%, rgba(5, 9, 18, .30) 70%, rgba(5, 9, 18, .10) 100%),
		linear-gradient(180deg, rgba(5, 9, 18, .35) 0%, rgba(5, 9, 18, .70) 100%);
}
html.dark-mode a { color: var(--e-blue-soft); }
html.dark-mode a:hover,
html.dark-mode a:focus { color: var(--e-silver-1) !important; }
html.dark-mode ::selection { background: var(--e-blue); color: #fff; }

/* el diseño es unico: se oculta el selector claro/oscuro */
.theme-toggle { display: none !important; }

/* ---------- barra superior ---------- */
html.dark-mode .global-top-bar {
	background: #03060c;
	border-bottom: 1px solid var(--e-line);
	color: var(--e-muted);
	letter-spacing: .08em;
}
html.dark-mode .global-top-bar a { color: var(--e-silver-2) !important; }
html.dark-mode .global-top-bar a:hover { color: #fff !important; }
html.dark-mode .global-top-bar a.logout { color: #ff6b6b !important; }

/* ---------- menu (logo fuera; menu al centro, Ingresar/Registrarse a la derecha) ---------- */
html.dark-mode #navbar {
	background: linear-gradient(180deg, rgba(5, 9, 18, .96), rgba(5, 9, 18, .74));
	border-bottom: 1px solid var(--e-line);
	backdrop-filter: blur(8px);
}
.eternals-navbar-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	max-width: 1240px;
	height: 76px;
	margin: 0 auto;
	padding: 0 16px;
}
#navbar ul { grid-column: 2; margin: 0; padding: 0; }
.eternals-nav-actions { grid-column: 3; display: flex; gap: 10px; justify-content: flex-end; }
html.dark-mode #navbar ul li { font-size: 13.5px; }
html.dark-mode #navbar ul li a {
	color: var(--e-silver-1) !important;
	font-family: 'Cinzel', Georgia, serif;
	font-weight: 600;
	letter-spacing: .12em;
	padding: 8px 12px;
	position: relative;
}
html.dark-mode #navbar ul li a::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--e-blue), transparent);
	transform: scaleX(0);
	transition: transform .25s;
}
html.dark-mode #navbar ul li a:hover,
html.dark-mode #navbar ul li a:focus,
html.dark-mode #navbar ul li.active a { color: #fff !important; }
html.dark-mode #navbar ul li a:hover::after,
html.dark-mode #navbar ul li.active a::after { transform: scaleX(1); }

/* ---------- franja de eventos ---------- */
.eternals-strip {
	position: relative;
	z-index: 4;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
	padding: 12px 16px;
	background: rgba(6, 11, 22, .86);
	border-bottom: 1px solid var(--e-line);
	font-size: 13px;
}
.eternals-strip-events { display: contents; }
.eternals-live {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	border: 1px solid rgba(80, 220, 140, .5);
	color: #7ef0b0;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .14em;
}
.eternals-live i { width: 7px; height: 7px; border-radius: 50%; background: #3fe08a; box-shadow: 0 0 10px #3fe08a; }
.eternals-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px; border-left: 1px solid var(--e-line); }
.eternals-chip strong {
	color: var(--e-silver-1);
	font-family: 'Cinzel', Georgia, serif;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.eternals-chip em { color: var(--e-blue); font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.eternals-chip em.on { color: #3fe08a; }

/* ---------- portada ---------- */
#header { padding: 40px 16px 30px; }
body.home #header {
	min-height: 560px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-bottom: 130px;
}
#header .eternals-hero { max-width: 620px; margin: 0 auto; }
#header .webengine-mu-logo {
	width: 150px;
	max-width: 70%;
	height: auto;
	filter: drop-shadow(0 0 30px var(--e-glow));
}
body.home #header .webengine-mu-logo { width: 200px; margin-bottom: 6px; }
.eternals-eyebrow {
	color: #8bbcff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .32em;
	text-transform: uppercase;
	text-shadow: 0 0 14px rgba(5, 9, 18, .95), 0 0 4px rgba(5, 9, 18, .9);
	margin-bottom: 18px;
}
.eternals-title {
	font-family: 'Cinzel', Georgia, serif;
	font-weight: 700;
	font-size: 44px;
	line-height: 1.12;
	letter-spacing: .06em;
	margin: 10px 0 16px;
	background: linear-gradient(180deg, #fff, var(--e-silver-2));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6));
}
.eternals-lead {
	color: var(--e-text);
	font-size: 17px;
	line-height: 1.6;
	max-width: 470px;
	margin: 0 auto;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}
.eternals-online {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 26px 0 28px;
	padding: 10px 20px;
	background: var(--e-panel);
	border: 1px solid var(--e-line);
	border-radius: 999px;
	font-size: 12px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--e-muted);
}
.eternals-online i { width: 8px; height: 8px; border-radius: 50%; background: #3fe08a; box-shadow: 0 0 10px #3fe08a; }
.eternals-online b { color: var(--e-silver-1); font-family: 'Cinzel', Georgia, serif; font-size: 20px; letter-spacing: .06em; }
.eternals-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* botones con esquina cortada */
.eternals-btn,
html.dark-mode .btn-primary,
html.dark-mode .btn-default,
html.dark-mode .btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-family: 'Cinzel', Georgia, serif;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 15px 30px;
	border-radius: 0;
	transition: transform .15s, filter .2s, box-shadow .2s;
}
.eternals-btn.sm { padding: 11px 18px; font-size: 12px; letter-spacing: .14em; }
.eternals-btn.silver,
html.dark-mode .btn-primary {
	color: #0a1020 !important;
	border: 0;
	background: linear-gradient(180deg, var(--e-silver-1) 0%, var(--e-silver-2) 52%, var(--e-silver-3) 53%, #d3d8e4 100%);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.eternals-btn.silver:hover,
html.dark-mode .btn-primary:hover,
html.dark-mode .btn-primary:focus,
html.dark-mode .btn-primary:active {
	color: #0a1020 !important;
	filter: brightness(1.08);
	transform: translateY(-2px);
}
.eternals-btn.ghost,
html.dark-mode .btn-default,
html.dark-mode .btn-secondary {
	color: var(--e-silver-1) !important;
	background: rgba(10, 18, 36, .45);
	border: 1px solid rgba(190, 205, 240, .45);
	clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}
.eternals-btn.ghost:hover,
html.dark-mode .btn-default:hover,
html.dark-mode .btn-secondary:hover {
	border-color: var(--e-blue);
	box-shadow: 0 0 22px var(--e-glow);
	color: #fff !important;
}
html.dark-mode .btn-xs, html.dark-mode .btn-sm { padding: 6px 14px; font-size: 11px; }

/* botones chicos dentro del titulo de un panel ("Olvidaste tu contrasena?", "+" de rankings):
   se muestran como enlace de texto, no como boton grande */
html.dark-mode .panel-title .btn,
html.dark-mode .panel-title .btn:hover,
html.dark-mode .panel-title .btn:focus,
html.dark-mode .panel-title .btn:active {
	float: right;
	display: inline-block;
	width: auto !important;
	margin: 2px 0 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	clip-path: none;
	transform: none;
	filter: none;
	font-family: 'PT Sans', system-ui, sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.6;
	text-transform: none;
	color: var(--e-blue-soft) !important;
}
html.dark-mode .panel-title .btn:hover { color: #fff !important; text-decoration: underline; }

/* ---------- tarjetas ---------- */
.eternals-features {
	position: relative;
	z-index: 3;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	max-width: 1240px;
	margin: -100px auto 44px;
	padding: 0 16px;
}
.eternals-card {
	background: var(--e-panel);
	border: 1px solid var(--e-line);
	padding: 24px 22px;
	backdrop-filter: blur(10px);
	clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
	transition: border-color .2s, transform .2s;
}
.eternals-card:hover { border-color: rgba(120, 170, 255, .6); transform: translateY(-4px); }
.eternals-card .k { display: block; margin-bottom: 6px; color: var(--e-blue); font-family: 'Cinzel', Georgia, serif; font-weight: 700; font-size: 26px; }
.eternals-card h3 {
	margin: 0 0 8px;
	color: var(--e-silver-1);
	font-family: 'Cinzel', Georgia, serif;
	font-size: 14px;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.eternals-card p { margin: 0; color: var(--e-muted); font-size: 14px; line-height: 1.55; }

/* ---------- banner de bienvenida (portada, columna de noticias) ---------- */
.eternals-welcome {
	position: relative;
	margin-bottom: 22px;
	min-height: 320px;
	display: flex;
	align-items: center;
	border: 1px solid var(--e-line-strong);
	background:
		linear-gradient(90deg, rgba(5, 9, 18, .96) 0%, rgba(5, 9, 18, .82) 45%, rgba(5, 9, 18, .15) 100%),
		url('../img/fondo-eternals-azul.jpg') right center / cover no-repeat;
	clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
	box-shadow: 0 0 30px rgba(0, 0, 0, .5);
}
.eternals-welcome::after { /* linea azul inferior */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--e-blue), transparent 70%);
}
.eternals-welcome-body { max-width: 62%; padding: 30px 32px; }
.eternals-welcome-tag {
	color: var(--e-blue-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .3em;
	text-transform: uppercase;
}
.eternals-welcome-title {
	margin: 6px 0 12px;
	font-family: 'Cinzel', Georgia, serif;
	font-weight: 700;
	font-size: clamp(22px, 2.4vw, 32px);
	overflow-wrap: anywhere;
	letter-spacing: .06em;
	background: linear-gradient(180deg, #fff, var(--e-silver-2));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.eternals-welcome-text { color: var(--e-text); font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.eternals-welcome-list { list-style: none; margin: 0 0 20px; padding: 0; }
.eternals-welcome-list li { display: flex; align-items: center; gap: 10px; color: var(--e-silver-2); font-size: 14px; padding: 3px 0; }
.eternals-welcome-list li i { flex: none; width: 6px; height: 6px; background: var(--e-blue); box-shadow: 0 0 8px var(--e-glow); transform: rotate(45deg); }
.eternals-welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- donaciones ---------- */
.edon-intro { font-size: 15px; line-height: 1.6; margin: 10px 0 20px; }
.edon-section-title {
	margin: 26px 0 14px;
	font-family: 'Cinzel', Georgia, serif;
	font-size: 18px;
	letter-spacing: .08em;
	color: var(--e-silver-1);
}
.edon-section-title small { display: block; margin-top: 4px; font-family: 'PT Sans', sans-serif; font-size: 13px; letter-spacing: .04em; color: var(--e-muted); }
.edon-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.edon-pack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 22px 16px;
	text-align: center;
	background: rgba(12, 20, 38, .72);
	border: 1px solid var(--e-line);
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
	transition: border-color .2s, transform .2s;
}
.edon-pack:hover { border-color: rgba(120, 170, 255, .6); transform: translateY(-3px); }
.edon-pack-credits { font-family: 'Cinzel', Georgia, serif; font-weight: 700; font-size: 20px; color: var(--e-silver-1); }
.edon-pack-price { color: var(--e-blue-soft); font-size: 18px; font-weight: 700; }
.edon-pack-methods { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.edon-help { margin-top: 24px; padding: 12px 16px; border-left: 2px solid var(--e-blue); background: rgba(12, 20, 38, .5); color: var(--e-muted); }
.edon-checkout { max-width: 560px; margin: 20px auto; }
.edon-note { color: var(--e-muted); font-size: 13px; margin-top: 14px; }
.edon-steps { margin: 16px 0 20px; padding-left: 20px; line-height: 1.7; }

/* ---------- votos ---------- */
.evote-sites { margin-bottom: 24px; }
.evote-wait { color: var(--e-muted); font-size: 13px; }
.evote-support { justify-content: flex-start; margin-bottom: 10px; }

/* ---------- rankings de la portada (4 columnas) ---------- */
.home-rankings .panel-sidebar .table { font-size: 13px; }
.home-rankings .panel-sidebar .table th { font-size: 12px; }
.home-rankings .panel-sidebar .panel-title { font-size: 15px; white-space: nowrap; }
.home-rankings-empty { color: var(--e-muted); font-size: 14px; line-height: 1.55; padding: 10px 4px; }

/* ---------- ranking de la beta ---------- */
.general-table-ui tr.erew-mine td { color: var(--e-blue-soft); font-weight: 700; }

/* ---------- informacion del servidor ---------- */
.info-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.info-nav a {
	padding: 6px 14px;
	border: 1px solid var(--e-line);
	background: rgba(12, 20, 38, .7);
	color: var(--e-silver-2) !important;
	font-size: 13px;
	letter-spacing: .06em;
	text-decoration: none;
}
.info-nav a:hover { border-color: var(--e-blue); color: #fff !important; }
.info-title {
	margin: 30px 0 12px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--e-line);
	font-family: 'Cinzel', Georgia, serif;
	font-size: 19px;
	letter-spacing: .08em;
	color: var(--e-silver-1);
	scroll-margin-top: 20px;
}
.info-note { color: var(--e-muted); font-size: 13px; }

/* ---------- paginas legales ---------- */
.legal-page { max-width: 820px; line-height: 1.7; }
.legal-page h3 {
	margin: 26px 0 10px;
	font-family: 'Cinzel', Georgia, serif;
	font-size: 17px;
	letter-spacing: .06em;
	color: var(--e-silver-1);
}
.legal-page ul { padding-left: 20px; }
.legal-page li { margin-bottom: 6px; }

/* ---------- aviso flotante del proximo evento ---------- */
.eternals-toast {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 10000;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 18px;
	background: rgba(8, 14, 28, .92);
	border: 1px solid rgba(160, 190, 240, .35);
	border-radius: 999px;
	box-shadow: 0 0 28px rgba(0, 0, 0, .5), 0 0 22px var(--e-glow);
}
.eternals-toast[hidden] { display: none; }

/* contenedor de los cuadros flotantes: Castle Siege arriba, proximo evento abajo */
.eternals-floating {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}
.eternals-floating .eternals-toast { position: static; }

/* ---------- cuadro flotante del Castle Siege ---------- */
.eternals-cs-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 18px 10px 12px;
	background: rgba(8, 14, 28, .92);
	border: 1px solid rgba(160, 190, 240, .35);
	border-radius: 18px;
	box-shadow: 0 0 28px rgba(0, 0, 0, .5), 0 0 22px var(--e-glow);
	text-decoration: none !important;
	transition: border-color .2s;
}
.eternals-cs-card:hover { border-color: var(--e-blue); }
.eternals-cs-card .cs-mark img { display: block; border: 1px solid var(--e-line); image-rendering: pixelated; }
.eternals-cs-card .cs-info { display: flex; flex-direction: column; min-width: 0; }
.eternals-cs-card small { display: block; color: var(--e-muted); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.eternals-cs-card strong { color: var(--e-silver-1); font-family: 'Cinzel', Georgia, serif; font-size: 14px; letter-spacing: .08em; white-space: nowrap; }
.eternals-cs-card .cs-info > span { color: var(--e-silver-2); font-size: 12px; }
.eternals-cs-card .cs-time { display: flex; flex-direction: column; align-items: flex-end; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--e-line); }
.eternals-cs-card .cs-time b { color: var(--e-blue); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eternals-cs-card .cs-time b.on { color: #3fe08a; }
.eternals-toast small { display: block; color: var(--e-muted); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.eternals-toast strong { color: var(--e-silver-1); font-family: 'Cinzel', Georgia, serif; font-size: 14px; letter-spacing: .08em; }
.eternals-toast .t { margin-left: 10px; color: var(--e-blue); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---------- caja de hora / online ---------- */
.header-info-container { display: none !important; }
html.dark-mode .header-info-container .header-info {
	background: var(--e-panel);
	border: 1px solid var(--e-line);
	box-shadow: 0 0 22px rgba(0, 0, 0, .55);
	border-radius: 0;
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
	text-align: left;
	letter-spacing: .04em;
}
.header-info-container .header-info .header-info-block { color: var(--e-muted); }
.header-info-container .header-info .header-info-block .online-count { color: #3fe08a; font-weight: 700; }
html.dark-mode .webengine-online-bar { background: rgba(255, 255, 255, .08); border-color: var(--e-line); }
.webengine-online-bar-progress { background: linear-gradient(90deg, var(--e-blue), var(--e-blue-soft)) !important; }

/* ---------- contenedor / paneles ---------- */
html.dark-mode #container {
	background: var(--e-panel);
	border: 1px solid var(--e-line);
	border-bottom: 0;
	border-radius: 0;
	backdrop-filter: blur(10px);
	box-shadow: 0 0 40px rgba(0, 0, 0, .55);
}
html.dark-mode #content { color: var(--e-text); }

html.dark-mode .panel,
html.dark-mode .panel-default,
html.dark-mode .panel-news,
html.dark-mode .panel-sidebar,
html.dark-mode .panel-general,
html.dark-mode .panel-addstats,
html.dark-mode .panel-downloads,
html.dark-mode .thumbnail,
html.dark-mode .well,
html.dark-mode .table-responsive {
	background: rgba(12, 20, 38, .72);
	border: 1px solid var(--e-line);
	border-radius: 0;
	box-shadow: none;
	color: var(--e-text);
}
html.dark-mode .panel-heading,
html.dark-mode .panel-sidebar > .panel-heading {
	background: linear-gradient(180deg, rgba(40, 62, 108, .55), rgba(14, 24, 46, .55));
	border: 0;
	border-bottom: 2px solid var(--e-blue);
	border-radius: 0;
	color: var(--e-silver-1);
}
html.dark-mode .panel-footer {
	background: rgba(5, 9, 18, .5);
	border-top: 1px solid var(--e-line);
	color: var(--e-muted);
}
html.dark-mode .panel-title,
html.dark-mode .panel-news .panel-title {
	font-family: 'Cinzel', Georgia, serif;
	color: var(--e-silver-1);
	letter-spacing: .08em;
}
html.dark-mode .page-title {
	font-family: 'Cinzel', Georgia, serif;
	color: var(--e-silver-1);
	letter-spacing: .08em;
	border-bottom: 1px solid var(--e-line);
	padding-bottom: 8px;
}
html.dark-mode .panel-body .panel-title { border-bottom-color: var(--e-line); }
html.dark-mode .panel-usercp { background-image: none; }
html.dark-mode .panel-usercp ul li a { color: var(--e-silver-1) !important; }
html.dark-mode .panel-usercp ul li a:hover { color: var(--e-blue-soft) !important; }
html.dark-mode .sidebar-banner img { box-shadow: 0 0 20px rgba(0, 0, 0, .5); border-radius: 0; }

/* ---------- tablas / rankings ---------- */
html.dark-mode .rankings-table tr:first-child td,
html.dark-mode .general-table-ui tr:first-child td {
	color: var(--e-blue-soft);
	border-bottom: 2px solid var(--e-blue);
	font-family: 'Cinzel', Georgia, serif;
	letter-spacing: .08em;
}
html.dark-mode .rankings-table tr td,
html.dark-mode .general-table-ui tr td,
html.dark-mode .myaccount-table tr td,
html.dark-mode .table > tbody > tr > td,
html.dark-mode table td {
	border-color: var(--e-line);
	color: var(--e-text);
}
html.dark-mode .general-table-ui,
html.dark-mode .myaccount-table { background: rgba(12, 20, 38, .6); border-color: var(--e-line); }
html.dark-mode .general-table-ui tr:nth-child(2n+2) td,
html.dark-mode .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255, 255, 255, .03); }
html.dark-mode .rankings-table tr:not(:first-child):hover td { background: rgba(77, 147, 255, .09); }
html.dark-mode .rankings-table-place { color: var(--e-silver-2); font-family: 'Cinzel', Georgia, serif; }
html.dark-mode .rankings_menu a {
	background: rgba(12, 20, 38, .7);
	border: 1px solid var(--e-line);
	color: var(--e-silver-2);
	border-radius: 0;
}
html.dark-mode .rankings_menu a.active,
html.dark-mode .rankings_menu a:hover { border-color: var(--e-blue); color: #fff; }
html.dark-mode .rankings_menu span { color: var(--e-muted); }

/* ---------- formularios ---------- */
html.dark-mode .form-control,
html.dark-mode input[type=text],
html.dark-mode input[type=password],
html.dark-mode input[type=number],
html.dark-mode textarea,
html.dark-mode select {
	background: rgba(5, 9, 18, .75);
	border: 1px solid var(--e-line-strong);
	border-radius: 0;
	color: var(--e-silver-1);
}
html.dark-mode .form-control:focus,
html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus {
	border-color: var(--e-blue);
	box-shadow: 0 0 0 2px var(--e-glow);
	outline: 0;
}
/* autocompletado del navegador: mantiene el fondo oscuro en usuario/contrasena guardados */
html.dark-mode input:-webkit-autofill,
html.dark-mode input:-webkit-autofill:hover,
html.dark-mode input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--e-silver-1);
	-webkit-box-shadow: 0 0 0 1000px #0a1120 inset;
	box-shadow: 0 0 0 1000px #0a1120 inset;
	caret-color: var(--e-silver-1);
	transition: background-color 9999s;
}
html.dark-mode .alert { border-radius: 0; }

/* ---------- pie ---------- */
html.dark-mode .footer {
	background: rgba(3, 6, 12, .92);
	border: 1px solid var(--e-line);
	border-top: 2px solid var(--e-blue);
	color: var(--e-muted);
	border-radius: 0;
}
html.dark-mode .footer a { color: var(--e-silver-2); }
html.dark-mode .footer a:hover { color: #fff !important; }
html.dark-mode .footer hr { border-top-color: var(--e-line); }

/* ---------- idioma ---------- */
html.dark-mode .webengine-language-switcher li { background: rgba(255, 255, 255, .08); }

/* ---------- movil ---------- */
@media (max-width: 1000px) {
	.eternals-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
	.eternals-navbar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; height: auto; padding: 8px 12px; }
	#navbar ul { order: 3; width: 100%; }
	.eternals-nav-actions { margin-left: auto; }
	.eternals-title { font-size: 30px; }
	body.home #header { min-height: 0; padding-bottom: 110px; }
	body.home #header .webengine-mu-logo { width: 170px; }
	.eternals-features { grid-template-columns: 1fr; margin-top: -80px; }
	.eternals-welcome { background-position: 70% center; }
	.eternals-welcome-body { max-width: 100%; padding: 24px 20px; }
	.eternals-welcome-title { font-size: 26px; }
	.eternals-floating { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
	.eternals-toast { justify-content: space-between; }
	.eternals-cs-card { display: none; } /* en celular solo queda el aviso del proximo evento */
}

/* barra superior alineada con el menu */
html.dark-mode .global-top-bar .global-top-bar-content { max-width: 1240px; padding: 0 16px; }
html.dark-mode .global-top-bar .webengine-language-switcher { vertical-align: middle; }

/* ---------- noticias: destacada en la portada, lista y noticia completa ---------- */
.enews-featured, .enews-card {
	display: flex;
	gap: 0;
	margin-top: 20px;
	background: var(--e-panel);
	border: 1px solid var(--e-line);
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
	color: var(--e-text);
	text-decoration: none;
	transition: border-color .2s, transform .2s;
}
.enews-featured:hover, .enews-card:hover { border-color: var(--e-line-strong); transform: translateY(-2px); text-decoration: none; color: var(--e-text); }
.enews-featured:focus-visible, .enews-card:focus-visible { outline: 2px solid var(--e-blue); outline-offset: 2px; }
.enews-featured-image, .enews-card-image {
	flex: 0 0 34%;
	min-height: 200px;
	background-size: cover;
	background-position: center top;
	border-right: 1px solid var(--e-line);
}
.enews-featured-text, .enews-card-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 24px; min-width: 0; }
.enews-tag, .enews-meta { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--e-blue-soft); }
.enews-featured-title, .enews-card-title { font-family: 'Cinzel', Georgia, serif; font-weight: 700; font-size: 24px; line-height: 1.2; color: var(--e-silver-1); overflow-wrap: anywhere; }
.enews-card-title { font-size: 20px; }
.enews-card-excerpt { color: var(--e-muted); font-size: 15px; line-height: 1.55; }
.enews-featured .eternals-btn { margin-top: 6px; }
.enews-more { color: var(--e-blue-soft); font-size: 14px; font-weight: 700; }
.enews-more-list { display: flex; flex-direction: column; margin-top: 10px; border: 1px solid var(--e-line); background: rgba(12, 20, 38, .55); }
.enews-more-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; color: var(--e-text); border-bottom: 1px solid var(--e-line); }
.enews-more-list a:last-child { border-bottom: 0; }
.enews-more-list a small { color: var(--e-muted); white-space: nowrap; }
.enews-more-list a.enews-all { justify-content: flex-end; color: var(--e-blue-soft); font-weight: 700; }
.enews-list { display: flex; flex-direction: column; gap: 4px; }
.enews-card-image { flex-basis: 26%; min-height: 170px; }

.enews-article { max-width: 860px; margin: 10px auto 30px; }
.enews-back { display: inline-block; margin-bottom: 14px; color: var(--e-blue-soft); font-size: 14px; }
.enews-title { font-family: 'Cinzel', Georgia, serif; font-weight: 700; font-size: 34px; line-height: 1.2; color: var(--e-silver-1); margin: 0 0 8px; overflow-wrap: anywhere; }
.enews-article .enews-meta { display: block; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--e-line); }
.enews-body { font-size: 16px; line-height: 1.7; color: var(--e-text); overflow-wrap: break-word; }
.enews-body img { max-width: 100%; height: auto; }
.enews-body h2, .enews-body h3 { font-family: 'Cinzel', Georgia, serif; color: var(--e-silver-1); margin: 26px 0 10px; }
.enews-body ul, .enews-body ol { padding-left: 22px; }
.enews-body li + li { margin-top: 6px; }
.enews-body a { color: var(--e-blue-soft); }
@media (max-width: 700px) {
	.enews-featured, .enews-card { flex-direction: column; }
	.enews-featured-image, .enews-card-image { flex-basis: auto; min-height: 180px; border-right: 0; border-bottom: 1px solid var(--e-line); }
}

/* ---------- ventana emergente con la ultima noticia (portada) ---------- */
.enews-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.enews-modal[hidden] { display: none; }
.enews-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 14, .82); }
.enews-modal-box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 760px;
	max-height: 90vh;
	background: var(--e-panel-solid);
	border: 1px solid var(--e-line-strong);
	box-shadow: 0 0 60px var(--e-glow);
}
.enews-modal-scroll { overflow-y: auto; padding: 30px 34px 10px; }
.enews-modal-scroll .enews-title { font-size: 28px; margin: 6px 0 18px; padding-right: 30px; }
.enews-modal-scroll .enews-body img { display: block; margin: 0 auto; max-height: 60vh; width: auto; }
.enews-modal-close {
	position: absolute; top: 8px; right: 12px; z-index: 1;
	background: none; border: 0; color: var(--e-silver-2); font-size: 34px; line-height: 1; cursor: pointer;
}
.enews-modal-close:hover, .enews-modal-close:focus-visible { color: var(--e-silver-1); outline: none; }
.enews-modal-actions { display: flex; justify-content: flex-end; padding: 14px 34px 20px; border-top: 1px solid var(--e-line); }
body.enews-modal-open { overflow: hidden; }
@media (max-width: 600px) {
	.enews-modal { padding: 10px; }
	.enews-modal-scroll { padding: 24px 18px 8px; }
	.enews-modal-actions { padding: 12px 18px 16px; }
}

/* ---------- wiki (modules/wiki.php) ---------- */
.wiki { display: flex; gap: 22px; align-items: flex-start; }
.wiki-side { flex: 0 0 220px; position: sticky; top: 14px; }
.wiki-content { flex: 1 1 auto; min-width: 0; }
.wiki-search {
	width: 100%;
	padding: 8px 10px;
	margin-bottom: 8px;
	border: 1px solid var(--e-line-strong);
	background: rgba(12, 20, 38, .85);
	color: var(--e-text);
	font-size: 13px;
}
.wiki-search:focus { outline: none; border-color: var(--e-blue); }
.wiki-results a { display: block; padding: 4px 8px; font-size: 13px; color: var(--e-blue-soft) !important; }
.wiki-results { margin-bottom: 8px; }
.wiki-menu-toggle { display: none; }
.wiki-nav-group { margin-bottom: 12px; }
.wiki-nav-title {
	font-family: 'Cinzel', Georgia, serif;
	font-size: 13px;
	letter-spacing: .1em;
	color: var(--e-silver-3);
	text-transform: uppercase;
	margin-bottom: 4px;
}
.wiki-nav a {
	display: block;
	padding: 5px 10px;
	border-left: 2px solid transparent;
	color: var(--e-silver-2) !important;
	font-size: 14px;
	text-decoration: none;
}
.wiki-nav a:hover { color: #fff !important; border-left-color: var(--e-line-strong); }
.wiki-nav a.active { color: #fff !important; border-left-color: var(--e-blue); background: rgba(77, 147, 255, .08); }
.wiki-updated { color: var(--e-muted); font-size: 12px; margin-top: 10px; }
.wiki-section .info-title { margin-top: 6px; }
.wiki-sub { margin: 22px 0 8px; font-size: 16px; color: var(--e-silver-1); }
.wiki-table td { vertical-align: top; }
.wiki-chat {
	margin: 6px 0 10px;
	padding: 10px 12px;
	border: 1px solid var(--e-line);
	background: rgba(6, 10, 20, .75);
	color: #e8e2c8;
	font-family: Consolas, 'Courier New', monospace;
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}
.wiki-items { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.wiki-item {
	display: inline-block;
	padding: 2px 8px;
	border: 1px solid var(--e-line);
	background: rgba(12, 20, 38, .6);
	font-size: 13px;
	color: var(--e-text);
}
.wiki-item small { color: var(--e-muted); font-size: 11px; }
.wiki-item.is-exc { border-color: rgba(80, 200, 120, .45); color: #8fe3a8; }
.wiki-item.is-anc { border-color: rgba(90, 150, 255, .55); color: var(--e-blue-soft); }
.wiki-item[title] { cursor: help; }
.wiki-bag { margin-bottom: 8px; }
.wiki-bag summary, .wiki-bag-head { font-size: 13px; color: var(--e-silver-2); cursor: default; }
.wiki-bag summary { cursor: pointer; }
.wiki-coins { color: #f2c94c; font-size: 13px; font-weight: 700; }
.wiki-muted { color: var(--e-muted); font-size: 13px; }
.wiki-boss { color: #ff8a7a; }
.wiki-gold { color: #f2c94c; }
.wiki-pill {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	border: 1px solid var(--e-line);
	font-size: 12px;
	color: var(--e-silver-2);
	font-family: 'PT Sans', system-ui, sans-serif;
	letter-spacing: 0;
}
details.wiki-map { border: 1px solid var(--e-line); background: rgba(9, 15, 29, .55); margin-bottom: 8px; }
details.wiki-map > summary {
	padding: 9px 12px;
	cursor: pointer;
	font-family: 'Cinzel', Georgia, serif;
	font-size: 15px;
	color: var(--e-silver-1);
}
details.wiki-map[open] > summary { border-bottom: 1px solid var(--e-line); }
details.wiki-map > table, details.wiki-map > .wiki-moves { margin: 10px 12px; width: calc(100% - 24px); }
.wiki-moves { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--e-silver-2); }
.wiki-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.wiki-card {
	display: block;
	padding: 12px 14px;
	border: 1px solid var(--e-line);
	background: rgba(12, 20, 38, .7);
	text-decoration: none !important;
}
.wiki-card:hover { border-color: var(--e-blue); }
.wiki-card b { display: block; color: var(--e-silver-1); font-family: 'Cinzel', Georgia, serif; }
.wiki-card span { color: var(--e-muted); font-size: 13px; }
.wiki-pager { display: flex; justify-content: space-between; margin: 26px 0 10px; }
.wiki-pager a { color: var(--e-blue-soft) !important; }
.wiki-hit { outline: 2px solid var(--e-blue); outline-offset: 2px; }
@media (max-width: 900px) {
	.wiki { display: block; }
	.wiki-side { position: static; margin-bottom: 14px; }
	.wiki-menu-toggle {
		display: block;
		width: 100%;
		padding: 8px;
		border: 1px solid var(--e-line-strong);
		background: rgba(12, 20, 38, .85);
		color: var(--e-silver-1);
	}
	.wiki-nav { display: none; margin-top: 8px; }
	.wiki-nav.open { display: block; }
	.wiki-content { overflow-x: auto; }
	.wiki-mobs td:nth-child(5) { display: none; }
}

/* ---------- wiki etapa 2: iconos, buscador de items, clases, simulador ---------- */
.wiki-icon { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 5px; image-rendering: auto; }
.wiki-item { display: inline-flex; align-items: center; }
.wiki-item .wiki-icon { margin-right: 4px; }
.wiki-mapdrops { margin: 0 12px 12px; font-size: 13px; color: var(--e-silver-2); }
.wiki-mapdrops .wiki-muted { margin-top: 6px; }
.wiki-result-item { border: 1px solid var(--e-line); background: rgba(12, 20, 38, .7); padding: 6px 8px; margin-bottom: 6px; }
.wiki-result-name { display: flex; align-items: center; color: var(--e-silver-1); font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.wiki-result-item a { padding: 2px 4px !important; }
.wiki-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wiki-class { border: 1px solid var(--e-line); background: rgba(9, 15, 29, .55); padding: 10px 12px; }
.wiki-class h4 { margin: 0 0 2px; font-family: 'Cinzel', Georgia, serif; font-size: 16px; color: var(--e-silver-1); }
.wiki-class .wiki-table { margin: 8px 0 0; font-size: 13px; }
.wiki-sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; margin: 12px 0; }
.wiki-sim label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--e-silver-2); font-weight: 400; }
.wiki-sim input, .wiki-sim select {
	padding: 6px 8px;
	border: 1px solid var(--e-line-strong);
	background: rgba(12, 20, 38, .85);
	color: var(--e-text);
}
.wiki-sim-result { margin: 8px 0 12px; font-size: 15px; }
.wiki-sim-roll {
	padding: 8px 22px;
	border: 1px solid var(--e-blue);
	background: rgba(77, 147, 255, .15);
	color: #fff;
	font-family: 'Cinzel', Georgia, serif;
	letter-spacing: .08em;
}
.wiki-sim-roll:hover { background: rgba(77, 147, 255, .3); }
.wiki-sim-outcome { margin-left: 12px; font-weight: 700; }
.wiki-sim-outcome.is-ok { color: #8fe3a8; }
.wiki-sim-outcome.is-fail { color: #ff8a7a; }
