/* Optimización de selectores */
body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #FFF;
    margin: 0;
    padding: 2px;
    font-size: 12px;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

h1, h2 {
    text-align: center;
    margin: 6px 0;
}

h1 {
    color: #F00;
    font-size: 16px;
}

h2 {
    color: #FC0;
    font-size: 14px;
}

/* Agrupación de estilos comunes */
.menu, .type-menu, .button-back {
    text-align: center;
    margin: 6px 0;
}

.button-back {
    margin: 15px 0;
}

/* Optimización de botones */
.button, .button-small, .table-button {
    display: inline-block;
    text-decoration: none;
    border-radius: 4px;
}

.button {
    padding: 6px 8px;
    background-color: #E00;
    color: white;
    font-size: 12px;
    margin: 2px;
    min-width: 80px;
}

.button-small {
    font-size: 0.8em;
    padding: 5px 10px;
    background-color: #ff5252;
    color: white;
    border-radius: 5px;
}

.table-button {
    background-color: #f0f0f0;
    padding: 3px 6px;
    text-decoration: none;
    color: #333;
    margin: 2px 0;
    font-size: 10px;
}

/* Estilos para los tipos */
.type-btn, .type-tag {
    display: inline-block;
    padding: 5px 8px;
    margin: 3px;
    border-radius: 15px;
    color: white;
    text-align: center;
    font-weight: bold;
    min-width: 80px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    height: auto;
    line-height: 1.2;
    overflow: visible;
    white-space: nowrap;
    border: none;
}

/* Estilos para las secciones de interacciones */
.type-section {
    margin: 2px 0;
    text-align: center;
}

.type-section strong {
    display: block;
    margin: 2px 0;
    text-align: center;
    font-size: 14px;
}

.type-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin: 2px 0;
}

/* Centrar el encabezado de interacciones */
.type-header {
    text-align: center;
    font-weight: bold;
    margin: 6px 0;
    font-size: 14px;
    padding: 3px;
    border-radius: 4px;
}

/* Ajustes para los multiplicadores */
.type-tag .multiplier {
    font-size: 10px;
    display: block;
    line-height: 10px;
    margin-top: 2px;
}

/* Ajustes específicos para los tipos en las interacciones */
#typeDetails .type-tag {
    width: auto;
    min-width: 80px;
    height: auto;
    margin: 3px;
    padding: 5px 8px;
    font-size: 11px;
}

/* Asegurar que todos los tipos tengan el mismo tamaño */
#gen1-types .type-btn, 
#gen2-types .type-btn, 
#gen6-types .type-btn {
    width: 80px;
    height: 25px;
    line-height: 15px;
    padding: 5px 10px;
    margin: 5px;
    box-sizing: border-box;
}

.content {
    display: none;
}

.content:target {
    display: block;
}

/* Detalles de tipos */
.type-detail {
    border: 1px solid #444;
    border-radius: 6px;
    margin: 3px 0;
    padding: 3px;
    background-color: #222;
    display: none;
}

/* Colores de tipos */
.normal { background-color: #A8A878; }
.fuego { background-color: #F08030; }
.agua { background-color: #6890F0; }
.planta { background-color: #78C850; }
.electrico { background-color: #F8D030; }
.hielo { background-color: #98D8D8; }
.lucha { background-color: #C03028; }
.veneno { background-color: #A040A0; }
.tierra { background-color: #E0C068; }
.volador { background-color: #A890F0; }
.psiquico { background-color: #F85888; }
.bicho { background-color: #A8B820; }
.roca { background-color: #B8A038; }
.fantasma { background-color: #705898; }
.dragon { background-color: #7038F8; }
.siniestro { background-color: #705848; }
.acero { background-color: #B8B8D0; }
.hada { background-color: #EE99AC; }

/* Efectividad */
.weak { background-color: #F44; }
.resist { background-color: #4C4; }
.strong { background-color: #26F; }
.immune { background-color: #999; }

/* Estilos de búsqueda y resultados */
#search-container {
    padding: 2px 0;
    text-align: center;
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000;
    border-top: 1px solid #444;
    height: auto;
    min-height: 40px;
    z-index: 1000;
}

#search-container h1 {
    margin: 0;
    font-size: 14px;
    line-height: 1;
    color: #F00;
    text-shadow: 1px 1px 1px #000;
}

#resultado {
    padding: 6px;
    margin-bottom: 45px;
    text-align: center;
}

#pokeContainer {
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.nav-arrow {
    width: 100%;
    height: 100%;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    cursor: pointer;
    margin: 0 5px;
}

.nav-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:focus {
    outline: 2px solid #F00;
    border-radius: 5px;
}

.nav-button:active {
    transform: scale(0.95);
}

#search-container form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

#pokeImg {
    width: 160px;
    height: auto;
    margin-bottom: 0;
}

#pokeName {
    margin-top: 0;
    font-weight: bold;
    font-size: 16px;
    color: #FFF;
}

#pokeInfo {
    background: #222;
    padding: 6px;
    margin-top: 10px;
    color: white;
    border: 1px solid #444;
    text-align: left;
    width: 300px;
    margin: 10px auto;
}

input[type="text"] {
    font-size: 11px;
    padding: 2px;
    width: 70px;
    height: 18px;
    margin: 0 3px;
    border: 1px solid #666;
    border-radius: 3px;
    text-align: center;
    vertical-align: middle;
}

input[type="submit"] {
    font-size: 11px;
    padding: 2px;
    width: 60px;
    height: 22px;
    margin: 0 3px;
    background-color: #E00;
    color: white;
    border: 1px solid #900;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: middle;
}

button {
    font-size: 10px;
    padding: 1px;
    width: 60px;
    margin: 1px;
    height: 16px;
}

.note {
    font-size: 10px;
    margin: 6px 0;
    padding: 0 4px;
    text-align: left;
    color: #CCC;
}

/* Estilos específicos para busqueda.html */
.button-back-small {
    position: absolute;
    top: 10px;
    left: 10px;
}

/* Estilos para autocompletar */
.sugerencias-container {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    max-width: 200px;
    z-index: 1001;
    display: none;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    color: #000;
}

.sugerencia-item {
    padding: 5px 10px;
    cursor: pointer;
}

.sugerencia-item:hover {
    background-color: #f0f0f0;
}

.sugerencia-item.selected {
    background-color: #e0e0e0;
}