/* 小狗容器 */
#dog-container {
    position: absolute;
    cursor: pointer;
    z-index: 500;
    transition: transform 0.5s ease-in-out; /* 增加平滑的移动效果 */
}

/* 小狗图片 */
#dog-image {
    display: block;
    width: 100px; /* 设定一个固定宽度，可以根据需要调整 */
    height: 100px; /* 高度与宽度相等，确保是圆形 */
    object-fit: cover; /* 保证图片被裁剪填充，不变形 */
    border-radius: 50%; /* 使图片变为圆形 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 加入轻微的阴影效果 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 增加点击和悬停效果 */
}

/* 小狗图片点击时的动画 */
#dog-image:hover {
    transform: scale(1.1); /* 略微放大，增加互动性 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* 提升阴影 */
}

/* 欢迎信息弹窗 */
#welcome-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 15px; /* 更柔和的圆角 */
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease-in-out; /* 更流畅的过渡效果 */
}

/* 欢迎信息显示状态 */
#welcome-message.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1.05); /* 放大显示效果 */
}

#welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #007bff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 使用现代感更强的字体 */
}

#welcome-message p {
    font-size: 1.2rem;
    color: #333;
}

/* 动态福字样式 */
.fu-char {
    position: absolute;
    font-size: 30px;
    color: #ff6347;
    transform: rotate(180deg); /* 初始为倒着的“福”字 */
    opacity: 0;
    animation: fuAnimation 5s ease-in-out infinite;
    font-family: 'Orbitron', 'Bebas Neue', 'Zilla Slab', sans-serif; /* 使用 Orbitron、Bebas Neue 和 Zilla Slab */
    font-weight: bold; /* 让部分福字加粗 */
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 为“福”字加上阴影，增强层次感 */
}

/* 福字动画效果 */
@keyframes fuAnimation {
    0% {
        opacity: 0;
        transform: translateY(-50px) rotate(180deg); /* 动画开始时消失并从上方进入 */
    }
    50% {
        opacity: 1;
        transform: translateY(0) rotate(180deg); /* 动画中间为可见且位置回归正常 */
    }
    100% {
        opacity: 0;
        transform: translateY(50px) rotate(180deg); /* 动画结束时消失并从下方退出 */
    }
}

/* 更自然的渐变背景动画 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 响应式设计：确保页面适应不同屏幕 */
@media (max-width: 768px) {
    /* 欢迎信息调整为小屏幕适应 */
    #welcome-message {
        padding: 20px;
        font-size: 1rem;
    }

    #dog-image {
        width: 80px; /* 小屏幕时减小图片大小 */
        height: 80px;
    }

    .fu-char {
        font-size: 20px; /* 小屏幕时减小“福”字大小 */
    }
}

@media (max-width: 480px) {
    /* 在更小的屏幕下进一步调整 */
    #dog-image {
        width: 60px;
        height: 60px;
    }

    #welcome-message h2 {
        font-size: 1.5rem; /* 进一步减小字体大小 */
    }

    #welcome-message p {
        font-size: 1rem;
    }

    .fu-char {
        font-size: 18px; /* 更小的字体 */
    }
}
