mobile-desktop-tablet

This commit is contained in:
mike
2025-12-16 21:03:01 +01:00
parent 03a7d11976
commit 2e7cb722c0
34 changed files with 2670 additions and 63 deletions

62
desktop/404.html Normal file
View File

@@ -0,0 +1,62 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
line-height: 1.2;
margin: 0;
}
html {
color: #888;
display: table;
font-family: sans-serif;
height: 100%;
text-align: center;
width: 100%;
}
body {
display: table-cell;
vertical-align: middle;
margin: 2em auto;
}
h1 {
color: #555;
font-size: 2em;
font-weight: 400;
}
p {
margin: 0 auto;
width: 280px;
}
@media only screen and (max-width: 280px) {
body,
p {
width: 95%;
}
h1 {
font-size: 1.5em;
margin: 0 0 0.3em;
}
}
</style>
</head>
<body>
<h1>Page Not Found</h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
</body>
</html>
<!-- IE needs 512+ bytes: https://docs.microsoft.com/archive/blogs/ieinternals/friendly-http-error-pages -->

BIN
desktop/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

954
desktop/game.js Normal file
View File

@@ -0,0 +1,954 @@
// Kruiswoord Pro Game Logic - Fixed Version with Tablet Support and Correct Hints
class KruiswoordProGame {
constructor() {
this.currentLevel = 1
this.coins = 100
this.hints = 3
this.currentPuzzle = null
this.userAnswers = {}
this.selectedCell = null
this.gridElement = document.getElementById('crosswordGrid')
this.isTablet = window.innerWidth >= 768
this.initializeGame()
this.setupEventListeners()
this.loadPuzzle(this.currentLevel)
// Handle window resize for tablet/desktop
window.addEventListener('resize', () => {
this.handleResize()
})
}
handleResize() {
const wasTablet = this.isTablet
this.isTablet = window.innerWidth >= 768
if (wasTablet !== this.isTablet && this.currentPuzzle) {
this.renderGrid() // Re-render for different screen size
}
}
initializeGame() {
this.updateUI()
this.setupTabletStyles()
}
setupTabletStyles() {
if (this.isTablet) {
document.body.classList.add('tablet-mode')
} else {
document.body.classList.remove('tablet-mode')
}
}
setupEventListeners() {
// Menu controls
document.getElementById('menuBtn').addEventListener('click', () => {
document.getElementById('sideMenu').classList.add('active')
})
document.getElementById('closeMenu').addEventListener('click', () => {
document.getElementById('sideMenu').classList.remove('active')
})
// Game controls
document.getElementById('checkBtn').addEventListener('click', () => {
this.checkAnswers()
})
document.getElementById('clearBtn').addEventListener('click', () => {
this.clearGrid()
})
document.getElementById('revealLetterBtn').addEventListener('click', () => {
this.showHintModal()
})
document.getElementById('skipBtn').addEventListener('click', () => {
this.skipPuzzle()
})
// Hint modal
document.getElementById('useHintBtn').addEventListener('click', () => {
this.useHint()
})
document.getElementById('cancelHintBtn').addEventListener('click', () => {
this.hideHintModal()
})
// Success modal
document.getElementById('nextPuzzleBtn').addEventListener('click', () => {
this.nextPuzzle()
})
document.getElementById('closeModalBtn').addEventListener('click', () => {
this.hideSuccessModal()
})
// Menu items
document.getElementById('dailyPuzzle').addEventListener('click', () => {
this.loadDailyPuzzle()
})
document.getElementById('levelSelect').addEventListener('click', () => {
this.showLevelSelect()
})
// Keyboard navigation
document.addEventListener('keydown', (e) => {
this.handleKeyboardInput(e)
})
}
// Load puzzles from external puzzleData.js
getDutchPuzzles() {
// Use puzzles from puzzleData.js if available
if (typeof DUTCH_PUZZLES !== 'undefined') {
return {
1: DUTCH_PUZZLES.level1,
2: DUTCH_PUZZLES.level2,
3: DUTCH_PUZZLES.level3
}
}
// Fallback puzzles
return {
1: {
grid : [
['H', 'A', 'A', 'S'],
['#', '#', '#', '#'],
['V', 'L', 'I', 'E', 'G'],
['#', '#', '#', '#', '#']
],
words : [
{
word : 'HAAS',
clue : 'Snel dier',
startRow : 0,
startCol : 0,
direction: 'horizontal',
answer : 'HAAS'
},
{
word : 'VLIEG',
clue : 'Insect',
startRow : 2,
startCol : 0,
direction: 'horizontal',
answer : 'VLIEG'
}
],
difficulty: 1
},
2: {
grid : [
['B', 'O', 'M', 'E', 'N'],
['#', '#', '#', '#', '#'],
['H', 'O', 'N', 'D', 'E'],
['#', '#', '#', '#', '#']
],
words : [
{
word : 'BOMEN',
clue : 'Planten →',
startRow : 0,
startCol : 0,
direction: 'horizontal',
answer : 'BOMEN'
},
{
word : 'HONDE',
clue : 'Huisdieren →',
startRow : 2,
startCol : 0,
direction: 'horizontal',
answer : 'HONDE'
}
],
difficulty: 2
},
3: {
grid : [
['R', 'E', 'G', 'E', 'N'],
['#', '#', '#', '#', '#'],
['S', 'N', 'E', 'E', 'U'],
['#', '#', '#', '#', '#']
],
words : [
{
word : 'REGEN',
clue : 'Valt uit de lucht →',
startRow : 0,
startCol : 0,
direction: 'horizontal',
answer : 'REGEN'
},
{
word : 'SNEEU',
clue : 'Witte vlokken →',
startRow : 2,
startCol : 0,
direction: 'horizontal',
answer : 'SNEEU'
}
],
difficulty: 3
},
// Tablet-optimized larger puzzles
4: {
grid : [
['H', 'A', 'A', 'S', '#', '#'],
['#', '#', '#', 'T', '#', '#'],
['V', 'L', 'I', 'E', 'G', '#'],
['#', '#', '#', 'S', '#', '#'],
['#', '#', '#', '#', '#', '#'],
['#', '#', '#', '#', '#', '#']
],
words : [
{
word : 'HAAS',
clue : 'Snel dier →',
startRow : 0,
startCol : 0,
direction: 'horizontal',
answer : 'HAAS'
},
{
word : 'VLIEG',
clue : 'Insect',
startRow : 2,
startCol : 0,
direction: 'horizontal',
answer : 'VLIEG'
}
],
difficulty : 2,
tabletOptimized: true
}
}
}
loadPuzzle(level) {
const puzzles = this.getDutchPuzzles()
this.currentPuzzle = puzzles[level] || puzzles[1]
this.renderGrid()
this.userAnswers = {}
this.updateProgress()
}
calculateOptimalCellSize(rows, cols) {
// Get available viewport space with mobile-specific adjustments
const isMobile = window.innerWidth < 768
const headerHeight = isMobile ? 70 : 80
const progressHeight = isMobile ? 50 : 60
const controlsHeight = isMobile ? 100 : 120
const gridPadding = isMobile ? 5 : 10 // padding inside grid-container
const sectionPadding = isMobile ? 5 : 20 // padding of puzzle-section
const mainPadding = isMobile ? 10 : 20 // game-main padding
const totalPadding = (gridPadding * 2) + (sectionPadding * 2) + (mainPadding * 2) + (isMobile ? 20 : 0)
const gap = isMobile ? 1 : 2
const availableHeight = window.innerHeight - headerHeight - progressHeight - controlsHeight - totalPadding
const availableWidth = window.innerWidth - totalPadding
// Calculate max cell size based on available space
// Account for gaps between cells
const totalGapHeight = (rows - 1) * gap
const totalGapWidth = (cols - 1) * gap
const maxCellFromHeight = (availableHeight - totalGapHeight) / rows
const maxCellFromWidth = (availableWidth - totalGapWidth) / cols
// Use the smaller dimension
let cellSize = Math.floor(Math.min(maxCellFromHeight, maxCellFromWidth))
// Set min/max bounds based on device - more conservative on mobile
const minSize = isMobile ? 28 : 40
const maxSize = isMobile ? 45 : 120
cellSize = Math.max(minSize, Math.min(maxSize, cellSize))
console.log('Grid calculation:', {
isMobile,
viewportWidth: window.innerWidth,
availableWidth,
availableHeight,
rows,
cols,
maxCellFromWidth,
maxCellFromHeight,
finalCellSize: cellSize,
totalGridWidth: cols * cellSize + totalGapWidth + (gridPadding * 2),
totalPadding
})
return cellSize
}
renderGrid() {
if (!this.currentPuzzle) return
const grid = this.currentPuzzle.grid
const words = this.currentPuzzle.words
this.gridElement.innerHTML = ''
// Set grid dimensions - add 1 column for clue cells on the left
const rows = grid.length
const cols = Math.max(...grid.map(row => row.length)) + 1
// Calculate available space and determine optimal cell size
const cellSize = this.calculateOptimalCellSize(rows, cols)
const isMobile = window.innerWidth < 768
const gap = isMobile ? 1 : 2
this.gridElement.style.gridTemplateColumns = `repeat(${ cols }, ${ cellSize }px)`
this.gridElement.style.gridTemplateRows = `repeat(${ rows }, ${ cellSize }px)`
this.gridElement.style.gap = `${gap}px`
this.gridElement.style.justifyContent = 'center'
this.gridElement.style.margin = '0 auto'
// Create grid cells with clue column
for (let row = 0; row < rows; row++) {
for (let col = 0; col < cols; col++) {
if (col === 0) {
// First column is for clues
const clueData = this.getClueForRow(row, words)
const cellElement = this.createClueCell(row, clueData, cellSize)
this.gridElement.appendChild(cellElement)
} else {
// Remaining columns are the actual grid (offset by 1)
const gridCol = col - 1
const cellValue = grid[row] && grid[row][gridCol] ? grid[row][gridCol] : '#'
const cellElement = this.createCellElement(cellValue, row, gridCol, words, cellSize)
this.gridElement.appendChild(cellElement)
}
}
}
this.attachCellListeners()
}
getClueForRow(row, words) {
// Find horizontal word that starts in this row
for (const word of words) {
if (word.direction === 'horizontal' && word.startRow === row) {
return {
clue: word.clue,
direction: 'horizontal'
}
}
}
return null
}
createClueCell(row, clueData, cellSize) {
const cellDiv = document.createElement('div')
cellDiv.className = 'grid-cell clue-cell'
cellDiv.style.width = `${ cellSize }px`
cellDiv.style.height = `${ cellSize }px`
if (clueData) {
// Has a clue for this row
const clueText = document.createElement('div')
clueText.className = 'clue-text'
clueText.textContent = clueData.clue
// Responsive font sizing based on cell size
const fontSize = Math.max(7, Math.min(12, cellSize / 6))
clueText.style.fontSize = `${fontSize}px`
clueText.style.lineHeight = '1.1'
clueText.style.padding = '2px'
const arrow = document.createElement('div')
arrow.className = 'arrow arrow-right'
arrow.textContent = '→'
const arrowSize = Math.max(12, Math.min(24, cellSize / 3))
arrow.style.fontSize = `${arrowSize}px`
cellDiv.appendChild(clueText)
cellDiv.appendChild(arrow)
} else {
// Empty clue cell
cellDiv.classList.add('blocked-cell')
}
return cellDiv
}
createCellElement(cellValue, row, col, words, cellSize) {
const cellDiv = document.createElement('div')
cellDiv.className = 'grid-cell'
cellDiv.dataset.row = row
cellDiv.dataset.col = col
// FIXED: Set consistent sizing
cellDiv.style.width = `${ cellSize }px`
cellDiv.style.height = `${ cellSize }px`
if (cellValue === '#') {
// Check if this is a clue cell (before second word in row)
const clueData = this.getClueForPosition(row, col, words)
if (clueData) {
// This is a clue cell for the second word
cellDiv.classList.add('clue-cell')
const clueText = document.createElement('div')
clueText.className = 'clue-text'
clueText.textContent = clueData.clue
// Responsive font sizing based on cell size
const fontSize = Math.max(7, Math.min(12, cellSize / 6))
clueText.style.fontSize = `${fontSize}px`
clueText.style.lineHeight = '1.1'
clueText.style.padding = '2px'
const arrow = document.createElement('div')
arrow.className = 'arrow arrow-right'
arrow.textContent = '→'
const arrowSize = Math.max(12, Math.min(24, cellSize / 3))
arrow.style.fontSize = `${arrowSize}px`
cellDiv.appendChild(clueText)
cellDiv.appendChild(arrow)
} else {
// Regular blocked cell
cellDiv.classList.add('blocked-cell')
}
} else {
// Letter cell - create input
if (this.isPartOfWord(row, col, words)) {
cellDiv.classList.add('input-cell')
const input = document.createElement('input')
input.type = 'text'
input.maxLength = 1
input.dataset.row = row
input.dataset.col = col
// Responsive font sizing based on cell size
const inputFontSize = Math.max(16, Math.min(36, cellSize * 0.5))
input.style.fontSize = `${inputFontSize}px`
// Add existing answer if available
const key = `${ row }-${ col }`
if (this.userAnswers[key]) {
input.value = this.userAnswers[key]
}
cellDiv.appendChild(input)
} else {
// Empty cell that's not part of any word
cellDiv.classList.add('blocked-cell')
}
}
return cellDiv
}
// FIXED: Check if cell is part of any word
isPartOfWord(row, col, words) {
for (const word of words) {
if (word.direction === 'horizontal') {
if (row === word.startRow && col >= word.startCol && col < word.startCol + word.answer.length) {
return true
}
} else if (word.direction === 'vertical') {
if (col === word.startCol && row >= word.startRow && row < word.startRow + word.answer.length) {
return true
}
}
}
return false
}
getClueForPosition(row, col, words) {
for (const word of words) {
if (word.direction === 'horizontal') {
// Horizontal clue appears one cell to the left of word start
if (word.startRow === row && word.startCol - 1 === col) {
return {
clue : word.clue,
direction: word.direction
}
}
} else if (word.direction === 'vertical') {
// Vertical clue appears one cell above word start
if (word.startRow - 1 === row && word.startCol === col) {
return {
clue : word.clue,
direction: word.direction
}
}
}
}
return null
}
attachCellListeners() {
const inputs = this.gridElement.querySelectorAll('input')
inputs.forEach(input => {
input.addEventListener('input', (e) => {
this.handleInput(e)
})
input.addEventListener('focus', (e) => {
this.selectCell(e.target)
})
input.addEventListener('click', (e) => {
this.selectCell(e.target)
})
})
}
handleInput(e) {
const input = e.target
const value = input.value.toUpperCase()
input.value = value
const row = parseInt(input.dataset.row)
const col = parseInt(input.dataset.col)
const key = `${ row }-${ col }`
this.userAnswers[key] = value
// FIXED: Smart navigation to next cell in the same word
if (value && value.length === 1) {
this.moveToNextInWord(input, row, col)
}
this.updateProgress()
}
// FIXED: Navigate to next cell in the same word, not just any next input
moveToNextInWord(currentInput, row, col) {
const currentWord = this.findWordContainingCell(row, col)
if (!currentWord) {
this.moveToNextCell(currentInput)
return
}
let nextRow = row
let nextCol = col
if (currentWord.direction === 'horizontal') {
nextCol++
} else {
nextRow++
}
// Check if next position is still in the same word
const nextInput = this.gridElement.querySelector(`input[data-row="${ nextRow }"][data-col="${ nextCol }"]`)
if (nextInput && this.isPartOfWord(nextRow, nextCol, this.currentPuzzle.words)) {
nextInput.focus()
nextInput.select()
} else {
// End of word, move to next available input
this.moveToNextCell(currentInput)
}
}
findWordContainingCell(row, col) {
for (const word of this.currentPuzzle.words) {
if (word.direction === 'horizontal') {
if (row === word.startRow && col >= word.startCol && col < word.startCol + word.answer.length) {
return word
}
} else if (word.direction === 'vertical') {
if (col === word.startCol && row >= word.startRow && row < word.startRow + word.answer.length) {
return word
}
}
}
return null
}
selectCell(input) {
// Remove previous selection
document.querySelectorAll('.grid-cell').forEach(cell => {
cell.classList.remove('active')
})
// Add selection to current cell
input.parentElement.classList.add('active')
this.selectedCell = input
}
// FIXED: Better navigation that respects word boundaries
moveToNextCell(currentInput) {
const inputs = Array.from(this.gridElement.querySelectorAll('input'))
const currentIndex = inputs.indexOf(currentInput)
if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
const nextInput = inputs[currentIndex + 1]
nextInput.focus()
nextInput.select()
}
}
handleKeyboardInput(e) {
if (!this.selectedCell) return
const inputs = Array.from(this.gridElement.querySelectorAll('input'))
const currentIndex = inputs.indexOf(this.selectedCell)
if (currentIndex === -1) return
let targetIndex = currentIndex
switch (e.key) {
case 'ArrowUp':
const currentRow = parseInt(this.selectedCell.dataset.row)
const currentCol = parseInt(this.selectedCell.dataset.col)
const targetInput = this.findInputAbove(currentRow, currentCol)
if (targetInput) {
targetInput.focus()
targetInput.select()
}
break
case 'ArrowDown':
const targetInputDown = this.findInputBelow(currentRow, currentCol)
if (targetInputDown) {
targetInputDown.focus()
targetInputDown.select()
}
break
case 'ArrowLeft':
if (currentIndex > 0) {
targetIndex--
inputs[targetIndex].focus()
inputs[targetIndex].select()
}
break
case 'ArrowRight':
if (currentIndex < inputs.length - 1) {
targetIndex++
inputs[targetIndex].focus()
inputs[targetIndex].select()
}
break
case 'Backspace':
this.selectedCell.value = ''
const row = parseInt(this.selectedCell.dataset.row)
const col = parseInt(this.selectedCell.dataset.col)
delete this.userAnswers[`${ row }-${ col }`]
this.updateProgress()
break
}
}
findInputAbove(row, col) {
for (let r = row - 1; r >= 0; r--) {
const input = this.gridElement.querySelector(`input[data-row="${ r }"][data-col="${ col }"]`)
if (input) return input
}
return null
}
findInputBelow(row, col) {
const maxRow = Math.max(...Array.from(this.gridElement.querySelectorAll('input')).map(input => parseInt(input.dataset.row)))
for (let r = row + 1; r <= maxRow; r++) {
const input = this.gridElement.querySelector(`input[data-row="${ r }"][data-col="${ col }"]`)
if (input) return input
}
return null
}
checkAnswers() {
let correct = 0
let total = 0
const inputs = this.gridElement.querySelectorAll('input')
inputs.forEach(input => {
const row = parseInt(input.dataset.row)
const col = parseInt(input.dataset.col)
const key = `${ row }-${ col }`
const userAnswer = input.value.toUpperCase()
const correctAnswer = this.findCorrectAnswer(row, col)
if (correctAnswer) {
total++
if (userAnswer === correctAnswer) {
correct++
input.parentElement.classList.add('correct')
input.parentElement.classList.remove('incorrect')
} else if (userAnswer) {
input.parentElement.classList.add('incorrect')
input.parentElement.classList.remove('correct')
}
}
})
const percentage = total > 0 ? Math.round((correct / total) * 100) : 0
if (percentage === 100) {
this.showSuccess()
} else {
this.showFeedback(`Je hebt ${ correct } van de ${ total } letters correct (${ percentage }%)`)
}
}
findCorrectAnswer(row, col) {
for (const word of this.currentPuzzle.words) {
if (word.direction === 'horizontal') {
if (word.startRow === row && col >= word.startCol && col < word.startCol + word.answer.length) {
const letterIndex = col - word.startCol
return word.answer[letterIndex]
}
} else if (word.direction === 'vertical') {
if (word.startCol === col && row >= word.startRow && row < word.startRow + word.answer.length) {
const letterIndex = row - word.startRow
return word.answer[letterIndex]
}
}
}
return null
}
clearGrid() {
if (confirm('Weet je zeker dat je alle ingevulde letters wilt wissen?')) {
const inputs = this.gridElement.querySelectorAll('input')
inputs.forEach(input => {
input.value = ''
input.parentElement.classList.remove('correct', 'incorrect')
})
this.userAnswers = {}
this.updateProgress()
this.showFeedback('Raster gewist')
}
}
showHintModal() {
if (this.hints <= 0) {
this.showFeedback('Je hebt geen hints meer. Verdien hints door puzzels op te lossen!', 'error')
return
}
document.getElementById('hintModal').classList.add('active')
}
hideHintModal() {
document.getElementById('hintModal').classList.remove('active')
}
useHint() {
if (this.hints <= 0) return
const inputs = this.gridElement.querySelectorAll('input')
const emptyInputs = Array.from(inputs).filter(input => !input.value)
if (emptyInputs.length === 0) {
this.showFeedback('Alle letters zijn al ingevuld!', 'info')
this.hideHintModal()
return
}
// Randomly select an empty cell
const randomInput = emptyInputs[Math.floor(Math.random() * emptyInputs.length)]
const row = parseInt(randomInput.dataset.row)
const col = parseInt(randomInput.dataset.col)
const correctAnswer = this.findCorrectAnswer(row, col)
if (correctAnswer) {
randomInput.value = correctAnswer
const key = `${ row }-${ col }`
this.userAnswers[key] = correctAnswer
this.hints--
this.updateUI()
this.updateProgress()
this.showFeedback('Letter onthuld!')
this.hideHintModal()
// Check if puzzle is complete
this.checkIfComplete()
}
}
checkIfComplete() {
const inputs = this.gridElement.querySelectorAll('input')
let allFilled = true
inputs.forEach(input => {
if (!input.value) {
allFilled = false
}
})
if (allFilled) {
setTimeout(() => this.checkAnswers(), 500)
}
}
showSuccess() {
// Award rewards
this.coins += 50
this.hints += 1
this.updateUI()
document.getElementById('successModal').classList.add('active')
}
hideSuccessModal() {
document.getElementById('successModal').classList.remove('active')
}
nextPuzzle() {
this.hideSuccessModal()
this.currentLevel++
this.loadPuzzle(this.currentLevel)
this.showFeedback(`Niveau ${ this.currentLevel } geladen!`)
}
skipPuzzle() {
if (confirm('Weet je zeker dat je deze puzzel wilt overslaan?')) {
this.currentLevel++
this.loadPuzzle(this.currentLevel)
this.showFeedback('Puzzel overgeslagen')
}
}
loadDailyPuzzle() {
this.showFeedback('Dagelijkse puzzel wordt geladen...')
// Implement daily puzzle logic
document.getElementById('sideMenu').classList.remove('active')
}
showLevelSelect() {
this.showFeedback('Niveau selectie komt binnenkort!')
document.getElementById('sideMenu').classList.remove('active')
}
updateProgress() {
const inputs = this.gridElement.querySelectorAll('input')
let filled = 0
let total = 0
inputs.forEach(input => {
const row = parseInt(input.dataset.row)
const col = parseInt(input.dataset.col)
const correctAnswer = this.findCorrectAnswer(row, col)
if (correctAnswer) {
total++
if (input.value) {
filled++
}
}
})
const progress = total > 0 ? Math.round((filled / total) * 100) : 0
document.getElementById('progressFill').style.width = `${ progress }%`
document.getElementById('progressText').textContent = `${ progress }% voltooid`
}
updateUI() {
document.getElementById('coinsCount').textContent = this.coins
document.querySelector('.hint-count').textContent = this.hints
document.querySelector('.level-number').textContent = `Niveau ${ this.currentLevel }`
}
showFeedback(message, type = 'info') {
const feedback = document.createElement('div')
feedback.className = `feedback feedback-${ type }`
feedback.textContent = message
feedback.style.cssText = `
position: fixed;
top: 100px;
right: 20px;
padding: 15px 20px;
border-radius: 8px;
color: white;
font-weight: 600;
z-index: 1000;
animation: slideIn 0.3s ease;
max-width: 300px;
word-wrap: break-word;
`
switch (type) {
case 'error':
feedback.style.background = 'linear-gradient(135deg, #f56565, #e53e3e)'
break
case 'success':
feedback.style.background = 'linear-gradient(135deg, #48bb78, #38a169)'
break
default:
feedback.style.background = 'linear-gradient(135deg, #4299e1, #3182ce)'
}
document.body.appendChild(feedback)
setTimeout(() => {
feedback.style.animation = 'slideOut 0.3s ease'
setTimeout(() => {
if (feedback.parentNode) {
feedback.parentNode.removeChild(feedback)
}
}, 300)
}, 3000)
}
}
// Add CSS animations and tablet styles
const style = document.createElement('style')
style.textContent = `
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
from { transform: translateX(0); opacity: 1; }
to { transform: translateX(100%); opacity: 0; }
}
/* Tablet Mode Styles */
.tablet-mode .grid-container {
max-width: 90vw;
margin: 0 auto;
}
.tablet-mode .puzzle-section {
padding: 30px;
}
@media (min-width: 768px) {
.app-container {
max-width: 100vw;
}
.game-main {
padding: 30px;
}
.bottom-controls {
max-width: 600px;
margin: 0 auto;
}
}
@media (min-width: 1024px) {
.grid-container {
transform: scale(1.1);
transform-origin: center;
}
.puzzle-section {
min-height: 70vh;
}
}
`
document.head.appendChild(style)
// Initialize game when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
const game = new KruiswoordProGame()
})

