.container { position: relative; width: 100vw; height: 100vh; overflow: hidden; background: #0d0d1a; } /* 多树分屏 */ .tree-swiper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .tree-page { position: relative; width: 100%; height: 100%; } /* 背景图撑满全屏 */ .tree-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* 萤火虫 */ .firefly { position: absolute; z-index: 3; border-radius: 50%; background: #ffd700; box-shadow: 0 0 8px #ffd700, 0 0 14px #ffd700; animation: twinkle 3s ease-in-out infinite; pointer-events: none; } /* 边缘暗角 */ .vignette { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(120% 90% at 50% 30%, transparent 45%, rgba(13, 13, 26, 0.75) 100%); pointer-events: none; z-index: 2; } /* 许愿便签 */ .wish-tag { position: absolute; z-index: 5; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; } .wish-tag.new { animation: tag-drop 0.7s cubic-bezier(0.22, 1, 0.36, 1); } .tag-sway { display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: sway 4s ease-in-out infinite; } .tag-string { width: 2rpx; height: 36rpx; } .tag-knot { width: 12rpx; height: 12rpx; border-radius: 50%; margin-top: -2rpx; } .tag-content { margin-top: 8rpx; padding: 12rpx 16rpx; border-radius: 12rpx; width: 160rpx; box-sizing: border-box; } .tag-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 19rpx; font-weight: 500; color: #2a2a3a; line-height: 1.4; word-break: break-all; } .tag-author { display: block; font-size: 15rpx; color: rgba(42, 42, 58, 0.7); margin-top: 6rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 弹幕层 */ .danmaku-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: hidden; } .danmaku-item { position: absolute; left: 0; white-space: nowrap; font-size: 24rpx; color: rgba(255, 255, 255, 0.65); padding: 6rpx 24rpx; border-radius: 30rpx; background: rgba(13, 13, 26, 0.35); text-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.6); animation-name: danmaku; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; will-change: transform; } .danmaku-item.paid { color: #ffd700; background: rgba(60, 40, 0, 0.35); } /* 顶部 */ .header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: 40rpx 40rpx 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; } .subtitle { font-size: 22rpx; letter-spacing: 8rpx; color: rgba(255, 215, 0, 0.85); text-shadow: 0 2rpx 10rpx rgba(255, 215, 0, 0.4); } /* 顶级位置轮播 */ .top-swiper { width: 100%; height: 64rpx; margin-top: 16rpx; pointer-events: auto; } .top-item { display: flex; align-items: center; justify-content: center; gap: 12rpx; height: 64rpx; padding: 0 32rpx; border-radius: 32rpx; background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.12)); border: 1rpx solid rgba(255, 215, 0, 0.35); } .top-crown { font-size: 26rpx; } .top-text { font-size: 24rpx; color: #ffd700; font-weight: 500; max-width: 420rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .top-author { font-size: 20rpx; color: rgba(255, 215, 0, 0.7); } /* 分屏指示点 */ .page-dots { position: absolute; bottom: 190rpx; left: 0; right: 0; display: flex; justify-content: center; gap: 12rpx; z-index: 10; pointer-events: none; } .dot { width: 12rpx; height: 12rpx; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transition: all 0.3s; } .dot.active { width: 32rpx; border-radius: 8rpx; background: rgba(255, 215, 0, 0.9); } /* 许愿按钮(树根附近,单行) */ .action-bar { position: absolute; bottom: calc(48rpx + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; z-index: 20; } .btn-wish { display: flex; flex-direction: row; align-items: center; justify-content: center; white-space: nowrap; gap: 12rpx; background: linear-gradient(135deg, #c41e3a 0%, #e74c3c 50%, #ff6b6b 100%); color: #fff; font-size: 32rpx; font-weight: bold; line-height: 1; padding: 24rpx 72rpx; border-radius: 60rpx; border: none; box-shadow: 0 10rpx 40rpx rgba(196, 30, 58, 0.5), 0 0 50rpx rgba(255, 107, 107, 0.25); } .btn-wish::after { border: none; } .btn-wish:active { transform: scale(0.95); } .btn-wish .icon { font-size: 36rpx; } .btn-wish .btn-text { white-space: nowrap; } /* 便签详情弹窗 */ .detail-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; } .detail-mask { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); } .note-card { position: relative; width: 560rpx; padding: 64rpx 48rpx 40rpx; background: linear-gradient(160deg, #fff8e7 0%, #ffedc8 100%); border-radius: 16rpx; box-shadow: 0 20rpx 80rpx rgba(0, 0, 0, 0.5); transform: rotate(-1.5deg); animation: tag-drop 0.5s cubic-bezier(0.22, 1, 0.36, 1); } /* 顶级便签:金色卡片,与普通便签区分 */ .note-card.top-note { background: linear-gradient(160deg, #fff3c4 0%, #ffd97a 100%); border: 2rpx solid rgba(255, 200, 60, 0.8); box-shadow: 0 20rpx 80rpx rgba(0, 0, 0, 0.5), 0 0 60rpx rgba(255, 215, 0, 0.35); } .note-string { position: absolute; top: -48rpx; left: 50%; width: 2rpx; height: 48rpx; background: linear-gradient(to bottom, transparent, #b8860b); } .note-knot { position: absolute; top: -10rpx; left: 50%; width: 16rpx; height: 16rpx; margin-left: -8rpx; border-radius: 50%; } .note-badge { display: inline-block; font-size: 22rpx; color: #8b5a00; background: rgba(255, 255, 255, 0.6); border: 1rpx solid rgba(180, 120, 0, 0.4); border-radius: 24rpx; padding: 6rpx 20rpx; margin-bottom: 24rpx; } .note-text { display: block; font-size: 34rpx; color: #3a2a1a; line-height: 1.8; word-break: break-all; } .note-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 36rpx; } .note-author { font-size: 26rpx; color: rgba(58, 42, 26, 0.75); } .note-date { font-size: 22rpx; color: rgba(58, 42, 26, 0.5); } /* 许愿弹窗 */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; } .modal-mask { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); } .modal-content { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%); border-radius: 40rpx 40rpx 0 0; max-height: 85vh; overflow: hidden; border-top: 2rpx solid rgba(255, 215, 0, 0.3); } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 40rpx; border-bottom: 1rpx solid rgba(255, 255, 255, 0.1); } .modal-title { font-size: 36rpx; font-weight: bold; color: #ffd700; } .modal-close { font-size: 56rpx; color: rgba(255, 255, 255, 0.5); padding: 10rpx; line-height: 1; } .modal-body { padding: 40rpx; max-height: 60vh; overflow-y: auto; } /* 类型选择 */ .type-selector { display: flex; gap: 24rpx; margin-bottom: 40rpx; } .type-item { flex: 1; padding: 32rpx; border: 2rpx solid rgba(255, 255, 255, 0.2); border-radius: 20rpx; text-align: center; background: rgba(255, 255, 255, 0.05); } .type-item.active { border-color: #ffd700; background: rgba(255, 215, 0, 0.1); } .type-name { display: block; font-size: 32rpx; font-weight: bold; color: #fff; margin-bottom: 12rpx; } .type-desc { font-size: 24rpx; color: rgba(255, 255, 255, 0.6); } /* 输入框 */ .wish-input { width: 100%; height: 240rpx; padding: 28rpx; border: 2rpx solid rgba(255, 255, 255, 0.2); border-radius: 20rpx; font-size: 30rpx; box-sizing: border-box; background: rgba(255, 255, 255, 0.08); color: #fff; } .input-count { text-align: right; font-size: 24rpx; color: rgba(255, 255, 255, 0.5); margin-top: 16rpx; } /* 商品选择 */ .product-section { margin-top: 40rpx; } .product-title { font-size: 32rpx; font-weight: bold; color: #ffd700; margin-bottom: 24rpx; } .product-list { display: flex; flex-direction: column; gap: 20rpx; } .product-item { display: flex; align-items: center; justify-content: space-between; padding: 32rpx; border: 2rpx solid rgba(255, 255, 255, 0.15); border-radius: 20rpx; background: rgba(255, 255, 255, 0.05); } .product-item.active { border-color: #ffd700; background: rgba(255, 215, 0, 0.1); } .product-name { font-size: 32rpx; font-weight: bold; color: #fff; } .product-desc { font-size: 24rpx; color: rgba(255, 255, 255, 0.6); margin-top: 8rpx; } .product-price { font-size: 40rpx; font-weight: bold; color: #ffd700; } /* 底部按钮 */ .modal-footer { display: flex; gap: 24rpx; padding: 40rpx; border-top: 1rpx solid rgba(255, 255, 255, 0.1); } .modal-footer button { flex: 1; padding: 28rpx; border-radius: 60rpx; font-size: 32rpx; font-weight: bold; white-space: nowrap; } .btn-outline { background: transparent; border: 2rpx solid rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.8); } .btn-primary { background: linear-gradient(135deg, #c41e3a 0%, #e74c3c 100%); color: #fff; border: none; } /* 动画 */ @keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } } @keyframes twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.15); } } @keyframes tag-drop { 0% { transform: translateY(-40rpx) rotate(-8deg); opacity: 0; } 60% { transform: translateY(8rpx) rotate(3deg); opacity: 1; } 100% { transform: translateY(0) rotate(0deg); opacity: 1; } } /* 弹幕:从屏幕右侧飘到左侧。每条只播一次,由 JS 控制一行一条排队出现。 */ @keyframes danmaku { 0% { transform: translateX(100vw); } 100% { transform: translateX(-120%); } }