/* 容器样式：固定在底部或放在 footer 中 */
.dog-container {
    width: 120px;
    height: 80px;
   
    overflow: visible;
    cursor: pointer;
    /* 如果放在固定底部，取消下面这行的注释 */
     position: fixed;
    bottom: 20px; left: 20px;  z-index: 9999;
}

/* --- 小狗身体部分 --- */
.dog {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 身体 */
.dog_body {
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 70px;
    height: 40px;
    background-color: #f4a460; /* 棕色 */
    border-radius: 20px 20px 10px 10px;
    z-index: 2;
}

/* 肚子斑点 */
.dog_body::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    width: 40px;
    height: 20px;
    background-color: #fceabb; /* 浅黄色 */
    border-radius: 50%;
}

/* 头 */
.head {
    position: absolute;
    bottom: 25px;
    right: 10px;
    width: 45px;
    height: 40px;
    background-color: #f4a460;
    border-radius: 15px;
    z-index: 3;
    transition: all 0.3s ease;
    transform-origin: bottom center;
}

/* 耳朵 (左) */
.ear-left {
    position: absolute;
    top: -7px;
    left: 5px;
    width: 12px;
    height: 18px;
    background-color: #8b4513; /* 深棕色 */
    border-radius: 10px;
    transform: rotate(-15deg);
    z-index: 2;
    transition: transform 0.3s ease;
}

/* 耳朵 (右) */
.ear-right {
    position: absolute;
    top: -7px;
    right: 5px;
    width: 12px;
    height: 18px;
    background-color: #8b4513;
    border-radius: 10px;
    transform: rotate(15deg);
    z-index: 2;
    transition: transform 0.3s ease;
}

/* 眼睛 */
.eye {
    position: absolute;
    top: 12px;
    width: 6px;
    height: 6px;
    background-color: #333;
    border-radius: 50%;
    animation: blink 4s infinite;
}

.eye.left { left: 10px; }
.eye.right { right: 10px; }

/* 鼻子 */
.nose {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 6px;
    background-color: #333;
    border-radius: 4px;
}

/* 嘴巴 */
.mouth {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 5px;
    border-bottom: 2px solid #333;
    border-radius: 0 0 10px 10px;
}

/* 尾巴 */
.tail {
    position: absolute;
    bottom: 15px;
    left: 10px;
    width: 30px;
    height: 8px;
    background-color: #f4a460;
    border-radius: 4px;
    transform-origin: right center;
    transform: rotate(-20deg);
    z-index: 1;
    animation: wag 1s infinite ease-in-out;
}

/* 腿 (简单表示) */
.leg {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 15px;
    background-color: #f4a460;
    border-radius: 5px;
    z-index: 1;
}
.leg.front { right: 25px; }
.leg.back { left: 25px; }

/* --- 动画定义 --- */

/* 摇尾巴 */
@keyframes wag {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
}

/* 眨眼 */
@keyframes blink {
    0%, 48%, 52%, 100% { height: 6px; top: 12px; }
    50% { height: 1px; top: 14px; }
}

/* --- 交互效果 (Hover) --- */

/* 鼠标悬停时抬头 */
.dog-container:hover .head {
    transform: translateY(-5px) rotate(-5deg);
    bottom: 30px;
}

/* 鼠标悬停时耳朵竖起一点 */
.dog-container:hover .ear-left {
    transform: rotate(-5deg);
}
.dog-container:hover .ear-right {
    transform: rotate(5deg);
}

/* 鼠标悬停时尾巴摇得更快 */
.dog-container:hover .tail {
    animation-duration: 0.3s;
}

/* 可选：添加一个小气泡提示 */
.dog-container::before {
    content: '汪!';
    position: absolute;
    top: -30px;
    right: 0;
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.dog-container:hover::before {
    opacity: 1;
    top: -40px;
}