/* ==========================================================================
   CatKeyLab - Interactive Cat Mascot Component Styles (Ginger Tabby Upgrade)
   ========================================================================== */

.mascot-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  user-select: none;
  pointer-events: none;
}

/* Speech Bubble (Pinned Safely Inside Viewport - No Overflow!) */
.mascot-speech-bubble {
  position: absolute;
  bottom: 115%;
  left: 0;
  transform: scale(0.85);
  transform-origin: bottom left;
  background: #1e293b;
  color: #ffffff;
  border: 2px solid #f97316;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(249, 115, 22, 0.3);
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 220px;
  white-space: pre-line;
  word-wrap: break-word;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  z-index: 1005;
}

.mascot-speech-bubble.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.mascot-speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 36px;
  border-width: 7px;
  border-style: solid;
  border-color: #f97316 transparent transparent transparent;
}

/* Cat Character Canvas Frame */
.cat-character {
  width: 80px;
  height: 80px;
  position: relative;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.15s ease-out;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.cat-character:hover {
  transform: translateZ(0) scale(1.04);
}

/* Cat Head Surface - Vibrant Ginger Tabby Orange */
.cat-head {
  width: 74px;
  height: 66px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border: 3px solid #7c2d12;
  border-radius: 42px 42px 34px 34px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 2px 6px rgba(255, 255, 255, 0.3);
  overflow: visible;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Cat Ears with Pink Inner Pads (Symmetrically Centered) */
.cat-ear {
  position: absolute;
  top: -14px;
  width: 24px;
  height: 26px;
  background: #ea580c;
  border: 2.5px solid #7c2d12;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transition: transform 0.15s ease;
  z-index: -1;
}

.cat-ear::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 14px;
  background: #fda4af; /* Cute Pink Inner Ear */
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.cat-ear-left {
  left: 6px;
  transform: rotate(-14deg);
  transform-origin: bottom center;
}

.cat-ear-right {
  right: 6px;
  transform: rotate(14deg);
  transform-origin: bottom center;
}

.cat-character.play-mode .cat-ear-left {
  transform: rotate(-26deg) translateY(-4px);
}

.cat-character.play-mode .cat-ear-right {
  transform: rotate(26deg) translateY(-4px);
}

/* Cat Eyes Area - Vibrant Emerald Irises */
.cat-eyes-row {
  display: flex;
  justify-content: space-between;
  padding: 0 11px;
  margin-top: 14px;
}

.cat-sclera {
  width: 22px;
  height: 22px;
  background: #10b981; /* Glowing Emerald Cat Eye Iris */
  border-radius: 50%;
  border: 2px solid #064e3b;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6), inset 0 0 4px rgba(255, 255, 255, 0.4);
}

.cat-pupil {
  width: 7px;
  height: 15px;
  background: #090d16; /* Black slit pupil */
  border-radius: 50%;
  transition: height 0.15s ease, width 0.15s ease;
}

.cat-character.play-mode .cat-pupil {
  width: 15px;
  height: 15px; /* Dilated play pupils! */
  background: #020617;
}

/* Eyelids / Blinking */
.cat-eyelid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ea580c;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.1s ease;
  z-index: 5;
}

.cat-character.blinking .cat-eyelid {
  transform: scaleY(1);
}

.cat-character.squint .cat-eyelid {
  transform: scaleY(0.40);
}

/* Cat Snout, Nose & Natural Fanned Whiskers */
.cat-snout {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cat-nose {
  width: 9px;
  height: 7px;
  background: #f43f5e; /* Vibrant Pink Nose */
  border-radius: 50% 50% 40% 40%;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
}

.cat-whiskers {
  position: absolute;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  z-index: 8;
}

.cat-whiskers-left {
  left: -18px;
  align-items: flex-end;
}

.cat-whiskers-right {
  right: -18px;
  align-items: flex-start;
}

.whisker-line {
  height: 1.5px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  border-radius: 1px;
}

/* Sleek Flattened Cat Whiskers */
.cat-whiskers-left .whisker-top { width: 22px; transform: none; }
.cat-whiskers-left .whisker-mid { width: 25px; transform: none; }
.cat-whiskers-left .whisker-bot { width: 22px; transform: none; }

.cat-whiskers-right .whisker-top { width: 22px; transform: none; }
.cat-whiskers-right .whisker-mid { width: 25px; transform: none; }
.cat-whiskers-right .whisker-bot { width: 22px; transform: none; }

.cat-character.purring .whisker-line {
  animation: vibrate-whisker 0.15s infinite;
}

@keyframes vibrate-whisker {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.5px); }
}

/* Cat Paws Reaching & Tracking Cursor */
.cat-paw {
  position: absolute;
  bottom: -4px;
  width: 20px;
  height: 18px;
  background: #fff7ed; /* White paw pads */
  border: 2.5px solid #7c2d12;
  border-radius: 10px 10px 6px 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.08s ease-out;
  pointer-events: none;
  z-index: 10;
}

.cat-paw::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 6px;
  background: #fda4af; /* Pink Paw Pad */
  border-radius: 50%;
}

.cat-paw-left { left: 8px; }
.cat-paw-right { right: 8px; }

/* Nibbles Collar & Bell */
.cat-collar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 8px;
  background: linear-gradient(90deg, #e11d48, #f43f5e);
  border: 1.5px solid #881337;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}

.cat-bell {
  font-size: 0.7rem;
  margin-top: 5px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  animation: jingle-bell 2.5s ease-in-out infinite;
}

@keyframes jingle-bell {
  0%, 80%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(-12deg); }
  90% { transform: rotate(12deg); }
  95% { transform: rotate(-6deg); }
}

/* Floating Heart / Paw Print Particles */
.floating-particle {
  position: absolute;
  font-size: 1.3rem;
  pointer-events: none;
  animation: float-up-fade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 1008;
}

@keyframes float-up-fade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translateY(-55px) scale(1.3);
  }
}

/* Interactive Throwable Yarn Ball Toy 🧶 */
.yarn-ball-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1002;
}

.yarn-ball-toy {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f43f5e, #be123c);
  border: 3px solid #881337;
  box-shadow: 0 8px 20px rgba(190, 18, 60, 0.4), inset 0 2px 6px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  will-change: transform;
}

.yarn-ball-toy:hover {
  box-shadow: 0 10px 28px rgba(244, 63, 94, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.7);
}

.yarn-ball-toy.dragging {
  cursor: grabbing;
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.7);
}

/* Interactive Cat Food Bowl & Draggable Fish 🥣🐟 */
.food-bowl-container {
  position: fixed;
  bottom: 22px;
  right: 90px;
  z-index: 1003;
  pointer-events: auto;
}

.food-bowl-toy {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #0284c7, #0369a1);
  border: 3px solid #075985;
  box-shadow: 0 8px 20px rgba(3, 105, 161, 0.4), inset 0 2px 6px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.food-bowl-toy:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.6);
}

.bowl-fish-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.draggable-fish {
  position: fixed;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  pointer-events: none;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.draggable-fish.eaten {
  transform: scale(0) rotate(180deg);
  opacity: 0;
}

.draggable-fish.dropping {
  transform: translateY(40px) scale(0.5);
  opacity: 0;
}
