:root {
  --fondo: #17181a;
  --panel: #1f2023;
  --carta: #2a2b2f;
  --borde: #3a3c41;
  --borde-fuerte: #5b5f66;
  --texto: #e9e9ea;
  --suave: #a2a6ad;
  --marcador: #55585e;
  --barra: #0f0f10;
  --barra-raya: #171718;
  --barra-texto: #ffffff;
  --acento: #e0435a;
  --acento-suave: #3b2125;
  --enlace: #62acef;
  --fila: #26272b;
  --alto: #4cc38a;
  --bajo: #f0705f;
  --uso: #4f7fae;
  --campo: #2a2b2f;
  --velo: rgba(23, 24, 26, 0.86);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(var(--velo), var(--velo)), url("fondo.jpg") center / cover fixed, var(--fondo);
  color: var(--texto);
  font: 15px/1.45 "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.cabecera {
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cabecera-interior {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-height: 74px;
}

.marca {
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.marca-texto span { color: var(--acento); }
.marca { display: inline-flex; align-items: center; gap: 8px; }
.marca-logo { width: 40px; height: 40px; object-fit: contain; }
.marca:hover { text-decoration: none; }

.buscador-cabecera {
  display: flex;
  flex: 1 1 300px;
  max-width: 380px;
  min-width: 180px;
  height: 42px;
  border: 2px solid #4a4a4a;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.buscador-cabecera input[type=search] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  height: auto;
  border-radius: 0;
  padding: 0 12px;
  font: inherit;
}
.buscador-cabecera input::placeholder { color: #9a9a9a; }
.buscador-cabecera input:focus { outline: none; }
.buscador-cabecera button {
  width: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.menu { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.menu a {
  color: var(--barra-texto);
  padding: 8px 10px;
  font-weight: 600;
  font-size: 16px;
  border-radius: 4px;
}
.menu a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.menu a.activo { background: rgba(255, 255, 255, .14); }

.contenido {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

h1 { font-size: 26px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 18px; margin: 0 0 12px; }
.subtitulo { color: var(--suave); margin: 0 0 20px; }

.titulo-seccion {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.enlace-seccion {
  font-size: 14px;
  font-weight: 600;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 18px;
}

.panel.filtros { background: var(--carta); border-color: transparent; }

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: flex-end;
}

.campo { display: flex; flex-direction: column; gap: 5px; }
.campo > span {
  font-size: 14px;
  font-weight: 500;
  color: var(--suave);
}

input, select, button { font: inherit; }

input[type=text], input[type=search], input[type=number], select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--borde);
  border-radius: 4px;
  background: var(--campo);
  color: var(--texto);
}
input[type=number] { width: 90px; }
select { max-width: 360px; }

.boton {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: var(--acento);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.boton:hover { filter: brightness(1.08); }

.segmentado { align-self: flex-start; display: inline-flex; border: 1px solid var(--borde); border-radius: 4px; overflow: hidden; }
.segmentado input { position: absolute; opacity: 0; pointer-events: none; }
.segmentado label {
  padding: 0 13px;
  line-height: 36px;
  cursor: pointer;
  font-weight: 600;
  color: var(--suave);
  background: var(--campo);
  border-left: 1px solid var(--borde);
}
.segmentado label:first-of-type { border-left: 0; }
.segmentado input:checked + label { background: var(--barra); color: #fff; }
.segmentado input:focus-visible + label { outline: 2px solid var(--enlace); outline-offset: -2px; }

.tabla-envoltura { overflow-x: auto; }

table.datos {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}
table.datos th {
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--suave);
  padding: 9px 12px;
  border-bottom: 2px solid var(--borde);
  white-space: nowrap;
}
table.datos td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--borde);
  vertical-align: middle;
}
table.datos tbody tr:hover { background: var(--fila); }
table.datos .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.datos .pos { color: var(--suave); width: 1%; }

.sprite {
  width: 40px;
  height: 40px;
  margin: 0 2px;
  object-fit: contain;
  vertical-align: middle;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}
.icono-objeto { width: 26px; height: 26px; margin: -4px 6px -4px 0; vertical-align: middle; image-rendering: pixelated; }
.sprite-grande { width: 140px; height: 140px; object-fit: contain; }

.equipo { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.equipo a:hover { text-decoration: none; }

.combo-nombres { font-size: 12px; color: var(--suave); margin-top: 4px; }

.uso-celda { min-width: 140px; }
.uso-barra { height: 6px; border-radius: 3px; background: var(--fila); margin-top: 4px; overflow: hidden; }
.uso-barra > div { height: 100%; background: var(--uso); }

.wr-alto { color: var(--alto); font-weight: 700; }
.wr-bajo { color: var(--bajo); font-weight: 700; }

.etiqueta {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--fila);
  border: 1px solid var(--borde);
  font-size: 12px;
  color: var(--suave);
  white-space: nowrap;
}
.enlace-titulo { color: inherit; }
.enlace-titulo:hover { color: var(--enlace); }
.etiqueta-detalle { font-weight: 400; color: var(--suave); white-space: normal; }
.etiqueta-enlace {
  color: var(--texto);
  background: var(--carta);
  border-color: var(--borde-fuerte);
}
.etiqueta-enlace:hover { border-color: var(--enlace); color: var(--enlace); text-decoration: none; }
.etiqueta-acento {
  border: 1px solid var(--acento);
  border-radius: 4px;
  background: transparent;
  color: var(--texto);
  font-weight: 700;
  font-size: 14px;
  padding: 6px 10px;
}

.tipo {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  background: #777;
}
.tipo-normal { background: #9fa19f; } .tipo-fire { background: #e62829; }
.tipo-water { background: #2980ef; } .tipo-electric { background: #d9b100; }
.tipo-grass { background: #3fa129; } .tipo-ice { background: #3dcef3; }
.tipo-fighting { background: #ff8000; } .tipo-poison { background: #9141cb; }
.tipo-ground { background: #915121; } .tipo-flying { background: #81b9ef; }
.tipo-psychic { background: #ef4179; } .tipo-bug { background: #91a119; }
.tipo-rock { background: #afa981; } .tipo-ghost { background: #704170; }
.tipo-dragon { background: #5060e1; } .tipo-dark { background: #624d4e; }
.tipo-steel { background: #60a1b8; } .tipo-fairy { background: #ef70ef; }

.aviso { padding: 10px 14px; border-radius: 4px; background: var(--acento-suave); color: var(--bajo); }
.vacio { color: var(--suave); padding: 8px 0; }

.ficha { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: start; }
.ficha dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.ficha dt { color: var(--suave); font-weight: 600; }
.ficha dd { margin: 0; }
.columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.movimientos-juego { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.movimiento {
  display: block;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--texto);
  background: var(--carta);
  border: 1px solid var(--borde-fuerte);
  border-radius: 8px;
}
.movimiento:hover { border-color: var(--enlace); color: var(--enlace); text-decoration: none; }

.top-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.top-carta {
  display: flex;
  flex-direction: column;
  background: var(--carta);
  border-radius: 4px;
  color: var(--texto);
  overflow: hidden;
}
.top-carta:hover { text-decoration: none; outline: 2px solid var(--marcador); }
.top-nombre {
  padding: 4px 10px 12px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  line-height: 1.3;
}
.top-nombre span { color: var(--suave); font-weight: 400; }
.top-imagen { display: flex; align-items: center; justify-content: center; height: 140px; padding: 12px 8px 4px; }
.top-imagen img { max-width: 100%; max-height: 120px; }
.top-pie { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

.recientes { display: flex; flex-direction: column; background: var(--carta); border-radius: 4px; overflow: hidden; }
.reciente {
  display: block;
  padding: 14px 16px;
  color: var(--texto);
  border-bottom: 1px solid var(--borde);
}
.reciente:last-child { border-bottom: 0; }
.reciente:hover { text-decoration: none; background: var(--fila); }
.reciente strong { display: block; font-size: 18px; font-weight: 500; }
.reciente span { color: var(--suave); }
.recientes-pie { padding: 14px 16px 0; }

.pie {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 24px;
  font-size: 13px;
  color: var(--suave);
}
.pie p { margin: 0 0 4px; }

@media (max-width: 960px) {
  .top-grid { grid-template-columns: repeat(4, 1fr); }
  .menu { margin-left: 0; }
}

@media (max-width: 700px) {
  .top-grid { grid-template-columns: repeat(2, 1fr); }
  .ficha, .columnas { grid-template-columns: 1fr; }
  .menu a { padding: 6px 8px; font-size: 16px; }
  .buscador-cabecera { flex-basis: 100%; }
}
