Browse Source

主持人玩家页面修改

wuzj 2 days ago
parent
commit
98c1814a5a

+ 453 - 148
lineforfun/pages/game-turtle-host.html

@@ -27,7 +27,7 @@
         }
         
         .chat-container {
-            max-height: 250px;
+            max-height: 120px;
             overflow-y: auto;
         }
         
@@ -81,6 +81,105 @@
         .solution-header i {
             margin-right: 6px;
         }
+        
+        /* 主题选择组件样式 */
+        .theme-selector-modal {
+            position: fixed;
+            inset: 0;
+            background-color: rgba(0, 0, 0, 0.5);
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            z-index: 50;
+        }
+        
+        .theme-selector-content {
+            background-color: white;
+            width: 91.666667%;
+            border-radius: 0.5rem;
+            max-height: 80vh;
+            overflow-y: auto;
+        }
+        
+        .theme-selector-header {
+            padding: 0.75rem;
+            border-bottom: 1px solid #e5e7eb;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            position: sticky;
+            top: 0;
+            background-color: white;
+        }
+        
+        .theme-selector-step {
+            display: none;
+        }
+        
+        .theme-selector-step.active {
+            display: block;
+        }
+        
+        .theme-item {
+            display: flex;
+            align-items: center;
+            padding: 0.5rem;
+            border: 1px solid #e5e7eb;
+            border-radius: 0.375rem;
+            margin-bottom: 0.75rem;
+            cursor: pointer;
+            transition: all 0.2s;
+        }
+        
+        .theme-item:hover {
+            border-color: #FFA000;
+            background-color: #FFF8E1;
+        }
+        
+        .theme-item.selected {
+            background-color: #FFF8E1;
+            border-color: #FFA000;
+        }
+        
+        .difficulty-btn {
+            background-color: #f3f4f6;
+            border: 1px solid #e5e7eb;
+            color: #374151;
+            font-size: 0.875rem;
+            padding: 0.5rem 1rem;
+            border-radius: 0.375rem;
+            cursor: pointer;
+            transition: all 0.2s;
+        }
+        
+        .difficulty-btn:hover {
+            background-color: #e5e7eb;
+        }
+        
+        .difficulty-btn.selected {
+            background-color: #FFA000;
+            color: white;
+            border-color: #FFA000;
+        }
+        
+        .puzzle-item {
+            padding: 0.75rem;
+            border: 1px solid #e5e7eb;
+            border-radius: 0.375rem;
+            margin-bottom: 0.5rem;
+            cursor: pointer;
+            transition: all 0.2s;
+        }
+        
+        .puzzle-item:hover {
+            border-color: #FFA000;
+            background-color: #FFF8E1;
+        }
+        
+        .puzzle-item.selected {
+            background-color: #FFF8E1;
+            border-color: #FFA000;
+        }
     </style>
 </head>
 <body class="host-theme">
@@ -154,10 +253,11 @@
                         <p class="text-sm mt-1">这块手表有特殊功能,不是普通手表。</p>
                     </div>
                     
+                    <!-- 已揭示线索2 -->
                     <div class="turtle-soup-clue">
                         <div class="flex justify-between items-center">
                             <span class="text-xs text-primary font-medium">线索2(已揭示)</span>
-                            <span class="text-xs text-gray-500">12:08揭示</span>
+                            <span class="text-xs text-gray-500">12:10揭示</span>
                         </div>
                         <p class="text-sm mt-1">手表可以显示未来将发生的事情。</p>
                     </div>
@@ -166,94 +266,53 @@
                     <div class="turtle-soup-clue unrevealed">
                         <div class="flex justify-between items-center">
                             <span class="text-xs text-gray-500 font-medium">线索3(未揭示)</span>
-                            <button class="text-xs text-amber-600 font-medium">揭示</button>
+                            <button class="text-xs text-amber-600 font-medium reveal-clue-btn">揭示</button>
                         </div>
                         <p class="text-sm mt-1 text-gray-400">男人尝试了多种方法阻止预言的实现,但都失败了。</p>
                     </div>
                     
+                    <!-- 未揭示线索 -->
                     <div class="turtle-soup-clue unrevealed">
                         <div class="flex justify-between items-center">
                             <span class="text-xs text-gray-500 font-medium">线索4(未揭示)</span>
-                            <button class="text-xs text-amber-600 font-medium">揭示</button>
+                            <button class="text-xs text-amber-600 font-medium reveal-clue-btn">揭示</button>
                         </div>
-                        <p class="text-sm mt-1 text-gray-400">手表预测的是他的死亡,但没有预测到死亡的具体方式。</p>
+                        <p class="text-sm mt-1 text-gray-400">手表预示了他在一周后会死亡。</p>
                     </div>
                     
+                    <!-- 未揭示线索 -->
                     <div class="turtle-soup-clue unrevealed">
                         <div class="flex justify-between items-center">
                             <span class="text-xs text-gray-500 font-medium">线索5(未揭示)</span>
-                            <button class="text-xs text-amber-600 font-medium">揭示</button>
+                            <button class="text-xs text-amber-600 font-medium reveal-clue-btn">揭示</button>
                         </div>
-                        <p class="text-sm mt-1 text-gray-400">手表的预言总是会实现,但方式可能有所不同。</p>
-                    </div>
-                </div>
-            </div>
-            
-            <!-- 问答互动区域 -->
-            <div class="p-3 bg-white border-t border-gray-200">
-                <h3 class="font-medium mb-3 flex items-center">
-                    <i class="fas fa-comments text-amber-500 mr-1"></i> 玩家问题
-                </h3>
-                
-                <div class="chat-container flex flex-col">
-                    <!-- 玩家问题1 -->
-                    <div class="chat-bubble left">
-                        <div class="text-xs text-gray-500 mb-1">小红 · 2分钟前</div>
-                        手表是有特殊功能的吗?
-                    </div>
-                    
-                    <!-- 主持人回答1 -->
-                    <div class="chat-bubble right bg-amber-50 border-amber-200">
-                        <div class="text-xs text-amber-500 mb-1">我 (主持人) · 2分钟前</div>
-                        是的
-                    </div>
-                    
-                    <!-- 玩家问题2 -->
-                    <div class="chat-bubble left">
-                        <div class="text-xs text-gray-500 mb-1">小明 · 1分钟前</div>
-                        这块手表能预测未来吗?
-                    </div>
-                    
-                    <!-- 主持人回答2 -->
-                    <div class="chat-bubble right bg-amber-50 border-amber-200">
-                        <div class="text-xs text-amber-500 mb-1">我 (主持人) · 1分钟前</div>
-                        是的
-                    </div>
-                    
-                    <!-- 玩家问题3 -->
-                    <div class="chat-bubble left">
-                        <div class="text-xs text-gray-500 mb-1">小红 · 刚刚</div>
-                        手表预测了他的死亡?
+                        <p class="text-sm mt-1 text-gray-400">男人因无法承受预知自己死亡的恐惧而自杀。</p>
                     </div>
                 </div>
