/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #1a1a2e;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
}

/* ── Outer shell ──────────────────────────────────────────────────────────── */
.pokedex-outer {
  width: 100%;
  max-width: 960px;
  background: #cc0000;
  border-radius: 16px 16px 12px 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.7), inset 0 2px 0 rgba(255,255,255,.15);
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.pokedex-header {
  background: #cc0000;
  padding: 16px 24px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 4px solid #990000;
}

.header-light.big-light {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #88eeff, #0af, #007aab);
  border: 4px solid #fff;
  box-shadow: 0 0 16px #0af, 0 0 4px #fff inset;
  flex-shrink: 0;
}

.header-lights-small {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.small-light {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25);
}
.small-light.red    { background: #ff4444; box-shadow: 0 0 6px #f00; }
.small-light.yellow { background: #ffdd00; box-shadow: 0 0 6px #ff0; }
.small-light.green  { background: #44ff44; box-shadow: 0 0 6px #0f0; }

.pokedex-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0,0,0,.4);
  flex: 1;
  text-align: right;
}

/* ── Body ─────────────────────────────────────────────────────────────────── */
.pokedex-body {
  display: flex;
  gap: 0;
  background: #cc0000;
  padding: 16px;
  gap: 16px;
  min-height: 620px;
}

.panel {
  background: #1a1a2e;
  border-radius: 10px;
  padding: 16px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.5);
}

/* ── Left panel ───────────────────────────────────────────────────────────── */
.left-panel {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Search box */
.search-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-box .form-control {
  background: #0d0d1a;
  border: 2px solid #444;
  border-radius: 8px;
  color: #eee;
  font-size: .9rem;
  padding: 8px 12px;
  transition: border-color .2s;
}
.search-box .form-control:focus {
  border-color: #cc0000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(204,0,0,.25);
}

.search-box .selectize-control .selectize-input {
  background: #0d0d1a;
  border: 2px solid #444;
  border-radius: 8px;
  color: #eee;
  font-size: .85rem;
  padding: 7px 12px;
  box-shadow: none;
}
.search-box .selectize-control .selectize-input.focus {
  border-color: #cc0000;
  box-shadow: 0 0 0 3px rgba(204,0,0,.25);
}
.search-box .selectize-dropdown {
  background: #1a1a2e;
  border: 1px solid #444;
  color: #eee;
}
.search-box .selectize-dropdown .option:hover,
.search-box .selectize-dropdown .option.active {
  background: #cc0000;
}

.type-filter-label {
  font-size: .75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Random button */
.btn-poke.btn-random {
  background: #cc0000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  padding: 8px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: 1px;
}
.btn-poke.btn-random:hover  { background: #ff1a1a; }
.btn-poke.btn-random:active { transform: scale(.97); }

/* Pokemon list */
.pokemon-list-container {
  flex: 1;
  overflow-y: auto;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: #cc0000 #0d0d1a;
}
.pokemon-list-container::-webkit-scrollbar       { width: 6px; }
.pokemon-list-container::-webkit-scrollbar-track { background: #0d0d1a; border-radius: 4px; }
.pokemon-list-container::-webkit-scrollbar-thumb { background: #cc0000; border-radius: 4px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.list-item:hover    { background: rgba(204,0,0,.25); }
.list-item.selected { background: rgba(204,0,0,.5); box-shadow: 0 0 0 2px #cc0000 inset; }

.list-num  { font-size: .75rem; color: #888; min-width: 36px; font-family: monospace; }
.list-name { font-size: .9rem; color: #eee; font-weight: 600; text-transform: capitalize; }

.no-results { color: #888; text-align: center; padding: 24px; font-size: .9rem; }

/* ── Right panel ──────────────────────────────────────────────────────────── */
.right-panel {
  flex: 1;
  overflow-y: auto;
  max-height: 620px;
  scrollbar-width: thin;
  scrollbar-color: #cc0000 #0d0d1a;
}
.right-panel::-webkit-scrollbar       { width: 6px; }
.right-panel::-webkit-scrollbar-track { background: #0d0d1a; border-radius: 4px; }
.right-panel::-webkit-scrollbar-thumb { background: #cc0000; border-radius: 4px; }

/* Placeholder */
.placeholder {
  color: #555;
  text-align: center;
  font-size: 1.1rem;
  margin-top: 40px;
}

/* Detail header */
.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pokemon-sprite {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.6));
  flex-shrink: 0;
}

.detail-identity { display: flex; flex-direction: column; gap: 6px; }

.detail-id {
  font-size: .85rem;
  color: #888;
  font-family: monospace;
  letter-spacing: 1px;
}

.detail-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-transform: capitalize;
  letter-spacing: 1px;
}

/* Type badges */
.type-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  margin-right: 4px;
}

/* Flavour text */
.flavour-text {
  font-style: italic;
  color: #bbb;
  font-size: .88rem;
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-left: 3px solid #cc0000;
  background: rgba(255,255,255,.04);
  border-radius: 0 6px 6px 0;
}

/* Info grid */
.info-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.info-card {
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 10px 16px;
  flex: 1;
  min-width: 120px;
}

.info-label {
  font-size: .7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.info-value {
  font-size: .95rem;
  color: #eee;
  font-weight: 600;
}

/* Stats section */
.stats-section h3,
.moves-section h3 {
  font-size: 1rem;
  color: #cc0000;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.stats-section {
  margin-bottom: 20px;
}

/* Moves */
.moves-section { margin-bottom: 8px; }

.moves-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.move-pill {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .78rem;
  color: #ccc;
  transition: background .15s;
  cursor: default;
  text-transform: capitalize;
}
.move-pill:hover { background: rgba(204,0,0,.3); color: #fff; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .pokedex-body     { flex-direction: column; }
  .left-panel       { width: 100%; }
  .pokemon-list-container { max-height: 220px; }
  .right-panel      { max-height: none; }
}
