/* ===== RESET & VARIABLES ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --poke-red: #ff1c1c;
  --poke-red-dark: #cc1616;
  --great-blue: #3b4cca;
  --great-blue-dark: #2f3db5;
  --electric-yellow: #ffde00;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --charcoal: #2d2d2d;
  --grey-light: #e2e8e6;
  --grey-mid: #9aa5a1;
  --hp-green: #4fc337;
  --hp-yellow: #ffde00;
  --hp-red: #ff1c1c;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito", sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== FLOATING PARTICLES ===== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.15;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.15;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-10vh) rotate(720deg);
    opacity: 0;
  }
}

/* ===== POKEBALL LOGO ===== */
.pokeball-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--charcoal);
  flex-shrink: 0;
  animation: pokeballPulse 3s ease-in-out infinite;
}

.pokeball-logo--small {
  width: 28px;
  height: 28px;
  border-width: 2px;
  animation: none;
}

.pokeball-logo--large {
  width: 80px;
  height: 80px;
  border-width: 4px;
  opacity: 0.2;
}

.pokeball-logo__top {
  height: 50%;
  background: var(--poke-red);
}

.pokeball-logo__bottom {
  height: 50%;
  background: var(--surface);
}

.pokeball-logo__band {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--charcoal);
  transform: translateY(-50%);
  z-index: 1;
}

.pokeball-logo__button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--surface);
  border: 3px solid var(--charcoal);
  border-radius: 50%;
  z-index: 2;
}

.pokeball-logo--small .pokeball-logo__band {
  height: 2px;
}

.pokeball-logo--small .pokeball-logo__button {
  width: 8px;
  height: 8px;
  border-width: 2px;
}

.pokeball-logo--large .pokeball-logo__band {
  height: 4px;
}

.pokeball-logo--large .pokeball-logo__button {
  width: 22px;
  height: 22px;
  border-width: 4px;
}

@keyframes pokeballPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--poke-red), var(--poke-red-dark));
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(255, 28, 28, 0.25);
}

.header__inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
}

.header__brand h1 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
}

.header__tagline {
  font-size: 0.7rem;
  opacity: 0.75;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.header__nav {
  display: flex;
  gap: 0.5rem;
}

/* Filter chips */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.filter-chip ion-icon {
  font-size: 1rem;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.filter-chip.active {
  background: #fff;
  color: var(--poke-red);
  border-color: #fff;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 4rem 2rem 3rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff5f5 0%, var(--bg) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.hero__title {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.6s ease both;
}

.text-gradient {
  background: linear-gradient(135deg, var(--poke-red), var(--great-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  color: var(--grey-mid);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

/* Search */
.hero__search {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero__search ion-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--grey-mid);
  z-index: 2;
}

.hero__search input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  border: 2px solid var(--grey-light);
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.hero__search input:focus {
  outline: none;
  border-color: var(--great-blue);
  box-shadow: 0 0 0 4px rgba(59, 76, 202, 0.1), 0 8px 30px rgba(0, 0, 0, 0.08);
}

.hero__search-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--poke-red), var(--great-blue));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  filter: blur(12px);
}

.hero__search input:focus ~ .hero__search-glow {
  opacity: 0.15;
}

/* Physics pokeballs container */
.hero__physics-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.hero__ball {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
  transition: filter 0.2s ease;
  will-change: transform;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

.hero__ball:active {
  cursor: grabbing;
}

.hero__ball:hover {
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

.hero__ball .pokeball-logo {
  animation: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), inset 0 -2px 4px rgba(0, 0, 0, 0.06);
}

/* On mobile, disable drag but keep physics float */
@media (max-width: 768px) {
  .hero__ball {
    pointer-events: none;
    cursor: default;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FEATURED SECTION ===== */
.featured {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 4rem 2rem;
  overflow: hidden;
  position: relative;
}

.featured__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

/* Left: text */
.featured__text {
  flex: 1;
  color: #fff;
  animation: fadeInUp 0.6s ease both;
}

.featured__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--electric-yellow);
  margin-bottom: 1rem;
}

.featured__label ion-icon {
  font-size: 0.85rem;
}

.featured__name {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 0%, #ffde00 40%, #ff8c00 70%, #ff1c1c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.featured__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.featured__meta span::after {
  content: "·";
  margin-left: 0.5rem;
}

.featured__meta span:last-child::after {
  content: "";
}

.featured__desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 420px;
}

.featured__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.featured__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
}

