:root {
  color-scheme: light dark;
  --bg: #0d1117;
  --panel: #111827;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --accent: #f97316;
  --border: #1f2937;
  --success: #22c55e;
  --warn: #facc15;
  --error: #ef4444;
  --card-width: min(960px, 100%);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 10% 10%, rgba(249, 115, 22, 0.25), transparent 25%), radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.2), transparent 22%), var(--bg);
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px 48px;
}

.page {
  width: var(--card-width);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

.title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.pokeball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f87171 50%, #0f172a 50%);
  border: 4px solid #0f172a;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pokeball::before {
  content: '';
  position: absolute;
  inset: 22px 0 22px 0;
  background: #0f172a;
}

.pokeball::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 4px solid #0f172a;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
}

.flavor {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.genus {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-transform: capitalize;
}

.title-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.search {
  display: flex;
  width: 100%;
  max-width: 420px;
  gap: 8px;
}

.search input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  outline: none;
  transition: border 120ms ease, box-shadow 120ms ease;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35);
}

.search button {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

.search button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search .ghost {
  background: transparent;
  color: var(--text);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.pager button {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.pager button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.pager button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  flex: 1;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease;
}

.tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.tab.active {
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.15);
}

.status {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
}

.status[data-tone='success'] {
  color: var(--success);
}

.status[data-tone='error'] {
  color: var(--error);
}

.status[data-tone='warn'] {
  color: var(--warn);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  flex-wrap: wrap;
}

.toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar__search {
  flex: 1;
  min-width: 200px;
}

.toolbar__search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.toolbar select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-weight: 600;
}

.toolbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35);
}

.toolbar select option {
  background: #0f172a;
  color: var(--text);
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.filter-pill input {
  accent-color: var(--accent);
}

.filter-pill--toggle {
  cursor: pointer;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--text);
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease;
}

.mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.mini-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

.mini-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-card__name {
  margin: 0;
  font-weight: 700;
  text-transform: capitalize;
}

.mini-card__types {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.type-pill.small {
  font-size: 12px;
  padding: 5px 8px;
}

.icon-btn,
.ghost-btn {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease;
}

.ghost-btn {
  background: transparent;
}

.icon-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.icon-btn.is-active {
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.2);
}

.icon-btn--star {
  font-size: 16px;
  line-height: 1;
  padding: 6px 8px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel__header h2 {
  margin: 0;
  font-size: 20px;
}

.team-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.team-slot {
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.team-slot img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.team-actions {
  display: flex;
  justify-content: flex-end;
}

.quiz {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.quiz__image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.quiz__image--hidden {
  filter: brightness(0) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.quiz__controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.quiz__controls input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  min-width: 180px;
}

.link-plain {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.card {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card__title h2 {
  margin: 4px 0 6px;
  font-size: 26px;
}

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

.type-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  text-transform: capitalize;
  color: #0f172a;
  font-weight: 700;
}

.sprite {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.35));
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  border-radius: 50%;
}

.card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
}

.label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.value {
  margin: 0;
  font-weight: 700;
}

.card__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  column-gap: 24px;
  row-gap: 18px;
}

.battle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.chips {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.evolution {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.evo-path {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.evo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: var(--text);
  width: 140px;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease;
}

.evo-node--current {
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.2);
}

.evo-node:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.evo-node img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.evo-node .eyebrow {
  font-size: 11px;
}

.evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  min-width: 72px;
}

.evo-method {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  max-width: 120px;
}

.evo-special {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.evo-special__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.chip {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  min-width: 180px;
  max-width: 280px;
}

.ability-title {
  font-weight: 700;
  text-transform: capitalize;
  margin: 0 0 4px;
}

.ability-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.moves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.moves-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.move-chip {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  text-transform: capitalize;
}

.move-meta {
  color: var(--muted);
  font-size: 12px;
}

.move-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.move-type-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  color: #0f172a;
}

.eff-chip {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.eff-mult {
  color: var(--muted);
  font-weight: 600;
}

.type-pill-sm {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  color: #0f172a;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.gallery-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.gallery-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25));
}

.gallery-card .label {
  margin: 0;
}


.stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: 110px 1fr 72px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.stat-row .value {
  font-size: 12px;
  text-align: right;
}

.stat-name {
  text-transform: capitalize;
  color: var(--muted);
  font-size: 13px;
}

.stat-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  border-radius: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 680px) {
  .card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sprite {
    width: 140px;
    height: 140px;
  }
}