BIN
desktop/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

1
desktop/icon.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 192 192"><path fill="#e08524" d="M75.3 73.4H18.4l45.3 34.3L48.3 163l46.1-32.3 48.2 34.6-16.9-58.3 44.9-33.6H115l-20.5-55-19.2 55z"/><path d="m96.7 18.8 18.2 8.2 16.5 44.3h-15.1L96.7 18.8zm-47 146 18.7 9.9 42.6-29.9-16.5-11.4-44.8 31.4zm79.1-56.8 17.4 9.4 18.6 60.1-19.7-11.3-16.3-58.2z"/><path d="m173.1 74.3 17.8 9.2-44.7 34-17.4-9.4 44.3-33.8z"/></svg>

After

Width:  |  Height:  |  Size: 429 B

166
desktop/index.html Normal file
View File

@@ -0,0 +1,166 @@
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kruiswoord Pro: Zweedse puzzel</title>
<link rel="stylesheet" href="styles_v5.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
</head>
<body>
<div class="app-container">
<header class="top-header">
<div class="header-left">
<button class="header-btn menu-btn" id="menuBtn">
<i class="fas fa-bars"></i>
</button>
<div class="level-info">
<span class="level-number">Niveau 1</span>
<div class="difficulty-stars">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="far fa-star"></i>
</div>
</div>
</div>
<div class="header-center">
<h1 class="app-title">Kruiswoord Pro</h1>
</div>
<div class="header-right">
<div class="coins-display">
<i class="fas fa-coins"></i>
<span id="coinsCount">100</span>
</div>
<button class="header-btn hints-btn" id="hintsBtn">
<i class="fas fa-lightbulb"></i>
<span class="hint-count">3</span>
</button>
</div>
</header>
<!-- Progress Bar -->
<div class="progress-container">
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
<span class="progress-text" id="progressText">0% voltooid</span>
</div>
<!-- Main Game Area -->
<main class="game-main">
<!-- Crossword Grid Container -->
<div class="puzzle-section">
<div class="grid-container" id="crosswordGrid">
<!-- Grid will be generated by JavaScript -->
</div>
</div>
<!-- Bottom Controls -->
<div class="bottom-controls">
<button class="control-btn" id="checkBtn">
<i class="fas fa-check-circle"></i>
<span>Controleren</span>
</button>
<button class="control-btn" id="clearBtn">
<i class="fas fa-eraser"></i>
<span>Wissen</span>
</button>
<button class="control-btn hint-btn" id="revealLetterBtn">
<i class="fas fa-eye"></i>
<span>Letter</span>
</button>
<button class="control-btn" id="skipBtn">
<i class="fas fa-forward"></i>
<span>Overslaan</span>
</button>
</div>
</main>
<!-- Side Menu -->
<div class="side-menu" id="sideMenu">
<div class="menu-header">
<h3>Menu</h3>
<button class="close-menu" id="closeMenu">
<i class="fas fa-times"></i>
</button>
</div>
<div class="menu-items">
<button class="menu-item" id="dailyPuzzle">
<i class="fas fa-calendar-day"></i>
<span>Dagelijkse Puzzel</span>
<span class="bonus-indicator">+5</span>
</button>
<button class="menu-item" id="levelSelect">
<i class="fas fa-layer-group"></i>
<span>Kies Niveau</span>
</button>
<button class="menu-item" id="statistics">
<i class="fas fa-chart-bar"></i>
<span>Statistieken</span>
</button>
<button class="menu-item" id="settings">
<i class="fas fa-cog"></i>
<span>Instellingen</span>
</button>
<button class="menu-item" id="help">
<i class="fas fa-question-circle"></i>
<span>Hulp</span>
</button>
</div>
</div>
<!-- Success Modal -->
<div class="modal" id="successModal">
<div class="modal-content success-modal">
<div class="success-icon">
<i class="fas fa-trophy"></i>
</div>
<h2>Gefeliciteerd!</h2>
<p>Je hebt de puzzel opgelost!</p>
<div class="reward-info">
<div class="reward-item">
<i class="fas fa-star"></i>
<span>+3 Sterren</span>
</div>
<div class="reward-item">
<i class="fas fa-coins"></i>
<span>+50 Munten</span>
</div>
</div>
<div class="modal-buttons">
<button class="btn btn-primary" id="nextPuzzleBtn">Volgende Puzzel</button>
<button class="btn btn-secondary" id="closeModalBtn">Sluiten</button>
</div>
</div>
</div>
<div class="modal" id="hintModal">
<div class="modal-content hint-modal">
<h3>Hint Gebruiken</h3>
<p>Wil je een hint gebruiken om een letter te onthullen?</p>
<div class="hint-cost">
<i class="fas fa-lightbulb"></i>
<span>Kosten: 1 hint</span>
</div>
<div class="modal-buttons">
<button class="btn btn-primary" id="useHintBtn">Gebruiken</button>
<button class="btn btn-secondary" id="cancelHintBtn">Annuleren</button>
</div>
</div>
</div>
</div>
<script src="puzzleData.js"></script>
<script src="game.js"></script>
</body>
</html>