.featured__btn--primary {
  background: var(--electric-yellow);
  color: var(--charcoal);
  box-shadow: 0 4px 20px rgba(255, 222, 0, 0.3);
}

.featured__btn--primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 222, 0, 0.45);
}

.featured__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.featured__btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Right: card */
.featured__card-wrap {
  flex-shrink: 0;
  animation: featuredCardFloat 6s ease-in-out infinite, fadeInUp 0.6s ease 0.2s both;
}

.featured__card {
  position: relative;
  width: 300px;
}

.featured__card-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(255, 222, 0, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

.featured__card-inner {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(255, 222, 0, 0.08);
  border: 2px solid rgba(255, 222, 0, 0.2);
  background: linear-gradient(135deg, #2a2a3e, #1e1e30);
}

.featured__card-inner img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.featured__card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.featured__card-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.featured__card-set,
.featured__card-lang {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.featured__card-lang::before {
  content: "🌐";
  font-size: 0.7rem;
}

.featured__card-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.5rem;
}

.featured__card-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.featured__card-set-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
}

.featured__card-cond {
  background: var(--hp-green);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.featured__card-holo {
  background: linear-gradient(135deg, var(--electric-yellow), #ffc107);
  color: var(--charcoal);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.featured__card-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--hp-green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(79, 195, 55, 0.4);
}

.featured__card-status--unavailable {
  background: var(--grey-mid);
  box-shadow: none;
}

@keyframes featuredCardFloat {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-12px) rotate(-1deg); }
}

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

/* Featured responsive */
@media (max-width: 768px) {
  .featured__inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .featured__name {
    font-size: 2.2rem;
  }

  .featured__desc {
    max-width: 100%;
  }

  .featured__actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .featured__card {
    width: 220px;
  }
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--grey-light);
  padding: 1rem 2rem;
  position: sticky;
  top: 62px;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.stats-bar__inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stat-item ion-icon {
  font-size: 1.5rem;
  color: var(--great-blue);
}

.stat-item__value {
  font-size: 1.35rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  color: var(--charcoal);
}

.stat-item__label {
  font-size: 0.7rem;
  color: var(--grey-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== CATALOG ===== */
.catalog {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 50vh;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ===== TCG-STYLE POKEMON CARD ===== */
.pokemon-card {
  background: linear-gradient(145deg, #f5e6a3, #e8d68a);
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 3px solid #d4c06a;
  padding: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  animation: cardAppear 0.5s var(--bounce) forwards;
}

.pokemon-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.pokemon-card:hover .pokemon-card__img {
  transform: scale(1.05);
}

/* Stagger animation */
.pokemon-card:nth-child(1) { animation-delay: 0s; }
.pokemon-card:nth-child(2) { animation-delay: 0.05s; }
.pokemon-card:nth-child(3) { animation-delay: 0.1s; }
.pokemon-card:nth-child(4) { animation-delay: 0.15s; }
.pokemon-card:nth-child(5) { animation-delay: 0.2s; }
.pokemon-card:nth-child(6) { animation-delay: 0.25s; }
.pokemon-card:nth-child(7) { animation-delay: 0.3s; }
.pokemon-card:nth-child(8) { animation-delay: 0.35s; }
.pokemon-card:nth-child(9) { animation-delay: 0.4s; }
.pokemon-card:nth-child(10) { animation-delay: 0.45s; }
.pokemon-card:nth-child(11) { animation-delay: 0.5s; }
.pokemon-card:nth-child(12) { animation-delay: 0.55s; }

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card header bar */
.pokemon-card__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.4rem;
}

.pokemon-card__type-dot {
  font-size: 0.7rem;
  line-height: 1;
}

.pokemon-card__title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--charcoal);
  flex: 1;
}

.pokemon-card__avail {
  font-size: 0.5rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pokemon-card__avail--yes {
  background: #4fc337;
  color: #fff;
}

.pokemon-card__avail--no {
  background: #9aa5a1;
  color: #fff;
}

/* Image area */
.pokemon-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.08);
}

.pokemon-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.pokemon-card__name-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2rem 0.5rem 0.6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Holo shimmer overlay */
.pokemon-card__holo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 20%,
    rgba(255, 222, 0, 0.15) 35%,
    rgba(59, 76, 202, 0.1) 50%,
    rgba(255, 28, 28, 0.1) 65%,
    transparent 80%
  );
  background-size: 250% 250%;
  animation: holoShimmer 4s ease infinite;
  pointer-events: none;
}

