Spaces:
Running

super-aprendriz / index.html
IsaB20's picture
Add 3 files
06bfcb2 verified
Raw History Blame Contribute Delete
39 kB
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Super Aprendiz - Gamificação para Alunos</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;700&display=swap');
body {
font-family: 'Baloo 2', cursive;
background-color: #f0f9ff;
}
.hero-transition {
transition: all 0.5s ease;
transform: scale(1);
}
.hero-transition:hover {
transform: scale(1.1);
}
.tab-active {
border-bottom: 4px solid #3b82f6;
color: #3b82f6;
font-weight: bold;
}
.challenge-card {
transition: all 0.3s ease;
}
.challenge-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.reward-badge {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
.gold-rank {
background: linear-gradient(135deg, #fcd34d, #f59e0b);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.silver-rank {
background: linear-gradient(135deg, #e5e7eb, #9ca3af);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.bronze-rank {
background: linear-gradient(135deg, #fcd34d, #92400e);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.game-button {
transition: all 0.3s ease;
}
.game-button:hover {
transform: scale(1.05);
}
</style>
</head>
<body class="min-h-screen">
<div class="container mx-auto px-4 py-6 max-w-6xl">
<!-- Header -->
<header class="flex justify-between items-center mb-8">
<div class="flex items-center">
<img src="https://img.icons8.com/color/96/000000/children.png" alt="Logo" class="w-16 h-16">
<h1 class="text-3xl font-bold ml-3 text-blue-600">Super Aprendiz</h1>
</div>
<div class="flex items-center bg-yellow-100 px-4 py-2 rounded-full">
<span class="font-bold text-yellow-800 mr-2">Pontos:</span>
<span id="totalPoints" class="font-bold text-2xl text-yellow-800">0</span>
</div>
</header>
<!-- Navigation Tabs -->
<div class="flex overflow-x-auto mb-8 bg-white rounded-lg shadow-md">
<button onclick="showTab('home')" id="homeTab" class="tab-active flex-1 py-4 px-6 text-center font-medium">
<i class="fas fa-home mr-2"></i>Início
</button>
<button onclick="showTab('register')" id="registerTab" class="flex-1 py-4 px-6 text-center font-medium text-gray-600">
<i class="fas fa-user-plus mr-2"></i>Cadastro
</button>
<button onclick="showTab('rewards')" id="rewardsTab" class="flex-1 py-4 px-6 text-center font-medium text-gray-600">
<i class="fas fa-trophy mr-2"></i>Recompensas
</button>
<button onclick="showTab('challenges')" id="challengesTab" class="flex-1 py-4 px-6 text-center font-medium text-gray-600">
<i class="fas fa-tasks mr-2"></i>Desafios
</button>
<button onclick="showTab('ranking')" id="rankingTab" class="flex-1 py-4 px-6 text-center font-medium text-gray-600">
<i class="fas fa-medal mr-2"></i>Ranking
</button>
<button onclick="showTab('daily')" id="dailyTab" class="flex-1 py-4 px-6 text-center font-medium text-gray-600">
<i class="fas fa-gamepad mr-2"></i>Jogo do Dia
</button>
</div>
<!-- Tab Content -->
<div class="bg-white rounded-lg shadow-lg p-6 min-h-96">
<!-- Home Tab -->
<div id="homeTabContent" class="tab-content">
<h2 class="text-2xl font-bold mb-6 text-blue-600">Bem-vindo ao Super Aprendiz!</h2>
<div class="bg-gradient-to-r from-blue-100 to-purple-100 p-6 rounded-xl mb-8">
<h3 class="text-xl font-bold mb-4 text-purple-800">Desafio do Dia</h3>
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-2/3 mb-4 md:mb-0">
<h4 class="text-lg font-semibold mb-2">Matemática: Adição e Subtração</h4>
<p class="mb-4">Resolva 5 problemas de adição e subtração para ganhar pontos e desbloquear um novo adesivo!</p>
<button onclick="showTab('daily')" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-6 rounded-full game-button">
Jogar Agora
</button>
</div>
<div class="md:w-1/3 flex justify-center">
<div class="bg-white p-4 rounded-full shadow-lg reward-badge">
<img src="https://img.icons8.com/color/96/000000/math.png" alt="Recompensa" class="w-20 h-20">
</div>
</div>
</div>
</div>
<div class="mb-8">
<h3 class="text-xl font-bold mb-4 text-blue-600">Seu Progresso</h3>
<div class="flex items-center mb-4">
<div id="currentHero" class="hero-transition mr-4">
<img src="https://img.icons8.com/color/96/000000/superhero.png" alt="Herói" class="w-24 h-24">
</div>
<div class="flex-1">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium">Nível 1</span>
<span class="text-sm font-medium">0/100 pontos</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-4">
<div id="progressBar" class="bg-blue-500 h-4 rounded-full" style="width: 0%"></div>
</div>
</div>
</div>
</div>
<div>
<h3 class="text-xl font-bold mb-4 text-blue-600">Top 3 do Ranking</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-gradient-to-b from-yellow-100 to-yellow-50 p-4 rounded-xl text-center border-2 border-yellow-300">
<div class="gold-rank text-4xl font-bold mb-2">1º</div>
<img src="https://img.icons8.com/color/96/000000/superhero-female.png" alt="1º lugar" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Ana Clara</h4>
<p class="text-yellow-600 font-bold">320 pontos</p>
</div>
<div class="bg-gradient-to-b from-gray-100 to-gray-50 p-4 rounded-xl text-center border-2 border-gray-300">
<div class="silver-rank text-4xl font-bold mb-2">2º</div>
<img src="https://img.icons8.com/color/96/000000/superhero.png" alt="2º lugar" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Pedro Henrique</h4>
<p class="text-gray-600 font-bold">280 pontos</p>
</div>
<div class="bg-gradient-to-b from-amber-100 to-amber-50 p-4 rounded-xl text-center border-2 border-amber-300">
<div class="bronze-rank text-4xl font-bold mb-2">3º</div>
<img src="https://img.icons8.com/color/96/000000/superhero-male.png" alt="3º lugar" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Maria Eduarda</h4>
<p class="text-amber-600 font-bold">250 pontos</p>
</div>
</div>
</div>
</div>
<!-- Register Tab -->
<div id="registerTabContent" class="tab-content hidden">
<h2 class="text-2xl font-bold mb-6 text-blue-600">Cadastro do Aluno</h2>
<div class="bg-blue-50 p-6 rounded-xl mb-8">
<div class="mb-4">
<label for="studentName" class="block text-sm font-medium text-gray-700 mb-1">Seu Nome</label>
<input type="text" id="studentName" class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500" placeholder="Digite seu nome">
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">Escolha seu Herói Inicial</label>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<div class="flex flex-col items-center">
<input type="radio" id="hero1" name="hero" value="hero1" class="hidden peer" checked>
<label for="hero1" class="cursor-pointer p-2 rounded-lg border-2 border-transparent peer-checked:border-blue-500">
<img src="https://img.icons8.com/color/96/000000/superhero.png" alt="Herói 1" class="w-16 h-16">
</label>
<span class="mt-1 text-sm">Herói 1</span>
</div>
<div class="flex flex-col items-center">
<input type="radio" id="hero2" name="hero" value="hero2" class="hidden peer">
<label for="hero2" class="cursor-pointer p-2 rounded-lg border-2 border-transparent peer-checked:border-blue-500">
<img src="https://img.icons8.com/color/96/000000/superhero-female.png" alt="Herói 2" class="w-16 h-16">
</label>
<span class="mt-1 text-sm">Herói 2</span>
</div>
<div class="flex flex-col items-center">
<input type="radio" id="hero3" name="hero" value="hero3" class="hidden peer">
<label for="hero3" class="cursor-pointer p-2 rounded-lg border-2 border-transparent peer-checked:border-blue-500">
<img src="https://img.icons8.com/color/96/000000/superhero-male.png" alt="Herói 3" class="w-16 h-16">
</label>
<span class="mt-1 text-sm">Herói 3</span>
</div>
<div class="flex flex-col items-center">
<input type="radio" id="hero4" name="hero" value="hero4" class="hidden peer">
<label for="hero4" class="cursor-pointer p-2 rounded-lg border-2 border-transparent peer-checked:border-blue-500">
<img src="https://img.icons8.com/color/96/000000/superhero-2.png" alt="Herói 4" class="w-16 h-16">
</label>
<span class="mt-1 text-sm">Herói 4</span>
</div>
</div>
</div>
<button onclick="registerStudent()" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-6 rounded-full w-full">
<i class="fas fa-check mr-2"></i>Confirmar Cadastro
</button>
</div>
<div>
<h3 class="text-xl font-bold mb-4 text-blue-600">Evolução dos Heróis</h3>
<div class="bg-white border border-gray-200 rounded-lg p-4">
<div class="flex items-center mb-3">
<div class="w-16">
<img src="https://img.icons8.com/color/48/000000/level-1.png" alt="Nível 1" class="w-12 h-12">
</div>
<div class="ml-4">
<h4 class="font-bold">Herói Inicial</h4>
<p class="text-sm text-gray-600">5 a 100 pontos</p>
</div>
</div>
<div class="flex items-center mb-3">
<div class="w-16">
<img src="https://img.icons8.com/color/48/000000/level-2.png" alt="Nível 2" class="w-12 h-12">
</div>
<div class="ml-4">
<h4 class="font-bold">Herói Intermediário</h4>
<p class="text-sm text-gray-600">101 a 200 pontos</p>
</div>
</div>
<div class="flex items-center mb-3">
<div class="w-16">
<img src="https://img.icons8.com/color/48/000000/level-3.png" alt="Nível 3" class="w-12 h-12">
</div>
<div class="ml-4">
<h4 class="font-bold">Herói Avançado</h4>
<p class="text-sm text-gray-600">201 a 300 pontos</p>
</div>
</div>
<div class="flex items-center">
<div class="w-16">
<img src="https://img.icons8.com/color/48/000000/level-4.png" alt="Nível 4" class="w-12 h-12">
</div>
<div class="ml-4">
<h4 class="font-bold">Herói Mestre</h4>
<p class="text-sm text-gray-600">301+ pontos</p>
</div>
</div>
</div>
</div>
</div>
<!-- Rewards Tab -->
<div id="rewardsTabContent" class="tab-content hidden">
<h2 class="text-2xl font-bold mb-6 text-blue-600">Recompensas e Heróis</h2>
<div class="mb-8">
<h3 class="text-xl font-bold mb-4 text-purple-600">Suas Recompensas</h3>
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
<!-- Stickers -->
<div class="bg-white p-4 rounded-xl border-2 border-yellow-300 text-center">
<img src="https://img.icons8.com/color/96/000000/star.png" alt="Adesivo" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Estrela Dourada</h4>
<p class="text-sm text-gray-600">20 pontos</p>
</div>
<div class="bg-white p-4 rounded-xl border-2 border-blue-300 text-center">
<img src="https://img.icons8.com/color/96/000000/medal2.png" alt="Adesivo" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Medalha Azul</h4>
<p class="text-sm text-gray-600">50 pontos</p>
</div>
<!-- More stickers would be here -->
</div>
</div>
<div>
<h3 class="text-xl font-bold mb-4 text-purple-600">Heróis Desbloqueáveis</h3>
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
<!-- Hero 1 -->
<div class="bg-white p-4 rounded-xl border-2 border-green-300 text-center">
<img src="https://img.icons8.com/color/96/000000/superhero.png" alt="Herói 1" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Herói Inicial</h4>
<p class="text-sm text-gray-600">5-100 pontos</p>
<div class="mt-2 bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Desbloqueado</div>
</div>
<!-- Hero 2 -->
<div class="bg-white p-4 rounded-xl border-2 border-blue-300 text-center">
<img src="https://img.icons8.com/color/96/000000/superhero-female.png" alt="Herói 2" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Herói Intermediário</h4>
<p class="text-sm text-gray-600">101-200 pontos</p>
<div class="mt-2 bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">Bloqueado</div>
</div>
<!-- Hero 3 -->
<div class="bg-white p-4 rounded-xl border-2 border-purple-300 text-center">
<img src="https://img.icons8.com/color/96/000000/superhero-male.png" alt="Herói 3" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Herói Avançado</h4>
<p class="text-sm text-gray-600">201-300 pontos</p>
<div class="mt-2 bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">Bloqueado</div>
</div>
<!-- Hero 4 -->
<div class="bg-white p-4 rounded-xl border-2 border-yellow-300 text-center">
<img src="https://img.icons8.com/color/96/000000/superhero-2.png" alt="Herói 4" class="w-16 h-16 mx-auto mb-2">
<h4 class="font-bold">Herói Mestre</h4>
<p class="text-sm text-gray-600">301+ pontos</p>
<div class="mt-2 bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">Bloqueado</div>
</div>
</div>
</div>
</div>
<!-- Challenges Tab -->
<div id="challengesTabContent" class="tab-content hidden">
<h2 class="text-2xl font-bold mb-6 text-blue-600">Desafios</h2>
<div class="mb-6">
<div class="flex flex-wrap gap-2 mb-4">
<button class="bg-blue-500 text-white px-4 py-2 rounded-full text-sm font-medium">Todos</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Português</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Matemática</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">História</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Geografia</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Ciências</button>
</div>
<div class="flex flex-wrap gap-2 mb-6">
<button class="bg-blue-500 text-white px-4 py-2 rounded-full text-sm font-medium">Todos</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Fácil</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Médio</button>
<button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-full text-sm font-medium">Difícil</button>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Challenge 1 -->
<div class="bg-white p-6 rounded-xl shadow-md challenge-card border-l-4 border-blue-500">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg">Adição Simples</h3>
<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">Matemática</span>
</div>
<p class="text-gray-600 mb-4">Resolva 5 problemas de adição com números até 20.</p>
<div class="flex justify-between items-center">
<span class="text-yellow-600 font-bold">20 pontos</span>
<button class="bg-gray-200 text-gray-800 px-4 py-1 rounded-full text-sm font-medium">Refazer</button>
</div>
</div>
<!-- Challenge 2 -->
<div class="bg-white p-6 rounded-xl shadow-md challenge-card border-l-4 border-green-500">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg">Leitura de Texto</h3>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Português</span>
</div>
<p class="text-gray-600 mb-4">Leia um pequeno texto e responda 3 perguntas.</p>
<div class="flex justify-between items-center">
<span class="text-yellow-600 font-bold">15 pontos</span>
<button class="bg-gray-200 text-gray-800 px-4 py-1 rounded-full text-sm font-medium">Refazer</button>
</div>
</div>
<!-- Challenge 3 -->
<div class="bg-white p-6 rounded-xl shadow-md challenge-card border-l-4 border-red-500">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg">Estados Brasileiros</h3>
<span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded-full">Geografia</span>
</div>
<p class="text-gray-600 mb-4">Identifique 5 estados do Brasil no mapa.</p>
<div class="flex justify-between items-center">
<span class="text-yellow-600 font-bold">25 pontos</span>
<button class="bg-gray-200 text-gray-800 px-4 py-1 rounded-full text-sm font-medium">Refazer</button>
</div>
</div>
<!-- More challenges would be here -->
</div>
</div>
<!-- Ranking Tab -->
<div id="rankingTabContent" class="tab-content hidden">
<h2 class="text-2xl font-bold mb-6 text-blue-600">Ranking dos Alunos</h2>
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
<div class="grid grid-cols-12 bg-gray-100 p-4 font-bold text-gray-700">
<div class="col-span-1">Posição</div>
<div class="col-span-7">Aluno</div>
<div class="col-span-2 text-center">Herói</div>
<div class="col-span-2 text-right">Pontos</div>
</div>
<!-- Student 1 -->
<div class="grid grid-cols-12 items-center p-4 border-b border-gray-200 bg-gradient-to-r from-yellow-50 to-white">
<div class="col-span-1 font-bold text-yellow-600 text-xl">1º</div>
<div class="col-span-7 flex items-center">
<img src="https://img.icons8.com/color/48/000000/superhero-female.png" alt="Aluno" class="w-10 h-10 mr-3">
<span class="font-medium">Ana Clara</span>
</div>
<div class="col-span-2 flex justify-center">
<img src="https://img.icons8.com/color/48/000000/level-3.png" alt="Herói" class="w-8 h-8">
</div>
<div class="col-span-2 text-right font-bold text-yellow-600">320</div>
</div>
<!-- Student 2 -->
<div class="grid grid-cols-12 items-center p-4 border-b border-gray-200 bg-gradient-to-r from-gray-50 to-white">
<div class="col-span-1 font-bold text-gray-600 text-xl">2º</div>
<div class="col-span-7 flex items-center">
<img src="https://img.icons8.com/color/48/000000/superhero.png" alt="Aluno" class="w-10 h-10 mr-3">
<span class="font-medium">Pedro Henrique</span>
</div>
<div class="col-span-2 flex justify-center">
<img src="https://img.icons8.com/color/48/000000/level-2.png" alt="Herói" class="w-8 h-8">
</div>
<div class="col-span-2 text-right font-bold text-gray-600">280</div>
</div>
<!-- Student 3 -->
<div class="grid grid-cols-12 items-center p-4 border-b border-gray-200 bg-gradient-to-r from-amber-50 to-white">
<div class="col-span-1 font-bold text-amber-600 text-xl">3º</div>
<div class="col-span-7 flex items-center">
<img src="https://img.icons8.com/color/48/000000/superhero-male.png" alt="Aluno" class="w-10 h-10 mr-3">
<span class="font-medium">Maria Eduarda</span>
</div>
<div class="col-span-2 flex justify-center">
<img src="https://img.icons8.com/color/48/000000/level-2.png" alt="Herói" class="w-8 h-8">
</div>
<div class="col-span-2 text-right font-bold text-amber-600">250</div>
</div>
<!-- More students would be here -->
<!-- Current Student (example) -->
<div class="grid grid-cols-12 items-center p-4 bg-blue-50">
<div class="col-span-1 font-bold text-blue-600 text-xl">15º</div>
<div class="col-span-7 flex items-center">
<img src="https://img.icons8.com/color/48/000000/superhero.png" alt="Aluno" class="w-10 h-10 mr-3">
<span class="font-medium">Você</span>
</div>
<div class="col-span-2 flex justify-center">
<img src="https://img.icons8.com/color/48/000000/level-1.png" alt="Herói" class="w-8 h-8">
</div>
<div class="col-span-2 text-right font-bold text-blue-600">45</div>
</div>
</div>
<div class="bg-blue-50 p-4 rounded-xl">
<h3 class="font-bold text-lg mb-2 text-blue-600">Como subir no ranking?</h3>
<p class="text-gray-700 mb-3">Complete os desafios diários e ganhe pontos para evoluir seu herói e subir posições!</p>
<button onclick="showTab('daily')" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-6 rounded-full">
<i class="fas fa-gamepad mr-2"></i>Jogar Desafio do Dia
</button>
</div>
</div>
<!-- Daily Challenge Tab -->
<div id="dailyTabContent" class="tab-content hidden">
<h2 class="text-2xl font-bold mb-6 text-blue-600">Jogo do Dia</h2>
<div class="bg-gradient-to-r from-purple-100 to-blue-100 p-6 rounded-xl mb-8">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/3 mb-4 md:mb-0 flex justify-center">
<img src="https://img.icons8.com/color/96/000000/math.png" alt="Matemática" class="w-24 h-24">
</div>
<div class="md:w-2/3">
<h3 class="text-xl font-bold mb-2 text-purple-800">Matemática: Adição e Subtração</h3>
<p class="mb-4">Resolva 5 problemas de adição e subtração para ganhar pontos e desbloquear um novo adesivo!</p>
<div class="flex items-center mb-2">
<i class="fas fa-trophy text-yellow-500 mr-2"></i>
<span class="font-medium">Recompensa: 20 pontos + Adesivo Estrela</span>
</div>
<div class="flex items-center">
<i class="fas fa-clock text-blue-500 mr-2"></i>
<span class="font-medium">Tempo estimado: 5 minutos</span>
</div>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-md mb-8">
<h3 class="text-lg font-bold mb-4">Questão 1 de 5</h3>
<p class="text-xl mb-6">Quanto é 15 + 7?</p>
<div class="grid grid-cols-2 gap-4 mb-6">
<button onclick="checkAnswer(22, this)" class="bg-blue-100 hover:bg-blue-200 text-blue-800 font-medium py-3 px-4 rounded-lg text-center game-button">
22
</button>
<button onclick="checkAnswer(22, this)" class="bg-blue-100 hover:bg-blue-200 text-blue-800 font-medium py-3 px-4 rounded-lg text-center game-button">
23
</button>
<button onclick="checkAnswer(22, this)" class="bg-blue-100 hover:bg-blue-200 text-blue-800 font-medium py-3 px-4 rounded-lg text-center game-button">
21
</button>
<button onclick="checkAnswer(22, this)" class="bg-blue-100 hover:bg-blue-200 text-blue-800 font-medium py-3 px-4 rounded-lg text-center game-button">
24
</button>
</div>
<div class="flex justify-between items-center">
<div class="w-full bg-gray-200 rounded-full h-4">
<div class="bg-green-500 h-4 rounded-full" style="width: 20%"></div>
</div>
<span class="ml-4 text-sm font-medium">1/5</span>
</div>
</div>
<div class="bg-yellow-50 p-4 rounded-xl border border-yellow-200">
<h3 class="font-bold text-lg mb-2 text-yellow-700">Dica do Dia</h3>
<p class="text-yellow-800">Lembre-se que na adição, você pode contar nos dedos ou decompor os números. Por exemplo: 15 + 7 = (10 + 5) + 7 = 10 + (5 + 7) = 10 + 12 = 22</p>
</div>
</div>
</div>
</div>
<script>
// Global variables
let currentPoints = 0;
let registered = false;
let currentHero = 'hero1';
// Show tab function
function showTab(tabName) {
// Hide all tab contents
document.querySelectorAll('.tab-content').forEach(tab => {
tab.classList.add('hidden');
});
// Remove active class from all tabs
document.querySelectorAll('button[id$="Tab"]').forEach(tab => {
tab.classList.remove('tab-active');
tab.classList.add('text-gray-600');
});
// Show selected tab content
document.getElementById(tabName + 'TabContent').classList.remove('hidden');
// Add active class to selected tab
document.getElementById(tabName + 'Tab').classList.add('tab-active');
document.getElementById(tabName + 'Tab').classList.remove('text-gray-600');
// Special case for register tab
if (tabName === 'register' && registered) {
showTab('home');
alert('Você já está registrado!');
}
}
// Register student function
function registerStudent() {
const name = document.getElementById('studentName').value;
const hero = document.querySelector('input[name="hero"]:checked').value;
if (!name) {
alert('Por favor, digite seu nome!');
return;
}
registered = true;
currentHero = hero;
updateHeroDisplay();
// Give initial points
currentPoints = 5;
updatePointsDisplay();
alert(`Parabéns ${name}! Seu cadastro foi realizado com sucesso. Você ganhou 5 pontos iniciais!`);
showTab('home');
}
// Update points display
function updatePointsDisplay() {
document.getElementById('totalPoints').textContent = currentPoints;
// Update progress bar
let progressPercentage = 0;
if (currentPoints < 100) {
progressPercentage = (currentPoints / 100) * 100;
} else if (currentPoints < 200) {
progressPercentage = ((currentPoints - 100) / 100) * 100;
} else if (currentPoints < 300) {
progressPercentage = ((currentPoints - 200) / 100) * 100;
} else {
progressPercentage = 100;
}
document.getElementById('progressBar').style.width = `${progressPercentage}%`;
// Update hero based on points
updateHeroBasedOnPoints();
}
// Update hero based on points
function updateHeroBasedOnPoints() {
if (currentPoints < 100) {
currentHero = 'hero1';
} else if (currentPoints < 200) {
currentHero = 'hero2';
} else if (currentPoints < 300) {
currentHero = 'hero3';
} else {
currentHero = 'hero4';
}
updateHeroDisplay();
}
// Update hero display
function updateHeroDisplay() {
const heroImg = document.getElementById('currentHero');
switch(currentHero) {
case 'hero1':
heroImg.innerHTML = '<img src="https://img.icons8.com/color/96/000000/superhero.png" alt="Herói" class="w-24 h-24">';
break;
case 'hero2':
heroImg.innerHTML = '<img src="https://img.icons8.com/color/96/000000/superhero-female.png" alt="Herói" class="w-24 h-24">';
break;
case 'hero3':
heroImg.innerHTML = '<img src="https://img.icons8.com/color/96/000000/superhero-male.png" alt="Herói" class="w-24 h-24">';
break;
case 'hero4':
heroImg.innerHTML = '<img src="https://img.icons8.com/color/96/000000/superhero-2.png" alt="Herói" class="w-24 h-24">';
break;
}
}
// Check answer in daily challenge
function checkAnswer(correctAnswer, button) {
const userAnswer = parseInt(button.textContent);
if (userAnswer === correctAnswer) {
// Correct answer
button.classList.remove('bg-blue-100', 'text-blue-800');
button.classList.add('bg-green-100', 'text-green-800');
// Add points
currentPoints += 4;
updatePointsDisplay();
setTimeout(() => {
alert('Resposta correta! Você ganhou 4 pontos.');
// Here you would normally go to next question
}, 500);
} else {
// Wrong answer
button.classList.remove('bg-blue-100', 'text-blue-800');
button.classList.add('bg-red-100', 'text-red-800');
setTimeout(() => {
alert('Ops! Resposta incorreta. A resposta correta é ' + correctAnswer + '.');
}, 500);
}
}
// Initialize
document.addEventListener('DOMContentLoaded', function() {
updateHeroDisplay();
updatePointsDisplay();
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=IsaB20/super-aprendriz" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>