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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Loto Boll</title>
|
| 7 |
+
<style>
|
| 8 |
+
:root {
|
| 9 |
+
--primary: #4a6bff;
|
| 10 |
+
--secondary: #ff6b6b;
|
| 11 |
+
--dark: #2c3e50;
|
| 12 |
+
--light: #f8f9fa;
|
| 13 |
+
--success: #28a745;
|
| 14 |
+
--warning: #ffc107;
|
| 15 |
+
--info: #17a2b8;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
* {
|
| 19 |
+
margin: 0;
|
| 20 |
+
padding: 0;
|
| 21 |
+
box-sizing: border-box;
|
| 22 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
body {
|
| 26 |
+
background-color: #f5f7ff;
|
| 27 |
+
color: var(--dark);
|
| 28 |
+
min-height: 100vh;
|
| 29 |
+
display: flex;
|
| 30 |
+
flex-direction: column;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
header {
|
| 34 |
+
background: linear-gradient(135deg, var(--primary), #6c5ce7);
|
| 35 |
+
color: white;
|
| 36 |
+
padding: 1.5rem;
|
| 37 |
+
text-align: center;
|
| 38 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
h1 {
|
| 42 |
+
font-size: 2.5rem;
|
| 43 |
+
margin-bottom: 0.5rem;
|
| 44 |
+
font-weight: 700;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.container {
|
| 48 |
+
max-width: 1200px;
|
| 49 |
+
margin: 2rem auto;
|
| 50 |
+
padding: 0 1rem;
|
| 51 |
+
flex: 1;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.game-container {
|
| 55 |
+
background: white;
|
| 56 |
+
border-radius: 12px;
|
| 57 |
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
| 58 |
+
padding: 2rem;
|
| 59 |
+
margin-bottom: 2rem;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.balls-container {
|
| 63 |
+
display: flex;
|
| 64 |
+
flex-wrap: wrap;
|
| 65 |
+
gap: 1rem;
|
| 66 |
+
justify-content: center;
|
| 67 |
+
margin: 2rem 0;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.ball {
|
| 71 |
+
width: 60px;
|
| 72 |
+
height: 60px;
|
| 73 |
+
border-radius: 50%;
|
| 74 |
+
background: linear-gradient(135deg, var(--primary), #6c5ce7);
|
| 75 |
+
color: white;
|
| 76 |
+
display: flex;
|
| 77 |
+
align-items: center;
|
| 78 |
+
justify-content: center;
|
| 79 |
+
font-size: 1.5rem;
|
| 80 |
+
font-weight: bold;
|
| 81 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 82 |
+
transition: transform 0.2s, box-shadow 0.2s;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.ball:hover {
|
| 86 |
+
transform: translateY(-5px);
|
| 87 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.ball.selected {
|
| 91 |
+
background: linear-gradient(135deg, var(--secondary), #ff8e8e);
|
| 92 |
+
transform: scale(1.1);
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.controls {
|
| 96 |
+
display: flex;
|
| 97 |
+
flex-wrap: wrap;
|
| 98 |
+
gap: 1rem;
|
| 99 |
+
justify-content: center;
|
| 100 |
+
margin-top: 2rem;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
button {
|
| 104 |
+
padding: 0.8rem 1.5rem;
|
| 105 |
+
border: none;
|
| 106 |
+
border-radius: 8px;
|
| 107 |
+
font-size: 1rem;
|
| 108 |
+
font-weight: 600;
|
| 109 |
+
cursor: pointer;
|
| 110 |
+
transition: all 0.2s;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.btn-primary {
|
| 114 |
+
background-color: var(--primary);
|
| 115 |
+
color: white;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.btn-primary:hover {
|
| 119 |
+
background-color: #3a5bef;
|
| 120 |
+
transform: translateY(-2px);
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.btn-secondary {
|
| 124 |
+
background-color: var(--secondary);
|
| 125 |
+
color: white;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.btn-secondary:hover {
|
| 129 |
+
background-color: #e05a5a;
|
| 130 |
+
transform: translateY(-2px);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.results {
|
| 134 |
+
margin-top: 2rem;
|
| 135 |
+
padding: 1.5rem;
|
| 136 |
+
background-color: var(--light);
|
| 137 |
+
border-radius: 8px;
|
| 138 |
+
display: none;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.results.show {
|
| 142 |
+
display: block;
|
| 143 |
+
animation: fadeIn 0.5s ease-in-out;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
@keyframes fadeIn {
|
| 147 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 148 |
+
to { opacity: 1; transform: translateY(0); }
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
footer {
|
| 152 |
+
background-color: var(--dark);
|
| 153 |
+
color: white;
|
| 154 |
+
text-align: center;
|
| 155 |
+
padding: 1.5rem;
|
| 156 |
+
margin-top: auto;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
@media (max-width: 768px) {
|
| 160 |
+
h1 {
|
| 161 |
+
font-size: 2rem;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.ball {
|
| 165 |
+
width: 50px;
|
| 166 |
+
height: 50px;
|
| 167 |
+
font-size: 1.2rem;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.controls {
|
| 171 |
+
flex-direction: column;
|
| 172 |
+
align-items: center;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
button {
|
| 176 |
+
width: 100%;
|
| 177 |
+
max-width: 300px;
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
</style>
|
| 181 |
+
</head>
|
| 182 |
+
<body>
|
| 183 |
+
<header>
|
| 184 |
+
<h1>Loto Boll</h1>
|
| 185 |
+
<p>Select your lucky numbers and try your chance!</p>
|
| 186 |
+
</header>
|
| 187 |
+
|
| 188 |
+
<div class="container">
|
| 189 |
+
<div class="game-container">
|
| 190 |
+
<h2>Select 6 Numbers</h2>
|
| 191 |
+
<div class="balls-container" id="ballsContainer">
|
| 192 |
+
<!-- Balls will be generated by JavaScript -->
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div class="controls">
|
| 196 |
+
<button class="btn-primary" id="generateBtn">Generate Random</button>
|
| 197 |
+
<button class="btn-secondary" id="checkBtn">Check Results</button>
|
| 198 |
+
<button class="btn-primary" id="resetBtn">Reset</button>
|
| 199 |
+
</div>
|
| 200 |
+
|
| 201 |
+
<div class="results" id="results">
|
| 202 |
+
<h3>Your Results</h3>
|
| 203 |
+
<div id="resultNumbers"></div>
|
| 204 |
+
<p id="resultMessage"></p>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
|
| 209 |
+
<footer>
|
| 210 |
+
<p>© 2023 Loto Boll Game. All rights reserved.</p>
|
| 211 |
+
</footer>
|
| 212 |
+
|
| 213 |
+
<script>
|
| 214 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 215 |
+
const ballsContainer = document.getElementById('ballsContainer');
|
| 216 |
+
const generateBtn = document.getElementById('generateBtn');
|
| 217 |
+
const checkBtn = document.getElementById('checkBtn');
|
| 218 |
+
const resetBtn = document.getElementById('resetBtn');
|
| 219 |
+
const results = document.getElementById('results');
|
| 220 |
+
const resultNumbers = document.getElementById('resultNumbers');
|
| 221 |
+
const resultMessage = document.getElementById('resultMessage');
|
| 222 |
+
|
| 223 |
+
let selectedBalls = [];
|
| 224 |
+
const totalBalls = 49;
|
| 225 |
+
const ballsToSelect = 6;
|
| 226 |
+
|
| 227 |
+
// Create balls
|
| 228 |
+
for (let i = 1; i <= totalBalls; i++) {
|
| 229 |
+
const ball = document.createElement('div');
|
| 230 |
+
ball.className = 'ball';
|
| 231 |
+
ball.textContent = i;
|
| 232 |
+
ball.dataset.number = i;
|
| 233 |
+
ball.addEventListener('click', toggleBall);
|
| 234 |
+
ballsContainer.appendChild(ball);
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
// Toggle ball selection
|
| 238 |
+
function toggleBall(e) {
|
| 239 |
+
const ball = e.target;
|
| 240 |
+
const number = parseInt(ball.dataset.number);
|
| 241 |
+
|
| 242 |
+
if (ball.classList.contains('selected')) {
|
| 243 |
+
ball.classList.remove('selected');
|
| 244 |
+
selectedBalls = selectedBalls.filter(n => n !== number);
|
| 245 |
+
} else {
|
| 246 |
+
if (selectedBalls.length < ballsToSelect) {
|
| 247 |
+
ball.classList.add('selected');
|
| 248 |
+
selectedBalls.push(number);
|
| 249 |
+
} else {
|
| 250 |
+
alert(`You can only select ${ballsToSelect} numbers!`);
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
// Generate random numbers
|
| 256 |
+
generateBtn.addEventListener('click', function() {
|
| 257 |
+
// Clear previous selection
|
| 258 |
+
selectedBalls = [];
|
| 259 |
+
document.querySelectorAll('.ball.selected').forEach(ball => {
|
| 260 |
+
ball.classList.remove('selected');
|
| 261 |
+
});
|
| 262 |
+
|
| 263 |
+
// Generate unique random numbers
|
| 264 |
+
while (selectedBalls.length < ballsToSelect) {
|
| 265 |
+
const randomNum = Math.floor(Math.random() * totalBalls) + 1;
|
| 266 |
+
if (!selectedBalls.includes(randomNum)) {
|
| 267 |
+
selectedBalls.push(randomNum);
|
| 268 |
+
document.querySelector(`.ball[data-number="${randomNum}"]`).classList.add('selected');
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
});
|
| 272 |
+
|
| 273 |
+
// Check results
|
| 274 |
+
checkBtn.addEventListener('click', function() {
|
| 275 |
+
if (selectedBalls.length !== ballsToSelect) {
|
| 276 |
+
alert(`Please select exactly ${ballsToSelect} numbers!`);
|
| 277 |
+
return;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
// Generate winning numbers
|
| 281 |
+
const winningNumbers = [];
|
| 282 |
+
while (winningNumbers.length < ballsToSelect) {
|
| 283 |
+
const randomNum = Math.floor(Math.random() * totalBalls) + 1;
|
| 284 |
+
if (!winningNumbers.includes(randomNum)) {
|
| 285 |
+
winningNumbers.push(randomNum);
|
| 286 |
+
}
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
// Check matches
|
| 290 |
+
const matchedNumbers = selectedBalls.filter(num => winningNumbers.includes(num));
|
| 291 |
+
const matchCount = matchedNumbers.length;
|
| 292 |
+
|
| 293 |
+
// Display results
|
| 294 |
+
resultNumbers.innerHTML = `
|
| 295 |
+
<p>Your numbers: ${selectedBalls.sort((a, b) => a - b).join(', ')}</p>
|
| 296 |
+
<p>Winning numbers: ${winningNumbers.sort((a, b) => a - b).join(', ')}</p>
|
| 297 |
+
<p>Matches: ${matchCount} (${matchedNumbers.sort((a, b) => a - b).join(', ') || 'None'})</p>
|
| 298 |
+
`;
|
| 299 |
+
|
| 300 |
+
// Result message
|
| 301 |
+
let message = '';
|
| 302 |
+
if (matchCount === ballsToSelect) {
|
| 303 |
+
message = '🎉 Jackpot! You matched all numbers! 🎉';
|
| 304 |
+
} else if (matchCount >= ballsToSelect - 2) {
|
| 305 |
+
message = 'Great job! You matched most numbers!';
|
| 306 |
+
} else if (matchCount > 0) {
|
| 307 |
+
message = 'Not bad! You got some matches.';
|
| 308 |
+
} else {
|
| 309 |
+
message = 'Better luck next time!';
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
resultMessage.textContent = message;
|
| 313 |
+
results.classList.add('show');
|
| 314 |
+
});
|
| 315 |
+
|
| 316 |
+
// Reset game
|
| 317 |
+
resetBtn.addEventListener('click', function() {
|
| 318 |
+
selectedBalls = [];
|
| 319 |
+
document.querySelectorAll('.ball.selected').forEach(ball => {
|
| 320 |
+
ball.classList.remove('selected');
|
| 321 |
+
});
|
| 322 |
+
results.classList.remove('show');
|
| 323 |
+
});
|
| 324 |
+
});
|
| 325 |
+
</script>
|
| 326 |
+
</body>
|
| 327 |
+
</html>
|