File size: 10,656 Bytes
9783792
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f39cc30
9783792
 
 
 
 
 
 
 
 
 
57bc38e
9783792
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI震撼体验</title>
    <style>
        :root {
            --slot-height: 60px;
        }

        body {
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background-color: #0f0f13;
            color: #e5e5e5;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            overflow: hidden;
            transition: background-color 0.1s;
        }

        /* 核爆震动特效 */
        @keyframes shake {
            0% { transform: translate(1px, 1px) rotate(0deg); }
            10% { transform: translate(-1px, -2px) rotate(-1deg); }
            20% { transform: translate(-3px, 0px) rotate(1deg); }
            30% { transform: translate(3px, 2px) rotate(0deg); }
            40% { transform: translate(1px, -1px) rotate(1deg); }
            50% { transform: translate(-1px, 2px) rotate(-1deg); }
            60% { transform: translate(-3px, 1px) rotate(0deg); }
            70% { transform: translate(3px, 1px) rotate(-1deg); }
            80% { transform: translate(-1px, -1px) rotate(1deg); }
            90% { transform: translate(1px, 2px) rotate(0deg); }
            100% { transform: translate(0px, 0px) rotate(0deg); }
        }

        .nuke-shake {
            animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
        }

        /* 核爆白闪特效 */
        #nuke-flash {
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            background: #fff;
            opacity: 0;
            pointer-events: none;
            z-index: 9999;
            transition: opacity 0.1s ease-out;
        }
        .flash-active {
            opacity: 1 !important;
            transition: opacity 0s !important;
        }
        .flash-fade {
            opacity: 0 !important;
            transition: opacity 2s ease-out !important;
        }

        .sentence-container {
            font-size: 32px;
            font-weight: 800;
            line-height: normal;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            z-index: 10;
        }

        .row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .static-text {
            color: #a0a0b0;
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
            letter-spacing: 2px;
        }

        .bomb-text {
            color: #ff3333;
            text-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
        }

        /* 槽位样式 */
        .slot {
            height: var(--slot-height);
            background: #1a1a24;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 5px 15px rgba(0,0,0,0.8), 0 0 0 2px #333;
            display: flex;
            align-items: flex-start;
        }

        .slot::before, .slot::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            height: 15px;
            z-index: 5;
            pointer-events: none;
        }
        
        .slot::before {
            top: 0;
            background: linear-gradient(to bottom, #1a1a24, transparent);
        }

        .slot::after {
            bottom: 0;
            background: linear-gradient(to top, #1a1a24, transparent);
        }

        #name-slot { width: 250px; }
        #model-slot { width: 230px; }

        .track {
            display: flex;
            flex-direction: column;
            width: 100%;
            /* 关键:滚动物理缓动 */
            transition: transform 0s; 
        }

        .item {
            height: var(--slot-height);
            line-height: var(--slot-height);
            text-align: center;
            white-space: nowrap;
        }

        .name-item {
            color: #00f2fe;
            text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
        }

        .model-item {
            color: #fb8500;
            text-shadow: 0 0 10px rgba(251, 133, 0, 0.5);
        }

        /* 按钮与UI */
        .btn-container {
            margin-top: 60px;
            z-index: 10;
        }

        button {
            padding: 16px 45px;
            font-size: 22px;
            font-weight: bold;
            color: #111;
            background: #ffd166;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            box-shadow: 0 6px 0 #cc9b22, 0 15px 20px rgba(0,0,0,0.4);
            transition: all 0.1s;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        button:active {
            transform: translateY(6px);
            box-shadow: 0 0px 0 #cc9b22, 0 5px 10px rgba(0,0,0,0.4);
        }

        button:disabled {
            background: #555;
            box-shadow: 0 6px 0 #333;
            color: #888;
            cursor: not-allowed;
            transform: translateY(6px);
        }
    </style>
</head>
<body>

    <div id="nuke-flash"></div>

    <div class="sentence-container" id="main-view">
        <div class="row">
            <div class="slot" id="name-slot">
                <div class="track" id="name-track"></div>
            </div>
            <div class="static-text">首次体验</div>
            <div class="slot" id="model-slot">
                <div class="track" id="model-track"></div>
            </div>
        </div>
        <div class="row">
            <div class="static-text">,被吓到眩晕瘫坐,</div>
        </div>
        <div class="row">
            <div class="static-text bomb-text">那一刻像看到原子弹爆炸。</div>
        </div>
    </div>

    <div class="btn-container">
        <button id="spinBtn">💥 查看下一个瘫坐的人</button>
    </div>

    <script>
        const data = [
            { name: "Demis Hassabis", model: "Gemini 4" },
            { name: "Dario Amodei", model: "Claude 5" },
            { name: "山大王", model: "muse-spark-2" },
            { name: "Elon Musk", model: "Grok 5" },
            { name: "奥特曼", model: "GPT-6" },
            { name: "杨植麟", model: "Kimi K3" },
            { name: "唐杰", model: "GLM-6" },
            { name: "梁文峰", model: "Deepseek-V4" },
            { name: "Bo", model: "RWKV-8" }
        ];

        const slotHeight = 60; // 对应CSS中的 --slot-height
        const trackRepeat = 20; // 虚拟生成20排来提供足够的滚动距离

        const nameTrack = document.getElementById('name-track');
        const modelTrack = document.getElementById('model-track');
        const spinBtn = document.getElementById('spinBtn');
        const nukeFlash = document.getElementById('nuke-flash');
        const mainView = document.getElementById('main-view');

        // 构建长列表轨道
        function buildTracks() {
            nameTrack.innerHTML = '';
            modelTrack.innerHTML = '';
            
            for(let i = 0; i < trackRepeat; i++) {
                data.forEach(item => {
                    const nameDiv = document.createElement('div');
                    nameDiv.className = 'item name-item';
                    nameDiv.innerText = item.name;
                    nameTrack.appendChild(nameDiv);

                    const modelDiv = document.createElement('div');
                    modelDiv.className = 'item model-item';
                    modelDiv.innerText = item.model;
                    modelTrack.appendChild(modelDiv);
                });
            }
        }

        buildTracks();
        
        // 初始静止状态显示第一个组合
        nameTrack.style.transform = `translateY(0px)`;
        modelTrack.style.transform = `translateY(0px)`;

        let isSpinning = false;

        spinBtn.addEventListener('click', () => {
            if (isSpinning) return;
            isSpinning = true;
            spinBtn.disabled = true;

            // 每次点击重置轨道(无动画复位回顶部重新打乱)
            nameTrack.style.transition = 'none';
            modelTrack.style.transition = 'none';
            nameTrack.style.transform = `translateY(0px)`;
            modelTrack.style.transform = `translateY(0px)`;

            // 强制重绘,使重置立即生效
            void nameTrack.offsetWidth; 
            
            // 随机抽取一个组合索引 (15组往后能保证转好几圈)
            const winnerIndex = Math.floor(Math.random() * data.length);
            const targetCycle = trackRepeat - 2; // 停在倒数第二组的对应位置
            const targetPosition = (targetCycle * data.length + winnerIndex) * slotHeight;

            // 为名字槽添加转动动画 (转3秒)
            nameTrack.style.transition = 'transform 3s cubic-bezier(0.15, 0.85, 0.25, 1)';
            nameTrack.style.transform = `translateY(-${targetPosition}px)`;

            // 为模型槽添加转动动画 (转4.5秒,制造等待悬念感)
            modelTrack.style.transition = 'transform 4.5s cubic-bezier(0.1, 0.9, 0.2, 1)';
            modelTrack.style.transform = `translateY(-${targetPosition}px)`;

            // 监听最后一个槽位停止(核爆时刻!)
            setTimeout(() => {
                triggerNukeEffect();
                isSpinning = false;
                spinBtn.disabled = false;
            }, 4500); 
        });

        function triggerNukeEffect() {
            // 步骤1:屏幕瞬间纯白闪瞎
            nukeFlash.classList.add('flash-active');
            
            // 步骤2:整体剧烈震屏
            mainView.classList.add('nuke-shake');
            document.body.style.backgroundColor = "#330000"; // 背景变红
            
            // 步骤3:褪去白光,恢复原状
            setTimeout(() => {
                nukeFlash.classList.remove('flash-active');
                nukeFlash.classList.add('flash-fade');
                document.body.style.backgroundColor = "#0f0f13";
            }, 50);

            // 清理状态
            setTimeout(() => {
                mainView.classList.remove('nuke-shake');
                nukeFlash.classList.remove('flash-fade');
            }, 2000);
        }
    </script>
</body>
</html>