.cat--idle {
    animation: breathe 5s infinite ease-in-out;
}

@keyframes waveLeft {
    0% { transform: rotate(-2deg); }
    20% { transform: rotate(-25deg); }
    60% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.cat--wave .cat-paw.paw-left {
    animation: waveLeft 2s ease-in-out both;
    transform-origin: top center;
}

@keyframes breathe {
    0%, 100% { transform: translateZ(0) scale(1); }
    50% { transform: translateZ(10px) scale(1.02); }
}

.cat--happy .cat-body {
    animation: happyJump 0.9s ease-in-out infinite;
}

.cat--happy .cat-shadow {
    animation: happyShadow 0.9s ease-in-out infinite;
}

.cat--happy .ear-left {
    animation: happyEarLeft 0.9s ease-in-out infinite;
    transform-origin: bottom center;
}

.cat--happy .ear-right {
    animation: happyEarRight 0.9s ease-in-out infinite;
    transform-origin: bottom center;
}

.cat--happy .cat-eye .pupil {
    transform: translate(-50%, -30%);
}

.cat--happy .cat-paw.paw-right {
    animation: pawWave 1.2s infinite ease-in-out;
    transform-origin: top center;
}

@keyframes pawWave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-18deg); }
}

@keyframes happyJump {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    35% { transform: translateX(-50%) translateY(-18px) scale(1.03); }
    60% { transform: translateX(-50%) translateY(-8px) scale(1.01); }
}

@keyframes happyShadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.4; }
    35% { transform: translateX(-50%) scale(0.8); opacity: 0.2; }
    60% { transform: translateX(-50%) scale(0.9); opacity: 0.3; }
}

@keyframes happyEarLeft {
    0%, 100% { transform: rotate(-40deg) skewX(-10deg) translate(-6px, -10px) scaleY(var(--ear-react)); }
    50% { transform: rotate(-18deg) skewX(-4deg) translate(-2px, -2px) scaleY(var(--ear-react)); }
}

@keyframes happyEarRight {
    0%, 100% { transform: rotate(40deg) skewX(10deg) translate(6px, -10px) scaleY(var(--ear-react)); }
    50% { transform: rotate(18deg) skewX(4deg) translate(2px, -2px) scaleY(var(--ear-react)); }
}

.cat--angry .cat-ear {
    --ear-state: 12deg;
    --ear-shift: 6px;
}

.cat--angry .cat-eye {
    background: radial-gradient(circle at 50% 30%, #ffdede, #ff8a80 80%);
}

.cat--angry .cat-eye .pupil {
    transform: translate(-50%, -50%) scaleX(0.6);
}

.cat--happy .cat-tail {
    animation-duration: 3s;
}
.cat--happy .cat-tail span {
    animation-duration: 3s;
}

.cat--surprised .cat-tail {
    animation-duration: 2.4s;
}
.cat--surprised .cat-tail span {
    animation-duration: 2.4s;
    animation-timing-function: ease-out;
}

.cat--angry .cat-tail {
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.65, 0.05, 0.36, 1);
}
.cat--angry .cat-tail span {
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.65, 0.05, 0.36, 1);
    filter: drop-shadow(0 0 4px rgba(255, 64, 64, 0.4));
}

.cat--surprised {
    transform: translateZ(20px) rotateX(-4deg);
}

.cat--surprised .cat-eye {
    transform: scaleY(1.2);
}

.cat--surprised .cat-mouth {
    border-bottom-width: 5px;
    transform: translateX(-50%) scale(1.2);
}

.cat--transitioning {
    transition: transform 0.5s ease;
}
.cat--mega-happy .cat-ear {
    --ear-state: -30deg;
    --ear-shift: -12px;
    --ear-lean: 8deg;
}

.cat--mega-happy .cat-body {
    animation: megaBounce 0.7s ease-in-out infinite;
}

.cat--mega-happy .cat-eye .pupil {
    transform: translate(-50%, -40%);
}

.cat--mega-happy .cat-mouth {
    width: 110px;
    height: 30px;
    border-bottom: 4px solid #eee;
    transform: translateX(-50%) scale(1.1);
}

.cat--mega-happy .cat-mouth::before,
.cat--mega-happy .cat-mouth::after {
    width: 26px;
    height: 20px;
}

.cat--mega-happy .cat-paw {
    animation: megaPawWave 0.5s infinite alternate;
}

.cat--mega-happy .cat-tail {
    animation: tailTildeAgitated 0.4s infinite ease-in-out;
}

@keyframes megaBounce {
    0%, 100% { transform: translateZ(0) scale(1); }
    50% { transform: translateZ(10px) scale(1.04); }
}

@keyframes megaPawWave {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}