-                
-                <!-- 快速回答按钮 -->
-                <div class="flex flex-wrap gap-2 mt-3">
-                    <button class="bg-amber-100 text-amber-700 text-sm py-1 px-3 rounded-full">是的</button>
-                    <button class="bg-gray-100 text-gray-700 text-sm py-1 px-3 rounded-full">不是</button>
-                    <button class="bg-gray-100 text-gray-700 text-sm py-1 px-3 rounded-full">相关</button>
-                    <button class="bg-gray-100 text-gray-700 text-sm py-1 px-3 rounded-full">不相关</button>
-                </div>
-                
-                <!-- 回答输入框 -->
-                <div class="mt-3 flex">
-                    <input type="text" class="app-input flex-1" placeholder="输入回答...">
-                    <button class="bg-amber-500 text-white ml-2 px-3 py-2 rounded-md">
-                        <i class="fas fa-paper-plane"></i>
-                    </button>
-                </div>
             </div>
             
             <!-- 游戏控制按钮 -->
             <div class="p-3 sticky bottom-0 bg-white border-t border-gray-200">
-                <div class="flex items-center justify-between mb-2">
-                    <button class="bg-amber-500 text-white rounded-md text-sm px-3 py-1.5 flex items-center">
-                        <i class="fas fa-lightbulb mr-1"></i> 揭示线索
-                    </button>
-                    <button class="bg-amber-500 text-white rounded-md text-sm px-3 py-1.5 flex items-center">
+                <div class="flex items-center justify-center mb-2">
+                    <button class="bg-amber-500 text-white rounded-md text-sm px-4 py-2 flex items-center" id="endGameBtn">
                         <i class="fas fa-trophy mr-1"></i> 结束游戏
                     </button>
                 </div>
+
+                <!-- 结束游戏后显示的操作区域 -->
+                <div class="bg-green-50 rounded-lg p-3 mb-2 border border-green-200 hidden" id="gameEndedOptions">
+                    <div class="flex justify-between items-center">
+                        <div>
+                            <div class="text-sm font-medium text-green-700">游戏已结束</div>
+                            <div class="text-xs text-gray-500">选择下一步操作</div>
+                        </div>
+                        <div class="flex gap-2">
+                            <button class="bg-amber-500 text-white text-xs py-1.5 px-3 rounded-md flex items-center" id="selectNextThemeBtn">
+                                <i class="fas fa-redo-alt mr-1"></i> 下一题
+                            </button>
+                        </div>
+                    </div>
+                </div>
                 
                 <!-- 道具购买区 -->
                 <div class="bg-blue-50 rounded-lg p-2 mb-2 border border-blue-200">
@@ -267,88 +326,170 @@
                                 <div class="text-xs text-gray-500">解锁多种主题内容</div>
                             </div>
                         </div>
-                        <button class="bg-blue-500 text-white text-xs py-1 px-2 rounded-md" id="openPropsBtn">
+                        <button class="bg-blue-500 text-white text-xs py-1 px-2 rounded-md" id="openThemeSelector">
                             更换主题
                         </button>
                     </div>
                 </div>
+            </div>
+        </div>
+        
+        <!-- 主题选择弹窗组件 -->
+        <div id="themeSelector" class="theme-selector-modal hidden">
+            <div class="theme-selector-content">
+                <div class="theme-selector-header">
+                    <h3 class="font-bold theme-selector-title">选择主题</h3>
+                    <button id="closeThemeSelector" class="text-gray-500">
+                        <i class="fas fa-times"></i>
+                    </button>
+                </div>
                 
-                <!-- 道具弹窗 -->
-                <div id="propsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
-                    <div class="bg-white w-11/12 rounded-lg max-h-[80vh] overflow-y-auto">
-                        <div class="p-3 border-b border-gray-200 flex justify-between items-center sticky top-0 bg-white">
-                            <h3 class="font-bold">游戏主题</h3>
-                            <button id="closePropsBtn" class="text-gray-500">
-                                <i class="fas fa-times"></i>
-                            </button>
+                <!-- 步骤1:选择主题 -->
+                <div id="step1" class="theme-selector-step active p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        选择一个主题,不同主题包含不同类型的谜题
+                    </div>
+                    
+                    <div class="space-y-2">
+                        <!-- 主题列表 -->
+                        <div class="theme-item selected" data-theme="classic">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-bookmark text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">经典解谜</div>
+                                    <div class="text-xs text-amber-600">免费</div>
+                                </div>
+                                <div class="text-xs text-gray-500">基础主题,包含多种经典谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">已解锁</div>
                         </div>
                         
-                        <div class="p-3">
-                            <div class="space-y-3">
-                                <!-- 主题包 -->
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-amber-50 border-amber-200">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-bookmark text-amber-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">经典解谜</div>
-                                            <div class="text-xs text-amber-600">免费</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">基础主题,包含多种经典谜题</div>
-                                    </div>
-                                    <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">已解锁</div>
-                                </div>
-                                
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-white relative">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-ticket-alt text-amber-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">环球影城</div>
-                                            <div class="text-xs text-amber-600">20元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">包含多个环球影城主题谜题</div>
-                                    </div>
-                                    <button class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</button>
-                                    <div class="absolute -top-1 -right-1 bg-red-500 text-white text-xs px-1.5 py-0.5 rounded-full">新</div>
-                                </div>
-                                
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-white">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-hat-wizard text-amber-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">迪士尼奇幻</div>
-                                            <div class="text-xs text-amber-600">15元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">迪士尼主题相关谜题</div>
-                                    </div>
-                                    <button class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</button>
+                        <div class="theme-item" data-theme="universal">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-ticket-alt text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">环球影城</div>
+                                    <div class="text-xs text-amber-600">20元/小时</div>
                                 </div>
-                                
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-white">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-dragon text-amber-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">奇幻冒险</div>
-                                            <div class="text-xs text-amber-600">12元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">奇幻世界主题谜题</div>
-                                    </div>
-                                    <button class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</button>
+                                <div class="text-xs text-gray-500">包含多个环球影城主题谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</div>
+                        </div>
+                        
+                        <div class="theme-item" data-theme="disney">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-hat-wizard text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">迪士尼奇幻</div>
+                                    <div class="text-xs text-amber-600">15元/小时</div>
                                 </div>
-                                
-                                <div class="mt-3 py-2 text-center border-t border-gray-200">
-                                    <div class="text-xs text-gray-500">主题随时可切换,计费按使用时长计算</div>
+                                <div class="text-xs text-gray-500">迪士尼主题相关谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</div>
+                        </div>
+                        
+                        <div class="theme-item" data-theme="fantasy">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-dragon text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">奇幻冒险</div>
+                                    <div class="text-xs text-amber-600">12元/小时</div>
                                 </div>
+                                <div class="text-xs text-gray-500">奇幻世界主题谜题</div>
                             </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</div>
+                        </div>
+                    </div>
+                    
+                    <div class="mt-4 flex justify-end">
+                        <button id="nextToStep2" class="bg-amber-500 text-white py-2 px-4 rounded-md text-sm">下一步</button>
+                    </div>
+                </div>
+                
+                <!-- 步骤2:选择难度 -->
+                <div id="step2" class="theme-selector-step p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        选择游戏难度,不同难度适合不同玩家群体
+                    </div>
+                    
+                    <div class="flex justify-between gap-3 mb-4">
+                        <button class="difficulty-btn flex-1 selected" data-difficulty="easy">
+                            简单
+                        </button>
+                        <button class="difficulty-btn flex-1" data-difficulty="medium">
+                            中等
+                        </button>
+                        <button class="difficulty-btn flex-1" data-difficulty="hard">
+                            困难
+                        </button>
+                    </div>
+                    
+                    <div class="my-3">
+                        <div class="text-sm font-medium">难度说明:</div>
+                        <div id="difficultyDescription" class="text-xs text-gray-500 mt-1">
+                            简单难度适合初次接触海龟汤的玩家,解题时间约10-15分钟。
                         </div>
                     </div>
