/* Estilo tomado de la interfaz del juego: paneles oscuros con marco dorado, títulos dorados y botones rojos. */
:root {
    --bg: #101314;
    --panel: #171b1d;
    --panel-2: #1d2225;
    --line: #2c3236;
    --gold: #c9a14a;
    --gold-dark: #6e5424;
    --gold-text: #f0c35a;
    --value: #ffcc33;
    --text: #d6d2c8;
    --muted: #8b8f91;
    --red-1: #b13a22;
    --red-2: #7c1d0f;
    --red-border: #d0603f;
    --green: #4fd14f;
    --radius: 3px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 "Segoe UI", Tahoma, Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(201, 161, 74, .12), transparent 55%),
        radial-gradient(ellipse at 50% 120%, rgba(177, 58, 34, .10), transparent 60%),
        var(--bg);
}

a { color: var(--gold-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Encabezado ---------- */
.top {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px max(16px, calc(50% - 560px));
    background: linear-gradient(#1a1e20, #111415);
    border-bottom: 1px solid var(--gold-dark);
    box-shadow: 0 1px 0 rgba(201, 161, 74, .25), 0 6px 20px rgba(0, 0, 0, .5);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--gold-text); }
.brand:hover { text-decoration: none; }
.brand img { height: 52px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); }
.brand span { font-weight: 700; font-size: 18px; letter-spacing: .5px; text-transform: uppercase; line-height: 1.15; }
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 1px; }

.menu { display: flex; gap: 8px; flex-wrap: wrap; }

.status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid var(--line);
    background: #0c0e0f;
    border-radius: var(--radius);
    font-size: 13px;
}
.status i { width: 9px; height: 9px; border-radius: 50%; background: #c33; box-shadow: 0 0 8px #c33; }
.status.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status.on { color: #bfe8bf; }
.status.off { color: #e0a0a0; }

/* ---------- Botones rojos como los del juego ---------- */
.btn {
    display: inline-block;
    padding: 6px 16px;
    color: #ffe2b0;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    background: linear-gradient(var(--red-1), var(--red-2));
    border: 1px solid var(--red-border);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 200, 150, .3), 0 2px 4px rgba(0, 0, 0, .6);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .7);
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn.active { outline: 1px solid var(--gold); outline-offset: 2px; }
.btn.dark {
    background: linear-gradient(#3a3f42, #24282a);
    border-color: #5a6064;
    color: #d6d2c8;
}
.btn.big { padding: 9px 26px; font-size: 15px; }
.btn:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }

/* ---------- Paneles con marco dorado ---------- */
main {
    flex: 1;
    width: 100%;
    max-width: 1152px;
    margin: 0 auto;
    padding: 28px 16px;
}

.panel {
    position: relative;
    background: linear-gradient(var(--panel-2), var(--panel));
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 24px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 40px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .5);
}
/* Esquinas doradas del marco. */
.panel::before, .panel::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--gold);
    pointer-events: none;
}
.panel::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }

.panel.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }

