:root{
  --bg0: #070A12;
  --bg1: #0B1020;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.10);
  --stroke2: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.55);

  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --shadow2: 0 12px 40px rgba(0,0,0,.22);

  --r12: 12px;
  --r16: 16px;
  --r20: 20px;

  --pmin: 0%;
  --pmax: 100%;

  --spriteTable: 54px;
  --spriteMini: 46px;
  --spriteHero: 96px;
  --itemIco: 30px;
}

*{ box-sizing: border-box; }


:root{
  --bg0:#050814; --bg1:#061022; --bg2:#040914;
  --g1: rgba(90,180,255,.22);
  --g2: rgba(70,255,210,.14);
  --g3: rgba(120,140,255,.10);
  --g4: rgba(255,255,255,.04);
}


html { background: linear-gradient(180deg, var(--bg0), var(--bg1)); }
html, body { min-height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.25;

  background: transparent;
  position: relative;
  z-index: 0;
}

body::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;

  background:
    radial-gradient(1200px 900px at 12% -12%, var(--g1), transparent 62%),
    radial-gradient(1000px 700px at 92% 8%,  var(--g2), transparent 58%),
    radial-gradient(900px 700px at 55% 115%, var(--g3), transparent 60%),
    radial-gradient(800px 600px at 75% 70%,  var(--g4), transparent 65%),

    conic-gradient(from 210deg at 30% 35%,
      rgba(120,170,255,.10),
      rgba(230,120,255,.08),
      rgba(90,255,210,.06),
      rgba(120,170,255,.10)
    ),

    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 55%, var(--bg2) 100%);

  filter: saturate(1.15) contrast(1.05);
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  transform: translate3d(0,0,0);
}


a{ color: inherit; }
.muted{ color: var(--muted); font-size: 12px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }

.page{
  width: min(1200px, 100%);
  margin: 28px auto 50px;
  padding: 0 18px;
}

.top{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.top h1{
  margin: 0;
  font-size: 24px;
  letter-spacing: .2px;
}
.top h1 span{
  font-weight: 600;
  color: var(--muted);
}

.topRight{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.githubLink{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.05);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.githubLink svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.githubLink:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

.githubLink:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(120,170,255,.20);
}

.bar{
  display:grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: var(--r20);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

@media (max-width: 1100px){
  .bar{ grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}
@media (max-width: 720px){
  .bar{ grid-template-columns: 1fr; }
}

label{
  display:flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

input, select, button{
  font: inherit;
  color: var(--text);
}

input, select{
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(10,14,26,.55);
  outline: none;
}
input::placeholder{ color: rgba(255,255,255,.40); }

select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.55) 50%),
    linear-gradient(135deg, rgba(255,255,255,.55) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 16px,
    calc(100% - 12px) 16px,
    calc(100% - 2.6em) 0.4em;
  background-size: 6px 6px, 6px 6px, 1px 1.8em;
  background-repeat: no-repeat;
}

input:focus, select:focus{
  border-color: rgba(160,200,255,.55);
  box-shadow: 0 0 0 4px rgba(120,170,255,.14);
}

.rangeBlock{ grid-column: span 2; }
@media (max-width: 1100px){ .rangeBlock{ grid-column: span 3; } }
@media (max-width: 720px){ .rangeBlock{ grid-column: span 1; } }

.rangeWrap{
  position: relative;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(10,14,26,.55);
  overflow: hidden;
  display:flex;
  align-items:center;
  padding: 0 10px;
}

.rangeTrack{
  position: absolute;
  left: 10px;
  right: 10px;
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,.18) 0%,
      rgba(255,255,255,.18) var(--pmin),
      rgba(120,170,255,.70) var(--pmin),
      rgba(120,170,255,.70) var(--pmax),
      rgba(255,255,255,.18) var(--pmax),
      rgba(255,255,255,.18) 100%);
  pointer-events: none;
}