244
desktop/puzzleData.js Normal file
View File

@@ -0,0 +1,244 @@
// Level 4 - 9x8 (Nature & Daily Words)
const level1 = {
grid: [
['B','O','M','E','N','#','Z','O','N'],
['H','A','A','S','#','D','O','R','P'],
['H','O','N','D','#','O','P','E','N'],
['W','I','N','D','#','N','E','S','T'],
['W','O','L','K','#','D','U','I','F'],
['S','T','E','R','#','E','E','N','D'],
['M','A','A','N','#','R','E','U','S'],
['R','E','G','E','N','#','V','I','S']
],
words: [
// horizontaal
{ word: 'BOMEN', clue: 'Planten', startRow: 0, startCol: 0, direction: 'horizontal', answer: 'BOMEN' },
{ word: 'ZON', clue: 'Ster aan de hemel', startRow: 0, startCol: 6, direction: 'horizontal', answer: 'ZON' },
{ word: 'HAAS', clue: 'Snel dier', startRow: 1, startCol: 0, direction: 'horizontal', answer: 'HAAS' },
{ word: 'DORP', clue: 'Kleine plaats', startRow: 1, startCol: 5, direction: 'horizontal', answer: 'DORP' },
{ word: 'HOND', clue: 'Huisdier', startRow: 2, startCol: 0, direction: 'horizontal', answer: 'HOND' },
{ word: 'OPEN', clue: 'Niet dicht', startRow: 2, startCol: 5, direction: 'horizontal', answer: 'OPEN' },
{ word: 'WIND', clue: 'Luchtbeweging', startRow: 3, startCol: 0, direction: 'horizontal', answer: 'WIND' },
{ word: 'NEST', clue: 'Thuis van een vogel', startRow: 3, startCol: 5, direction: 'horizontal', answer: 'NEST' },
{ word: 'WOLK', clue: 'In de lucht', startRow: 4, startCol: 0, direction: 'horizontal', answer: 'WOLK' },
{ word: 'DUIF', clue: 'Stadsvogel', startRow: 4, startCol: 5, direction: 'horizontal', answer: 'DUIF' },
{ word: 'STER', clue: 'Hemellichaam', startRow: 5, startCol: 0, direction: 'horizontal', answer: 'STER' },
{ word: 'EEND', clue: 'Watervogel', startRow: 5, startCol: 5, direction: 'horizontal', answer: 'EEND' },
{ word: 'MAAN', clue: 'Nachthemel', startRow: 6, startCol: 0, direction: 'horizontal', answer: 'MAAN' },
{ word: 'REUS', clue: 'Gigant', startRow: 6, startCol: 5, direction: 'horizontal', answer: 'REUS' },
{ word: 'REGEN', clue: 'Valt uit de lucht', startRow: 7, startCol: 0, direction: 'horizontal', answer: 'REGEN' },
{ word: 'VIS', clue: 'Zwemt in water', startRow: 7, startCol: 6, direction: 'horizontal', answer: 'VIS' },
// verticaal (spine)
{ word: 'DONDER', clue: 'Weerverschijnsel', startRow: 1, startCol: 5, direction: 'vertical', answer: 'DONDER' }
],
difficulty: 3,
rewards: { coins: 125, stars: 4, hints: 1 }
};
// Dutch Swedish-style Crossword Puzzles Database
const DUTCH_PUZZLES = {
// Level 1 - Easy
level1,
level0: {
grid: [
['#','#', '#', '#', '#'],
['#','H', 'A', 'A', 'S'],
['#','#', '#', '#', 'T'],
['#','V', 'L', 'I', 'E', 'G'],
['#','#', '#', '#', 'S']
],
words: [
{
word: 'HAAS',
clue: 'Snel dier',
startRow: 0,
startCol: 0,
direction: 'horizontal',
answer: 'HAAS'
},
{
word: 'VLIEG',
clue: 'Insect',
startRow: 2,
startCol: 0,
direction: 'horizontal',
answer: 'VLIEG'
},
{
word: 'AT',
clue: 'Kleine woord',
startRow: 0,
startCol: 2,
direction: 'vertical',
answer: 'AT'
}
],
difficulty: 1,
rewards: { coins: 50, stars: 3, hints: 1 }
},
// Level 2 - Medium Easy
level2: {
grid: [
['B', 'O', 'M', 'E', 'N'],
['#', '#', '#', '#', 'D'],
['H', 'O', 'N', 'D', 'E'],
['#', '#', '#', '#', 'R']
],
words: [
{
word: 'BOMEN',
clue: 'Planten',
startRow: 0,
startCol: 0,
direction: 'horizontal',
answer: 'BOMEN'
},
{
word: 'HONDE',
clue: 'Huisdieren',
startRow: 2,
startCol: 0,
direction: 'horizontal',
answer: 'HONDE'
},
{
word: 'NE',
clue: 'Nee afkorting',
startRow: 0,
startCol: 4,
direction: 'vertical',
answer: 'NE'
}
],
difficulty: 2,
rewards: { coins: 75, stars: 3, hints: 1 }
},
// Level 3 - Weather Theme
level3: {
grid: [
['R', 'E', 'G', 'E', 'N'],
['#', '#', '#', '#', 'B'],
['S', 'N', 'E', 'E', 'U'],
['#', '#', '#', '#', 'W']
],
words: [
{
word: 'REGEN',
clue: 'Valt uit de lucht',
startRow: 0,
startCol: 0,
direction: 'horizontal',
answer: 'REGEN'
},
{
word: 'SNEEU',
clue: 'Witte vlokken',
startRow: 2,
startCol: 0,
direction: 'horizontal',
answer: 'SNEEU'
},
{
word: 'NB',
clue: 'Nota bene',
startRow: 0,
startCol: 4,
direction: 'vertical',
answer: 'NB'
}
],
difficulty: 3,
rewards: { coins: 100, stars: 3, hints: 1 }
},
// Daily Puzzle Template
daily: {
grid: [
['Z', 'O', 'N', 'N', 'E'],
['#', '#', '#', '#', 'D'],
['M', 'A', 'A', 'N', 'D'],
['#', '#', '#', '#', 'G']
],
words: [
{
word: 'ZONNE',
clue: 'Daglicht',
startRow: 0,
startCol: 0,
direction: 'horizontal',
answer: 'ZONNE'
},
{
word: 'MAAND',
clue: 'Tijdseenheid',
startRow: 2,
startCol: 0,
direction: 'horizontal',
answer: 'MAAND'
},
{
word: 'ND',
clue: 'Noord',
startRow: 0,
startCol: 4,
direction: 'vertical',
answer: 'ND'
}
],
difficulty: 2,
rewards: { coins: 150, stars: 5, hints: 2 },
dailyBonus: true
}
};
// Word Database for hints and validation
const DUTCH_WORD_DATABASE = {
animals: [
{ word: 'HAAS', clue: 'Snel dier' },
{ word: 'HOND', clue: 'Huisdier' },
{ word: 'KAT', clue: 'Katachtige' },
{ word: 'VLIEG', clue: 'Insect' },
{ word: 'VIS', clue: 'Zwemt in water' },
{ word: 'MUIS', clue: 'Klein dier' },
{ word: 'PAARD', clue: 'Rijdier' },
{ word: 'KIP', clue: 'Legt eieren' },
{ word: 'EEL', clue: 'Lang dier' }
],
nature: [
{ word: 'BOMEN', clue: 'Planten' },
{ word: 'REGEN', clue: 'Valt uit de lucht' },
{ word: 'SNEEU', clue: 'Witte vlokken' },
{ word: 'DONDER', clue: 'Weer verschijnsel' },
{ word: 'BLIKSEM', clue: 'Lichtflits' },
{ word: 'MAAND', clue: 'Satelliet' },
{ word: 'STER', clue: 'Hemellichaam' },
{ word: 'WOLK', clue: 'Watten in lucht' },
{ word: 'WIND', clue: 'Luchtbeweging' },
{ word: 'ZON', clue: 'Ster' }
],
common: [
{ word: 'AT', clue: 'Kleine woord' },
{ word: 'NE', clue: 'Nee afkorting' },
{ word: 'NB', clue: 'Nota bene' },
{ word: 'ND', clue: 'Noord' },
{ word: 'EN', clue: 'En' },
{ word: 'ER', clue: 'Er' },
{ word: 'IN', clue: 'In' },
{ word: 'OP', clue: 'Op' }
]
};
// Export for use in game logic
if (typeof module !== 'undefined' && module.exports) {
module.exports = { DUTCH_PUZZLES, DUTCH_WORD_DATABASE };
}