h1, h2 {
    margin: 0 0 16px;
    color: var(--gold-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px #000;
}
h1 { font-size: 20px; }
h2 { font-size: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

.hero { text-align: center; }
.hero h1 { font-size: 26px; }
.hero p { color: var(--muted); margin: 0 0 18px; }

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid .panel { margin-bottom: 0; }

.steps { margin: 0 0 20px; padding-left: 20px; }
.steps li { margin-bottom: 6px; }

.more { text-align: right; margin: 12px 0 0; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 0 0 14px; }
.empty { color: var(--muted); text-align: center; padding: 20px 0; }
.muted { color: var(--muted); }

/* ---------- Pestañas ---------- */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 14px; }
.tabs a {
    padding: 5px 14px;
    background: linear-gradient(#2c3134, #1d2123);
    border: 1px solid #454b4f;
    border-radius: 2px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
.tabs a:hover { text-decoration: none; border-color: var(--gold-dark); }
.tabs a.active {
    background: linear-gradient(var(--red-1), var(--red-2));
    border-color: var(--red-border);
    color: #ffe2b0;
}
.main-tabs a { padding: 7px 22px; font-size: 14px; }

/* ---------- Tabla del ranking ---------- */
.table-wrap { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank th {
    color: var(--gold-text);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--gold-dark);
    background: rgba(0, 0, 0, .25);
}
.rank td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rank tbody tr:hover { background: rgba(201, 161, 74, .06); }
.rank .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank .pos { width: 42px; text-align: center; color: var(--muted); font-weight: 700; }
.rank .name { font-weight: 600; color: #ece6d8; }
.rank .hl { color: var(--value); font-weight: 700; }
.rank tr.top1 .pos { color: #ffd34d; }
.rank tr.top2 .pos { color: #d8dde0; }
.rank tr.top3 .pos { color: #d08a4a; }
.rank tr.top1 .name { color: #ffd34d; }

.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #4a4f52; vertical-align: 1px; }
.dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }

.mark { vertical-align: -4px; margin-right: 4px; background: rgba(0, 0, 0, .35); outline: 1px solid #3a3f42; }

/* Colores por raza. */
.race {
    display: inline-block;
    min-width: 38px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border-radius: 2px;
    border: 1px solid currentColor;
    background: rgba(0, 0, 0, .3);
}
.race-dw { color: #6fa8ff; }
.race-dk { color: #ff6b4a; }
.race-elf { color: #7fe07f; }
.race-mg { color: #d78bff; }
.race-dl { color: #ffcf4a; }
.race-sum { color: #ff8fc8; }
.race-rf { color: #5fe0d8; }

.races { display: flex; flex-wrap: wrap; gap: 8px; }
.races a { font-size: 13px; padding: 4px 10px; }
.races a:hover { text-decoration: none; filter: brightness(1.3); }

/* ---------- Formulario ---------- */
form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 4px; color: #cfc8b8; font-size: 14px; }
label small { color: var(--muted); font-size: 12px; }
input {
    padding: 8px 10px;
    font: inherit;
    color: var(--value);
    background: #0b0d0e;
    border: 1px solid #4a4436;
    border-radius: 2px;
    outline: none;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 161, 74, .2); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.captcha {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: #0b0d0e;
    border: 1px solid #4a4436;
    border-radius: 2px;
    cursor: pointer;
    user-select: none;
}
.captcha .check {
    grid-row: span 2;
    width: 24px;
    height: 24px;
    padding: 0;
    background: #1b1f21;
    border: 2px solid var(--gold-dark);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}
.captcha .label { font-weight: 600; }
.captcha .small { font-size: 11px; color: var(--muted); }
.captcha[data-state=working] .check { border-color: var(--gold); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.captcha[data-state=done] { border-color: #2f6b2f; cursor: default; }
.captcha[data-state=done] .check { border-color: var(--green); }
.captcha[data-state=done] .check::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid var(--green);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.captcha[data-state=done] .label { color: var(--green); }
.captcha[data-state=error] .label { color: #ff8a7a; }
@keyframes spin { to { transform: rotate(360deg); } }

.msg { padding: 12px 14px; border-radius: 2px; margin-bottom: 16px; font-size: 14px; }
.msg.error { background: rgba(177, 58, 34, .15); border: 1px solid #8a3020; color: #ffb4a4; }
.msg.ok { background: rgba(79, 209, 79, .08); border: 1px solid #2f6b2f; color: #c8f0c8; }
.msg.ok b { display: block; color: var(--green); font-size: 16px; margin-bottom: 4px; }

footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 18px 16px;
    border-top: 1px solid var(--line);
}

/* ---------- Teléfono ---------- */
@media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; }
    .top { gap: 12px; }
    .status { margin-left: 0; }
    .brand img { height: 40px; }
    .panel { padding: 18px 14px; }
    .hide-sm { display: none; }
    .rank td, .rank th { padding: 6px 6px; }
}

/* ---------- Reglas ---------- */
.rules ol, .rules ul { margin: 0; padding-left: 22px; }
.rules li { margin-bottom: 8px; }
.rules h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.rules h3.ok { color: var(--green); }
.rules h3.no { color: #ff8a7a; }
.rules .note { margin: 14px 0 0; padding: 10px 14px; background: rgba(201, 161, 74, .08); border: 1px solid var(--gold-dark); border-radius: 2px; color: #e8dcc0; font-size: 14px; }
.rules section { scroll-margin-top: 16px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
code { color: var(--value); background: #0b0d0e; padding: 1px 5px; border: 1px solid #3a3426; border-radius: 2px; font-size: 13px; }

/* ---------- Títulos ---------- */
.rarities { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rarity { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: #111415; border: 1px solid var(--line); font-size: 13px; }
.rarity i { width: 10px; height: 10px; display: inline-block; }
.insignia, .insignia-supremo { display: inline-block; line-height: 0; max-width: 100%; }
.insignia b, .insignia-supremo b { line-height: 1.5; }
.insignia svg, .insignia-supremo svg { max-width: 100%; height: auto; }
.supreme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.supreme-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); text-align: center; }
.supreme-card .cond { color: #cfc8b8; font-size: 14px; }
.supreme-card .holder { font-size: 13px; }
.supreme-card .holder b { color: var(--gold-text); }
.titles .hint { margin-top: -8px; }
.title-table td { white-space: normal; vertical-align: middle; }
.title-table .badge-cell { width: 316px; }
.title-table .cond { color: #cfc8b8; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid3 .panel { margin-bottom: 0; }
.grid3 p { margin: 0; font-size: 14px; }
.title-tag { display: block; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-shadow: 0 0 6px rgba(0, 0, 0, .9); }

@media (max-width: 760px) {
    .two-cols, .grid3 { grid-template-columns: 1fr; }
    .title-table .badge-cell { width: auto; min-width: 200px; }
    .supreme-grid { grid-template-columns: 1fr; }
}

/* ---------- Eventos ---------- */
.clock { color: var(--value); font-variant-numeric: tabular-nums; }
.next-event {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 28px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--gold-dark);
}
.next-event .label, .now-events .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.next-event .name { color: var(--gold-text); font-size: 18px; }
.next-event .when { color: #cfc8b8; font-size: 14px; }
.next-event .big-cd { color: var(--value); font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 204, 51, .35); }
.now-events { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; }
.now-events:empty { display: none; }
.live-tag {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    border: 1px solid #2f6b2f;
    background: rgba(79, 209, 79, .08);
    border-radius: 2px;
}
.events-table td { white-space: normal; vertical-align: top; }
.events-table .ev-name b { display: block; color: #ece6d8; font-size: 15px; }
.events-table .ev-desc { display: block; color: #cfc8b8; font-size: 13px; }
.events-table .ev-details { display: block; font-size: 12px; margin-top: 2px; }
.events-table tr.live .ev-name b { color: var(--green); }
.ev-kind { float: right; margin-left: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 0 5px; border: 1px solid currentColor; border-radius: 2px; }
.kind-evento { color: #6fa8ff; }
.kind-asedio { color: #ff6b4a; }
.kind-bonus { color: var(--green); }
.kind-invasión { color: #f2c14e; }
.ev-times { min-width: 160px; }
.chip { display: inline-block; margin: 0 4px 4px 0; padding: 0 5px; font-size: 12px; font-variant-numeric: tabular-nums; color: #cfc8b8; background: #0b0d0e; border: 1px solid var(--line); border-radius: 2px; }
.chip.next { color: var(--value); border-color: var(--gold); }
.ev-next { min-width: 110px; }
.ev-next .cd { color: var(--value); font-variant-numeric: tabular-nums; }
.ev-next small { display: block; color: var(--muted); font-size: 12px; }
.agenda { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; }
.agenda li { display: flex; gap: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.agenda .at { flex: 0 0 64px; color: var(--value); font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda .at small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.agenda .what { color: #cfc8b8; }

@media (max-width: 760px) {
    .events-table .ev-times { min-width: 120px; }
    .next-event { padding: 10px 14px; }
    .next-event .big-cd { font-size: 24px; }
}

/* Página de descarga */
.install li { margin-bottom: 12px; }
.install b { display: block; color: #ece6d8; }
.install code { background: rgba(0, 0, 0, .35); padding: 1px 5px; border-radius: var(--radius); font-size: 13px; }
