Here's a vibrant and modern Singapore Toto Quick Pick generator with the requested features:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Singapore Toto Quick Pick</title>
<style>
:root {
--bg-color: #f0f4f8;
--text-color: #333;
--card-bg: #fff;
--primary: #6a11cb;
--secondary: #2575fc;
--accent: #ff6a88;
}
[data-theme="night"] {
--bg-color: #1a1a2e;
--text-color: #e6e6e6;
--card-bg: #16213e;
--primary: #fc5c7d;
--secondary: #6a82fb;
--accent: #ff9a8b;
}
* {
box-sizing: border-box;
font-family: 'Segoe UI', sans-serif;
}
body {
background: linear-gradient(135deg, var(--bg-color) 0%, #c3cfe2 100%);
color: var(--text-color);
transition: all 0.3s ease;
min-height: 100vh;
margin: 0;
padding: 2rem;
}
.container {
max-width: 800px;
margin: 0 auto;
text-align: center;
}
h1 {
color: var(--primary);
font-size: 2.5rem;
margin-bottom: 2rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.controls {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 1rem;
margin-bottom: 2rem;
}
input, button {
padding: 12px 20px;
border: none;
border-radius: 25px;
font-size: 1.1rem;
transition: all 0.3s ease;
}
input {
background: var(--card-bg);
color: var(--text-color);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
button {
background: linear-gradient(45deg, var(--primary), var(--secondary));
color: white;
cursor: pointer;
text-transform: uppercase;
font-weight: bold;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.ticket-container {
display: grid;
gap: 1.5rem;
margin: 2rem 0;
}
.ticket {
background: var(--card-bg);
padding: 1.5rem;
border-radius: 15px;
box-shadow: 0 8px 15px rgba(0,0,0,0.1);
display: flex;
justify-content: center;
gap: 0.8rem;
}
.number {
width: 50px;
height: 50px;
background: linear-gradient(45deg, var(--primary), var(--secondary));
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 1.2rem;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.theme-toggle {
position: fixed;
top: 20px;
right: 20px;
padding: 10px;
border-radius: 50%;
width: 45px;
height: 45px;
}
@media (max-width: 600px) {
.controls {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div class="container">
<h1>🎱 Singapore Toto Quick Pick</h1>
<div class="controls">
<input type="number" id="lines" placeholder="Number of Lines" min="1">
<button onclick="generateTickets()">Generate Tickets</button>
<button onclick="copyTickets()" id="copyBtn">Copy All</button>
</div>
<div class="ticket-container" id="tickets"></div>
<div class="controls">
<button onclick="resetTickets()">Reset</button>
<button onclick="toggleTheme()" class="theme-toggle">🌓</button>
</div>
</div>
<script>
function generateNumbers() {
const numbers = [];
while (numbers.length < 6) {
const num = Math.floor(Math.random() * 49) + 1;
if (!numbers.includes(num)) numbers.push(num);
}
return numbers.sort((a, b) => a - b);
}
function generateTickets() {
const lines = parseInt(document.getElementById('lines').value) || 1;
const container = document.getElementById('tickets');
container.innerHTML = '';
for (let i = 0; i < lines; i++) {
const numbers = generateNumbers();
const ticket = document.createElement('div');
ticket.className = 'ticket';
ticket.innerHTML = numbers.map(n =>
`<div class="number">${n.toString().padStart(2, '0')}</div>`
).join('');
container.appendChild(ticket);
}
}
function copyTickets() {
const tickets = Array.from(document.getElementsByClassName('ticket'))
.map(ticket =>
Array.from(ticket.children)
.map(num => num.textContent)
.join(' ')
).join('\n');
navigator.clipboard.writeText(tickets).then(() => {
const copyBtn = document.getElementById('copyBtn');
copyBtn.textContent = 'Copied!';
setTimeout(() => copyBtn.textContent = 'Copy All', 2000);
});
}
function resetTickets() {
document.getElementById('tickets').innerHTML = '';
document.getElementById('lines').value = '';
}
function toggleTheme() {
document.body.toggleAttribute('data-theme', 'night');
}
// Initial load
generateTickets();
</script>
</body>
</html>
This web page includes:
- A modern, gradient-based design with card-style tickets
- Responsive layout that works on mobile and desktop
- Day/Night theme toggle
- Number input for selecting number of lines
- Copy to clipboard functionality
- Reset button
- Animated hover effects
- Unique number generation (6 numbers 1-49 per ticket)
- Sorted numbers in each ticket
- Visual feedback for copy action
- Modern UI with shadow effects and rounded corners
To use:
- Enter number of lines needed
- Click "Generate Tickets"
- Use "Copy All" to copy tickets
- "Reset" to clear
- Click the moon/sun icon to toggle themes
The design features vibrant gradients, smooth animations, and a clean layout that works well for both casual users and lottery enthusiasts. The numbers are displayed in circular badges with proper zero-padding for single-digit numbers.