578
desktop/styles_v5.css Normal file
View File

@@ -0,0 +1,578 @@
/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: #333;
overflow-x: hidden;
}
/* App Container */
.app-container {
max-width: 100vw;
margin: 0 auto;
background: white;
min-height: 100vh;
position: relative;
}
/* Top Header */
.top-header {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
padding: 15px 20px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 100;
}
.header-left {
display: flex;
align-items: center;
gap: 15px;
}
.header-right {
display: flex;
align-items: center;
gap: 15px;
}
.header-btn {
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s ease;
font-size: 18px;
}
.header-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: scale(1.1);
}
.level-info {
display: flex;
flex-direction: column;
}
.level-number {
font-weight: 600;
font-size: 16px;
}
.difficulty-stars {
display: flex;
gap: 2px;
font-size: 12px;
}
.app-title {
font-size: 20px;
font-weight: 700;
text-align: center;
flex: 1;
}
.coins-display {
display: flex;
align-items: center;
gap: 5px;
background: rgba(255, 255, 255, 0.2);
padding: 8px 12px;
border-radius: 20px;
font-weight: 600;
}
.hints-btn {
position: relative;
}
.hint-count {
position: absolute;
top: -5px;
right: -5px;
background: #ff6b6b;
color: white;
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 600;
}
/* Progress Bar */
.progress-container {
background: #f8f9fa;
padding: 15px 20px;
display: flex;
align-items: center;
gap: 15px;
border-bottom: 1px solid #e9ecef;
}
.progress-bar {
flex: 1;
height: 8px;
background: #e9ecef;
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #48bb78, #38a169);
width: 0%;
transition: width 0.3s ease;
}
.progress-text {
font-size: 14px;
font-weight: 600;
color: #4a5568;
min-width: 80px;
}
/* Main Game Area */
.game-main {
flex: 1;
display: flex;
flex-direction: column;
padding: 20px;
gap: 20px;
}
.puzzle-section {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
background: white;
border-radius: 15px;
padding: 20px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
overflow: hidden;
position: relative;
}
@media (max-width: 768px) {
.game-main {
padding: 10px;
gap: 10px;
}
.puzzle-section {
padding: 5px;
border-radius: 10px;
overflow: hidden;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
/* Crossword Grid */
.grid-container {
display: grid;
gap: 2px;
background: #cbd5e0;
padding: 10px;
border-radius: 10px;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
margin: 0 auto;
width: fit-content;
max-width: 100%;
}
@media (max-width: 768px) {
.grid-container {
padding: 5px;
gap: 1px;
width: fit-content;
margin: 0 auto;
display: grid;
place-items: center;
}
}
.grid-cell {
width: 45px;
height: 45px;
background: white;
border: 2px solid #e2e8f0;
display: flex;
align-items: center;
justify-content: center;
position: relative;
cursor: pointer;
transition: all 0.2s ease;
}
.grid-cell:hover:not(.clue-cell):not(.blocked-cell) {
background: #f7fafc;
border-color: #4299e1;
}
.grid-cell.active {
background: #ebf8ff;
border-color: #3182ce;
box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}
.grid-cell.correct {
background: #c6f6d5;
border-color: #48bb78;
}
.grid-cell.incorrect {
background: #fed7d7;
border-color: #f56565;
}
/* Clue Cell Styles */
.clue-cell {
background: linear-gradient(135deg, #4a5568, #2d3748);
color: white;
font-size: 9px;
font-weight: 600;
text-align: center;
padding: 2px;
line-height: 1.2;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
position: relative;
cursor: default;
pointer-events: none;
}
.clue-cell.horizontal {
border-right: 3px solid #4299e1;
}
.clue-cell.vertical {
border-bottom: 3px solid #4299e1;
}
.clue-text {
font-size: 8px;
line-height: 1.1;
word-wrap: break-word;
text-align: left;
width: 100%;
}
.arrow {
position: absolute;
font-size: 14px;
color: #4299e1;
font-weight: bold;
}
.arrow-right {
right: 1px;
top: 50%;
transform: translateY(-50%);
}
.arrow-down {
bottom: 1px;
left: 50%;
transform: translateX(-50%);
}
/* Input Cell Styles */
.input-cell {
background: white;
border: 2px solid #cbd5e0;
}
.input-cell input {
width: 100%;
height: 100%;
border: none;
background: transparent;
text-align: center;
font-weight: bold;
font-size: 20px;
color: #2d3748;
text-transform: uppercase;
}
.input-cell input:focus {
outline: none;
background: #ebf8ff;
}
/* Blocked Cell */
.blocked-cell {
background: #2d3748;
border: 2px solid #2d3748;
}
/* Bottom Controls */
.bottom-controls {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
padding: 0;
}
.control-btn {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
border-radius: 12px;
padding: 15px 10px;
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
font-size: 12px;
}
.control-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.control-btn:active {
transform: translateY(0);
}
.control-btn i {
font-size: 20px;
}
.hint-btn {
background: linear-gradient(135deg, #ed8936, #dd6b20);
}
/* Side Menu */
.side-menu {
position: fixed;
top: 0;
left: -300px;
width: 300px;
height: 100vh;
background: white;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
transition: left 0.3s ease;
z-index: 200;
}
.side-menu.active {
left: 0;
}
.menu-header {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.close-menu {
background: none;
border: none;
color: white;
font-size: 24px;
cursor: pointer;
}
.menu-items {
padding: 20px 0;
}
.menu-item {
display: flex;
align-items: center;
gap: 15px;
padding: 15px 20px;
border: none;
background: none;
width: 100%;
text-align: left;
cursor: pointer;
transition: background 0.2s ease;
font-size: 16px;
}
.menu-item:hover {
background: #f8f9fa;
}
.menu-item i {
width: 20px;
color: #4facfe;
}
.bonus-indicator {
background: #48bb78;
color: white;
padding: 2px 8px;
border-radius: 10px;
font-size: 12px;
font-weight: 600;
margin-left: auto;
}
/* Modals */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 300;
justify-content: center;
align-items: center;
}
.modal.active {
display: flex;
}
.modal-content {
background: white;
border-radius: 20px;
padding: 30px;
text-align: center;
max-width: 400px;
width: 90%;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.success-icon {
font-size: 60px;
color: #48bb78;
margin-bottom: 20px;
}
.success-modal h2 {
color: #2d3748;
margin-bottom: 10px;
}
.reward-info {
display: flex;
justify-content: space-around;
margin: 20px 0;
}
.reward-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
color: #4a5568;
}
.modal-buttons {
display: flex;
gap: 10px;
margin-top: 20px;
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
transition: all 0.3s ease;
}
.btn-primary {
background: linear-gradient(135deg, #48bb78, #38a169);
color: white;
flex: 1;
}
.btn-secondary {
background: #e2e8f0;
color: #4a5568;
}
.hint-cost {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin: 15px 0;
color: #4a5568;
}
/* Responsive Design */
@media (max-width: 768px) {
.app-title {
font-size: 18px;
}
/* Grid cell sizes are now set dynamically by JavaScript */
.input-cell input {
font-size: 16px;
}
.clue-text {
font-size: 7px;
}
.control-btn {
padding: 12px 8px;
font-size: 11px;
}
.control-btn i {
font-size: 18px;
}
}
/* Animations */
@keyframes bounce {
0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
40% { transform: translateY(-10px); }
60% { transform: translateY(-5px); }
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.success-icon {
animation: bounce 1s ease;
}
.control-btn:hover {
animation: pulse 0.3s ease;
}