@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0d1117 100%);
  color: #f0f6fc;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(250, 204, 21, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(76, 201, 240, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* NAVBAR */
nav {
  background: linear-gradient(135deg, #161b22 0%, #1a2332 100%);
  border-bottom: 3px solid #facc15;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  gap: 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(250, 204, 21, 0.1);
  backdrop-filter: blur(10px);
}

nav button {
  background: linear-gradient(135deg, #facc15, #ffda44);
  color: #1f2937;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.2);
  letter-spacing: 0.5px;
}

nav button:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 24px rgba(250, 204, 21, 0.4);
  background: linear-gradient(135deg, #ffda44, #facc15);
}

/* LAYOUT */
.layout {
  display: flex;
  flex-direction: row;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  gap: 30px;
  position: relative;
  z-index: 1;
}

main {
  flex: 4;
  min-width: 0;
}

.sidebar {
  flex: 1.2;
  max-width: 340px;
  background: linear-gradient(135deg, rgba(22, 27, 34, 0.9) 0%, rgba(26, 35, 50, 0.9) 100%);
  padding: 28px;
  border-left: 3px solid #facc15;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(250, 204, 21, 0.1);
}

.sidebar h2 {
  color: #facc15;
  font-size: 22px;
  margin-bottom: 24px;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(250, 204, 21, 0.2);
}

/* TITULOS */
header {
  text-align: center;
  margin-bottom: 45px;
  position: relative;
}

header h1 {
  font-size: 42px;
  color: #facc15;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 4px 16px rgba(250, 204, 21, 0.3);
  letter-spacing: -0.5px;
}

.subtitulo {
  font-size: 17px;
  color: #a8b4c0;
  margin-top: 10px;
  font-weight: 300;
}

/* CARDS */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 28px;
  justify-content: center;
}

.card {
  background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(26, 35, 50, 0.95) 100%);
  border: 2px solid #30363d;
  border-radius: 16px;
  max-width: 240px;
  width: 100%;
  padding: 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: fadeInUp 0.5s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-12px) scale(1.06);
  box-shadow: 0 20px 48px rgba(250, 204, 21, 0.2);
  border-color: #facc15;
}

.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: linear-gradient(135deg, #0d1117 0%, #1a1f3a 100%);
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 14px;
  transition: all 0.3s ease;
}

.card:hover img {
  filter: brightness(1.1);
}

.card h3 {
  color: #facc15;
  font-size: 17px;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.card p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #b0bfc9;
  font-weight: 300;
}

/* Pokedex Diseño */
.pokedex-card {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(26, 35, 50, 0.95) 100%);
    border: 3px solid #facc15;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    max-width: 240px;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 12px 36px rgba(250, 204, 21, 0.2);
    transition: all 0.3s ease;
}

.pokedex-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(250, 204, 21, 0.3);
}

.pokedex-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
    filter: brightness(1.05);
}

.pokedex-card .card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #facc15;
    font-weight: 700;
    padding: 0 6px;
}

/* ETIQUETA NUEVA */
.etiqueta-nueva {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #00d084, #00ff88);
  color: white;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 208, 132, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ETIQUETA DESTACADA */
.etiqueta-destacada {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #FFD700, #FFED4E);
  color: #121212;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 50px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CARTA DESTACADA */
.destacadas .card {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  border: 3px solid #FFD700 !important;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4) !important;
  transform: scale(1.08);
  position: relative;
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95) 0%, rgba(42, 42, 42, 0.95) 100%);
  animation: pulse 3.5s infinite ease-in-out;
  display: block;
  margin-bottom: 20px;
  padding-bottom: 20px;
}

.destacadas .card:hover {
  transform: scale(1.15);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.6) !important;
}

/* TIPOS DE CARTAS */
.card.tipo-pokemon {
  border-color: #facc15;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

.card.tipo-pokemon:hover {
  border-color: #ffda44;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
}

.card.tipo-trainer {
  border-color: #4cc9f0;
  box-shadow: 0 8px 24px rgba(76, 201, 240, 0.15);
}

.card.tipo-trainer:hover {
  border-color: #72d7ff;
  box-shadow: 0 8px 32px rgba(76, 201, 240, 0.3);
}

.card.tipo-energia {
  border-color: #f72585;
  box-shadow: 0 8px 24px rgba(247, 37, 133, 0.15);
}

.card.tipo-energia:hover {
  border-color: #ff49b0;
  box-shadow: 0 8px 32px rgba(247, 37, 133, 0.3);
}

/* BOTONES */
.destacada-btn,
button[type="submit"] {
  background: linear-gradient(135deg, #facc15, #ffda44);
  color: #1f2937;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.3);
  display: block;
  margin: 0 auto;
  max-width: 240px;
  letter-spacing: 0.5px;
}

.destacadas {
  display: flex;
  justify-content: center;
}

.destacada-btn:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #ffda44, #ffed4e);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(250, 204, 21, 0.4);
}

.destacada-btn:active,
button[type="submit"]:active {
  transform: translateY(-1px);
}

/* BUSCADOR */
#search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  margin-bottom: 24px;
  border: 2px solid #30363d;
  border-radius: 12px;
  background-color: rgba(42, 42, 42, 0.8);
  color: white;
  transition: all 0.3s ease;
  font-weight: 400;
}

