/* Valtorius - estilo clasico de pagina de servidor de Tibia: encabezado con arte, menu a la izquierda, contenido al centro, cajas a la derecha */
:root {
	--bg: #0b0d12;
	--box: #10141b;
	--box-in: #0c1015;
	--edge: #2a3240;
	--edge-hi: #3b4558;
	--head-a: #2b3343;
	--head-b: #1a1f29;
	--gold: #e8b64c;
	--gold-hi: #ffd987;
	--text: #c9ccd3;
	--muted: #8a909c;
	--link: #e8b64c;
	--green: #8ee06b;
	--red: #ff5d4d;
	--cream: #d9f2d0;
	--serif: 'Cinzel', 'Times New Roman', serif;
	--sans: Verdana, Tahoma, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.6 var(--sans); min-height: 100vh; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--gold-hi); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 6px; background: var(--gold); color: #000; padding: 6px 10px; z-index: 99; }
.skip:focus { left: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--gold); margin: 0 0 .6em; line-height: 1.2; }
p { margin: 0 0 1em; }

/* ---------- encabezado */
.head { position: relative; height: 400px; overflow: hidden; background: #07080c; }
.head-art { position: absolute; inset: -3%; background: url('/img/header.jpg') center 38% / cover no-repeat; opacity: 0; transition: opacity .8s; }
.head.has-photo .head-art { opacity: 1; animation: kenburns 40s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.head-logo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 40px; pointer-events: none; }
.logo { pointer-events: auto; display: inline-flex; flex-direction: column; align-items: center; text-decoration: none !important; }
.logo-word {
	font: 900 clamp(46px, 8vw, 96px)/1 'Cinzel Decorative', var(--serif);
	background: linear-gradient(180deg, #fff3c6 0%, #ffd56a 38%, #c98a1f 62%, #8a5512 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 3px 0 #3a1d05) drop-shadow(0 0 18px rgba(255, 160, 50, .45));
	letter-spacing: .02em;
}
.logo-sub { margin-top: 6px; font: 700 15px/1 var(--serif); letter-spacing: .5em; color: #f3dfb0; text-shadow: 0 2px 4px #000; padding-left: .5em; }

/* ---------- barra de navegacion */
.topnav { position: relative; max-width: 1180px; margin: -46px auto 18px; z-index: 3; }
.topnav-in { display: flex; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(180deg, #232a37, #12161d); border: 1px solid var(--edge-hi); box-shadow: 0 8px 24px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); min-height: 54px; padding: 0 10px; }
.topnav-in > a { font: 700 13px/1 var(--serif); color: #d9dde6; padding: 12px 14px; text-transform: none; letter-spacing: .03em; white-space: nowrap; }
.topnav-in > a:hover { color: var(--gold-hi); text-decoration: none; }
.topnav-in > a.gold { color: var(--gold); }
.topnav-badge { margin: -14px 14px; padding: 6px 10px !important; background: radial-gradient(circle at 50% 40%, #3a2a12, #140d06); border: 1px solid #6e5320; box-shadow: 0 0 18px rgba(232, 182, 76, .35); }
.topnav-badge img { display: block; }
.menu-btn { display: none; }

/* ---------- columnas */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 10px 40px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 14px; align-items: start; }
#app:focus { outline: none; }

/* cajas */
.box, .panel { background: var(--box); border: 1px solid var(--edge); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); margin-bottom: 14px; }
.box-h, .panel > h2:first-child, .panel > .page-head:first-child {
	margin: 0; padding: 9px 14px; font: 700 15px/1.2 var(--serif); color: var(--gold);
	background: linear-gradient(180deg, var(--head-a), var(--head-b)); border-bottom: 1px solid var(--edge-hi);
	text-shadow: 0 1px 2px #000; letter-spacing: .03em;
}
.panel { padding: 0 16px 16px; }
.panel > h2:first-child, .panel > .page-head:first-child { margin: 0 -16px 14px; }
.panel > .page-head:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 15px; }
.page-head > span { font: 12px var(--sans); color: var(--muted); }
.panel h3 { font-size: 15px; margin-top: 16px; }

/* menu izquierdo */
.menu { list-style: none; margin: 0; padding: 4px 10px 8px; }
.menu li { border-bottom: 1px solid #1e2530; }
.menu li:last-child { border-bottom: 0; }
.menu a { display: block; padding: 7px 8px; font: 700 12px/1.3 var(--serif); color: #c9ccd3; letter-spacing: .02em; }
.menu a:hover { color: var(--gold-hi); background: rgba(255, 255, 255, .03); text-decoration: none; }
.menu a.hl { color: #f1e15c; }
.menu a.gold { color: var(--gold); }
.menu a.red { color: var(--red); }
.menu a.on { color: var(--gold-hi); }

/* caja derecha */
.side-in { padding: 10px 12px 12px; }
.status-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #1e2530; }
.status-row:last-child { border-bottom: 0; }
.st-world { font: 700 12px var(--serif); color: #d9dde6; }
.st-ver { color: var(--red); font-weight: 700; }
.st-on { color: var(--green); font-weight: 700; }
.st-off { color: var(--red); font-weight: 700; }
.power { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.power li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #1e2530; }
.power li:last-child { border-bottom: 0; }
.power li::before { counter-increment: p; content: counter(p) '.'; color: var(--muted); width: 18px; }
.power li a { flex: 1; color: #e3e6ec; font-weight: 700; }
.power li span { color: var(--green); }

/* formularios */
label { display: block; font-weight: 700; margin: 0 0 4px; color: #d9dde6; }
.hint { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
input, select, textarea { width: 100%; font: 13px var(--sans); color: #e6e8ec; background: #0a0d12; border: 1px solid var(--edge-hi); padding: 7px 9px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
.field { margin-bottom: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 13px/1 var(--serif); letter-spacing: .03em; padding: 10px 18px; cursor: pointer; text-decoration: none !important; border: 1px solid; }
.btn-ember, .btn-gold { background: linear-gradient(180deg, #f2c35c, #b9801f); color: #1b1004; border-color: #ffe19a #8a5a12 #6b430c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-ember:hover, .btn-gold:hover { background: linear-gradient(180deg, #ffd47a, #c98d27); color: #1b1004; }
.btn-ghost { background: linear-gradient(180deg, #2b3343, #1a1f29); color: #dfe3ea; border-color: var(--edge-hi); }
.btn-ghost:hover { color: var(--gold-hi); }
.btn-danger { background: transparent; color: var(--red); border-color: #6b2b27; }
.btn-small { padding: 6px 10px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-block { width: 100%; }
.form-error { background: #2a1010; border: 1px solid #7a2e28; color: #ffb4ab; padding: 8px 10px; margin-bottom: 12px; }
.form-ok { background: #102a14; border: 1px solid #3b6b33; color: var(--cream); padding: 10px 12px; margin-bottom: 12px; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.choice label { margin: 0; position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; text-align: center; padding: 8px; border: 1px solid var(--edge-hi); background: #0a0d12; font-weight: 700; cursor: pointer; }
.choice input:checked + span { border-color: var(--gold); color: var(--gold-hi); background: #1d1708; }
.choice input:focus-visible + span { outline: 2px solid var(--gold); }

/* portada */
.countdown-box { text-align: center; padding: 18px 14px; }
.countdown-box h2 { font-size: 22px; margin-bottom: 4px; }
.countdown-box .cd-label { font: 11px var(--serif); letter-spacing: .08em; color: #c9ccd3; margin: 0; }
.countdown-box .cd-date { font: 700 26px var(--serif); color: var(--gold-hi); margin: 4px 0 0; }
.cd-clock { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.cd-clock div { min-width: 64px; padding: 6px 4px; background: var(--box-in); border: 1px solid var(--edge); }
.cd-clock b { display: block; font: 700 24px var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
.cd-clock small { color: var(--muted); font-size: 10px; }
.dl-box { display: block; text-align: center; padding: 14px; margin-bottom: 14px; background: linear-gradient(180deg, #e0f5d5, #b9e3a6); border: 1px solid #7fb36a; font: 700 22px var(--serif); color: #0f5a0f !important; text-decoration: none !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.dl-box:hover { background: linear-gradient(180deg, #ecffe3, #c8efb5); }
.news-item { padding: 14px 0 6px; border-bottom: 1px solid #1e2530; }
.news-item:last-child { border-bottom: 0; }
.news-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.news-item h2 { font-size: 17px; margin: 0; }
.news-item h2 a { color: var(--gold); }
.news-date { font-size: 11px; color: #c9ccd3; white-space: nowrap; }
.news-body { white-space: pre-line; }
.news-by { font-size: 11px; color: var(--muted); }

/* tablas al estilo tibia */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
thead th { background: linear-gradient(180deg, #2b3343, #1f2530); color: var(--gold); font: 700 12px var(--serif); text-align: left; padding: 7px 8px; border: 1px solid var(--edge-hi); white-space: nowrap; }
td { padding: 6px 8px; border: 1px solid #1e2530; }
tbody tr:nth-child(odd) td { background: #0e1218; }
tbody tr:nth-child(even) td { background: #121720; }
tbody tr:hover td { background: #18202b; }
td.num, th.num { text-align: right; }
.rank { width: 46px; color: var(--muted); }
.rank-1 { color: var(--gold-hi); font-weight: 700; }
.voc { color: var(--muted); }
.voc svg { display: none; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs a, .tabs button { font: 700 12px var(--serif); padding: 6px 10px; border: 1px solid var(--edge-hi); background: linear-gradient(180deg, #232a37, #161b23); color: #c9ccd3; text-decoration: none; cursor: pointer; }
.tabs a:hover { color: var(--gold-hi); }
.tabs .on { color: var(--gold-hi); border-color: var(--gold); }
.empty { color: var(--muted); padding: 10px 0; }
.err-box { color: #ffb4ab; }
.kv { display: grid; grid-template-columns: max-content 1fr; margin: 0; border: 1px solid #1e2530; }
.kv dt, .kv dd { margin: 0; padding: 6px 10px; border-bottom: 1px solid #1e2530; }
.kv dt { color: var(--muted); font-weight: 700; background: #0e1218; }
.kv dd { background: #121720; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border: 1px solid var(--edge-hi); color: var(--muted); vertical-align: 1px; }
.badge.on { color: var(--green); border-color: #3b6b33; }
.badge.prem { color: var(--gold); border-color: #6e5320; }
.search { display: flex; gap: 6px; max-width: 420px; }
.search input { flex: 1; }
.prose { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.steps li { margin-bottom: .4em; }

/* tienda */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 16px; }
.pack { text-align: center; font: inherit; color: inherit; background: linear-gradient(180deg, #161b24, #0e1218); border: 1px solid var(--edge-hi); padding: 12px 8px; cursor: pointer; }
.pack:hover { border-color: var(--gold); }
.pack[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 14px rgba(232, 182, 76, .25); }
.pack .coins { font: 700 22px var(--serif); color: var(--gold-hi); display: flex; align-items: center; justify-content: center; gap: 6px; }
.pack .coins img { width: 28px; height: 28px; image-rendering: pixelated; }
.pack .bonus { color: var(--green); font-size: 11px; font-weight: 700; min-height: 1.5em; }
.pack .price { font: 700 16px var(--serif); color: #fff; margin-top: 4px; }
.methods { display: grid; gap: 8px; }
.method { border: 1px solid var(--edge); background: var(--box-in); padding: 10px 12px; }
.method h3 { margin: 0 0 4px; font-size: 14px; }
.method pre { white-space: pre-wrap; font: 12px/1.5 var(--sans); background: #080a0e; border: 1px dashed var(--edge-hi); padding: 8px 10px; margin: 8px 0; }
.method summary { cursor: pointer; color: var(--gold); font-weight: 700; }

/* cuenta */
.chars { display: grid; gap: 6px; }
.char-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #1e2530; background: #0e1218; flex-wrap: wrap; }
.recovery { font: 700 20px/1.2 var(--sans); letter-spacing: .08em; color: var(--gold-hi); background: #080a0e; border: 1px dashed var(--gold); padding: 10px 14px; display: inline-block; margin: 4px 0 10px; user-select: all; }

/* pie */
.foot { text-align: center; padding: 22px 10px 30px; border-top: 1px solid var(--edge); background: #080a0e; font-size: 11px; }
.foot p { margin: 4px 0; }
.toast { visibility: hidden; opacity: 0; position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 120%); background: #1a1f29; border: 1px solid var(--gold); color: #fff; padding: 10px 16px; z-index: 50; transition: transform .25s ease, opacity .25s; max-width: calc(100vw - 32px); }
.toast.show { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.loading { color: var(--muted); padding: 14px; }

@media (max-width: 1000px) {
	.wrap { grid-template-columns: 1fr; }
	.col-left { display: none; }
	.col-left.open { display: block; }
	.topnav { margin: -40px 10px 14px; }
	.topnav-in { flex-wrap: wrap; justify-content: center; }
	.topnav-badge { display: none; }
	.menu-btn { display: block; width: 100%; margin-top: 6px; font: 700 13px var(--serif); color: var(--gold); background: linear-gradient(180deg, #232a37, #12161d); border: 1px solid var(--edge-hi); padding: 10px; }
}
@media (max-width: 560px) {
	.head { height: 230px; }
	.topnav-in > a { padding: 9px 8px; font-size: 12px; }
	.row2 { grid-template-columns: 1fr; }
	.cd-clock div { min-width: 54px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