+                    
+                    <div class="mt-4 flex justify-between">
+                        <button id="backToStep1" class="border border-gray-300 text-gray-700 py-2 px-4 rounded-md text-sm">上一步</button>
+                        <button id="nextToStep3" class="bg-amber-500 text-white py-2 px-4 rounded-md text-sm">下一步</button>
+                    </div>
+                </div>
+                
+                <!-- 步骤3:选择题目 -->
+                <div id="step3" class="theme-selector-step p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        从当前主题和难度中选择一个谜题
+                    </div>
+                    
+                    <div class="space-y-2 max-h-60 overflow-y-auto mb-4">
+                        <!-- 题目列表 -->
+                        <div class="puzzle-item selected" data-puzzle="watch">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">神秘的手表</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时25分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一个男人收到了一块神秘的手表,戴上后就再也无法取下来...</div>
+                        </div>
+                        
+                        <div class="puzzle-item" data-puzzle="apartment">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">高层公寓</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时20分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一个男人走进电梯,按下了最低的按钮,然后走到自己家...</div>
+                        </div>
+                        
+                        <div class="puzzle-item" data-puzzle="mirror">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">破碎的镜子</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时18分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一面镜子碎了,但没有人受伤,为什么所有人都很高兴...</div>
+                        </div>
+                        
+                        <div class="puzzle-item" data-puzzle="snow">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">雪地足迹</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时22分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一个人走进雪地,留下了足迹,但回来时却没有足迹...</div>
+                        </div>
+                    </div>
+                    
+                    <div class="mt-4 flex justify-between">
+                        <button id="backToStep2" class="border border-gray-300 text-gray-700 py-2 px-4 rounded-md text-sm">上一步</button>
+                        <button id="confirmSelection" class="bg-amber-500 text-white py-2 px-4 rounded-md text-sm">确认选择</button>
+                    </div>
                 </div>
             </div>
         </div>
