@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --bg: #0b0817;
  --bg-2: #120c26;
  --bg-panel: #170f30;
  --bg-card: #1d1440;
  --bg-card-hi: #251a4f;
  --border: #3a2d66;
  --border-hi: #5a3fae;
  --text: #f4f1fb;
  --text-dim: #a99cd6;
  --text-dimmer: #756a99;
  --accent: #9a6cff;
  --accent-2: #7c3aed;
  --accent-glow: rgba(154, 108, 255, .45);
  --gold: #f4b43c;
  --font: 'Nunito', system-ui, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(124,58,237,.35), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(244,180,60,.10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #b794ff; }

::selection { background: var(--accent-2); color: #fff; }

/* scrollbars */
* { scrollbar-color: var(--border-hi) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- sidebar ---------- */

.wk-side {
  width: 268px;
  flex: 0 0 268px;
  background: linear-gradient(180deg, rgba(23,15,48,.96), rgba(14,9,32,.98));
  backdrop-filter: blur(6px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  box-shadow: 4px 0 24px rgba(0,0,0,.35);
}

.wk-side-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 18px;
}
.wk-logo { width: 36px; height: 36px; image-rendering: pixelated; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.wk-title-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.wk-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #d8c4ff, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wk-subtitle { font-size: 11px; color: var(--text-dimmer); letter-spacing: 1.5px; text-transform: uppercase; }

.wk-search { padding: 4px 16px 14px; }
.wk-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.wk-search input::placeholder { color: var(--text-dimmer); }
.wk-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.wk-nav { list-style: none; margin: 4px 0; padding: 4px 12px; flex: 1; overflow-y: auto; }
.wk-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 14.5px;
  transition: background .15s, color .15s, transform .1s;
}
.wk-nav li a:hover { background: rgba(154,108,255,.12); color: var(--text); text-decoration: none; }
.wk-nav li a.active {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.4);
}

.wk-side-foot {
  padding: 14px 18px;
  font-size: 11.5px;
  color: var(--text-dimmer);
  border-top: 1px solid var(--border);
}

.wk-burger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 50;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 20px;
  width: 42px; height: 42px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}

.wk-overlay { display: none; }

/* ---------- main content ---------- */

.wk-main { flex: 1; min-width: 0; }
.wk-content { max-width: 1180px; margin: 0 auto; padding: 40px 32px 80px; }

.wk-loading { color: var(--text-dim); padding: 60px 0; text-align: center; font-size: 15px; }
.wk-loading::before {
  content: '';
  display: block;
  width: 34px; height: 34px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: wk-spin 0.8s linear infinite;
}
@keyframes wk-spin { to { transform: rotate(360deg); } }

h1.wk-h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: .3px;
}
p.wk-sub { color: var(--text-dim); margin: 0 0 26px; font-size: 15px; }

/* hero banner (home) */
.wk-hero {
  position: relative;
  border-radius: 20px;
  padding: 42px 36px;
  margin-bottom: 32px;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(244,180,60,.18), transparent 60%),
    linear-gradient(135deg, #2a1a5e, #170f30 70%);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.wk-hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  margin: 0 0 10px;
  background: linear-gradient(90deg, #fff, #d8c4ff 60%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wk-hero p { color: var(--text-dim); font-size: 16px; max-width: 560px; margin: 0; }
.wk-hero-stars { position: absolute; inset: 0; opacity: .5; pointer-events: none; }

.wk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.wk-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s, box-shadow .16s;
  overflow: hidden;
}
.wk-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(160px 100px at 90% -10%, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity .2s;
}
.wk-card:hover { border-color: var(--border-hi); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(124,58,237,.25); }
.wk-card:hover::before { opacity: 1; }
.wk-card b { font-family: var(--font-display); font-size: 17px; position: relative; }
.wk-card span { position: relative; }

/* ---------- pokédex ---------- */

.wk-dex-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.wk-dex-toolbar input, .wk-dex-toolbar select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}
.wk-dex-toolbar input { flex: 1; min-width: 180px; }
.wk-dex-toolbar input:focus, .wk-dex-toolbar select:focus { outline: none; border-color: var(--accent); }
.wk-dex-count { color: var(--text-dimmer); font-size: 13px; margin: -10px 0 16px; }

