/* =========================
   BANNER
========================= */

.banner{
    width:100%;
    background:#111;
}

.banner img{
    width:100%;
    height:280px;
    object-fit:cover;
    display:block;
}

/* =========================
   SECCION POKEDEX
========================= */

.seccion-pokedex{
    max-width:1400px;
    margin:0 auto;
    padding:40px 30px 60px;
}

.encabezado-pokedex{
    text-align:center;
    margin-bottom:25px;
}

.titulo{
    margin:0;
    font-size:34px;
    font-weight:800;
    color:#111827;
}

.subtitulo{
    margin-top:10px;
    color:#6b7280;
    font-size:16px;
}

/* =========================
   FILTROS
========================= */

.filtros{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:16px;
    flex-wrap:wrap;
    margin-bottom:35px;
}

#buscarPokemon{
    width:320px;
    padding:14px 16px;
    border-radius:12px;
    border:1px solid #d1d5db;
    background:white;
    font-size:15px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
    outline:none;
}

#buscarPokemon:focus,
#filtroTipo:focus,
#filtroGeneracion:focus{
    border-color:#3b82f6;
    box-shadow:0 0 0 3px rgba(59,130,246,0.15);
}

#filtroTipo,
#filtroGeneracion{
    min-width:190px;
    padding:14px 16px;
    border-radius:12px;
    border:1px solid #d1d5db;
    background:white;
    font-size:15px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
    outline:none;
    cursor:pointer;
}

#modoShiny{
    background:#ffcc00;
    border:none;
    padding:12px 18px;
    border-radius:10px;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s;
    box-shadow:0 6px 12px rgba(255,204,0,0.25);
}

#modoShiny:hover{
    background:#ffd84d;
    transform:translateY(-1px);
}

/* =========================
   GRID POKEDEX
========================= */

#pokedex{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap:24px;
}

/* =========================
   CARD PREMIUM
========================= */

.card{
    position:relative;
    background:white;
    border-radius:22px;
    padding:18px 16px 20px;
    text-align:center;
    box-shadow:
        0 10px 24px rgba(0,0,0,0.10),
        inset 0 1px 0 rgba(255,255,255,0.65);
    cursor:pointer;
    transition:transform 0.22s ease, box-shadow 0.22s ease;
    display:flex;
    flex-direction:column;
    align-items:center;
    min-height:320px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,0.7);
}

.card::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.85), transparent 35%),
        linear-gradient(180deg, rgba(255,255,255,0.45), transparent 40%);
    pointer-events:none;
    z-index:0;
}

.card::after{
    content:"";
    position:absolute;
    top:-40px;
    right:-40px;
    width:120px;
    height:120px;
    border-radius:999px;
    background:radial-gradient(circle, rgba(255,255,255,0.45), transparent 70%);
    pointer-events:none;
    z-index:0;
}

.card:hover{
    transform:translateY(-6px) scale(1.015);
    box-shadow:
        0 18px 34px rgba(0,0,0,0.16),
        inset 0 1px 0 rgba(255,255,255,0.75);
}

.card h3{
    margin:0 0 8px;
    font-size:18px;
    color:#111827;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    position:relative;
    z-index:1;
    font-weight:800;
}

.card p{
    margin:5px 0;
    color:#334155;
    position:relative;
    z-index:1;
    font-size:14px;
}

/* =========================
   COLORES POR TIPO
   usa el primer tipo
========================= */

