:root {
    --primary-color: #ef5350;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

#searchInput {
    padding: 0.8rem 1.2rem;
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: rgba(255,255,255,0.2);
    color: white;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover, .btn.active {
    background-color: white;
    color: var(--primary-color);
}

.stats p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.card img {
    max-width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.card .number {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-bottom: 0.5rem;
}

.card h2 {
    font-size: 1.2rem;
    text-transform: capitalize;
    margin-bottom: 1rem;
}

.types {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.type {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-transform: capitalize;
}

.type.grass { background-color: #78c850; }
.type.poison { background-color: #a040a0; }

.feedback-state {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #666;
}

.hidden {
    display: none !important;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}