.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #000;
  font-size: 1.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.logo__text {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.logo__text:hover ~ .characterBox .character:nth-child(2) {
  animation: slap 0.5s ease 1s forwards;
}

.logo__text:hover ~ .characterBox .character:nth-child(3) {
  animation: wakeup 0.2s ease 1.5s forwards;
}

@keyframes slap {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(10px);
  }
  40% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
  80% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

.character:nth-child(3) .character__face {
  transition: all 0.3s ease 1.5s;
}

.logo__text:hover ~ .characterBox .character:nth-child(3) .character__face {
  top: 12px;
}

.logo__text:hover ~ .characterBox .character:nth-child(3) .character__face::before,
.logo__text:hover ~ .characterBox .character:nth-child(3) .character__face::after {
  animation: eye 5s linear 1.5s infinite;
}

.characterBox {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 120px;
  height: 36px;
  margin-left: 10px;
}

.characterBox::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -10px;
  right: -10px;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 4px,
    #fff 4px,
    #fff 8px
  );
  border-radius: 2px;
  z-index: 1;
  box-shadow: 0 1px 0 #000;
}

.characterBox::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -10px;
  right: -10px;
  height: 2px;
  background: #000;
  border-radius: 1px;
  z-index: 1;
  opacity: 0.3;
}

.character {
  position: relative;
  width: 36px;
  height: 24px;
  box-sizing: border-box;
  border: solid 2px #000;
  background: #fff;
  border-radius: 30px 30px 20px 20px / 24px 24px 15px 15px;
  animation: none;
  transition: all 0.3s ease;
  z-index: 2;
}

.character::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 14px;
  width: 8px;
  height: 8px;
  background: #000;
  clip-path: path('M10.23,3.32c-3.54,.63-5.72,2.51-7.02,4.23-.33-1.58-.34-3.54,.93-5.12,.52-.65,.41-1.59-.24-2.11C3.24-.19,2.29-.08,1.77,.57c-3.82,4.77-.31,11.11-.13,11.42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.01-.02,2.49,.04,2.52,0,.1-.14,1.54-4.82,6.59-5.71,.82-.14,1.37-.92,1.22-1.74s-.94-1.36-1.75-1.21Z');
}

.character::after {
  content: 'z';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  opacity: 0;
  animation: zzz 2s ease 2s infinite;
}

.character:nth-child(2)::after {
  animation-delay: 2.3s;
}

.character:nth-child(3)::after {
  animation-delay: 2.6s;
}

.character__face {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 8px;
  height: 4px;
  background: #000;
  border-radius: 50% 50% 50% 50% / 78% 78% 22% 22%;
  transition: .2s;
}

.character__face::before,
.character__face::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 6px;
  height: 2px;
  border-radius: 3px;
  background: #000;
}

.character__face::before {
  left: -4px;
}

.character__face::after {
  right: -4px;
}

.character__feet {
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 20px;
  height: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.character__feet::before,
.character__feet::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #000;
  clip-path: path('M8,0c0,0-2,4-2,6s1,2,2,2s2-1,2-2S8,0,8,0z');
  transform-origin: top center;
}

.character__feet::before {
  left: 0;
  transform: rotate(-15deg);
}

.character__feet::after {
  right: 0;
  transform: scaleX(-1) rotate(-15deg);
}

/* Hover States */
.navbar__logo:hover .character {
  animation: none;
  height: 28px;
  border-radius: 20px 20px 20px 20px / 24px 24px 15px 15px;
  transform: translateY(0);
}

.navbar__logo:hover .character__face {
  top: 12px;
}

.navbar__logo:hover .character__face::before,
.navbar__logo:hover .character__face::after {
  animation: eye 5s linear 1.5s infinite;
}

.navbar__logo:hover .character .character__feet {
  opacity: 1;
}

.navbar__logo:hover .wakeup {
  animation: wakeup .2s ease;
  animation-fill-mode: forwards;
}

.navbar__logo:hover .wakeup .character__face {
  top: 12px;
}

.navbar__logo:hover .wakeup .character__face::before,
.navbar__logo:hover .wakeup .character__face::after {
  animation: eye 5s linear infinite;
}

.navbar__logo:hover .wakeup:nth-child(2) .character__face::before,
.navbar__logo:hover .wakeup:nth-child(2) .character__face::after {
  animation: eye_2 5s linear infinite;
}

/* Not Hover States */
.navbar__logo:not(:hover) .character {
  animation: sleep 1s ease 2s infinite alternate;
}

.navbar__logo:not(:hover) .character::after {
  animation: zzz 2s ease 2s infinite;
}

.navbar__logo:not(:hover) .character:nth-child(2)::after {
  animation-delay: 2.3s;
}

.navbar__logo:not(:hover) .character:nth-child(3)::after {
  animation-delay: 2.6s;
}

.navbar__logo:not(:hover) .character .character__feet {
  transition: opacity 0.3s ease 2s;
  opacity: 0;
}

/* Animations */
@keyframes sleep {
  0% {
    height: 24px;
    border-radius: 30px 30px 20px 20px / 24px 24px 15px 15px;
    transform: translateY(0);
  }
  100% {
    height: 20px;
    border-radius: 35px 35px 20px 20px / 24px 24px 15px 15px;
    transform: translateY(2px);
  }
}

@keyframes wakeup {
  0% {
    height: 20px;
    border-radius: 35px 35px 20px 20px / 24px 24px 15px 15px;
    transform: translateY(2px);
  }
  100% {
    height: 28px;
    border-radius: 20px 20px 20px 20px / 24px 24px 15px 15px;
    transform: translateY(0);
  }
}

@keyframes eye {
  0% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  30% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  32% {
    top: -3px;
    width: 6px;
    height: 2px;
  }
  34% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  70% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  72% {
    top: -3px;
    width: 6px;
    height: 2px;
  }
  74% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  76% {
    top: -3px;
    width: 6px;
    height: 2px;
  }
  78% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  100% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
}

@keyframes eye_2 {
  0% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  10% {
    transform: translateX(0);
  }
  12% {
    transform: translateX(3px);
  }
  20% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  22% {
    top: -3px;
    width: 6px;
    height: 2px;
  }
  24% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  25% {
    transform: translateX(3px);
  }
  27% {
    transform: translateX(0);
  }
  74% {
    top: -4px;
    width: 4px;
    height: 4px;
    transform: translateX(0);
  }
  76% {
    top: -3px;
    width: 6px;
    height: 2px;
    transform: translateX(3px);
  }
  78% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  80% {
    top: -3px;
    width: 6px;
    height: 2px;
  }
  82% {
    top: -4px;
    width: 4px;
    height: 4px;
  }
  85% {
    transform: translateX(3px);
  }
  87% {
    transform: translateX(0);
  }
  100% {
    top: -4px;
    width: 4px;
    height: 4px;
    transform: translateX(0);
  }
}

@keyframes zzz {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
  }
  40% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
} 