Spaces:
Running
Running
Upload 5 files
Browse files- .gitattributes +1 -0
- ID.csv +16 -0
- Theme.jpg +3 -0
- index.html +42 -0
- script.js +206 -0
- style.css +161 -18
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Theme.jpg filter=lfs diff=lfs merge=lfs -text
|
ID.csv
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ID,姓名,職業
|
| 2 |
+
100090601,張秉恆,影武者
|
| 3 |
+
101010302,羅忠聘,光靈術士
|
| 4 |
+
101010303,羅政聘,光靈術士
|
| 5 |
+
101032704,林均綻,影武者
|
| 6 |
+
101082905,劉家震,影武者
|
| 7 |
+
100090806,邱品潔,暮影使徒
|
| 8 |
+
100110907,陳妤芮,影武者
|
| 9 |
+
101020808,鍾依捷,光靈術士
|
| 10 |
+
101030409,羅文辛,光靈術士
|
| 11 |
+
101042710,鄭詠嬛,暮影使徒
|
| 12 |
+
101060511,黃薇榕,暮影使徒
|
| 13 |
+
101071112,劉軒妤,光靈術士
|
| 14 |
+
101063013,徐立洋,暗影法刃
|
| 15 |
+
101080414,王孝淇,刺客
|
| 16 |
+
1000099,遊戲測試員,GM
|
Theme.jpg
ADDED
|
Git LFS Details
|
index.html
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh-TW">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>數學魔法王國:平方之旅</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div class="game-container">
|
| 11 |
+
<h1 class="game-title">《數學魔法王國:平方之旅》</h1>
|
| 12 |
+
|
| 13 |
+
<div class="menu-container">
|
| 14 |
+
<button id="start-btn" class="menu-btn">開始冒險</button>
|
| 15 |
+
<button id="load-btn" class="menu-btn">讀取進度</button>
|
| 16 |
+
<button id="exit-btn" class="menu-btn">遊戲結束</button>
|
| 17 |
+
</div>
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
<!-- ID輸入彈窗 -->
|
| 21 |
+
<div id="id-modal" class="modal">
|
| 22 |
+
<div class="modal-content">
|
| 23 |
+
<span class="close-btn">×</span>
|
| 24 |
+
<h2>請輸入您的ID</h2>
|
| 25 |
+
<input type="text" id="player-id" placeholder="請輸入ID...">
|
| 26 |
+
<button id="confirm-id">確認</button>
|
| 27 |
+
<p id="id-error" class="error-message"></p>
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
|
| 31 |
+
<!-- 歡迎訊息彈窗 -->
|
| 32 |
+
<div id="welcome-modal" class="modal">
|
| 33 |
+
<div class="modal-content welcome-content">
|
| 34 |
+
<span class="close-welcome-btn">×</span>
|
| 35 |
+
<div id="welcome-message"></div>
|
| 36 |
+
<button id="start-adventure">開始冒險!</button>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
<script src="script.js"></script>
|
| 41 |
+
</body>
|
| 42 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// 玩家資料
|
| 2 |
+
let playerData = [];
|
| 3 |
+
|
| 4 |
+
// 載入CSV檔案
|
| 5 |
+
async function loadPlayerData() {
|
| 6 |
+
try {
|
| 7 |
+
const response = await fetch('ID.csv');
|
| 8 |
+
const data = await response.text();
|
| 9 |
+
|
| 10 |
+
// 解析CSV
|
| 11 |
+
const rows = data.split('\n');
|
| 12 |
+
const headers = rows[0].split(',');
|
| 13 |
+
|
| 14 |
+
// 跳過標題行,處理每一行資料
|
| 15 |
+
for (let i = 1; i < rows.length; i++) {
|
| 16 |
+
if (rows[i].trim() === '') continue;
|
| 17 |
+
|
| 18 |
+
const values = rows[i].split(',');
|
| 19 |
+
const player = {
|
| 20 |
+
id: values[0].trim(),
|
| 21 |
+
name: values[1].trim(),
|
| 22 |
+
profession: values[2].trim()
|
| 23 |
+
};
|
| 24 |
+
playerData.push(player);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
console.log('玩家資料載入成功:', playerData);
|
| 28 |
+
} catch (error) {
|
| 29 |
+
console.error('載入玩家資料失敗:', error);
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
// 頁面載入時執行
|
| 34 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 35 |
+
loadPlayerData();
|
| 36 |
+
|
| 37 |
+
// 獲取DOM元素
|
| 38 |
+
const startBtn = document.getElementById('start-btn');
|
| 39 |
+
const loadBtn = document.getElementById('load-btn');
|
| 40 |
+
const exitBtn = document.getElementById('exit-btn');
|
| 41 |
+
const idModal = document.getElementById('id-modal');
|
| 42 |
+
const welcomeModal = document.getElementById('welcome-modal');
|
| 43 |
+
const closeBtn = document.querySelector('.close-btn');
|
| 44 |
+
const closeWelcomeBtn = document.querySelector('.close-welcome-btn');
|
| 45 |
+
const confirmIdBtn = document.getElementById('confirm-id');
|
| 46 |
+
const playerIdInput = document.getElementById('player-id');
|
| 47 |
+
const idError = document.getElementById('id-error');
|
| 48 |
+
const welcomeMessage = document.getElementById('welcome-message');
|
| 49 |
+
const startAdventureBtn = document.getElementById('start-adventure');
|
| 50 |
+
|
| 51 |
+
// 開始冒險按鈕點擊事件
|
| 52 |
+
startBtn.addEventListener('click', function() {
|
| 53 |
+
idModal.style.display = 'block';
|
| 54 |
+
playerIdInput.value = '';
|
| 55 |
+
idError.style.display = 'none';
|
| 56 |
+
});
|
| 57 |
+
|
| 58 |
+
// 關閉ID輸入彈窗
|
| 59 |
+
closeBtn.addEventListener('click', function() {
|
| 60 |
+
idModal.style.display = 'none';
|
| 61 |
+
});
|
| 62 |
+
|
| 63 |
+
// 關閉歡迎訊息彈窗
|
| 64 |
+
closeWelcomeBtn.addEventListener('click', function() {
|
| 65 |
+
welcomeModal.style.display = 'none';
|
| 66 |
+
});
|
| 67 |
+
|
| 68 |
+
// 點擊彈窗外部關閉彈窗
|
| 69 |
+
window.addEventListener('click', function(event) {
|
| 70 |
+
if (event.target === idModal) {
|
| 71 |
+
idModal.style.display = 'none';
|
| 72 |
+
}
|
| 73 |
+
if (event.target === welcomeModal) {
|
| 74 |
+
welcomeModal.style.display = 'none';
|
| 75 |
+
}
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
// 確認ID按鈕點擊事件
|
| 79 |
+
confirmIdBtn.addEventListener('click', function() {
|
| 80 |
+
const inputId = playerIdInput.value.trim();
|
| 81 |
+
|
| 82 |
+
if (inputId === '') {
|
| 83 |
+
idError.textContent = '請輸入ID';
|
| 84 |
+
idError.style.display = 'block';
|
| 85 |
+
return;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
// 在玩家資料中查找ID
|
| 89 |
+
const player = playerData.find(p => p.id === inputId);
|
| 90 |
+
|
| 91 |
+
if (player) {
|
| 92 |
+
// ID存在,顯示歡迎訊息
|
| 93 |
+
idModal.style.display = 'none';
|
| 94 |
+
|
| 95 |
+
// 設置歡迎訊息
|
| 96 |
+
const message = `
|
| 97 |
+
<p class="highlight">🌟 歡迎你,${player.profession}──${player.name}!</p>
|
| 98 |
+
<p>你被召喚至這個充滿數學魔力的世界,肩負起拯救「數學魔法王國」的重大使命。</p>
|
| 99 |
+
<p>傳說中,唯有真正的數學勇者,才能重新喚醒古老的「平方之力」──這股支撐王國、對抗黑暗的關鍵能量。</p>
|
| 100 |
+
<p>現在,時機已到。</p>
|
| 101 |
+
<p>接下來,你將踏上三段神聖試煉之路,學會感知、轉換與展開的力量。</p>
|
| 102 |
+
<p>前方的挑戰將磨練你的智慧與勇氣,</p>
|
| 103 |
+
<p>但只要堅持到底,王國的未來將因你而重生!</p>
|
| 104 |
+
<p>📜 任務即將開始,請準備好你的數學之心──</p>
|
| 105 |
+
<p>點擊下方按鈕,開啟你的冒險旅程!</p>
|
| 106 |
+
`;
|
| 107 |
+
|
| 108 |
+
welcomeMessage.innerHTML = message;
|
| 109 |
+
welcomeModal.style.display = 'block';
|
| 110 |
+
|
| 111 |
+
// 儲存玩家ID到localStorage,實現跨裝置存檔
|
| 112 |
+
localStorage.setItem('currentPlayerId', player.id);
|
| 113 |
+
localStorage.setItem('playerName', player.name);
|
| 114 |
+
localStorage.setItem('playerProfession', player.profession);
|
| 115 |
+
|
| 116 |
+
// 初始化遊戲進度
|
| 117 |
+
if (!localStorage.getItem(`gameProgress_${player.id}`)) {
|
| 118 |
+
const initialProgress = {
|
| 119 |
+
completedTrials: {
|
| 120 |
+
"平方之泉": {
|
| 121 |
+
completed: false,
|
| 122 |
+
score: 0,
|
| 123 |
+
challengesCompleted: [false, false, false, false, false, false]
|
| 124 |
+
},
|
| 125 |
+
"變換山谷": {
|
| 126 |
+
completed: false,
|
| 127 |
+
score: 0,
|
| 128 |
+
challengesCompleted: [false, false, false, false, false, false]
|
| 129 |
+
},
|
| 130 |
+
"展開之塔": {
|
| 131 |
+
completed: false,
|
| 132 |
+
score: 0,
|
| 133 |
+
challengesCompleted: [false, false, false, false, false, false]
|
| 134 |
+
}
|
| 135 |
+
},
|
| 136 |
+
lastSaved: new Date().toISOString()
|
| 137 |
+
};
|
| 138 |
+
|
| 139 |
+
localStorage.setItem(`gameProgress_${player.id}`, JSON.stringify(initialProgress));
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
} else {
|
| 143 |
+
// ID不存在,顯示錯誤訊息
|
| 144 |
+
idError.textContent = '找不到此ID,請確認後重新輸入';
|
| 145 |
+
idError.style.display = 'block';
|
| 146 |
+
}
|
| 147 |
+
});
|
| 148 |
+
|
| 149 |
+
// 開始冒險按鈕點擊事件(歡迎訊息後)
|
| 150 |
+
startAdventureBtn.addEventListener('click', function() {
|
| 151 |
+
welcomeModal.style.display = 'none';
|
| 152 |
+
// 這裡可以添加跳轉到遊戲主頁面的代碼
|
| 153 |
+
alert('冒險開始!(此處將跳轉到遊戲主頁面)');
|
| 154 |
+
});
|
| 155 |
+
|
| 156 |
+
// 讀取進度按鈕點擊事件
|
| 157 |
+
loadBtn.addEventListener('click', function() {
|
| 158 |
+
alert('讀取進度功能尚未實作');
|
| 159 |
+
});
|
| 160 |
+
|
| 161 |
+
// 遊戲結束按鈕點擊事件
|
| 162 |
+
exitBtn.addEventListener('click', function() {
|
| 163 |
+
if (confirm('確定要結束遊戲嗎?')) {
|
| 164 |
+
alert('感謝遊玩《數學魔法王國:平方之旅》!');
|
| 165 |
+
}
|
| 166 |
+
});
|
| 167 |
+
|
| 168 |
+
// 支援跨裝置存檔的功能
|
| 169 |
+
function generateSaveCode(playerId) {
|
| 170 |
+
const progress = localStorage.getItem(`gameProgress_${playerId}`);
|
| 171 |
+
if (progress) {
|
| 172 |
+
// 將遊戲進度轉為Base64編碼
|
| 173 |
+
return btoa(JSON.stringify({
|
| 174 |
+
id: playerId,
|
| 175 |
+
progress: JSON.parse(progress)
|
| 176 |
+
}));
|
| 177 |
+
}
|
| 178 |
+
return null;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
function loadFromSaveCode(saveCode) {
|
| 182 |
+
try {
|
| 183 |
+
// 解碼並解析存檔數據
|
| 184 |
+
const data = JSON.parse(atob(saveCode));
|
| 185 |
+
const playerId = data.id;
|
| 186 |
+
const progress = data.progress;
|
| 187 |
+
|
| 188 |
+
// 檢查ID是否存在
|
| 189 |
+
const player = playerData.find(p => p.id === playerId);
|
| 190 |
+
if (!player) {
|
| 191 |
+
return { success: false, message: '無效的玩家ID' };
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
// 儲存進度
|
| 195 |
+
localStorage.setItem(`gameProgress_${playerId}`, JSON.stringify(progress));
|
| 196 |
+
localStorage.setItem('currentPlayerId', playerId);
|
| 197 |
+
localStorage.setItem('playerName', player.name);
|
| 198 |
+
localStorage.setItem('playerProfession', player.profession);
|
| 199 |
+
|
| 200 |
+
return { success: true, player: player };
|
| 201 |
+
} catch (e) {
|
| 202 |
+
console.error("無效的存檔碼", e);
|
| 203 |
+
return { success: false, message: '無效的存檔碼格式' };
|
| 204 |
+
}
|
| 205 |
+
}
|
| 206 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
| 1 |
+
* {
|
| 2 |
+
margin: 0;
|
| 3 |
+
padding: 0;
|
| 4 |
+
box-sizing: border-box;
|
| 5 |
+
font-family: "微軟正黑體", "Microsoft JhengHei", Arial, sans-serif;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
body {
|
| 9 |
+
background-image: url('Theme.jpg');
|
| 10 |
+
background-size: cover;
|
| 11 |
+
background-position: center;
|
| 12 |
+
background-repeat: no-repeat;
|
| 13 |
+
height: 100vh;
|
| 14 |
+
display: flex;
|
| 15 |
+
justify-content: center;
|
| 16 |
+
align-items: center;
|
| 17 |
+
overflow: hidden;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.game-container {
|
| 21 |
+
text-align: center;
|
| 22 |
+
width: 100%;
|
| 23 |
+
max-width: 800px;
|
| 24 |
+
padding: 20px;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.game-title {
|
| 28 |
+
color: white;
|
| 29 |
+
font-size: 2.5rem;
|
| 30 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
|
| 31 |
+
0 0 10px rgba(255, 255, 255, 0.5),
|
| 32 |
+
0 0 20px rgba(0, 150, 255, 0.5);
|
| 33 |
+
margin-bottom: 50px;
|
| 34 |
+
letter-spacing: 3px;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.menu-container {
|
| 38 |
+
background-color: rgba(0, 0, 0, 0.6);
|
| 39 |
+
border: 3px solid rgba(0, 200, 0, 0.7);
|
| 40 |
+
border-radius: 10px;
|
| 41 |
+
padding: 20px;
|
| 42 |
+
width: 300px;
|
| 43 |
+
margin: 0 auto;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.menu-btn {
|
| 47 |
+
display: block;
|
| 48 |
+
width: 100%;
|
| 49 |
+
padding: 12px;
|
| 50 |
+
margin: 10px 0;
|
| 51 |
+
background-color: rgba(0, 150, 0, 0.8);
|
| 52 |
+
color: white;
|
| 53 |
+
border: none;
|
| 54 |
+
border-radius: 5px;
|
| 55 |
+
font-size: 1.2rem;
|
| 56 |
+
cursor: pointer;
|
| 57 |
+
transition: all 0.3s;
|
| 58 |
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.menu-btn:hover {
|
| 62 |
+
background-color: rgba(0, 200, 0, 0.9);
|
| 63 |
+
transform: scale(1.05);
|
| 64 |
+
box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/* 彈窗樣式 */
|
| 68 |
+
.modal {
|
| 69 |
+
display: none;
|
| 70 |
+
position: fixed;
|
| 71 |
+
z-index: 1;
|
| 72 |
+
left: 0;
|
| 73 |
+
top: 0;
|
| 74 |
+
width: 100%;
|
| 75 |
+
height: 100%;
|
| 76 |
+
background-color: rgba(0, 0, 0, 0.7);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.modal-content {
|
| 80 |
+
background-color: rgba(0, 0, 0, 0.8);
|
| 81 |
+
color: white;
|
| 82 |
+
margin: 15% auto;
|
| 83 |
+
padding: 20px;
|
| 84 |
+
border: 2px solid rgba(0, 200, 0, 0.7);
|
| 85 |
+
border-radius: 10px;
|
| 86 |
+
width: 80%;
|
| 87 |
+
max-width: 500px;
|
| 88 |
+
box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
|
| 89 |
+
animation: modalFadeIn 0.5s;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
@keyframes modalFadeIn {
|
| 93 |
+
from {opacity: 0; transform: translateY(-50px);}
|
| 94 |
+
to {opacity: 1; transform: translateY(0);}
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.close-btn, .close-welcome-btn {
|
| 98 |
+
color: #aaa;
|
| 99 |
+
float: right;
|
| 100 |
+
font-size: 28px;
|
| 101 |
+
font-weight: bold;
|
| 102 |
+
cursor: pointer;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.close-btn:hover, .close-welcome-btn:hover {
|
| 106 |
+
color: white;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.modal-content h2 {
|
| 110 |
+
margin-bottom: 20px;
|
| 111 |
+
text-align: center;
|
| 112 |
+
color: rgba(0, 255, 0, 0.9);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
#player-id {
|
| 116 |
+
width: 100%;
|
| 117 |
+
padding: 10px;
|
| 118 |
+
margin-bottom: 15px;
|
| 119 |
+
background-color: rgba(255, 255, 255, 0.9);
|
| 120 |
+
border: none;
|
| 121 |
+
border-radius: 5px;
|
| 122 |
+
font-size: 1rem;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
#confirm-id, #start-adventure {
|
| 126 |
+
display: block;
|
| 127 |
+
width: 100%;
|
| 128 |
+
padding: 10px;
|
| 129 |
+
background-color: rgba(0, 150, 0, 0.8);
|
| 130 |
+
color: white;
|
| 131 |
+
border: none;
|
| 132 |
+
border-radius: 5px;
|
| 133 |
+
font-size: 1.1rem;
|
| 134 |
+
cursor: pointer;
|
| 135 |
+
transition: all 0.3s;
|
| 136 |
+
margin-top: 10px;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
#confirm-id:hover, #start-adventure:hover {
|
| 140 |
+
background-color: rgba(0, 200, 0, 0.9);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.error-message {
|
| 144 |
+
color: #ff6b6b;
|
| 145 |
+
margin-top: 10px;
|
| 146 |
+
text-align: center;
|
| 147 |
+
display: none;
|
| 148 |
}
|
| 149 |
|
| 150 |
+
/* 歡迎訊息樣式 */
|
| 151 |
+
.welcome-content {
|
| 152 |
+
max-width: 600px;
|
| 153 |
+
text-align: center;
|
| 154 |
}
|
| 155 |
|
| 156 |
+
#welcome-message {
|
| 157 |
+
margin: 20px 0;
|
| 158 |
+
line-height: 1.8;
|
| 159 |
+
font-size: 1.1rem;
|
|
|
|
| 160 |
}
|
| 161 |
|
| 162 |
+
#welcome-message p {
|
| 163 |
+
margin-bottom: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
}
|
| 165 |
|
| 166 |
+
#welcome-message .highlight {
|
| 167 |
+
color: #ffcc00;
|
| 168 |
+
font-weight: bold;
|
| 169 |
+
font-size: 1.3rem;
|
| 170 |
+
text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
|
| 171 |
}
|