/* PokeSearch v2 — Glassmorphism, Animations, Zero Dependencies */

/* ─── CSS Variables ─── */
:root {
  --bg-deep: #0f172a;
  --bg-surface: rgba(30, 41, 59, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Type Colors ─── */
.type-normal  { --type-color: #A8A77A; --type-glow: rgba(168, 167, 122, 0.3); }
.type-fire    { --type-color: #EE8130; --type-glow: rgba(238, 129, 48, 0.3); }
.type-water   { --type-color: #6390F0; --type-glow: rgba(99, 144, 240, 0.3); }
.type-electric{ --type-color: #F7D02C; --type-glow: rgba(247, 208, 44, 0.3); }
.type-grass   { --type-color: #7AC74C; --type-glow: rgba(122, 199, 76, 0.3); }
.type-ice     { --type-color: #96D9D6; --type-glow: rgba(150, 217, 214, 0.3); }
.type-fighting{ --type-color: #C22E28; --type-glow: rgba(194, 46, 40, 0.3); }
.type-poison  { --type-color: #A33EA1; --type-glow: rgba(163, 62, 161, 0.3); }
.type-ground  { --type-color: #E2BF65; --type-glow: rgba(226, 191, 101, 0.3); }
.type-flying  { --type-color: #A98FF3; --type-glow: rgba(169, 143, 243, 0.3); }
.type-psychic { --type-color: #F95587; --type-glow: rgba(249, 85, 135, 0.3); }
.type-bug     { --type-color: #A6B91A; --type-glow: rgba(166, 185, 26, 0.3); }
.type-rock    { --type-color: #B6A136; --type-glow: rgba(182, 161, 54, 0.3); }
.type-ghost   { --type-color: #735797; --type-glow: rgba(115, 87, 151, 0.3); }
.type-dragon  { --type-color: #6F35FC; --type-glow: rgba(111, 53, 252, 0.3); }
.type-dark    { --type-color: #705746; --type-glow: rgba(112, 87, 70, 0.3); }
.type-steel   { --type-color: #B7B7CE; --type-glow: rgba(183, 183, 206, 0.3); }
.type-fairy   { --type-color: #D685AD; --type-glow: rgba(214, 133, 173, 0.3); }

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; image-rendering: pixelated; }

/* ─── Animated Gradient Mesh Background ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 60%),
    var(--bg-deep);
  animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Floating orbs */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-orbs::before,
.bg-orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: floatOrb 20s ease-in-out infinite;
}

.bg-orbs::before {
  width: 400px; height: 400px;
  background: #3b82f6;
  top: -100px; left: -100px;
  animation-delay: 0s;
}

.bg-orbs::after {
  width: 350px; height: 350px;
  background: #a855f7;
  bottom: -80px; right: -80px;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 50px) scale(0.9); }
}

/* ─── Glass Panel Utility ─── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
}

.glass-strong {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
}

/* ─── Skeleton Loader ─── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #60a5fa, #c084fc);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.offline-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 600;
  display: none;
}

.offline-badge.visible {
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Home Page ─── */
.main-home {
  padding: 6rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .main-home { padding: 7rem 2rem 4rem; }
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-logo {
  width: 200px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3));
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ─── Search ─── */
.search-container {
  width: 100%;
  max-width: 600px;
  margin-bottom: 2rem;
  position: relative;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 0.25rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  padding: 0.875rem 1.25rem;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.search-btn:active {
  transform: translateY(0);
}

.search-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.search-stats {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.search-wrapper:focus-within .search-stats {
  opacity: 1;
}

/* ─── Filters ─── */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
  max-width: 800px;
}

.filter-chip {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-chip:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ─── Grid ─── */
#grid-container {
  width: 100%;
  max-width: 1400px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ─── Pokemon Card (3D Tilt + Glassmorphism) ─── */
.poke-card {
  position: relative;
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  overflow: hidden;
}

.poke-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--type-glow, rgba(255,255,255,0.1)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.poke-card:hover::before {
  opacity: 1;
}

.poke-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--type-glow, var(--border-glass));
}

.poke-card.tilt {
  transition: transform 0.1s ease-out;
}

.poke-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.poke-card-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.poke-card:hover .poke-card-img {
  transform: scale(1.1);
}

.poke-card-name {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: var(--text-primary);
}

.poke-card-types {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.type-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--type-color);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 8px var(--type-glow);
}

.poke-card-number {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  opacity: 0.5;
  z-index: 1;
}

/* ─── Lazy Image Fade ─── */
.lazy-img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lazy-img.loaded {
  opacity: 1;
}

/* ─── Grid States ─── */
.grid-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 1.25rem;
  grid-column: 1 / -1;
}

.grid-loading {
  text-align: center;
  padding: 3rem;
  grid-column: 1 / -1;
}

/* ─── Spinner ─── */
.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; }
.lds-ellipsis div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; }
.lds-ellipsis div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; }
.lds-ellipsis div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; }

@keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }

/* ─── Detail Page ─── */
.main-detail {
  padding: 6rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .main-detail { padding: 7rem 2rem 4rem; }
}

.detail-hero {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .detail-hero {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.detail-image-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.detail-sprite {
  width: 250px;
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4));
  transition: transform 0.3s ease;
}

.detail-sprite:hover {
  transform: scale(1.05);
}

.detail-shiny-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
}

.shiny-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: var(--transition);
}

.shiny-btn.active {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-name-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-name {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f8fafc, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.detail-genus {
  color: var(--text-secondary);
  font-style: italic;
}

.detail-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-legendary {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
}

.tag-mega {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: white;
}

.tag-mythical {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: white;
}

.detail-flavor {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
  padding: 1rem;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.detail-flavor-game {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* ─── Detail Sections Grid ─── */
.detail-sections {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .detail-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}

.detail-section {
  composes: glass;
  padding: 1.5rem;
}

.detail-section.full-width {
  grid-column: 1 / -1;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 1.2rem;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

/* ─── Stats & Radar Chart ─── */
.stat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.stat-name {
  width: 60px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  text-align: right;
  flex-shrink: 0;
}

.stat-bar-wrapper {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.stat-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.stat-value {
  width: 40px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  flex-shrink: 0;
}

.radar-canvas {
  width: 100%;
  max-width: 300px;
  height: 300px;
  margin: 0 auto;
  display: block;
}

/* ─── Type Effectiveness ─── */
.type-eff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.type-eff-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
}

.type-eff-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--type-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.type-eff-mult {
  font-weight: 700;
  font-size: 0.9rem;
}

.type-eff-mult.weak { color: #ef4444; }
.type-eff-mult.resist { color: #22c55e; }
.type-eff-mult.immune { color: #94a3b8; }

/* ─── Evolution Chain ─── */
.evo-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.evo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
  min-width: 100px;
}

.evo-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.evo-item.current {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.evo-sprite {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.evo-name {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.evo-arrow {
  font-size: 1.5rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

.evo-trigger {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100px;
}

/* ─── Abilities ─── */
.ability-item {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.ability-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ability-hidden {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.ability-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Moves ─── */
.moves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.moves-grid::-webkit-scrollbar {
  width: 6px;
}

.moves-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.moves-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.move-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.move-level {
  width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
  flex-shrink: 0;
}

.move-name {
  font-weight: 600;
  flex: 1;
}

.move-type {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--type-color);
  flex-shrink: 0;
}

/* ─── Alternate Forms ─── */
.forms-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.form-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  min-width: 100px;
  transition: var(--transition);
}

.form-item:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.form-sprite {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.form-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
}

/* ─── Buttons ─── */
.return-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  margin-top: 1rem;
}

.return-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ─── Install Prompt ─── */
.install-prompt {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.install-prompt.visible {
  transform: translateY(0);
}

.install-text {
  font-weight: 600;
  font-size: 0.9rem;
}

.install-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.install-btn:hover {
  transform: scale(1.05);
}

.install-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.875rem 1.25rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}

.toast.success { border-left: 3px solid #22c55e; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid #3b82f6; }

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.toast-exit {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to { transform: translateX(120%); opacity: 0; }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .hero-title { font-size: 1.75rem; }
  .detail-name { font-size: 1.75rem; }
  .evo-chain { gap: 0.5rem; }
  .evo-arrow { display: none; }
  .evo-chain { flex-direction: column; }
  .nav-links { gap: 1rem; }
  .nav-link { font-size: 0.8rem; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

/* ─── Selection ─── */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: white;
}
