.mascot {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.mascot-body {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1a2e23 0%, #0d1a14 100%);
    border: 2px solid var(--emerald);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.5s, background 0.5s;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.15), inset 0 0 10px rgba(16, 185, 129, 0.05);
    position: relative;
    animation: mascot-float 4s ease-in-out infinite;
    flex-shrink: 0;
}

.mascot-body:hover {
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.3), inset 0 0 14px rgba(16, 185, 129, 0.1);
}

.mascot-body:active { transform: scale(0.92); }

@keyframes mascot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.mascot-face {
    position: relative;
    width: 28px;
    height: 20px;
}

.mascot-eye {
    position: absolute;
    width: 6px;
    height: 7px;
    background: var(--emerald-light);
    border-radius: 3px;
    top: 2px;
    transition: all 0.2s;
    box-shadow: 0 0 5px rgba(52, 211, 153, 0.5);
}

.mascot-eye-l { left: 4px; }
.mascot-eye-r { right: 4px; }

.mascot-mouth {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    border-radius: 0 0 5px 5px;
    background: var(--emerald);
    transition: all 0.3s;
}

/* HP bar */
.mascot-hp {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.mascot.hurt .mascot-hp,
.mascot.dead .mascot-hp { opacity: 1; }

.mascot-hp-fill {
    height: 100%;
    width: 100%;
    background: var(--emerald-light);
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.mascot.hurt .mascot-hp-fill { background: #fbbf24; }
.mascot.critical .mascot-hp-fill { background: #f87171; }
.mascot.dead .mascot-hp-fill { width: 0% !important; background: #f87171; }

/* Talking */
.mascot.talking .mascot-mouth {
    height: 7px;
    width: 10px;
    border-radius: 50%;
    animation: mascot-talk 0.3s ease-in-out infinite alternate;
}

@keyframes mascot-talk {
    0% { height: 4px; width: 8px; }
    100% { height: 8px; width: 11px; }
}

/* Blink */
.mascot.blink .mascot-eye {
    height: 2px;
    top: 4px;
}

/* Hurt shake */
.mascot.shake .mascot-body {
    animation: mascot-shake 0.4s ease;
}

@keyframes mascot-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) rotate(-3deg); }
    40% { transform: translateX(4px) rotate(3deg); }
    60% { transform: translateX(-3px) rotate(-2deg); }
    80% { transform: translateX(2px) rotate(1deg); }
}

/* Dead state */
.mascot.dead .mascot-body {
    border-color: #f87171;
    background: linear-gradient(135deg, #2a1215 0%, #1a0a0c 100%);
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.15), inset 0 0 10px rgba(248, 113, 113, 0.05);
    animation: none;
    opacity: 0.7;
}

.mascot.dead .mascot-eye {
    background: #f87171;
    box-shadow: 0 0 5px rgba(248, 113, 113, 0.5);
    width: 8px;
    height: 2px;
    top: 4px;
    transform: rotate(45deg);
}

.mascot.dead .mascot-eye-r { transform: rotate(-45deg); }

.mascot.dead .mascot-mouth {
    width: 10px;
    height: 2px;
    border-radius: 0;
    background: #f87171;
    bottom: 2px;
}

.mascot.dead .mascot-body:hover {
    box-shadow: 0 0 24px rgba(248, 113, 113, 0.3);
    transform: scale(1.05);
}

/* Revive pulse */
.mascot.reviving .mascot-body {
    animation: mascot-revive 1s ease;
}

@keyframes mascot-revive {
    0% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 30px rgba(16, 185, 129, 0.5); }
    100% { transform: scale(1); opacity: 1; }
}

/* React jump */
.mascot.react .mascot-body {
    animation: mascot-jump 0.4s ease;
}

@keyframes mascot-jump {
    0% { transform: translateY(0); }
    30% { transform: translateY(-10px) rotate(-4deg); }
    60% { transform: translateY(-4px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0); }
}

/* Bubble */
.mascot-bubble {
    background: rgba(13, 26, 20, 0.94);
    border: 1px solid rgba(52, 211, 153, 0.25);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    max-width: 190px;
    min-width: 80px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
}

.mascot-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mascot-bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    margin-left: -5px;
    width: 10px;
    height: 10px;
    background: rgba(13, 26, 20, 0.94);
    border-right: 1px solid rgba(52, 211, 153, 0.25);
    border-bottom: 1px solid rgba(52, 211, 153, 0.25);
    transform: rotate(45deg);
}

