/* ═══════════════════════════════════════════════════════
   VAULT — Cyber Bunny Mascot CSS  v3.0
   File: assets/css/bunny-mascot.css
═══════════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────────── */
#bunny-mascot-wrap {
  position: relative;
  width: 96px;
  height: 110px;          /* extra room for ears */
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
  background: transparent;
  border: none;
  padding: 0;
  /* ground shadow — the "floating" illusion */
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.55))
          drop-shadow(0 6px 4px rgba(0, 0, 0, 0.35));
}
@media (max-width: 360px) {
  #bunny-mascot-wrap { width: 72px; height: 84px; }
}

/* ── SVG ────────────────────────────────────────────── */
#bunny-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
  background: transparent;
}

/* ── "Tap me" hint label ────────────────────────────── */
#bunny-hint {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(165, 180, 252, 0.45);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* ── Idle animations ────────────────────────────────── */
@keyframes bunny-bob {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}
@keyframes bunny-breathe {
  0%, 100% { transform: scaleY(1) translateY(0); }
  50%       { transform: scaleY(1.025) translateY(-1px); }
}
@keyframes bunny-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94%            { transform: scaleY(0.07); }
}
@keyframes bunny-earL {
  0%, 84%, 100% { transform: rotate(0deg); }
  87%            { transform: rotate(-9deg); }
  93%            { transform: rotate(5deg); }
}
@keyframes bunny-earR {
  0%, 74%, 100% { transform: rotate(0deg); }
  77%            { transform: rotate(8deg); }
  84%            { transform: rotate(-4deg); }
}
@keyframes bunny-scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(400%); }
}
@keyframes bunny-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

#bunny-root  { animation: bunny-bob 4s ease-in-out infinite; transform-origin: 48px 55px; }
#bunny-body  { animation: bunny-breathe 3s ease-in-out infinite; transform-origin: 48px 60px; }
#bunny-eye-l { animation: bunny-blink 5s ease-in-out infinite; transform-origin: 35px 50px; }
#bunny-eye-r { animation: bunny-blink 5s ease-in-out 0.07s infinite; transform-origin: 61px 50px; }
#bunny-ear-l { animation: bunny-earL 7s ease-in-out infinite; transform-origin: 28px 24px; }
#bunny-ear-r { animation: bunny-earR 9.5s ease-in-out infinite; transform-origin: 68px 24px; }
#bunny-scan  { animation: bunny-scanline 3s linear infinite; }
#bunny-collar-dot { animation: bunny-pulse 2s ease-in-out infinite; }

/* ── Expression classes ─────────────────────────────── */
#bunny-mouth-happy   { display: none; }
#bunny-mouth-default { display: block; }
#bunny-mouth-sad     { display: none; }
#bunny-mouth-open    { display: none; }

.bunny-e-happy   #bunny-mouth-default { display: none; }
.bunny-e-happy   #bunny-mouth-happy   { display: block; }
.bunny-e-excited #bunny-mouth-default { display: none; }
.bunny-e-excited #bunny-mouth-open    { display: block; }
.bunny-e-sad     #bunny-mouth-default { display: none; }
.bunny-e-sad     #bunny-mouth-sad     { display: block; }

#bunny-blush-l,
#bunny-blush-r   { opacity: 0; transition: opacity 0.4s ease; }
.bunny-e-shy  #bunny-blush-l,
.bunny-e-shy  #bunny-blush-r,
.bunny-e-love #bunny-blush-l,
.bunny-e-love #bunny-blush-r { opacity: 1; }

#bunny-sparks { opacity: 0; transition: opacity 0.3s ease; }
.bunny-e-excited #bunny-sparks,
.bunny-e-love    #bunny-sparks { opacity: 1; }

#bunny-zzz { opacity: 0; transition: opacity 0.5s ease; }
.bunny-e-sleepy #bunny-zzz { opacity: 1; }

/* ── Reaction animations ────────────────────────────── */
@keyframes b-jump {
  0%   { transform: translateY(0) rotate(0deg); }
  30%  { transform: translateY(-16px) rotate(-4deg); }
  55%  { transform: translateY(-20px) rotate(4deg); }
  80%  { transform: translateY(-6px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes b-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-11deg); }
  40%       { transform: rotate(9deg); }
  60%       { transform: rotate(-7deg); }
  80%       { transform: rotate(5deg); }
}
@keyframes b-bounce {
  0%, 100% { transform: scale(1); }
  30%       { transform: scale(1.08, 0.92) translateY(4px); }
  60%       { transform: scale(0.96, 1.06) translateY(-12px); }
  80%       { transform: scale(1.03, 0.97) translateY(2px); }
}
@keyframes b-shy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40%       { transform: translateY(6px) rotate(-6deg); }
  70%       { transform: translateY(3px) rotate(3deg); }
}

.bunny-anim-jump   #bunny-root { animation: b-jump .7s ease forwards; }
.bunny-anim-wiggle #bunny-root { animation: b-wiggle .6s ease forwards; }
.bunny-anim-bounce #bunny-root { animation: b-bounce .65s ease forwards; }
.bunny-anim-shy    #bunny-root { animation: b-shy .8s ease forwards; }

/* ── Speech bubble ──────────────────────────────────── */
#bunny-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  transform-origin: bottom center;
  background: #0d0f1f;
  border: 1px solid rgba(99, 102, 241, 0.6);
  color: #a5b4fc;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3),
              inset 0 0 6px rgba(99, 102, 241, 0.08);
  z-index: 20;
  max-width: 160px;
  white-space: normal;
  text-align: center;
}
#bunny-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(99, 102, 241, 0.6);
}
#bunny-bubble.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #bunny-root, #bunny-body,
  #bunny-eye-l, #bunny-eye-r,
  #bunny-ear-l, #bunny-ear-r,
  #bunny-scan, #bunny-collar-dot {
    animation: none;
  }
}