@@ -359,26 +500,190 @@
     
     <script>
         document.addEventListener("DOMContentLoaded", function() {
-            // 道具弹窗控制
-            const openPropsBtn = document.getElementById('openPropsBtn');
-            const closePropsBtn = document.getElementById('closePropsBtn');
-            const propsModal = document.getElementById('propsModal');
+            // 结束游戏按钮功能
+            const endGameBtn = document.getElementById('endGameBtn');
+            const gameEndedOptions = document.getElementById('gameEndedOptions');
+            
+            endGameBtn.addEventListener('click', function() {
+                gameEndedOptions.classList.remove('hidden');
+                endGameBtn.classList.add('hidden');
+            });
+            
+            // 线索揭示功能
+            const revealButtons = document.querySelectorAll('.reveal-clue-btn');
+            
+            revealButtons.forEach(button => {
+                button.addEventListener('click', function() {
+                    const clueElement = this.closest('.turtle-soup-clue');
+                    clueElement.classList.remove('unrevealed');
+                    
+                    // 更改线索状态文本
+                    const statusSpan = clueElement.querySelector('span:first-child');
+                    const originalText = statusSpan.textContent;
+                    const clueNumber = originalText.match(/线索(\d+)/)[1];
+                    statusSpan.textContent = `线索${clueNumber}(已揭示)`;
+                    statusSpan.classList.remove('text-gray-500');
+                    statusSpan.classList.add('text-primary');
+                    
+                    // 替换揭示按钮为时间
+                    const now = new Date();
+                    const timeText = `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}揭示`;
+                    const timeSpan = document.createElement('span');
+                    timeSpan.className = 'text-xs text-gray-500';
+                    timeSpan.textContent = timeText;
+                    this.parentNode.replaceChild(timeSpan, this);
+                    
+                    // 文本变为正常可见
+                    const clueText = clueElement.querySelector('p');
+                    clueText.classList.remove('text-gray-400');
+                    
+                    // 更新已揭示线索计数
+                    updateClueCount();
+                });
+            });
+            
+            // 更新已揭示线索计数
+            function updateClueCount() {
+                const totalClues = document.querySelectorAll('.turtle-soup-clue').length;
+                const revealedClues = document.querySelectorAll('.turtle-soup-clue:not(.unrevealed)').length;
+                const clueCountElement = document.querySelector('.bg-amber-100.text-amber-700.rounded-full');
+                clueCountElement.textContent = `${revealedClues}/${totalClues}已揭示`;
+            }
+            
+            // 主题选择弹窗控制
+            const themeSelector = document.getElementById('themeSelector');
+            const openThemeSelector = document.getElementById('openThemeSelector');
+            const closeThemeSelector = document.getElementById('closeThemeSelector');
+            const selectNextThemeBtn = document.getElementById('selectNextThemeBtn');
+            
+            // 打开主题选择弹窗
+            openThemeSelector.addEventListener('click', function() {
+                themeSelector.classList.remove('hidden');
+                // 重置到第一步
+                showStep(1);
+            });
             
-            openPropsBtn.addEventListener('click', function() {
-                propsModal.classList.remove('hidden');
+            // 下一题按钮也打开主题选择弹窗
+            selectNextThemeBtn.addEventListener('click', function() {
+                themeSelector.classList.remove('hidden');
+                // 重置到第一步
+                showStep(1);
             });
             
-            closePropsBtn.addEventListener('click', function() {
-                propsModal.classList.add('hidden');
+            // 关闭主题选择弹窗
+            closeThemeSelector.addEventListener('click', function() {
+                themeSelector.classList.add('hidden');
             });
             
             // 点击弹窗外部关闭
-            propsModal.addEventListener('click', function(e) {
-                if (e.target === propsModal) {
-                    propsModal.classList.add('hidden');
+            themeSelector.addEventListener('click', function(e) {
+                if (e.target === themeSelector) {
+                    themeSelector.classList.add('hidden');
                 }
             });
+            
+            // 步骤控制
+            const nextToStep2 = document.getElementById('nextToStep2');
+            const backToStep1 = document.getElementById('backToStep1');
+            const nextToStep3 = document.getElementById('nextToStep3');
+            const backToStep2 = document.getElementById('backToStep2');
+            const confirmSelection = document.getElementById('confirmSelection');
+            
+            nextToStep2.addEventListener('click', function() {
+                showStep(2);
+            });
+            
+            backToStep1.addEventListener('click', function() {
+                showStep(1);
+            });
+            
+            nextToStep3.addEventListener('click', function() {
+                showStep(3);
+            });
+            
+            backToStep2.addEventListener('click', function() {
+                showStep(2);
+            });
+            
+            confirmSelection.addEventListener('click', function() {
+                // 这里可以添加选择完成后的逻辑
+                themeSelector.classList.add('hidden');
+                // 模拟选择完成,刷新页面
+                alert('已选择新题目,游戏即将开始!');
+                // 实际应用中这里应该是通过API加载新题目,而不是刷新页面
+            });
+            
+            function showStep(step) {
+                // 隐藏所有步骤
+                document.querySelectorAll('.theme-selector-step').forEach(el => {
+                    el.classList.remove('active');
+                });
+                
+                // 显示当前步骤
+                document.getElementById(`step${step}`).classList.add('active');
+                
+                // 更新标题
+                const titleElement = document.querySelector('.theme-selector-title');
+                if (step === 1) {
+                    titleElement.textContent = '选择主题';
+                } else if (step === 2) {
+                    titleElement.textContent = '选择难度';
+                } else if (step === 3) {
+                    titleElement.textContent = '选择题目';
+                }
+            }
+            
+            // 主题项选择
+            const themeItems = document.querySelectorAll('.theme-item');
+            themeItems.forEach(item => {
+                item.addEventListener('click', function() {
+                    // 移除其他选中状态
+                    themeItems.forEach(el => {
+                        el.classList.remove('selected');
+                    });
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                });
+            });
+            
+            // 难度按钮选择
+            const difficultyBtns = document.querySelectorAll('.difficulty-btn');
+            difficultyBtns.forEach(btn => {
+                btn.addEventListener('click', function() {
+                    // 移除其他选中状态
+                    difficultyBtns.forEach(el => {
+                        el.classList.remove('selected');
+                    });
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                    
+                    // 更新难度说明
+                    const difficultyDescription = document.getElementById('difficultyDescription');
+                    const difficulty = this.dataset.difficulty;
+                    
+                    if (difficulty === 'easy') {
+                        difficultyDescription.textContent = '简单难度适合初次接触海龟汤的玩家,解题时间约10-15分钟。';
+                    } else if (difficulty === 'medium') {
+                        difficultyDescription.textContent = '中等难度需要一定的逻辑思维能力,解题时间约15-25分钟。';
+                    } else if (difficulty === 'hard') {
+                        difficultyDescription.textContent = '困难难度挑战你的思维极限,解题时间约25-40分钟。';
+                    }
+                });
+            });
+            
+            // 题目项选择
+            const puzzleItems = document.querySelectorAll('.puzzle-item');
+            puzzleItems.forEach(item => {
+                item.addEventListener('click', function() {
+                    // 移除其他选中状态
+                    puzzleItems.forEach(el => {
+                        el.classList.remove('selected');
+                    });
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                });
+            });
         });
     </script>
 </body>
-</html> 
+</html>

+ 87 - 158
lineforfun/pages/game-turtle-player.html

@@ -27,7 +27,7 @@
         }
         
         .chat-container {
-            max-height: 250px;
+            max-height: 120px;
             overflow-y: auto;
         }
         
@@ -62,22 +62,6 @@
             transition: width 0.5s ease;
         }
         
-        .question-btn {
-            background-color: #f1f5f9;
-            border-radius: 999px;
-            padding: 4px 12px;
-            font-size: 0.875rem;
-            color: #334155;
-            border: none;
-            cursor: pointer;
-            white-space: nowrap;
-            transition: all 0.2s ease;
-        }
-        
-        .question-btn:hover {
-            background-color: #e2e8f0;
-        }
-        
         .puzzle-card {
             background-color: var(--player-secondary);
             border-radius: 8px;
@@ -94,6 +78,14 @@
             align-items: center;
             justify-content: space-between;
         }
+        
+        .keywords-container {
+            background-color: #dbeafe;
+            border-radius: 6px;
+            padding: 10px;
+            margin-top: 12px;
+            border-left: 3px solid #3b82f6;
+        }
     </style>
 </head>
 <body class="player-theme">
@@ -178,82 +170,41 @@
                         </div>
                         <p class="text-sm mt-1">手表可以显示未来将发生的事情。</p>
                     </div>
-                </div>
-            </div>
-            
-            <!-- 问答互动区域 -->
-            <div class="p-3 bg-white border-t border-gray-200">
-                <h3 class="font-medium mb-2 flex items-center">
-                    <i class="fas fa-comments text-sky-500 mr-1"></i> 问答区
-                </h3>
-                
-                <div class="chat-container flex flex-col">
-                    <!-- 玩家问题1(不是我) -->
-                    <div class="chat-bubble left">
-                        <div class="text-xs text-gray-500 mb-1">小红</div>
-                        手表是有特殊功能的吗?
-                    </div>
-                    
-                    <!-- 主持人回答1 -->
-                    <div class="chat-bubble left bg-amber-50">
-                        <div class="text-xs text-amber-500 mb-1">主持人</div>
-                        是的
-                    </div>
-                    
-                    <!-- 玩家问题2(不是我) -->
-                    <div class="chat-bubble left">
-                        <div class="text-xs text-gray-500 mb-1">小明</div>
-                        这块手表能预测未来吗?
-                    </div>
-                    
-                    <!-- 主持人回答2 -->
-                    <div class="chat-bubble left bg-amber-50">
-                        <div class="text-xs text-amber-500 mb-1">主持人</div>
-                        是的
-                    </div>
                     
-                    <!-- 玩家问题3(不是我) -->
-                    <div class="chat-bubble left">
-                        <div class="text-xs text-gray-500 mb-1">小红</div>
-                        手表预测了他的死亡?
-                    </div>
-                    
-                    <!-- 我的问题 -->
-                    <div class="chat-bubble right bg-sky-50 border-sky-200">
-                        <div class="text-xs text-sky-500 mb-1">我</div>
-                        他是因为看到了什么预言而自杀的吗?
+                    <!-- 关键词区域 -->
+                    <div class="keywords-container">
+                        <div class="flex justify-between items-center">
+                            <span class="text-xs text-blue-600 font-medium flex items-center">
+                                <i class="fas fa-search mr-1"></i> 关键词提示
+                            </span>
+                            <span class="text-xs text-gray-500">12:15购买</span>
+                        </div>
+                        <div class="flex flex-wrap gap-1 mt-1">
+                            <span class="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded-full">预知</span>
+                            <span class="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded-full">命运</span>
+                            <span class="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded-full">恐惧</span>
+                        </div>
                     </div>
                 </div>
-                
-                <!-- 快速提问按钮 -->
-                <div class="flex flex-wrap gap-2 mt-3">
-                    <button class="question-btn">手表是被诅咒的吗?</button>
-                    <button class="question-btn">他尝试取下手表吗?</button>
-                    <button class="question-btn">预言是关于他自己的吗?</button>
-                </div>
-                
-                <!-- 提问输入框 -->
-                <div class="mt-3 flex">
-                    <input type="text" class="app-input flex-1" placeholder="输入问题...">
-                    <button class="bg-sky-500 text-white ml-2 px-3 py-2 rounded-md">
-                        <i class="fas fa-paper-plane"></i>
-                    </button>
-                </div>
             </div>
             
-            <!-- 游戏按钮 -->
+            <!-- 游戏控制和道具区域 -->
             <div class="p-3 sticky bottom-0 bg-white border-t border-gray-200">
-                <div class="flex items-center justify-between mb-2">
-                    <button class="bg-sky-500 text-white rounded-md text-sm px-3 py-1.5 flex items-center">
-                        <i class="fas fa-question-circle mr-1"></i> 提问
-                    </button>
-                    <button class="bg-green-500 text-white rounded-md text-sm px-3 py-1.5 flex items-center">
-                        <i class="fas fa-lightbulb mr-1"></i> 猜测
-                    </button>
+                <!-- 结束游戏后显示的操作区域 -->
+                <div class="bg-green-50 rounded-lg p-3 mb-2 border border-green-200 hidden" id="gameEndedOptions">
+                    <div class="flex justify-between items-center">
+                        <div>
+                            <div class="text-sm font-medium text-green-700">游戏已结束</div>
+                            <div class="text-xs text-gray-500">等待主持人开始新游戏</div>
+                        </div>
+                        <button class="bg-sky-500 text-white text-xs py-1.5 px-3 rounded-md flex items-center">
+                            <i class="fas fa-thumbs-up mr-1"></i> 准备好了
+                        </button>
+                    </div>
                 </div>
                 
                 <!-- 道具购买区 -->
-                <div class="bg-blue-50 rounded-lg p-2 mb-2 border border-blue-200">
+                <div class="bg-blue-50 rounded-lg p-2 border border-blue-200">
                     <div class="flex justify-between items-center">
                         <div class="flex items-center">
                             <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2">
@@ -269,84 +220,62 @@
                         </button>
                     </div>
                 </div>
+            </div>
+        </div>
+        
+        <!-- 道具弹窗 -->
+        <div id="propsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
+            <div class="bg-white w-11/12 rounded-lg max-h-[80vh] overflow-y-auto">
+                <div class="p-3 border-b border-gray-200 flex justify-between items-center sticky top-0 bg-white">
+                    <h3 class="font-bold">解谜道具</h3>
+                    <button id="closePropsBtn" class="text-gray-500">
+                        <i class="fas fa-times"></i>
+                    </button>
+                </div>
                 
-                <!-- 道具弹窗 -->
-                <div id="propsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
-                    <div class="bg-white w-11/12 rounded-lg max-h-[80vh] overflow-y-auto">
-                        <div class="p-3 border-b border-gray-200 flex justify-between items-center sticky top-0 bg-white">
-                            <h3 class="font-bold">解谜道具</h3>
-                            <button id="closePropsBtn" class="text-gray-500">
-                                <i class="fas fa-times"></i>
-                            </button>
+                <div class="p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        解锁道具可以帮助你更快地解开谜题,计费按使用时长计算。
+                    </div>
+                    
+                    <div class="space-y-3">
+                        <!-- 初级道具 -->
+                        <div class="flex items-center p-3 border border-gray-200 rounded-md bg-white">
+                            <div class="flex-shrink-0 w-10 h-10 bg-blue-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-search text-blue-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">初级道具 - 关键词</div>
+                                    <div class="text-xs text-blue-600">15元/小时</div>
+                                </div>
+                                <div class="text-xs text-gray-500">提示故事关键词,帮助理解故事背景</div>
+                            </div>
+                            <button class="text-xs bg-blue-100 text-blue-700 py-1.5 px-2 rounded-md">已购买</button>
                         </div>
                         
-                        <div class="p-3">
-                            <div class="space-y-3">
-                                <!-- 道具1 -->
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-blue-50">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-blue-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-lightbulb text-blue-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">解题助手</div>
-                                            <div class="text-xs text-blue-600">8元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">智能分析问题并提供有效提示</div>
-                                    </div>
-                                    <button class="text-xs bg-blue-500 text-white py-1 px-2 rounded-md">解锁</button>
-                                </div>
-                                
-                                <!-- 道具2 -->
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-purple-50">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-purple-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-filter text-purple-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">思路引导器</div>
-                                            <div class="text-xs text-purple-600">6元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">分析当前思路,指引正确方向</div>
-                                    </div>
-                                    <button class="text-xs bg-purple-500 text-white py-1 px-2 rounded-md">解锁</button>
-                                </div>
-                                
-                                <!-- 道具3 -->
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-green-50">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-green-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-bullseye text-green-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">关键词提示</div>
-                                            <div class="text-xs text-green-600">5元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">提供解题关键词提示</div>
-                                    </div>
-                                    <button class="text-xs bg-green-500 text-white py-1 px-2 rounded-md">解锁</button>
-                                </div>
-                                
-                                <!-- 套餐 -->
-                                <div class="flex items-center p-2 border border-gray-200 rounded-md bg-red-50 relative">
-                                    <div class="flex-shrink-0 w-10 h-10 bg-red-100 rounded-md flex items-center justify-center mr-3">
-                                        <i class="fas fa-gift text-red-500"></i>
-                                    </div>
-                                    <div class="flex-1">
-                                        <div class="flex justify-between">
-                                            <div class="text-sm font-medium">高级解谜套装</div>
-                                            <div class="text-xs text-red-600">15元/小时</div>
-                                        </div>
-                                        <div class="text-xs text-gray-500">包含全部高级解谜工具</div>
-                                    </div>
-                                    <button class="text-xs bg-red-500 text-white py-1 px-2 rounded-md">解锁</button>
-                                    <div class="absolute -top-1 -right-1 bg-amber-500 text-white text-xs px-1.5 py-0.5 rounded-full">优惠</div>
-                                </div>
-                                
-                                <div class="mt-3 py-2 text-center border-t border-gray-200">
-                                    <div class="text-xs text-gray-500">道具随时可开启/关闭,按实际使用时长计费</div>
+                        <!-- 高级道具 -->
+                        <div class="flex items-center p-3 border border-gray-200 rounded-md bg-white relative">
+                            <div class="flex-shrink-0 w-10 h-10 bg-indigo-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-key text-indigo-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">高级道具 - 关键线索</div>
+                                    <div class="text-xs text-indigo-600">30元/小时</div>
                                 </div>
+                                <div class="text-xs text-gray-500">直接揭示一条未公开的关键线索</div>
                             </div>
+                            <button class="text-xs bg-indigo-500 text-white py-1.5 px-2 rounded-md">购买</button>
+                            <div class="absolute -top-1 -right-1 bg-red-500 text-white text-xs px-1.5 py-0.5 rounded-full">热门</div>
+                        </div>
+                        
+                        <div class="mt-3 py-2 text-center border-t border-gray-200">
+                            <div class="text-sm font-medium">当前套餐: 初级道具 15元/小时</div>
+                            <div class="text-xs text-gray-500 mt-1">计时中: 已使用 22分钟,剩余38分钟</div>
+                            <button class="mt-2 text-xs bg-blue-500 text-white py-1.5 px-3 rounded-md">
+                                延长套餐时间
+                            </button>
                         </div>
                     </div>
                 </div>
@@ -381,4 +310,4 @@
         });
     </script>
 </body>
-</html> 
+</html>

+ 458 - 122
lineforfun/pages/room-waiting.html

@@ -63,6 +63,105 @@
             background-color: #FFA000;
             color: white;
         }
+        
+        /* 主题选择弹窗样式 */
+        .theme-selector-modal {
+            position: fixed;
+            inset: 0;
+            background-color: rgba(0, 0, 0, 0.5);
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            z-index: 50;
+        }
+        
+        .theme-selector-content {
+            background-color: white;
+            width: 91.666667%;
+            border-radius: 0.5rem;
+            max-height: 80vh;
+            overflow-y: auto;
+        }
+        
+        .theme-selector-header {
+            padding: 0.75rem;
+            border-bottom: 1px solid #e5e7eb;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            position: sticky;
+            top: 0;
+            background-color: white;
+        }
+        
+        .theme-selector-step {
+            display: none;
+        }
+        
+        .theme-selector-step.active {
+            display: block;
+        }
+        
+        .theme-item {
+            display: flex;
+            align-items: center;
+            padding: 0.5rem;
+            border: 1px solid #e5e7eb;
+            border-radius: 0.375rem;
+            margin-bottom: 0.75rem;
+            cursor: pointer;
+            transition: all 0.2s;
+        }
+        
+        .theme-item:hover {
+            border-color: #FFA000;
+            background-color: #FFF8E1;
+        }
+        
+        .theme-item.selected {
+            background-color: #FFF8E1;
+            border-color: #FFA000;
+        }
+        
+        .difficulty-selector-btn {
+            background-color: #f3f4f6;
+            border: 1px solid #e5e7eb;
+            color: #374151;
+            font-size: 0.875rem;
+            padding: 0.5rem 1rem;
+            border-radius: 0.375rem;
+            cursor: pointer;
+            transition: all 0.2s;
+        }
+        
+        .difficulty-selector-btn:hover {
+            background-color: #e5e7eb;
+        }
+        
+        .difficulty-selector-btn.selected {
+            background-color: #FFA000;
+            color: white;
+            border-color: #FFA000;
+        }
+        
+        .puzzle-item {
+            padding: 0.75rem;
+            border: 1px solid #e5e7eb;
+            border-radius: 0.375rem;
+            margin-bottom: 0.5rem;
+            cursor: pointer;
+            transition: all 0.2s;
+        }
+        
+        .puzzle-item:hover {
+            border-color: #FFA000;
+            background-color: #FFF8E1;
+        }
+        
+        .puzzle-item.selected {
+            background-color: #FFF8E1;
+            border-color: #FFA000;
+        }
     </style>
 </head>
 <body>
@@ -128,91 +227,24 @@
             <div class="p-3 border-b border-gray-200">
                 <h3 class="font-medium mb-3">游戏设置</h3>
                 
-                <!-- 主题选择 -->
-                <div class="mb-3">
-                    <label class="block text-sm text-gray-700 mb-1">主题选择</label>
-                    <div class="space-y-2">
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md bg-amber-50 border-amber-200">
-                            <input type="radio" name="theme" id="theme1" checked class="w-4 h-4 text-amber-500">
-                            <div class="ml-3 flex-1">
-                                <div class="text-sm font-medium">经典解谜</div>
-                                <div class="text-xs text-gray-500">基础主题 · 免费</div>
-                            </div>
-                        </div>
-                        
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md relative">
-                            <input type="radio" name="theme" id="theme2" class="w-4 h-4 text-amber-500">
-                            <div class="ml-3 flex-1">
-                                <div class="text-sm font-medium">环球影城</div>
-                                <div class="text-xs text-gray-500">特色主题 · 20元/小时</div>
-                            </div>
-                            <button class="text-xs bg-amber-500 text-white py-1 px-2 rounded-full">解锁</button>
-                            <div class="absolute -top-1 -right-1 bg-red-500 text-white text-xs px-1.5 py-0.5 rounded-full">新</div>
-                        </div>
-                        
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md relative">
-                            <input type="radio" name="theme" id="theme3" class="w-4 h-4 text-amber-500">
-                            <div class="ml-3 flex-1">
-                                <div class="text-sm font-medium">迪士尼奇幻</div>
-                                <div class="text-xs text-gray-500">特色主题 · 15元/小时</div>
-                            </div>
-                            <button class="text-xs bg-amber-500 text-white py-1 px-2 rounded-full">解锁</button>
-                        </div>
-                        
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md relative">
-                            <input type="radio" name="theme" id="theme4" class="w-4 h-4 text-amber-500">
-                            <div class="ml-3 flex-1">
-                                <div class="text-sm font-medium">奇幻冒险</div>
-                                <div class="text-xs text-gray-500">特色主题 · 12元/小时</div>
-                            </div>
-                            <button class="text-xs bg-amber-500 text-white py-1 px-2 rounded-full">解锁</button>
-                        </div>
-                    </div>
-                </div>
+                <!-- 游戏设置按钮 -->
+                <button id="openThemeSelector" class="w-full bg-amber-500 text-white py-2 px-4 rounded-md text-sm flex items-center justify-center mb-3">
+                    <i class="fas fa-cog mr-2"></i> 选择游戏主题和难度
+                </button>
                 
-                <!-- 游戏难度 -->
-                <div class="mb-3">
-                    <label class="block text-sm text-gray-700 mb-1">游戏难度</label>
-                    <div class="flex space-x-2">
-                        <button id="easy" class="flex-1 py-2 bg-amber-500 text-white text-sm rounded-md difficulty-btn">简单</button>
-                        <button id="medium" class="flex-1 py-2 bg-gray-200 text-gray-700 text-sm rounded-md difficulty-btn">中等</button>
-                        <button id="hard" class="flex-1 py-2 bg-gray-200 text-gray-700 text-sm rounded-md difficulty-btn">困难</button>
+                <!-- 当前选择的设置 -->
+                <div class="bg-amber-50 p-3 rounded-md border border-amber-200">
+                    <div class="flex items-center justify-between mb-2">
+                        <div class="text-sm font-medium">当前选择:</div>
+                        <div class="text-xs text-amber-600" id="currentThemeText">经典解谜</div>
                     </div>
-                </div>
-                
-                <!-- 题目选择 -->
-                <div class="mb-3">
-                    <div class="flex justify-between items-center mb-2">
-                        <label class="text-sm text-gray-700">题目选择</label>
-                        <button id="randomBtn" class="text-xs bg-amber-100 text-amber-700 py-1 px-2 rounded-md flex items-center">
-                            <i class="fas fa-random mr-1"></i> 随机题目
-                        </button>
+                    <div class="flex items-center justify-between mb-2">
+                        <div class="text-sm font-medium">难度:</div>
+                        <div class="text-xs px-2 py-0.5 bg-amber-100 text-amber-700 rounded-full" id="currentDifficultyText">简单</div>
                     </div>
-                    
-                    <div id="puzzleSelection" class="space-y-2">
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md">
-                            <input type="radio" name="puzzle" id="puzzle1" checked class="w-4 h-4 text-amber-500">
-                            <div class="ml-3">
-                                <div class="text-sm font-medium">神秘的手表</div>
-                                <div class="text-xs text-gray-500">简单 · 平均用时25分钟</div>
-                            </div>
-                        </div>
-                        
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md">
-                            <input type="radio" name="puzzle" id="puzzle2" class="w-4 h-4 text-amber-500">
-                            <div class="ml-3">
-                                <div class="text-sm font-medium">迷路的青蛙</div>
-                                <div class="text-xs text-gray-500">中等 · 平均用时35分钟</div>
-                            </div>
-                        </div>
-                        
-                        <div class="flex items-center p-2 border border-gray-200 rounded-md">
-                            <input type="radio" name="puzzle" id="puzzle3" class="w-4 h-4 text-amber-500">
-                            <div class="ml-3">
-                                <div class="text-sm font-medium">消失的邮轮</div>
-                                <div class="text-xs text-gray-500">困难 · 平均用时50分钟</div>
-                            </div>
-                        </div>
+                    <div class="flex items-center justify-between">
+                        <div class="text-sm font-medium">题目:</div>
+                        <div class="text-xs text-amber-600" id="currentPuzzleText">神秘的手表</div>
                     </div>
                 </div>
             </div>
@@ -280,6 +312,166 @@
             </div>
         </div>
         
+        <!-- 主题选择弹窗组件 -->
+        <div id="themeSelector" class="theme-selector-modal hidden">
+            <div class="theme-selector-content">
+                <div class="theme-selector-header">
+                    <h3 class="font-bold theme-selector-title">选择主题</h3>
+                    <button id="closeThemeSelector" class="text-gray-500">
+                        <i class="fas fa-times"></i>
+                    </button>
+                </div>
+                
+                <!-- 步骤1:选择主题 -->
+                <div id="step1" class="theme-selector-step active p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        选择一个主题,不同主题包含不同类型的谜题
+                    </div>
+                    
+                    <div class="space-y-2">
+                        <!-- 主题列表 -->
+                        <div class="theme-item selected" data-theme="classic" data-name="经典解谜" data-price="免费">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-bookmark text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">经典解谜</div>
+                                    <div class="text-xs text-amber-600">免费</div>
+                                </div>
+                                <div class="text-xs text-gray-500">基础主题,包含多种经典谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">已解锁</div>
+                        </div>
+                        
+                        <div class="theme-item" data-theme="universal" data-name="环球影城" data-price="20元/小时">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-ticket-alt text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">环球影城</div>
+                                    <div class="text-xs text-amber-600">20元/小时</div>
+                                </div>
+                                <div class="text-xs text-gray-500">包含多个环球影城主题谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</div>
+                        </div>
+                        
+                        <div class="theme-item" data-theme="disney" data-name="迪士尼奇幻" data-price="15元/小时">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-hat-wizard text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">迪士尼奇幻</div>
+                                    <div class="text-xs text-amber-600">15元/小时</div>
+                                </div>
+                                <div class="text-xs text-gray-500">迪士尼主题相关谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</div>
+                        </div>
+                        
+                        <div class="theme-item" data-theme="fantasy" data-name="奇幻冒险" data-price="12元/小时">
+                            <div class="flex-shrink-0 w-10 h-10 bg-amber-100 rounded-md flex items-center justify-center mr-3">
+                                <i class="fas fa-dragon text-amber-500"></i>
+                            </div>
+                            <div class="flex-1">
+                                <div class="flex justify-between">
+                                    <div class="text-sm font-medium">奇幻冒险</div>
+                                    <div class="text-xs text-amber-600">12元/小时</div>
+                                </div>
+                                <div class="text-xs text-gray-500">奇幻世界主题谜题</div>
+                            </div>
+                            <div class="text-xs bg-amber-500 text-white py-1 px-2 rounded-md">解锁</div>
+                        </div>
+                    </div>
+                    
+                    <div class="mt-4 flex justify-end">
+                        <button id="nextToStep2" class="bg-amber-500 text-white py-2 px-4 rounded-md text-sm">下一步</button>
+                    </div>
+                </div>
+                
+                <!-- 步骤2:选择难度 -->
+                <div id="step2" class="theme-selector-step p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        选择游戏难度,不同难度适合不同玩家群体
+                    </div>
+                    
+                    <div class="flex justify-between gap-3 mb-4">
+                        <button class="difficulty-selector-btn flex-1 selected" data-difficulty="easy" data-name="简单">
+                            简单
+                        </button>
+                        <button class="difficulty-selector-btn flex-1" data-difficulty="medium" data-name="中等">
+                            中等
+                        </button>
+                        <button class="difficulty-selector-btn flex-1" data-difficulty="hard" data-name="困难">
+                            困难
+                        </button>
+                    </div>
+                    
+                    <div class="my-3">
+                        <div class="text-sm font-medium">难度说明:</div>
+                        <div id="difficultyDescription" class="text-xs text-gray-500 mt-1">
+                            简单难度适合初次接触海龟汤的玩家,解题时间约10-15分钟。
+                        </div>
+                    </div>
+                    
+                    <div class="mt-4 flex justify-between">
+                        <button id="backToStep1" class="border border-gray-300 text-gray-700 py-2 px-4 rounded-md text-sm">上一步</button>
+                        <button id="nextToStep3" class="bg-amber-500 text-white py-2 px-4 rounded-md text-sm">下一步</button>
+                    </div>
+                </div>
+                
+                <!-- 步骤3:选择题目 -->
+                <div id="step3" class="theme-selector-step p-3">
+                    <div class="text-xs text-gray-500 mb-3">
+                        从当前主题和难度中选择一个谜题
+                    </div>
+                    
+                    <div class="space-y-2 max-h-60 overflow-y-auto mb-4">
+                        <!-- 题目列表 -->
+                        <div class="puzzle-item selected" data-puzzle="watch" data-name="神秘的手表">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">神秘的手表</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时25分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一个男人收到了一块神秘的手表,戴上后就再也无法取下来...</div>
+                        </div>
+                        
+                        <div class="puzzle-item" data-puzzle="apartment" data-name="高层公寓">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">高层公寓</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时20分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一个男人走进电梯,按下了最低的按钮,然后走到自己家...</div>
+                        </div>
+                        
+                        <div class="puzzle-item" data-puzzle="mirror" data-name="破碎的镜子">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">破碎的镜子</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时18分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一面镜子碎了,但没有人受伤,为什么所有人都很高兴...</div>
+                        </div>
+                        
+                        <div class="puzzle-item" data-puzzle="snow" data-name="雪地足迹">
+                            <div class="flex justify-between">
+                                <div class="text-sm font-medium">雪地足迹</div>
+                                <div class="text-xs text-amber-600">简单 · 平均用时22分钟</div>
+                            </div>
+                            <div class="text-xs text-gray-500 mt-1">一个人走进雪地,留下了足迹,但回来时却没有足迹...</div>
+                        </div>
+                    </div>
+                    
+                    <div class="mt-4 flex justify-between">
+                        <button id="backToStep2" class="border border-gray-300 text-gray-700 py-2 px-4 rounded-md text-sm">上一步</button>
+                        <button id="confirmSelection" class="bg-amber-500 text-white py-2 px-4 rounded-md text-sm">确认选择</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+        
         <!-- 引入底部导航栏 -->
         <iframe src="../components/nav-bar.html" frameborder="0" scrolling="no" style="width:100%; height:50px; overflow:hidden; position:fixed; bottom:0;"></iframe>
     </div>
@@ -342,55 +534,199 @@
                 });
             });
             
