/* 微信场景层 */
.wechat-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 使用 100% 而不是 100vh 避免地址栏跳动 */
    background-color: #ededed;
    z-index: 9000; /* 高于普通视频层 */
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* 防止滚动穿透 */
}

.wx-header {
    background-color: #ededed;
    height: 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid #dcdcdc;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    /* 适配刘海屏 */
    padding-top: env(safe-area-inset-top);
    height: calc(45px + env(safe-area-inset-top));
    box-sizing: border-box; 
    z-index: 9001;
}

.wx-back { font-size: 18px; color: #181818; }
.wx-more { font-size: 20px; letter-spacing: 2px; }

.wx-chat-area {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    -webkit-overflow-scrolling: touch;
}

.wx-time {
    text-align: center;
    color: #b2b2b2;
    font-size: 12px;
    margin-bottom: 5px;
}

.wx-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    opacity: 0; /* 动画初始状态 */
    transform: translateY(10px);
}

.wx-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px; /* 微信头像是圆角矩形 */
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #fff;
    flex-shrink: 0;
}

.wx-content {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.wx-name {
    font-size: 12px;
    color: #b2b2b2;
    margin-bottom: 4px;
}

.wx-bubble {
    background-color: #fff;
    padding: 9px 13px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.5;
    color: #000;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    /* 长文本换行处理 */
    word-break: break-all;
    word-wrap: break-word;
}

/* 气泡小箭头 */
.wx-bubble::before {
    content: '';
    position: absolute;
    top: 14px;
    left: -5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 6px 5px 0;
    border-color: transparent #fff transparent transparent;
}

.wx-bubble.video {
    padding: 0; /* 视频气泡无内边距 */
    background-color: transparent;
    border-radius: 4px;
    overflow: hidden;
    max-width: 160px;
    cursor: pointer;
    position: relative;
}
.wx-bubble.video::before {
    display: none; /* 视频不显示白色箭头，通常是图片 */
}

.wx-video-thumb {
    width: 100%;
    display: block;
    border-radius: 5px;
}

.wx-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    border: 1px solid #fff;
}
.wx-play-icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 11px;
    border-left: 10px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}


/* 动画类 */
.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.8s; } /* 稍晚一点模仿输入延迟 */
.delay-3 { animation-delay: 1.6s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 模拟手指 */
.hand-cursor {
    position: fixed;
    top: 0;
    left: 0;
    font-size: 40px;
    z-index: 9999;
    pointer-events: none; /* 不阻挡点击 */
    display: none; /* JS控制显示 */
    will-change: transform;
}

.hand-cursor.move-active {
    transition: transform 1.5s ease-out;
}

.hand-cursor.click-active {
    transition: transform 0.2s ease-in-out;
}
