:root {
    --bg-color: #f0f8ff;
    --card-bg: #ffffff;
    --text-color: #333;
    --primary-color: #ff6b6b;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    /* Playful font */
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px #fff, 4px 4px 0px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.animal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.animal-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

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

.animal-card:active,
.animal-card.playing {
    transform: scale(0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff0f0;
}

.animal-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 15px;
    background-color: #f9f9f9;
}

.animal-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.animal-card:hover img {
    transform: scale(1.1);
}

.animal-card span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #555;
}

/* Animations */
@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.animal-card.playing .animal-img-wrapper {
    animation: shake 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .animal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}