/* 全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 禁止手机端长按选中文字 */
    user-select: none; 
    -webkit-user-select: none;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* 禁止滚动 */
    font-family: "Microsoft YaHei", sans-serif;
    /* 背景色：浅粉到浅紫的渐变 */
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); 
    background-image: linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);
}

/* 屏幕层级管理 */
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none; /* 默认隐藏 */
    opacity: 0;
    transition: opacity 1s;
}

.screen.active {
    display: flex;
    opacity: 1;
    z-index: 10;
}

/* 1. 开场页 */
#start-screen {
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.center-box {
    text-align: center;
}

.center-box h1 { font-size: 60px; margin-bottom: 20px; animation: bounce 2s infinite; }
.center-box p { color: #888; margin-bottom: 30px; font-size: 18px; }

button {
    padding: 12px 30px;
    font-size: 18px;
    border: none;
    border-radius: 25px;
    background: #ff758c;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.4);
    cursor: pointer;
    transition: transform 0.1s;
}
button:active { transform: scale(0.95); }

/* 2. 游戏页 - 背景文字墙 */
#text-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* 让文字点不到，只能点球 */
}

.floating-text {
    position: absolute;
    color: rgba(255, 126, 179, 0.6); /* 半透明粉色 */
    font-weight: bold;
    white-space: nowrap;
    animation: floatUp 15s linear infinite;
    bottom: -50px; /* 从屏幕下方生成 */
}

/* 3. 游戏页 - 交互球 */
#heart-ball {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #ff9a9e, #fecfef);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(255, 100, 100, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    z-index: 100; /* 保证在最上层 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.2s, top 0.5s ease, left 0.5s ease;
}

#heart-ball:active {
    transform: translate(-50%, -50%) scale(0.9);
}

/* 进度条 */
.progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.5);
    z-index: 50;
}
#progress-bar {
    width: 0%;
    height: 100%;
    background: #ff758c;
    transition: width 0.3s;
    border-radius: 0 3px 3px 0;
}

/* 4. 结果弹窗 */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    width: 85%;
    max-width: 400px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content h2 { color: #333; margin-bottom: 10px; }
.modal-content p { color: #666; margin-bottom: 20px; }
.wechat-box {
    background: #f0f2f5;
    padding: 15px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #444;
    margin-bottom: 20px;
    border: 2px dashed #ccc;
}
.hint { font-size: 12px; color: #999; margin-top: 10px; }

/* 动画定义 */
@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) rotate(20deg); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 新增：引导小字的样式 */
#click-hint {
    position: absolute;
    bottom: 20px; /* 在球的底部 */
    font-size: 12px;
    opacity: 0.8;
    animation: blink 1.5s infinite; /* 让它闪烁 */
}

/* 定义闪烁动画 */
@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* 新增：点击反馈的“谢谢”气泡 */
.feedback-bubble {
    position: fixed; /* 不随页面滚动 */
    color: #ff4757; /* 鲜艳的红色 */
    font-weight: bold;
    font-size: 24px;
    pointer-events: none; /* 也就是点不到它 */
    animation: floatUpFade 1s forwards; /* 1秒后消失 */
    z-index: 999; /* 保证在最上面 */
    text-shadow: 0 2px 5px rgba(255,255,255,0.8);
}

/* 定义气泡飘走动画 */
@keyframes floatUpFade {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}