/* Interactive Cat Styles */
.cat-component {
  position: relative;
  margin-top: 100px;
}

.cat * {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.cat, .ears, .eyes, .muzzle, .body, .paw, .tail, .tail-segment {
  position: relative;
}

.head, .body, .paw, .tail-segment {
  background-color: #6b7280; /* gray-500 to match dark theme */
}

.left { 
  float: left; 
}

.right { 
  float: right; 
}

.cat {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cat:hover {
  transform: scale(1.02);
}

.head {
  width: 100px;
  height: 90px;
  border-radius: 50%;
  z-index: 100;
}

.ears {
  top: -20px;
  z-index: -100;
}

.ear {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 50px solid #6b7280; /* gray-500 */
}

.ear.left {
  transform: rotate(-20deg) translateX(-10px);
  --ear-rot: -20deg;
  --ear-x: -10px;
}

.ear.right {
  transform: rotate(20deg) translateX(10px);
  --ear-rot: 20deg;
  --ear-x: 10px;
}

.eyes {
  top: -18px;
  width: 60%;
}

.eye {
  width: 16px;
  height: 4px;
  border-radius: 2px;
  background-color: #60a5fa; /* blue-400 to match theme */
  animation: none;
  top: 2px;
  transition: background 0.2s, height 0.2s;
}

.muzzle {
  top: 50px;
}

.nose {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #374151; /* gray-700 */
}

.body {
  width: 200px;
  height: 120px;
  border-top-left-radius: 200px;
  border-top-right-radius: 200px;
  top: -75px;
  left: 90px;
  z-index: -10;
  animation: breathe 4s infinite ease-in-out;
}

.paw {
  height: 30px;
  width: 50px;
  border-radius: 25px;
  left: -100px;
  top: 90px;
  background-color: #6b7280; /* gray-500 */
}

.tail {
  left: 180px;
  top: -100px;
}

.tail-segment {
  height: 20px;
  width: 30px;
  border-radius: 25px;
  top: 0px;
  left: 10px;
  animation: none;
  background-color: #6b7280; /* gray-500 */
}

.zzz {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-family: Arial, sans-serif;
  color: #e5e7eb; /* gray-200 */
  opacity: 0;
  animation: snooze 3s infinite;
}

.zzz.z2 {
  animation-delay: 1s;
  font-size: 24px;
  top: -30px;
}

.zzz.z3 {
  animation-delay: 2s;
  font-size: 28px;
  top: -40px;
}

.nap-text {
  bottom: -190px; /* adjust this to control height above the cat */
  left: 50%;
  transform: translateX(30%);
  z-index: 5;
  pointer-events: none; /* so clicks pass through */
  margin-top: 20px;
  text-align: center;
  font-size: 1.3rem;
  font-family: 'Georgia', serif;
  color: #d1d5db; /* gray-300 */
  font-style: italic;
  opacity: 0.8;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  left: 0;
}

/* Cat Animations */
@keyframes breathe {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(1.05); }
  100% { transform: scaleY(1); }
}

@keyframes snooze {
  0% { opacity: 0; transform: translateX(-50%) translateY(0) scale(0.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(1.2); }
}

@keyframes tailFlick {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(10deg); }
}

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

@keyframes eyeOpen {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.2); }
}

.cat-animate {
  animation: cat-lift-rotate 0.7s cubic-bezier(.4,2,.6,1) forwards;
}

@keyframes cat-lift-rotate {
  0% { transform: none; }
  20% { transform: translateY(-18px) rotate(-6deg); }
  60% { transform: translateY(-18px) rotate(6deg); }
  100% { transform: none; }
}

.tail-flick .tail-segment {
  animation: tail-flick 0.8s ease-in-out 0s 1 alternate;
}

@keyframes tail-flick {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(30deg); }
  75% { transform: rotate(-20deg); }
  100% { transform: rotate(0deg); }
}

.ear-twitch {
  animation: ear-twitch 0.3s cubic-bezier(.4,2,.6,1) 0s 2 alternate;
}

@keyframes ear-twitch {
  0% { transform: rotate(var(--ear-rot,0deg)) translateX(var(--ear-x,0px)); }
  30% { transform: rotate(calc(var(--ear-rot,0deg) + 18deg)) translateX(var(--ear-x,0px)); }
  60% { transform: rotate(var(--ear-rot,0deg)) translateX(var(--ear-x,0px)); }
  100% { transform: rotate(var(--ear-rot,0deg)) translateX(var(--ear-x,0px)); }
}

.eye-awake, .eye-open {
  background: radial-gradient(circle at 8px 10px, #fff 60%, #fbbf24 80%, #92400e 100%);
  height: 22px !important;
  width: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #1f2937, 0 2px 8px 0 #fef3c7;
  border: 2px solid #1f2937;
  position: relative;
  transition: background 0.2s, height 0.2s;
}

.eye-awake::after {
  content: '';
  display: block;
  position: absolute;
  left: 7px;
  top: 8px;
  width: 5px;
  height: 5px;
  background: #1f2937;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(0,0,0,0.4), 2px 2px 0 0 #fff;
}

.eye-awake::before {
  content: '';
  display: block;
  position: absolute;
  left: 11px;
  top: 12px;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.9;
}