.card[data-tipo^="Planta"]{
    background:linear-gradient(180deg,#f2fff3 0%, #e9f9ec 45%, #ffffff 100%);
    border-top:5px solid #4CAF50;
}

.card[data-tipo^="Fuego"]{
    background:linear-gradient(180deg,#fff6f2 0%, #ffe9dc 45%, #ffffff 100%);
    border-top:5px solid #f97316;
}

.card[data-tipo^="Agua"]{
    background:linear-gradient(180deg,#f1f7ff 0%, #e4f0ff 45%, #ffffff 100%);
    border-top:5px solid #3b82f6;
}

.card[data-tipo^="Electrico"],
.card[data-tipo^="Eléctrico"]{
    background:linear-gradient(180deg,#fffde9 0%, #fff6c7 45%, #ffffff 100%);
    border-top:5px solid #eab308;
}

.card[data-tipo^="Hielo"]{
    background:linear-gradient(180deg,#eefcff 0%, #daf6ff 45%, #ffffff 100%);
    border-top:5px solid #06b6d4;
}

.card[data-tipo^="Lucha"]{
    background:linear-gradient(180deg,#fff3f3 0%, #ffe2e2 45%, #ffffff 100%);
    border-top:5px solid #dc2626;
}

.card[data-tipo^="Veneno"]{
    background:linear-gradient(180deg,#fcf4ff 0%, #f2e1ff 45%, #ffffff 100%);
    border-top:5px solid #a855f7;
}

.card[data-tipo^="Tierra"]{
    background:linear-gradient(180deg,#fff9ec 0%, #f8ebcb 45%, #ffffff 100%);
    border-top:5px solid #ca8a04;
}

.card[data-tipo^="Volador"]{
    background:linear-gradient(180deg,#f8fbff 0%, #e8f0ff 45%, #ffffff 100%);
    border-top:5px solid #60a5fa;
}

.card[data-tipo^="Psiquico"],
.card[data-tipo^="Psíquico"]{
    background:linear-gradient(180deg,#fff1f7 0%, #ffdceb 45%, #ffffff 100%);
    border-top:5px solid #ec4899;
}

.card[data-tipo^="Bicho"]{
    background:linear-gradient(180deg,#f8ffe8 0%, #edf8d0 45%, #ffffff 100%);
    border-top:5px solid #65a30d;
}

.card[data-tipo^="Roca"]{
    background:linear-gradient(180deg,#fafaf9 0%, #f0ece6 45%, #ffffff 100%);
    border-top:5px solid #78716c;
}

.card[data-tipo^="Fantasma"]{
    background:linear-gradient(180deg,#f7f4ff 0%, #ebe5ff 45%, #ffffff 100%);
    border-top:5px solid #7c3aed;
}

.card[data-tipo^="Siniestro"],
.card[data-tipo^="Oscuro"],
.card[data-tipo^="Dark"]{
    background:linear-gradient(180deg,#f5f3ff 0%, #ede9fe 45%, #ffffff 100%);
    border-top:5px solid #6d28d9;
}

.card[data-tipo^="Dragon"],
.card[data-tipo^="Dragón"]{
    background:linear-gradient(180deg,#f1f3ff 0%, #dfe5ff 45%, #ffffff 100%);
    border-top:5px solid #4f46e5;
}

.card[data-tipo^="Acero"]{
    background:linear-gradient(180deg,#f6f9fc 0%, #e6edf5 45%, #ffffff 100%);
    border-top:5px solid #64748b;
}

.card[data-tipo^="Hada"]{
    background:linear-gradient(180deg,#fff2f8 0%, #ffdfee 45%, #ffffff 100%);
    border-top:5px solid #f472b6;
}

.card[data-tipo^="Normal"]{
    background:linear-gradient(180deg,#fafafa 0%, #efefef 45%, #ffffff 100%);
    border-top:5px solid #6b7280;
}

/* =========================
   IMAGEN POKEMON
========================= */

.imagen-pokemon{
    width:140px;
    height:140px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:18px auto 14px;
    position:relative;
    z-index:1;
}

.imagen-pokemon::before{
    content:"";
    position:absolute;
    width:108px;
    height:108px;
    border-radius:999px;
    background:radial-gradient(circle, rgba(255,255,255,0.95), rgba(255,255,255,0.35), transparent 72%);
    z-index:0;
}

.imagen-pokemon img{
    max-width:110px;
    max-height:110px;
    width:auto;
    height:auto;
    object-fit:contain;
    display:block;
    image-rendering:pixelated;
    filter:drop-shadow(0 8px 10px rgba(0,0,0,0.16));
    position:relative;
    z-index:1;
    transition:transform 0.22s ease, filter 0.22s ease;
}

.card:hover .imagen-pokemon img{
    transform:scale(1.14);
    filter:drop-shadow(0 12px 14px rgba(0,0,0,0.20));
}

/* =========================
   BADGE TIPO
========================= */

.tipo{
    color:white;
    padding:7px 14px;
    border-radius:999px;
    display:inline-block;
    margin:8px 0 12px;
    font-size:13px;
    min-width:78px;
    font-weight:800;
    position:relative;
    z-index:1;
    box-shadow:0 6px 12px rgba(0,0,0,0.10);
    letter-spacing:0.2px;
}

.card[data-tipo^="Planta"] .tipo{ background:#4CAF50; }
.card[data-tipo^="Fuego"] .tipo{ background:#f97316; }
.card[data-tipo^="Agua"] .tipo{ background:#3b82f6; }
.card[data-tipo^="Electrico"] .tipo,
.card[data-tipo^="Eléctrico"] .tipo{ background:#eab308; }
.card[data-tipo^="Hielo"] .tipo{ background:#06b6d4; }
.card[data-tipo^="Lucha"] .tipo{ background:#dc2626; }
.card[data-tipo^="Veneno"] .tipo{ background:#a855f7; }
.card[data-tipo^="Tierra"] .tipo{ background:#ca8a04; }
.card[data-tipo^="Volador"] .tipo{ background:#60a5fa; }
.card[data-tipo^="Psiquico"] .tipo,
.card[data-tipo^="Psíquico"] .tipo{ background:#ec4899; }
.card[data-tipo^="Bicho"] .tipo{ background:#65a30d; }
.card[data-tipo^="Roca"] .tipo{ background:#78716c; }
.card[data-tipo^="Fantasma"] .tipo{ background:#7c3aed; }
.card[data-tipo^="Siniestro"] .tipo,
.card[data-tipo^="Oscuro"] .tipo,
.card[data-tipo^="Dark"] .tipo{ background:#6d28d9; }
.card[data-tipo^="Dragon"] .tipo,
.card[data-tipo^="Dragón"] .tipo{ background:#4f46e5; }
.card[data-tipo^="Acero"] .tipo{ background:#64748b; }
.card[data-tipo^="Hada"] .tipo{ background:#f472b6; }
.card[data-tipo^="Normal"] .tipo{ background:#6b7280; }

/* =========================
   POKEBALL CAPTURA
========================= */

.pokeball-captura{
    position:absolute;
    top:12px;
    right:12px;
    width:24px;
    height:24px;
    z-index:2;
    border-radius:50%;
    background:rgba(255,255,255,0.92);
    padding:3px;
    box-shadow:0 4px 10px rgba(0,0,0,0.08);
}

.pokeball-captura.capturado{
    opacity:1;
    filter:none;
}

.pokeball-captura.no-capturado{
    opacity:0.35;
    filter:grayscale(100%) brightness(0.7);
}

/* =========================
   DETALLE POKEMON
========================= */


.detalle-pokemon-moderno{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.detalle-header h2{
    margin:0;
    text-align:center;
    font-size:32px;
    color:#111827;
}

.detalle-imagen-box{
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(180deg,#f1f5f9,#e2e8f0);
    border-radius:18px;
    padding:22px;
}

.imgPrincipal{
    width:150px;
    height:150px;
    object-fit:contain;
    image-rendering:pixelated;
}

.detalle-info-box{
    text-align:center;
}

.tipo-detalle{
    display:flex;
    justify-content:center;
    align-items:center;
    margin:10px 0 10px;
    min-height:auto;
}

.tipo.tipo-detalle{
    background:#6b7280;
}

.tipo.tipo-detalle{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    font-size:14px;
    padding:8px 16px;
    border-radius:999px;
    font-weight:800;
    color:#fff;
    box-shadow:0 6px 12px rgba(0,0,0,0.10);
}

.tipo.tipo-detalle[data-tipo^="Planta"]{ background:#4CAF50; }
.tipo.tipo-detalle[data-tipo^="Fuego"]{ background:#f97316; }
.tipo.tipo-detalle[data-tipo^="Agua"]{ background:#3b82f6; }
.tipo.tipo-detalle[data-tipo^="Electrico"],
.tipo.tipo-detalle[data-tipo^="Eléctrico"]{ background:#eab308; }
.tipo.tipo-detalle[data-tipo^="Hielo"]{ background:#06b6d4; }
.tipo.tipo-detalle[data-tipo^="Lucha"]{ background:#dc2626; }
.tipo.tipo-detalle[data-tipo^="Veneno"]{ background:#a855f7; }
.tipo.tipo-detalle[data-tipo^="Tierra"]{ background:#ca8a04; }
.tipo.tipo-detalle[data-tipo^="Volador"]{ background:#60a5fa; }
.tipo.tipo-detalle[data-tipo^="Psiquico"],
.tipo.tipo-detalle[data-tipo^="Psíquico"]{ background:#ec4899; }
.tipo.tipo-detalle[data-tipo^="Bicho"]{ background:#65a30d; }
.tipo.tipo-detalle[data-tipo^="Roca"]{ background:#78716c; }
.tipo.tipo-detalle[data-tipo^="Fantasma"]{ background:#7c3aed; }
.tipo.tipo-detalle[data-tipo^="Siniestro"],
.tipo.tipo-detalle[data-tipo^="Oscuro"],
.tipo.tipo-detalle[data-tipo^="Dark"]{ background:#6d28d9; }
.tipo.tipo-detalle[data-tipo^="Dragon"],
.tipo.tipo-detalle[data-tipo^="Dragón"]{ background:#4f46e5; }
.tipo.tipo-detalle[data-tipo^="Acero"]{ background:#64748b; }
.tipo.tipo-detalle[data-tipo^="Hada"]{ background:#f472b6; }
.tipo.tipo-detalle[data-tipo^="Normal"]{ background:#6b7280; }

.stats-detalle-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:12px;
}

.stat-detalle-card{
    background:white;
    border-radius:14px;
    padding:16px;
    box-shadow:0 6px 16px rgba(0,0,0,0.08);
}

.stat-detalle-card span{
    display:block;
    color:#6b7280;
    font-size:13px;
    margin-bottom:6px;
}

.stat-detalle-card strong{
    font-size:22px;
    color:#111827;
}

.detalle-evolucion-section h3{
    text-align:center;
    margin:0 0 14px;
    color:#111827;
    font-size:22px;
}

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

.evolucion-card-detalle{
    background:white;
    border-radius:16px;
    padding:18px 14px;
    text-align:center;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    transition:transform .2s;
}

.evolucion-card-detalle img{
    width:80px;
    height:80px;
    object-fit:contain;
    image-rendering:pixelated;
}

.evolucion-card-detalle h4{
    margin:10px 0 8px;
    font-size:16px;
    color:#111827;
}

.evolucion-card-detalle:hover{
    transform:translateY(-3px);
}

.metodo-evolucion{
    display:inline-block;
    background:#dbeafe;
    color:#1d4ed8;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.metodo-evolucion-item{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:#dbeafe;
    color:#1d4ed8;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    width:fit-content;
    margin:0 auto;
}

.metodo-evolucion-item img{
    width:18px;
    height:18px;
    object-fit:contain;
    image-rendering:pixelated;
}

.sin-evolucion-box{
    background:#f9fafb;
    border-radius:14px;
    padding:18px;
    text-align:center;
    color:#6b7280;
}

/* =========================
   MY POKEMON
========================= */

.filtros-mis-pokemon{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin:22px 0 28px;
}

#buscarMiPokemon,
#filtroMiTipo,
#filtroMiRareza{
    padding:12px 14px;
    border-radius:12px;
    border:1px solid #d1d5db;
    background:white;
    font-size:14px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
    outline:none;
}

#buscarMiPokemon{
    width:260px;
}

#filtroMiTipo,
#filtroMiRareza{
    min-width:170px;
}

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

.pokemon-card{
    background:white;
    border-radius:20px;
    padding:20px 18px;
    box-shadow:0 8px 22px rgba(0,0,0,0.10);
    transition:transform 0.2s, box-shadow 0.2s;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
}

.pokemon-card:hover{
    transform:translateY(-4px);
    box-shadow:0 14px 28px rgba(0,0,0,0.14);
}

.pokemon-card-header{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    margin-bottom:10px;
}

.pokemon-card-header h3{
    margin:0;
    font-size:18px;
    color:#111827;
}

.pokemon-card-image{
    width:100%;
    height:120px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:10px 0 8px;
}

.pokemon-card-image img{
    max-width:90px;
    max-height:90px;
    width:auto;
    height:auto;
    object-fit:contain;
    image-rendering:pixelated;
    display:block;
}

.badge-shiny{
    background:#f59e0b;
    color:white;
    font-size:13px;
    padding:5px 10px;
    border-radius:999px;
    font-weight:bold;
}

.badge-normal{
    background:#6b7280;
    color:white;
    font-size:13px;
    padding:5px 10px;
    border-radius:999px;
    font-weight:bold;
}

.pokemon-stats{
    margin-top:12px;
}

.pokemon-stats p{
    margin:6px 0;
    color:#374151;
}

.exp-box{
    width:100%;
    margin-top:12px;
}

.exp-label{
    font-size:13px;
    color:#4b5563;
    margin-bottom:6px;
}

.exp-bar{
    width:100%;
    height:10px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
}

.exp-fill{
    height:100%;
    background:linear-gradient(90deg, #22c55e, #16a34a);
    border-radius:999px;
}

/* cadena evolutiva */

.cadena-evolucion{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin-top:10px;
    flex-wrap:wrap;
}

.evo-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    background:#f3f4f6;
    padding:14px;
    border-radius:14px;
    min-width:90px;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

.evo-item img{
    width:60px;
    height:60px;
    margin-bottom:6px;
}

.evo-item span{
    font-weight:600;
    font-size:14px;
}

.evo-item small{
    font-size:12px;
    color:#4b5563;
}

.evo-flecha{
    font-size:22px;
    font-weight:bold;
    color:#6b7280;
}

.pokemon-actions{
    display:flex;
    gap:10px;
    margin-top:16px;
    flex-wrap:wrap;
    justify-content:center;
}

.btn-evolucionar{
    background:#2563eb;
    color:white;
    border:none;
    padding:10px 14px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.btn-evolucionar:hover{
    background:#1d4ed8;
}

.btn-soltar{
    background:#dc2626;
    color:white;
    border:none;
    padding:10px 14px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.btn-soltar:hover{
    background:#b91c1c;
}

.btn-evolucionar-listo{
    background:#16a34a;
    color:white;
    border:none;
    padding:10px 14px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.btn-evolucionar-listo:hover{
    background:#15803d;
}

.btn-evolucionar-item{
    background:#f59e0b;
    color:white;
    border:none;
    padding:10px 14px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.btn-evolucionar-item:hover{
    background:#d97706;
}

/* =========================
   INVENTARIO / RESUMEN
========================= */

.inventario-lista{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:center;
    margin-top:14px;
}

.item-chip{
    background:#eef2ff;
    color:#1e3a8a;
    padding:8px 12px;
    border-radius:999px;
    font-size:14px;
    font-weight:600;
}

.item-chip-con-icono{
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.item-chip-con-icono img{
    width:18px;
    height:18px;
    object-fit:contain;
    image-rendering:pixelated;
}

.empty-box{
    background:white;
    border-radius:18px;
    padding:30px;
    text-align:center;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.resumen-coleccion{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap:16px;
    margin:24px 0 28px;
}

.resumen-card{
    background:white;
    border-radius:16px;
    padding:18px;
    text-align:center;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.resumen-card span{
    display:block;
    color:#6b7280;
    font-size:14px;
    margin-bottom:8px;
}

.resumen-card strong{
    font-size:28px;
    color:#111827;
}

/* =========================
   MENSAJES EVOLUCION
========================= */

.mensaje-evolucion{
    max-width:900px;
    margin:0 auto 20px;
    padding:14px 18px;
    border-radius:14px;
    font-weight:700;
    text-align:center;
    box-shadow:0 6px 18px rgba(0,0,0,0.06);
}

.mensaje-evolucion.ok{
    background:#dcfce7;
    color:#166534;
    border:1px solid #86efac;
}

.mensaje-evolucion.error{
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #fca5a5;
}

/* =========================
   MODAL EVOLUCION
========================= */

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.7);
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    box-sizing:border-box;
    z-index:999;
    overflow:hidden;
}

.modal-content{
    background:white;
    border-radius:18px;
    padding:24px;
    width:100%;
    max-width:420px;
    text-align:center;
    position:relative;
    box-shadow:0 12px 30px rgba(0,0,0,0.25);
    max-height:90vh;
    overflow-y:auto;
    overscroll-behavior:contain;
    box-sizing:border-box;
}

.titulo-modal-evolucion{
    margin:0;
    text-align:center;
    font-size:32px;
    font-weight:800;
    color:#111827;
}

.subtitulo-modal-evolucion{
    text-align:center;
    margin:10px 0 24px;
    color:#6b7280;
    font-size:15px;
}

.evolucion-preview-horizontal{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:18px;
    margin:20px 0 26px;
    flex-wrap:wrap;
}

.evolucion-card-pokemon{
    background:#f8fafc;
    border-radius:20px;
    padding:20px 18px;
    width:170px;
    min-height:150px;
    text-align:center;
    box-shadow:0 8px 18px rgba(0,0,0,0.06);
}

.evolucion-card-pokemon img{
    width:96px;
    height:96px;
    object-fit:contain;
    image-rendering:pixelated;
}

.evolucion-card-pokemon p{
    margin:10px 0 0;
    font-weight:800;
    font-size:16px;
    color:#111827;
}

.evolucion-destino{
    background:linear-gradient(180deg,#eff6ff,#dbeafe);
    border:2px solid #93c5fd;
    box-shadow:0 10px 22px rgba(59,130,246,0.15);
}

.evolucion-lista{
    background:linear-gradient(180deg,#ecfdf5,#d1fae5);
    border:2px solid #86efac;
}

.evolucion-flecha-grande{
    font-size:42px;
    font-weight:900;
    color:#2563eb;
}

.item-evolucion-card{
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:18px 20px;
    margin:12px 0 20px;
    box-shadow:0 4px 12px rgba(0,0,0,0.04);
}

.item-evolucion-top{
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:14px;
}

.item-evolucion-top img{
    width:54px;
    height:54px;
    object-fit:contain;
    image-rendering:pixelated;
}

.item-evolucion-top h3{
    margin:0 0 10px;
    font-size:18px;
    color:#111827;
}

.item-evolucion-top p{
    margin:4px 0;
    color:#4b5563;
    font-size:15px;
}

.evolucion-detalle{
    text-align:center;
    font-weight:700;
    margin:10px 0 20px;
    font-size:15px;
}

.evolucion-detalle.ok{
    color:#15803d;
    background:#dcfce7;
    border:1px solid #86efac;
    padding:12px 14px;
    border-radius:14px;
}

.evolucion-detalle.error{
    color:#b91c1c;
    background:#fee2e2;
    border:1px solid #fca5a5;
    padding:12px 14px;
    border-radius:14px;
}

.evolucion-botones{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
    margin-top:6px;
}

.btn-cancelar-modal{
    background:#e5e7eb;
    color:#111827;
    border:none;
    padding:12px 18px;
    border-radius:12px;
    cursor:pointer;
    font-weight:bold;
}

.btn-cancelar-modal:hover{
    background:#d1d5db;
}

.btn-confirmar-evolucion{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:white;
    border:none;
    padding:12px 18px;
    border-radius:12px;
    cursor:pointer;
    font-weight:800;
    box-shadow:0 8px 18px rgba(37,99,235,0.25);
}

.btn-confirmar-evolucion:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 22px rgba(37,99,235,0.3);
}

.btn-confirmar-evolucion:disabled{
    background:#d1d5db;
    color:#6b7280;
    cursor:not-allowed;
    box-shadow:none;
    opacity:0.85;
}

.btn-usar-item{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:white;
    border:none;
    padding:12px 18px;
    border-radius:12px;
    font-weight:bold;
    font-size:14px;
    cursor:pointer;
    transition:all .25s ease;
    box-shadow:0 8px 18px rgba(37,99,235,0.28);
}

.btn-usar-item:hover{
    background:linear-gradient(135deg,#3b82f6,#2563eb);
    transform:translateY(-2px);
    box-shadow:0 12px 22px rgba(37,99,235,0.32);
}

.btn-usar-item:active{
    transform:scale(.97);
}

.btn-usar-item:disabled{
    background:#9ca3af;
    cursor:not-allowed;
    box-shadow:none;
}

.icon-item-btn{
    width:20px;
    height:20px;
    image-rendering:pixelated;
}

/* =========================
   RESPONSIVE TABLET
========================= */

@media (max-width: 1024px){
    .banner img{
        height:240px;
    }

    .seccion-pokedex{
        padding:32px 20px 48px;
    }

    #pokedex{
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap:20px;
    }
}



/* =========================
   RESPONSIVE MOBILE
========================= */
@media (max-width: 768px){
    .banner img{
        height:180px;
    }

    .seccion-pokedex{
        padding:24px 14px 40px;
    }

    .titulo{
        font-size:28px;
        line-height:1.15;
    }

    .subtitulo{
        font-size:14px;
        line-height:1.35;
        padding:0 6px;
    }

    .filtros,
    .filtros-mis-pokemon{
        flex-direction:column;
        align-items:stretch;
        gap:10px;
    }

    #buscarPokemon,
    #buscarMiPokemon,
    #filtroTipo,
    #filtroGeneracion,
    #filtroMiTipo,
    #filtroMiRareza,
    #modoShiny{
        width:100%;
        min-width:unset;
        box-sizing:border-box;
    }

    #modoShiny{
        text-align:center;
    }

    #pokedex,
    .maps-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .card,
    .pokemon-card{
        min-height:auto;
        padding:16px 14px 18px;
        border-radius:18px;
    }

    .card h3,
    .pokemon-card-header h3{
        font-size:17px;
        min-height:auto;
    }

    .imagen-pokemon{
        width:120px;
        height:120px;
        margin:14px auto 10px;
    }

    .imagen-pokemon::before{
        width:92px;
        height:92px;
    }

    .imagen-pokemon img{
        max-width:95px;
        max-height:95px;
    }

    .cadena-evolucion{
        gap:8px;
    }

    .evo-item{
        min-width:80px;
        padding:10px;
    }

    .evo-item img{
        width:60px;
        height:60px;
    }

    .evo-flecha{
        font-size:18px;
    }

    .evolucion-opciones-grid{
        grid-template-columns:1fr;
        gap:12px;
    }

    .tipo{
        font-size:12px;
        padding:6px 12px;
        min-width:72px;
    }

    .card p,
    .pokemon-stats p{
        font-size:13px;
    }

    .stats-detalle-grid{
        grid-template-columns:1fr;
    }

    .evolucion-detalle-grid{
        grid-template-columns:1fr;
    }

    .pokemon-actions,
    .evolucion-botones{
        flex-direction:column;
    }

    .btn-soltar,
    .btn-evolucionar,
    .btn-evolucionar-listo,
    .btn-evolucionar-item,
    .btn-confirmar-evolucion,
    .btn-usar-item,
    .btn-cancelar-modal{
        width:100%;
    }

    .detalle-header h2{
        font-size:26px;
        line-height:1.15;
        padding:0 24px 0 0;
    }

    .imgPrincipal{
        width:120px;
        height:120px;
    }

    .detalle-evolucion-section h3{
        font-size:20px;
    }

    .modal{
        position:fixed;
        inset:0;
        display:flex;
        align-items:center;
        justify-content:center;
        padding:0;
        overflow:hidden;
    }

    .modal-content{
        width:min(420px, calc(100vw - 20px));
        max-height:92vh;
        margin:0 auto;
        padding:16px 12px 18px;
        border-radius:20px;
        overflow-y:auto;
        overscroll-behavior:contain;
        -webkit-overflow-scrolling:touch;
        box-sizing:border-box;
    }

    .detalle-pokemon-moderno{
        gap:14px;
    }

    .detalle-imagen-box{
        padding:10px;
        min-height:140px;
    }

    .tipo.tipo-detalle{
        font-size:13px;
        padding:8px 14px;
    }

    .stat-detalle-card{
        padding:10px 12px;
    }

    .evolucion-card-detalle{
        padding:14px 10px;
    }

    .evolucion-card-detalle img{
        width:72px;
        height:72px;
    }

    .cerrar{
        top:10px;
        right:12px;
        font-size:28px;
    }



    .titulo-modal-evolucion{
        font-size:26px;
        line-height:1.15;
    }

    .subtitulo-modal-evolucion{
        font-size:14px;
        margin-bottom:18px;
    }

    .evolucion-preview-horizontal{
        gap:12px;
        margin:16px 0 20px;
    }

    .evolucion-card-pokemon{
        width:100%;
        min-height:auto;
        padding:16px 14px;
    }

    .evolucion-card-pokemon img{
        width:84px;
        height:84px;
    }

    .evolucion-flecha-grande{
        font-size:30px;
    }

    .item-evolucion-top{
        flex-direction:column;
        gap:10px;
    }

    .resumen-coleccion{
        grid-template-columns:1fr;
    }

    .inventario-lista{
        justify-content:flex-start;
    }

    .detalle-imagen-box{
        padding:12px;
    }

    .imgPrincipal{
        width:120px;
        height:120px;
    }

    .detalle-header h2{
        font-size:24px;
    }

    .tipo-detalle{
        margin:8px 0 10px;
    }

    .tipo.tipo-detalle{
        font-size:13px;
        padding:7px 14px;
        max-width:90%;
        text-align:center;
        white-space:normal;
        line-height:1.2;
    }

    .stats-detalle-grid{
        grid-template-columns:1fr;
        gap:10px;
    }

    .stat-detalle-card{
        padding:12px;
    }

    .evolucion-grid{
        grid-template-columns:1fr;
        gap:10px;
    }

    .evo-card{
        min-height:auto;
        padding:12px 10px;
    }

    .evo-card > img{
        width:56px;
        height:56px;
    }

    .evo-metodo{
        font-size:11px;
        padding:6px 8px;
        flex-wrap:wrap;
    }

    .evo-metodo img{
        width:20px;
        height:20px;
    }


}


.evolucion-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    margin-top:10px;
}

.evo-card{
    background:#f8fafc;
    border-radius:16px;
    padding:14px 12px;
    text-align:center;
    box-shadow:0 4px 10px rgba(0,0,0,0.08);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    min-height:180px;
}

.evo-card > img{
    width:64px;
    height:64px;
    object-fit:contain;
    image-rendering:pixelated;
    margin-bottom:8px;
}

.evo-nombre{
    display:block;
    font-weight:700;
    font-size:14px;
    margin:4px 0 8px;
    color:#111827;
}

.evo-metodo{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    font-size:12px;
    font-weight:700;
    color:#1d4ed8;
    background:#dbeafe;
    border-radius:999px;
    padding:6px 10px;
    max-width:100%;
    width:auto;
    margin-top:auto;
}

.evo-metodo img{
    width:24px;
    height:24px;
    object-fit:contain;
    image-rendering:pixelated;
    flex-shrink:0;
}

.evo-metodo span{
    line-height:1.2;
    text-align:center;
}

.evo-nivel{
    font-size:12px;
    font-weight:700;
    color:#2563eb;
    background:#dbeafe;
    padding:6px 10px;
    border-radius:999px;
    margin-top:auto;
}

.evolucion-grid .metodo-evolucion-item,
.evolucion-grid .evo-actual,
.evolucion-grid .evo-flecha{
    display:none !important;
}


.skeleton-card {
    pointer-events: none;
    animation: pulse 1.2s infinite ease-in-out;
}

.skeleton-title,
.skeleton-image,
.skeleton-pill,
.skeleton-line {
    background: #e5e7eb;
    border-radius: 10px;
    margin: 10px auto;
}

.skeleton-title {
    width: 70%;
    height: 22px;
    margin-top: 12px;
}

.skeleton-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-top: 22px;
    margin-bottom: 18px;
}

.skeleton-pill {
    width: 90px;
    height: 28px;
}

.skeleton-line {
    width: 65%;
    height: 14px;
}

.skeleton-line.short {
    width: 45%;
}

.pokedex-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
}

.pokedex-error button {
    margin-top: 10px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

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