.mascot.dead .mascot-bubble {
    border-color: rgba(248, 113, 113, 0.25);
    background: rgba(26, 10, 12, 0.94);
}

.mascot.dead .mascot-bubble::after {
    background: rgba(26, 10, 12, 0.94);
    border-color: rgba(248, 113, 113, 0.25);
}

/* Death countdown */
.mascot-death-timer {
    font-size: 10px;
    color: #f87171;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   EGG IN SIDEBAR
   ============================================ */
.mascot-egg-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mascot-egg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 58px;
    text-decoration: none;
    cursor: pointer;
    animation: egg-pulse 3s ease-in-out infinite;
    position: relative;
}

.mascot-egg-shell {
    width: 44px;
    height: 54px;
    background: linear-gradient(160deg, var(--emerald), #065f46);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(16,185,129,.2), inset 0 -10px 20px rgba(0,0,0,.2);
    transition: transform .15s;
}

.mascot-egg:hover .mascot-egg-shell { transform: scale(1.08); }

.mascot-egg-shine {
    position: absolute;
    top: 18%;
    left: 22%;
    width: 10px;
    height: 18px;
    background: rgba(255,255,255,.18);
    border-radius: 50%;
    transform: rotate(-20deg);
    pointer-events: none;
}

.mascot-egg-q {
    font-size: 22px;
    font-weight: 900;
    color: rgba(255,255,255,.25);
    pointer-events: none;
}

@keyframes egg-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ============================================
   SKIN: ROBOT (default green)
   ============================================ */
.mascot-skin-robot {
    border-color: var(--emerald);
    background: linear-gradient(135deg, #1a2e23 0%, #0d1a14 100%);
}
.mascot-skin-robot .mascot-eye { background: var(--emerald-light); box-shadow: 0 0 5px rgba(52,211,153,.5); }
.mascot-skin-robot .mascot-mouth { background: var(--emerald); }

/* ============================================
   SKIN: GHOST (purple, translucent, rounded top)
   ============================================ */
.mascot-skin-ghost {
    border-color: #a78bfa;
    background: linear-gradient(135deg, rgba(49,31,85,.85), rgba(26,15,50,.85));
    box-shadow: 0 0 16px rgba(167,139,250,.2), inset 0 0 10px rgba(167,139,250,.05);
    border-radius: 20px 20px 12px 12px;
    opacity: .88;
}
.mascot-skin-ghost .mascot-eye { background: #c4b5fd; box-shadow: 0 0 5px rgba(167,139,250,.5); }
.mascot-skin-ghost .mascot-mouth { background: #a78bfa; }
.mascot-skin-ghost:hover { box-shadow: 0 0 24px rgba(167,139,250,.35); }

/* ============================================
   SKIN: CAT (orange, CSS ears)
   ============================================ */
.mascot-skin-cat {
    border-color: #fb923c;
    background: linear-gradient(135deg, #3b2010, #1f1008);
    box-shadow: 0 0 16px rgba(251,146,60,.2);
}
.mascot-skin-cat::before, .mascot-skin-cat::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 12px;
    height: 12px;
    background: #fb923c;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.mascot-skin-cat::before { left: 4px; transform: rotate(-10deg); }
.mascot-skin-cat::after { right: 4px; transform: rotate(10deg); }
.mascot-skin-cat .mascot-eye { background: #fdba74; box-shadow: 0 0 5px rgba(251,146,60,.5); border-radius: 50%; }
.mascot-skin-cat .mascot-mouth { background: #fb923c; border-radius: 0 0 3px 3px; width: 6px; }
.mascot-skin-cat:hover { box-shadow: 0 0 24px rgba(251,146,60,.35); }

/* ============================================
   SKIN: DEMON (red, CSS horns)
   ============================================ */
.mascot-skin-demon {
    border-color: #ef4444;
    background: linear-gradient(135deg, #3b1010, #1a0808);
    box-shadow: 0 0 16px rgba(239,68,68,.2);
}
.mascot-skin-demon::before, .mascot-skin-demon::after {
    content: '';
    position: absolute;
    top: -10px;
    width: 8px;
    height: 14px;
    background: #ef4444;
    border-radius: 4px 4px 0 0;
}
.mascot-skin-demon::before { left: 6px; transform: rotate(-15deg); }
.mascot-skin-demon::after { right: 6px; transform: rotate(15deg); }
.mascot-skin-demon .mascot-eye { background: #fca5a5; box-shadow: 0 0 6px rgba(239,68,68,.6); }
.mascot-skin-demon .mascot-mouth { background: #ef4444; }
.mascot-skin-demon:hover { box-shadow: 0 0 24px rgba(239,68,68,.35); }

/* ============================================
   SKIN: ALIEN (cyan, CSS antenna)
   ============================================ */
.mascot-skin-alien {
    border-color: #22d3ee;
    background: linear-gradient(135deg, #0c2d30, #061a1c);
    box-shadow: 0 0 16px rgba(34,211,238,.2);
    border-radius: 22px 22px 14px 14px;
}
.mascot-skin-alien::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 10px;
    background: #22d3ee;
    border-radius: 2px;
}
.mascot-skin-alien::after {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #22d3ee;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34,211,238,.6);
}
.mascot-skin-alien .mascot-eye {
    background: #67e8f9;
    box-shadow: 0 0 5px rgba(34,211,238,.5);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.mascot-skin-alien .mascot-mouth { background: #22d3ee; width: 6px; height: 3px; border-radius: 50%; }
.mascot-skin-alien:hover { box-shadow: 0 0 24px rgba(34,211,238,.35); }

/* ============================================
   SKIN: SKELETON (white/grey, hollow eyes)
   ============================================ */
.mascot-skin-skeleton {
    border-color: #d1d5db;
    background: linear-gradient(135deg, #1f2023, #111114);
    box-shadow: 0 0 16px rgba(209,213,219,.15);
}
.mascot-skin-skeleton .mascot-eye {
    background: transparent;
    border: 2px solid #d1d5db;
    box-shadow: 0 0 4px rgba(209,213,219,.3);
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.mascot-skin-skeleton .mascot-mouth {
    background: transparent;
    border: 1.5px solid #d1d5db;
    width: 12px;
    height: 3px;
    border-radius: 0;
}
.mascot-skin-skeleton:hover { box-shadow: 0 0 24px rgba(209,213,219,.25); }

/* ============================================
   SKIN: PUMPKIN (orange, toothy mouth)
   ============================================ */
.mascot-skin-pumpkin {
    border-color: #f97316;
    background: linear-gradient(135deg, #3b2008, #1f1004);
    box-shadow: 0 0 16px rgba(249,115,22,.2);
    border-radius: 18px;
}
.mascot-skin-pumpkin::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #22c55e;
    border-radius: 2px;
}
.mascot-skin-pumpkin .mascot-eye {
    background: #fdba74;
    box-shadow: 0 0 6px rgba(249,115,22,.5);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
    width: 7px;
    height: 7px;
}
.mascot-skin-pumpkin .mascot-mouth {
    background: #f97316;
    width: 14px;
    height: 5px;
    border-radius: 0;
    clip-path: polygon(0% 0%, 15% 100%, 30% 0%, 45% 100%, 60% 0%, 75% 100%, 90% 0%, 100% 100%, 100% 0%, 0% 0%);
}
.mascot-skin-pumpkin:hover { box-shadow: 0 0 24px rgba(249,115,22,.35); }

/* ============================================
   SKIN: PIXEL (neon blue, square eyes)
   ============================================ */
.mascot-skin-pixel {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #0f1a3b, #080d1f);
    box-shadow: 0 0 16px rgba(59,130,246,.2);
    border-radius: 6px;
}
.mascot-skin-pixel .mascot-eye {
    background: #60a5fa;
    box-shadow: 0 0 5px rgba(59,130,246,.5);
    border-radius: 1px;
    width: 6px;
    height: 6px;
}
.mascot-skin-pixel .mascot-mouth {
    background: #3b82f6;
    border-radius: 1px;
    width: 10px;
    height: 3px;
}
.mascot-skin-pixel:hover { box-shadow: 0 0 24px rgba(59,130,246,.35); }

/* Pet page link in sidebar */
.mascot-pet-link {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    opacity: .6;
    transition: opacity .2s, color .2s;
}
.mascot-pet-link:hover {
    opacity: 1;
    color: var(--emerald);
}
