body {
    background-color: #f5f5f5;
    font-family: sans-serif;
    padding: 2rem;
    text-align: center;
}

h1 {
    margin-bottom: 1rem;
}

ul {
    padding-left: 0;
    margin: 0;
}

.pokemon-card {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 12px;
}

.infobox-header {
    background-color: #a3c3f3;
    color: black;
    text-align: center;
    font-weight: bold;
    padding: 0.5em;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #aaa;
}

.info-section {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.infobox-subtitle {
    font-weight: bold;
    background-color: #dbeaff;
    text-align: center;
    padding: 0.3em;
    border-radius: 6px;
    margin-bottom: 0.4em;
}

.infobox-image {
    text-align: center;
    padding: 1em 0;
}

.infobox-image img {
    max-width: 100%;
}

.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.type-badges {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.data-pair {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3em;
}

.data-pair span:first-child {
    font-weight: bold;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.stats-table td {
    padding: 4px;
    font-size: 14px;
}

.stat-label {
    font-weight: bold;
    width: 80px;
}

.stat-bar-container {
    background-color: #eee;
    border-radius: 5px;
    height: 10px;
    width: 100px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    transition: width 0.3s ease-in-out;
}

.stat-hp    { background-color: #c03028; }  /* red */
.stat-atk   { background-color: #f08030; }  /* orange */
.stat-def   { background-color: #f8d030; }  /* yellow */
.stat-spa   { background-color: #78c850; }  /* green */
.stat-spd   { background-color: #6890f0; }  /* blue */
.stat-spe   { background-color: #a040a0; }  /* purple */

.abilities-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.ability-card {
    background-color: #eee;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    min-width: 100px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.hidden-ability {
    background-color: #ccc;
    color: black;
}

.details-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

#pokedex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

#back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #4caf50;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    margin: 20px auto;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: background-color 0.3s;
}

#back-button:hover {
    background-color: #45a049;
}

#pokemon-details {
    display: flex;
    justify-content: center;
}

#search-bar {
    padding: 8px;
    width: 250px;
    margin-bottom: 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

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

.suggestion-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 8px;
}

.suggestion {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-width: 300px;
    width: 100%;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.suggestion:hover {
    background-color: #eef;
}

.suggestion-sprite {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.dex-number {
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
    color: #555;
    min-width: 60px;
}

.name {
    font-size: 16px;
    flex-grow: 1;
    text-align: left;
}

.no-results {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    margin-top: 10px;
    font-weight: bold;
    color: #999;
}