-            // 难度选择
-            const difficultyBtns = document.querySelectorAll('.difficulty-btn');
+            // 主题选择弹窗控制
+            const themeSelector = document.getElementById('themeSelector');
+            const openThemeSelector = document.getElementById('openThemeSelector');
+            const closeThemeSelector = document.getElementById('closeThemeSelector');
+            
+            // 打开主题选择弹窗
+            openThemeSelector.addEventListener('click', function() {
+                themeSelector.classList.remove('hidden');
+                // 重置到第一步
+                showStep(1);
+            });
+            
+            // 关闭主题选择弹窗
+            closeThemeSelector.addEventListener('click', function() {
+                themeSelector.classList.add('hidden');
+            });
+            
+            // 点击弹窗外部关闭
+            themeSelector.addEventListener('click', function(e) {
+                if (e.target === themeSelector) {
+                    themeSelector.classList.add('hidden');
+                }
+            });
+            
+            // 步骤控制
+            const nextToStep2 = document.getElementById('nextToStep2');
+            const backToStep1 = document.getElementById('backToStep1');
+            const nextToStep3 = document.getElementById('nextToStep3');
+            const backToStep2 = document.getElementById('backToStep2');
+            const confirmSelection = document.getElementById('confirmSelection');
+            
+            // 当前选择的数据
+            let selectedTheme = {
+                theme: 'classic',
+                themeName: '经典解谜',
+                themePrice: '免费',
+                difficulty: 'easy',
+                difficultyName: '简单',
+                puzzle: 'watch',
+                puzzleName: '神秘的手表'
+            };
+            
+            // 更新显示的当前选择
+            function updateCurrentSelection() {
+                document.getElementById('currentThemeText').textContent = selectedTheme.themeName;
+                document.getElementById('currentDifficultyText').textContent = selectedTheme.difficultyName;
+                document.getElementById('currentPuzzleText').textContent = selectedTheme.puzzleName;
+            }
+            
+            // 初始化默认选择
+            updateCurrentSelection();
+            
+            nextToStep2.addEventListener('click', function() {
+                showStep(2);
+            });
+            
+            backToStep1.addEventListener('click', function() {
+                showStep(1);
+            });
+            
+            nextToStep3.addEventListener('click', function() {
+                showStep(3);
+            });
+            
+            backToStep2.addEventListener('click', function() {
+                showStep(2);
+            });
+            
+            confirmSelection.addEventListener('click', function() {
+                // 保存当前选择
+                updateCurrentSelection();
+                
+                // 关闭弹窗
+                themeSelector.classList.add('hidden');
+                
+                // 更新主持人状态
+                const hostStatusElement = document.querySelector('.user-status.ready');
+                hostStatusElement.textContent = `已选择: ${selectedTheme.themeName} - ${selectedTheme.difficultyName}`;
+            });
+            
+            function showStep(step) {
+                // 隐藏所有步骤
+                document.querySelectorAll('.theme-selector-step').forEach(el => {
+                    el.classList.remove('active');
+                });
+                
+                // 显示当前步骤
+                document.getElementById(`step${step}`).classList.add('active');
+                
+                // 更新标题
+                const titleElement = document.querySelector('.theme-selector-title');
+                if (step === 1) {
+                    titleElement.textContent = '选择主题';
+                } else if (step === 2) {
+                    titleElement.textContent = '选择难度';
+                } else if (step === 3) {
+                    titleElement.textContent = '选择题目';
+                }
+            }
+            
+            // 主题项选择
+            const themeItems = document.querySelectorAll('.theme-item');
+            themeItems.forEach(item => {
+                item.addEventListener('click', function() {
+                    // 移除其他选中状态
+                    themeItems.forEach(el => {
+                        el.classList.remove('selected');
+                    });
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                    
+                    // 保存选择的主题数据
+                    selectedTheme.theme = this.dataset.theme;
+                    selectedTheme.themeName = this.dataset.name;
+                    selectedTheme.themePrice = this.dataset.price;
+                });
+            });
+            
+            // 难度按钮选择
+            const difficultyBtns = document.querySelectorAll('.difficulty-selector-btn');
             difficultyBtns.forEach(btn => {
                 btn.addEventListener('click', function() {
-                    difficultyBtns.forEach(b => {
-                        b.classList.remove('bg-amber-500', 'text-white');
-                        b.classList.add('bg-gray-200', 'text-gray-700');
+                    // 移除其他选中状态
+                    difficultyBtns.forEach(el => {
+                        el.classList.remove('selected');
                     });
-                    this.classList.remove('bg-gray-200', 'text-gray-700');
-                    this.classList.add('bg-amber-500', 'text-white');
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                    
+                    // 保存选择的难度数据
+                    selectedTheme.difficulty = this.dataset.difficulty;
+                    selectedTheme.difficultyName = this.dataset.name;
+                    
+                    // 更新难度说明
+                    const difficultyDescription = document.getElementById('difficultyDescription');
+                    const difficulty = this.dataset.difficulty;
+                    
+                    if (difficulty === 'easy') {
+                        difficultyDescription.textContent = '简单难度适合初次接触海龟汤的玩家,解题时间约10-15分钟。';
+                    } else if (difficulty === 'medium') {
+                        difficultyDescription.textContent = '中等难度需要一定的逻辑思维能力,解题时间约15-25分钟。';
+                    } else if (difficulty === 'hard') {
+                        difficultyDescription.textContent = '困难难度挑战你的思维极限,解题时间约25-40分钟。';
+                    }
+                });
+            });
+            
+            // 题目项选择
+            const puzzleItems = document.querySelectorAll('.puzzle-item');
+            puzzleItems.forEach(item => {
+                item.addEventListener('click', function() {
+                    // 移除其他选中状态
+                    puzzleItems.forEach(el => {
+                        el.classList.remove('selected');
+                    });
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                    
+                    // 保存选择的题目数据
+                    selectedTheme.puzzle = this.dataset.puzzle;
+                    selectedTheme.puzzleName = this.dataset.name;
                 });
             });
             
             // 随机题目按钮功能
             const randomBtn = document.getElementById('randomBtn');
-            const puzzleSelection = document.getElementById('puzzleSelection');
-            const puzzleRadios = document.querySelectorAll('input[name="puzzle"]');
-            
-            randomBtn.addEventListener('click', function() {
-                // 随机选择一个题目
-                const randomIndex = Math.floor(Math.random() * puzzleRadios.length);
-                puzzleRadios.forEach((radio, index) => {
-                    radio.checked = (index === randomIndex);
+            if (randomBtn) {
+                randomBtn.addEventListener('click', function() {
+                    // 打开主题选择弹窗
+                    themeSelector.classList.remove('hidden');
+                    // 直接跳到第三步选择题目
+                    showStep(3);
+                    
+                    // 随机选择一个题目
+                    const randomIndex = Math.floor(Math.random() * puzzleItems.length);
+                    puzzleItems.forEach((item, index) => {
+                        item.classList.remove('selected');
+                        if (index === randomIndex) {
+                            item.classList.add('selected');
+                            // 保存选择的题目数据
+                            selectedTheme.puzzle = item.dataset.puzzle;
+                            selectedTheme.puzzleName = item.dataset.name;
+                        }
+                    });
+                    
+                    // 选中的题目滚动到可见区域
+                    const selectedPuzzle = puzzleItems[randomIndex];
+                    if(selectedPuzzle) {
+                        selectedPuzzle.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
+                    }
                 });
-                
-                // 闪烁显示效果
-                puzzleSelection.classList.add('opacity-50');
-                setTimeout(() => {
-                    puzzleSelection.classList.remove('opacity-50');
-                }, 300);
-                
-                // 选中的题目滚动到可见区域
-                const selectedPuzzle = puzzleRadios[randomIndex].closest('.flex');
-                if(selectedPuzzle) {
-                    selectedPuzzle.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
-                }
-                
-                // 显示随机选择成功提示
-                randomBtn.innerHTML = '<i class="fas fa-check-circle mr-1"></i> 已随机选择';
-                randomBtn.classList.add('bg-green-100', 'text-green-700');
-                randomBtn.classList.remove('bg-amber-100', 'text-amber-700');
-                
-                setTimeout(() => {
-                    randomBtn.innerHTML = '<i class="fas fa-random mr-1"></i> 随机题目';
-                    randomBtn.classList.remove('bg-green-100', 'text-green-700');
-                    randomBtn.classList.add('bg-amber-100', 'text-amber-700');
-                }, 1500);
-            });
+            }
         });
     </script>
 </body>
-</html> 
+</html>