.wk-dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}
.wk-mon-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 8px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform .14s, border-color .14s, box-shadow .14s;
}
.wk-mon-card:hover { border-color: var(--border-hi); transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 24px rgba(124,58,237,.3); text-decoration: none; }
.wk-mon-card .spr-wrap {
  width: 72px; height: 72px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(154,108,255,.22), rgba(154,108,255,.04) 70%);
  display: flex; align-items: center; justify-content: center;
}
.wk-mon-card img { width: 60px; height: 60px; image-rendering: pixelated; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.wk-mon-card .num { color: var(--text-dimmer); font-size: 10.5px; font-weight: 700; letter-spacing: .5px; }
.wk-mon-card .name { font-size: 13.5px; font-weight: 700; margin-top: 2px; color: var(--text); }
.wk-mon-card .types { margin-top: 6px; display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }

.wk-type-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: .6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 2px 6px rgba(0,0,0,.25);
}

/* mon detail */
.wk-mon-detail {
  display: flex; gap: 30px; flex-wrap: wrap;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 10px;
}
.wk-mon-detail .art { flex: 0 0 200px; text-align: center; }
.wk-mon-detail .art .spr-wrap {
  width: 180px; height: 180px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(154,108,255,.28), rgba(154,108,255,.03) 72%);
  display: flex; align-items: center; justify-content: center;
}
.wk-mon-detail .art img { width: 152px; height: 152px; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.wk-mon-detail .art .dexnum { color: var(--text-dimmer); font-weight: 700; letter-spacing: 1px; }
.wk-mon-detail .info { flex: 1; min-width: 300px; }

.wk-stat-row { display: flex; align-items: center; gap: 12px; margin: 7px 0; }
.wk-stat-row .label { width: 72px; color: var(--text-dim); font-size: 13px; font-weight: 700; }
.wk-stat-row .bar-track { flex: 1; height: 11px; background: rgba(255,255,255,.05); border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.wk-stat-row .bar-fill { height: 100%; border-radius: 6px; transition: width .5s ease; }
.wk-stat-row .val { width: 34px; text-align: right; font-size: 13px; font-weight: 800; }

.wk-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0 20px; }
.wk-meta-item {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}
.wk-meta-item .k { font-size: 11px; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.wk-meta-item .v { font-size: 15px; font-weight: 700; margin-top: 2px; }
.wk-meta-item .hint { font-size: 10px; color: var(--text-dimmer); margin-top: 3px; line-height: 1.3; }

table.wk-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 10px 0 24px; overflow: hidden; border-radius: 14px; border: 1px solid var(--border); }
table.wk-table th, table.wk-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  text-align: left;
}
table.wk-table th { color: var(--gold); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; background: rgba(255,255,255,.03); }
table.wk-table tbody tr { transition: background .12s; }
table.wk-table tbody tr:hover { background: rgba(154,108,255,.08); }
table.wk-table tbody tr:last-child td { border-bottom: none; }
.wk-move-desc { color: var(--text-dim); font-size: 12.5px; min-width: 200px; max-width: 320px; }

.wk-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 13.5px;
}
.wk-back:hover { color: var(--accent); }

.wk-section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 30px 0 12px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.wk-section-title::before {
  content: '';
  width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  border-radius: 3px;
}

/* ---------- rotas: cards de encontro com sprite ---------- */