@keyframes holoShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Footer bar */
.pokemon-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.4rem 0.15rem;
}

.pokemon-card__footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pokemon-card__set {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--charcoal);
  text-transform: uppercase;
}

.pokemon-card__lang {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
}

.pokemon-card__footer-right {
  text-align: right;
}

.pokemon-card__qty {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--charcoal);
}

/* Badges row */
.pokemon-card__badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.2rem 0.4rem 0.3rem;
}

.pokemon-card__cond-badge {
  font-size: 0.55rem;
  font-weight: 800;
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.pokemon-card__holo-badge {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--charcoal);
  background: linear-gradient(135deg, #ffde00, #ffc107);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ===== SKELETON ===== */
.skeleton-card {
  background: linear-gradient(145deg, #f5e6a3, #e8d68a);
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 3px solid #d4c06a;
  padding: 0.6rem;
}

.skeleton {
  background: linear-gradient(90deg, var(--grey-light) 25%, #eef1f0 50%, var(--grey-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton--img {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.skeleton--title {
  height: 18px;
  width: 60%;
  margin: 1rem 1.15rem 0.5rem;
  border-radius: 6px;
}

.skeleton--text {
  height: 12px;
  width: 80%;
  margin: 0 1.15rem 1rem;
  border-radius: 6px;
}

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

/* ===== DETAIL MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  display: flex;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.4s var(--bounce);
  position: relative;
  max-height: 85vh;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
}

.modal-close ion-icon {
  font-size: 1.3rem;
  color: var(--charcoal);
}

.modal-close:hover {
  background: rgba(255, 28, 28, 0.1);
  transform: scale(1.1);
}

.modal-card__img {
  width: 45%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0f0f0, #e5e5e5);
  position: relative;
  overflow: hidden;
}

.modal-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-card__info {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

.modal-card__holo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, var(--electric-yellow), #ffc107);
  color: var(--charcoal);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.modal-card__info h2 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 1.25rem;
}

.modal-card__details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.detail-row ion-icon {
  font-size: 1.1rem;
  color: var(--great-blue);
  flex-shrink: 0;
}

.detail-row strong {
  font-weight: 700;
}

/* Condition bar in modal */
.condition-bar {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.condition-bar__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--grey-mid);
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 0.5rem;
}

.condition-bar__track {
  height: 10px;
  background: var(--grey-light);
  border-radius: 50px;
  overflow: hidden;
}

.condition-bar__fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s ease, background 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 800;
}

.empty-state p {
  color: var(--grey-mid);
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
}

.footer__inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.footer__brand .pokeball-logo {
  border-color: rgba(255, 255, 255, 0.3);
}

.footer__brand .pokeball-logo__top {
  background: var(--poke-red);
}

.footer__brand .pokeball-logo__band {
  background: rgba(255, 255, 255, 0.3);
}

.footer__brand .pokeball-logo__button {
  border-color: rgba(255, 255, 255, 0.3);
}

.footer p {
  font-size: 0.8rem;
}

/* ===== EASTER EGG: TEAM ROCKET ===== */
body.rocket-mode {
  background: #1a0a2e !important;
}

body.rocket-mode .header {
  background: linear-gradient(135deg, #2d0a4e, #1a0a2e) !important;
  box-shadow: 0 4px 30px rgba(100, 0, 200, 0.3) !important;
}

body.rocket-mode .hero {
  background: linear-gradient(180deg, #2d0a4e, #1a0a2e) !important;
}

body.rocket-mode .stats-bar {
  background: #120822 !important;
  border-color: #2d0a4e !important;
}

body.rocket-mode .featured {
  background: linear-gradient(135deg, #0d0518, #1a0a2e) !important;
}

body.rocket-mode .catalog {
  color: #ccc;
}

body.rocket-mode .pokemon-card {
  background: linear-gradient(145deg, #2d0a4e, #1a0a2e) !important;
  border-color: #6a0dad !important;
}

body.rocket-mode .pokemon-card__title,
body.rocket-mode .pokemon-card__set,
body.rocket-mode .pokemon-card__qty {
  color: #e0d0f0 !important;
}

body.rocket-mode .pokemon-card__lang {
  color: rgba(255, 255, 255, 0.4) !important;
}

body.rocket-mode .footer {
  background: #0d0518 !important;
}

body.rocket-mode .filter-chip {
  border-color: rgba(106, 13, 173, 0.4) !important;
}

body.rocket-mode .filter-chip.active {
  background: #6a0dad !important;
  color: #fff !important;
  border-color: #6a0dad !important;
}

body.rocket-mode .hero__search input {
  background: #2d0a4e !important;
  border-color: #6a0dad !important;
  color: #e0d0f0 !important;
}

body.rocket-mode .stat-item__value {
  color: #bf5af2 !important;
}

body.rocket-mode .stat-item__label,
body.rocket-mode .stat-item ion-icon {
  color: #8a6aae !important;
}

body.rocket-mode .text-gradient {
  background: linear-gradient(135deg, #bf5af2, #ff2d55) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.rocket-mode .hero__title {
  color: #e0d0f0;
}

body.rocket-mode .hero__subtitle {
  color: #8a6aae !important;
}

body.rocket-mode .skeleton-card {
  background: linear-gradient(145deg, #2d0a4e, #1a0a2e) !important;
  border-color: #6a0dad !important;
}

/* Big R overlay */
.rocket-r {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  animation: rocketRAppear 1.5s ease forwards;
}

.rocket-r span {
  font-size: 35vw;
  font-weight: 900;
  color: #ff2d55;
  text-shadow: 0 0 60px rgba(255, 45, 85, 0.6), 0 0 120px rgba(255, 45, 85, 0.3);
  font-family: "Nunito", sans-serif;
  line-height: 1;
}

@keyframes rocketRAppear {
  0% { opacity: 0; transform: scale(3); }
  15% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}

/* ===== EASTER EGG: MISSINGNO ===== */
.glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.03) 2px,
    rgba(0, 255, 0, 0.03) 4px
  );
  animation: vhsGlitch 2s steps(10) forwards;
}

@keyframes vhsGlitch {
  0% { opacity: 1; clip-path: inset(0 0 0 0); }
  5% { clip-path: inset(20% 0 30% 0); transform: translateX(-5px); }
  10% { clip-path: inset(50% 0 10% 0); transform: translateX(8px); }
  15% { clip-path: inset(10% 0 60% 0); transform: translateX(-3px); }
  20% { clip-path: inset(40% 0 20% 0); transform: translateX(5px); }
  25% { clip-path: inset(0 0 0 0); transform: translateX(0); }
  30% { clip-path: inset(70% 0 5% 0); transform: translateX(-8px); }
  35% { clip-path: inset(0 0 0 0); transform: translateX(0); }
  50% { opacity: 0.8; }
  100% { opacity: 0; }
}

.missingno-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 9999;
  background: linear-gradient(145deg, #f5e6a3, #e8d68a);
  border: 4px solid #d4c06a;
  border-radius: 16px;
  padding: 0.8rem;
  width: 280px;
  animation: missingnoAppear 2.5s ease forwards;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.missingno-card__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.4rem;
}

.missingno-card__header span:first-child {
  font-size: 0.7rem;
}

.missingno-card__header span:nth-child(2) {
  font-size: 0.85rem;
  font-weight: 800;
  flex: 1;
  font-family: monospace;
}

.missingno-card__header span:last-child {
  font-size: 0.5rem;
  font-weight: 800;
  background: #ff1c1c;
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.missingno-card__img {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #000;
  image-rendering: pixelated;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.missingno-card__img img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: contrast(1.2) brightness(1.1);
}

.missingno-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.4rem 0.2rem;
}

.missingno-card__footer span {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
  font-family: monospace;
}

.missingno-card__name {
  text-align: center;
  font-family: monospace;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0 0.4rem;
  border-radius: 0 0 6px 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 2px;
}

@keyframes missingnoAppear {
  0% { transform: translate(-50%, -50%) scale(0) rotate(15deg); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.1) rotate(-3deg); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  80% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.8) rotate(5deg); opacity: 0; }
}

/* ===== EASTER EGG: PROFESSOR OAK ===== */
.oak-bubble {
  position: fixed;
  bottom: -120px;
  right: 2rem;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  animation: oakSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  cursor: pointer;
}

.oak-bubble__avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e8d68a, #d4c06a);
  border-radius: 50%;
  border: 3px solid #b8a44e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.oak-bubble__text {
  background: var(--surface);
  border-radius: 16px 16px 4px 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  max-width: 300px;
  border: 2px solid var(--grey-light);
  position: relative;
}

.oak-bubble__text p {
  font-size: 0.85rem;
  color: var(--charcoal);
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.oak-bubble__text cite {
  font-size: 0.7rem;
  color: var(--grey-mid);
  font-style: italic;
  font-weight: 700;
}

.oak-bubble__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: var(--poke-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 28, 28, 0.3);
}

@keyframes oakSlideIn {
  from { bottom: -120px; }
  to { bottom: 2rem; }
}

.oak-bubble.leaving {
  animation: oakSlideOut 0.4s ease forwards;
}

@keyframes oakSlideOut {
  from { bottom: 2rem; opacity: 1; }
  to { bottom: -120px; opacity: 0; }
}

/* ===== UTILITIES ===== */
.hidden {
  display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    gap: 0.75rem;
  }

  .header__nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero {
    padding: 2.5rem 1.5rem 2rem;
  }

  .stats-bar__inner {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .catalog {
    padding: 1.5rem 1rem;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .modal-card {
    flex-direction: column;
    max-height: 90vh;
  }

  .modal-card__img {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .hero__pokeball {
    display: none;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .pokemon-card__body {
    padding: 0.75rem;
  }

  .pokemon-card__name {
    font-size: 0.9rem;
  }
}

/* ===== MODAL TELEGRAM BUTTON ===== */
.modal-telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  padding: 0.8rem 1.5rem;
  background: #0088cc;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.35);
  transition: var(--transition);
  width: 100%;
}

.modal-telegram-btn:hover {
  background: #006da4;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 136, 204, 0.45);
}

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

.modal-telegram-btn svg {
  flex-shrink: 0;
}

/* ===== FLOATING TELEGRAM BUTTON ===== */
.telegram-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0088cc;
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
  z-index: 9999;
  transition: var(--transition);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.telegram-fab:hover {
  background: #006da4;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 136, 204, 0.5);
}

.telegram-fab:active {
  transform: translateY(-1px);
}

.telegram-fab svg {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .telegram-fab__label {
    display: none;
  }

  .telegram-fab {
    padding: 1rem;
    border-radius: 50%;
  }
}