.rangeWrap input[type="range"]{
  position: absolute;
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  height: 40px;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  border: 0;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}
.rangeWrap input[type="range"]::-webkit-slider-runnable-track{
  height: 6px;
  background: transparent;
}
.rangeWrap input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.30);
  margin-top: -6px;
}
.rangeWrap input[type="range"]::-moz-range-track{
  height: 6px;
  background: transparent;
}
.rangeWrap input[type="range"]::-moz-range-thumb{
  pointer-events: auto;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.30);
}
.rangeWrap input[type="range"]:focus-visible::-webkit-slider-thumb{
  box-shadow: 0 0 0 5px rgba(120,170,255,.22), 0 6px 16px rgba(0,0,0,.30);
}

.tableWrap{
  margin-top: 14px;
  border-radius: var(--r20);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}

table{
  width: 100%;
  border-collapse: collapse;
}
thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 12px;
  background: rgba(14,18,32,.95);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

thead th[data-sort]{
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
thead th[data-sort]:hover{
  background: rgba(255,255,255,.04);
}
.sortInd{
  margin-left: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
}
thead th.isActive{
  color: rgba(255,255,255,.92);
}

tbody tr{ transition: background .12s ease; }
tbody tr.clickable{ cursor: pointer; }
tbody tr.clickable:hover{ background: rgba(255,255,255,.05); }

.poke{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 240px;
}

.poke img{
  width: var(--spriteTable);
  height: var(--spriteTable);
  image-rendering: pixelated;
  border-radius: 14px;
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(255,255,255,.10);
  flex: 0 0 auto;
}

.poke b{
  font-size: 14px;
  letter-spacing: .1px;
}

@media (max-width: 720px){
  :root{ --spriteTable: 48px; }
  .poke{ min-width: unset; }
}

.btn{
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.btn:hover{ background: rgba(255,255,255,.08); }

.modalBack{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
  background: rgba(0,0,0,.45);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.modal{
  width: min(1200px, 100%);
  max-height: min(90vh, 100%);
  overflow: hidden;
  background: rgba(18,22,36,.96);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);

  transform: translate3d(0,0,0);
  will-change: transform;
  contain: layout paint;
}

.modalHeader{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18,22,36,.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.modalHeader b{
  font-size: 13px;
  color: rgba(255,255,255,.86);
}

.modalBody{
  padding: 14px;
  overflow: auto;
  max-height: calc(min(90vh, 100vh) - 58px);
  -webkit-overflow-scrolling: touch;
  contain: content;
}

.detailGrid{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}
@media (max-width: 980px){ .detailGrid{ grid-template-columns: 1fr; } }

.card{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  padding: 12px;
}
.card h3, .card h4{
  margin: 0 0 10px 0;
  letter-spacing: .2px;
}
.card h3{ font-size: 14px; color: rgba(255,255,255,.90); }
.card h4{ font-size: 13px; color: rgba(255,255,255,.84); }

.heroRow{ display:flex; gap: 12px; align-items: center; }
.heroSprite{
  width: var(--spriteHero);
  height: var(--spriteHero);
  image-rendering: pixelated;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.heroTitle{
  font-size: 22px;
  font-weight: 850;
  line-height: 1.05;
}
.heroSub{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.80);
}
.chip b{ font-weight: 900; color: rgba(255,255,255,.92); }

.statGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 980px){ .statGrid{ grid-template-columns: 1fr; } }

.statBox{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 10px;
}
.statLabel{ color: var(--muted); font-size: 12px; }
.statValue{ font-weight: 900; font-size: 20px; margin-top: 3px; }

.minirow{
  display:flex;
  align-items:center;
  gap: 12px;
  margin: 10px 0;
}
.minirow img{
  width: var(--spriteMini);
  height: var(--spriteMini);
  image-rendering: pixelated;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}
.miniName{ font-weight: 850; font-size: 14px; }
.miniMeta{ color: var(--muted); font-size: 12px; margin-top: 3px; }

.listLine{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255,255,255,.10);
}
.listLine:last-child{ border-bottom: 0; }

.itemico{
  width: var(--itemIco);
  height: var(--itemIco);
  image-rendering: pixelated;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}

img[src$=".gif"]{ filter: none !important; }

html.modal-open body{ overflow: hidden; }