#search-input:focus {
  outline: none;
  border-color: #facc15;
  background-color: rgba(42, 42, 42, 0.95);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.2);
}

/* TOTAL COLECCIÓN */
.total-coleccion {
  width: 100%;
  margin-top: 28px;
  padding: 20px;
  font-size: 17px;
  text-align: center;
  color: #facc15;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(76, 201, 240, 0.05));
  border-radius: 12px;
  font-weight: 600;
  border: 2px solid rgba(250, 204, 21, 0.2);
}

/* FILTROS POR GENERACIÓN */
.filtro-generacion {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.05), rgba(76, 201, 240, 0.05));
  border-radius: 14px;
  border: 2px solid rgba(250, 204, 21, 0.15);
}

.btn-gen {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(50, 50, 50, 0.8));
  color: #a8b4c0;
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-gen:hover {
  border-color: #facc15;
  color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.2);
}

.btn-gen.activo {
  background: linear-gradient(135deg, #facc15, #ffda44);
  color: #1f2937;
  border-color: #facc15;
  box-shadow: 0 4px 16px rgba(250, 204, 21, 0.3);
  transform: scale(1.05);
}

/* BOTÓN FLOTANTE */
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #facc15, #ffda44);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.3);
  text-decoration: none;
  color: #1f2937;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 99;
  animation: fadeInUp 0.5s ease;
}

.fab:hover {
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 12px 36px rgba(250, 204, 21, 0.4);
  background: linear-gradient(135deg, #ffda44, #ffed4e);
}

.fab:active {
  transform: scale(1.1) translateY(-3px);
}

/* MENÚ FLOTANTE MEJORADO */
.fab-menu {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.fab-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  animation: fadeInUp 0.5s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.fab-main {
  background: linear-gradient(135deg, #facc15, #ffda44);
  color: #1f2937;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.3);
  z-index: 100;
}

.fab-main:hover {
  transform: scale(1.15) rotateZ(90deg);
  box-shadow: 0 12px 36px rgba(250, 204, 21, 0.4);
}

.fab-option {
  background: linear-gradient(135deg, #4cc9f0, #72d7ff);
  color: white;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  box-shadow: 0 6px 20px rgba(76, 201, 240, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-option:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 28px rgba(76, 201, 240, 0.4);
}

.fab-menu.activo .fab-option {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.fab-menu.activo .fab-option:nth-child(2) {
  transition-delay: 0.05s;
}

.fab-menu.activo .fab-option:nth-child(3) {
  transition-delay: 0.1s;
}

/* ANIMACIONES */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { 
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
  }
  50% { 
    transform: scale(1.12);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.55);
  }
  100% { 
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  nav button {
    flex: 1 1 calc(33.333% - 8px);
    padding: 10px 12px;
    font-size: 13px;
  }

  header h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 14px;
  }

  .layout {
    flex-direction: column;
    padding: 20px;
    gap: 24px;
  }

  .card {
    max-width: 100%;
    margin: 0 auto;
  }

  .sidebar {
    border-left: none;
    border-top: 3px solid #facc15;
    padding: 20px;
    border-radius: 16px;
    max-width: 100%;
  }

  .destacada-btn {
    font-size: 14px;
    padding: 12px;
    max-width: 100%;
  }

  #search-input {
    font-size: 15px;
    padding: 12px 14px;
  }

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

  .fab {
    width: 56px;
    height: 56px;
    font-size: 24px;
    bottom: 20px;
    right: 20px;
  }

  .filtro-generacion {
    gap: 8px;
    padding: 12px;
  }

  .btn-gen {
    padding: 8px 12px;
    font-size: 12px;
  }

/* RESUMEN POR GENERACIÓN */
.generaciones-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.gen-card {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(76, 201, 240, 0.1));
  border: 2px solid rgba(250, 204, 21, 0.2);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gen-card:hover {
  transform: translateY(-6px);
  border-color: #facc15;
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.2);
}

.gen-titulo {
  font-size: 14px;
  color: #a8b4c0;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gen-cantidad {
  font-size: 28px;
  color: #facc15;
  font-weight: 700;
}
