Files
ai-coding-workflow-labs/gsd-framework/index.html
T
tiennm99 967960846b feat(04-02): add game over HTML overlay
- Added game-over-overlay div with fixed positioning and z-index 1000
- Added overlay-content div with semi-transparent background
- Added game-over-message h1 element for win/lose message
- Added restart-button button with hover effect
- Overlay hidden by default (display: none)
- Styling matches score overlay pattern
2026-03-11 08:21:27 +00:00

85 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pikachu Match Game</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #1a1a2e;
}
#game {
border-radius: 8px;
}
#score-display {
position: absolute;
top: 20px;
right: 20px;
background-color: rgba(26, 26, 70, 0.9);
color: #eaeaea;
padding: 16px 24px;
border-radius: 8px;
font-size: 24px;
font-weight: bold;
z-index: 100;
}
#game-over-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
justify-content: center;
align-items: center;
z-index: 1000;
}
#overlay-content {
background-color: rgba(26, 26, 70, 0.95);
padding: 40px;
border-radius: 12px;
text-align: center;
}
#game-over-message {
font-size: 48px;
color: #eaeaea;
margin-bottom: 24px;
}
#restart-button {
padding: 16px 32px;
font-size: 24px;
background-color: #e94560;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.2s;
}
#restart-button:hover {
background-color: #d63850;
}
</style>
</head>
<body>
<canvas id="game"></canvas>
<div id="score-display">Score: 0</div>
<div id="game-over-overlay">
<div id="overlay-content">
<h1 id="game-over-message"></h1>
<button id="restart-button">Play Again</button>
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>