.wk-enc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.wk-enc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px 10px 10px;
  transition: transform .14s, border-color .14s;
}
.wk-enc-card:hover { border-color: var(--border-hi); transform: translateY(-2px); text-decoration: none; }
.wk-enc-card .spr-wrap {
  flex: 0 0 56px; width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(154,108,255,.22), rgba(154,108,255,.03) 70%);
  display: flex; align-items: center; justify-content: center;
}
.wk-enc-card img { width: 48px; height: 48px; image-rendering: pixelated; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.wk-enc-card .body { flex: 1; min-width: 0; }
.wk-enc-card .name { font-weight: 800; font-size: 14.5px; color: var(--text); }
.wk-enc-card .lvl { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.wk-enc-card .chance-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.wk-enc-card .chance-track { flex: 1; height: 6px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.wk-enc-card .chance-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 4px; }
.wk-enc-card .chance-pct { font-size: 11px; color: var(--gold); font-weight: 800; white-space: nowrap; }
.wk-enc-card .time-badge {
  flex: 0 0 auto;
  font-size: 14px;
}

.wk-legend-badge {
  background: linear-gradient(135deg, var(--gold), #ffdd8a);
  color: #3a2400;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- cadeia evolutiva ---------- */

.wk-evo-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 10px;
}
.wk-evo-step { display: flex; align-items: center; gap: 4px; }
.wk-evo-branches { display: flex; flex-direction: column; gap: 14px; }

.wk-evo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: border-color .14s, background .14s, transform .14s;
}
.wk-evo-node:hover { background: rgba(154,108,255,.08); transform: translateY(-2px); text-decoration: none; }
.wk-evo-node.current { border-color: var(--border-hi); background: rgba(154,108,255,.14); box-shadow: 0 0 0 1px var(--accent-glow); }
.wk-evo-node .spr-wrap {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(154,108,255,.22), rgba(154,108,255,.03) 70%);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.wk-evo-node img { width: 62px; height: 62px; image-rendering: pixelated; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.wk-evo-node .name { font-size: 13px; font-weight: 800; color: var(--text); }
.wk-evo-node.current .name { color: var(--gold); }

.wk-evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-dimmer);
  font-size: 20px;
  padding: 0 4px;
  min-width: 64px;
}
.wk-evo-method {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  margin-top: -2px;
}

/* ---------- habilidades ---------- */

.wk-ability-card {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.wk-ability-card b { font-family: var(--font-display); font-size: 16px; color: var(--text); }
.wk-ability-card .mons { color: var(--text-dim); font-size: 13.5px; margin-top: 6px; line-height: 1.6; }
.wk-ability-card .mons a { color: var(--text-dim); }
.wk-ability-card .mons a:hover { color: var(--accent); }

/* ---------- TMs/HMs ---------- */

.wk-tm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.wk-tm-badge {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hi));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: help;
  transition: all .2s;
}
.wk-tm-badge:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.wk-tm-badge[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  background: var(--bg-card-hi);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  white-space: pre-line;
  line-height: 1.5;
  width: max-content;
  max-width: 260px;
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  z-index: 50;
  pointer-events: none;
}
.wk-tm-badge[data-tip]:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--accent);
  z-index: 50;
  pointer-events: none;
}

/* ---------- líderes ---------- */

.wk-trainer-row {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}
.wk-trainer-row .thead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.wk-trainer-row .tinfo .nm {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .5px;
}
.wk-trainer-row .tinfo .sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}
.wk-trainer-row .tbadge {
  flex: none;
  text-align: right;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}
.wk-trainer-row .tbadge b {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: .4px;
}

.wk-mon-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wk-mon-box {
  position: relative;
  flex: none;
  width: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card-hi);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px 10px;
}
.wk-mon-box.boss {
  border-color: var(--gold);
  box-shadow: 0 0 18px -6px rgba(244, 180, 60, .55);
  background: linear-gradient(160deg, #33280f, var(--bg-card-hi));
}
.wk-mon-box .crown {
  position: absolute;
  top: -14px;
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}
.wk-mon-box .spr {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.wk-mon-box .spr img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wk-mon-box .nm { font-size: 12.5px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.wk-mon-box .lv { font-size: 11px; color: var(--gold); font-weight: 700; margin-top: 1px; margin-bottom: 8px; }
.wk-mon-box .moves {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}
.wk-mon-box .foot {
  margin-top: auto;
  padding-top: 8px;
  font-size: 10.5px;
  color: var(--text-dimmer);
  font-weight: 700;
  letter-spacing: .3px;
  border-top: 1px dashed var(--border);
  width: 100%;
}
.wk-mon-box.boss .foot { color: var(--gold); border-top-color: rgba(244,180,60,.3); }

.wk-move-chip {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #fff;
  padding: 3px 7px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .wk-side { position: fixed; left: -280px; z-index: 60; transition: left .2s; }
  .wk-side.open { left: 0; }
  .wk-burger { display: block; }
  .wk-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); z-index: 55; }
  .wk-content { padding: 70px 18px 60px; }
  .wk-hero { padding: 28px 22px; }
  .wk-hero h1 { font-size: 30px; }
}
