Spaces:
Running
Running
Download index.html from Fixo22/criando-uma-startup: direct link, hf CLI and curl.
- Browser
- Download file 60.4 kB
-
https://huggingface.co/spaces/Fixo22/criando-uma-startup/resolve/main/index.html
- Command line
-
hf download hf://spaces/Fixo22/criando-uma-startup/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Fixo22/criando-uma-startup/resolve/main/index.html
60.4 kB
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Startup Empire - Simulador de Negócios</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<style>
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse-effect {
animation: pulse 2s infinite;
}
.progress-bar {
transition: width 0.5s ease-in-out;
}
.modal {
transition: all 0.3s ease-out;
opacity: 0;
visibility: hidden;
}
.modal.active {
opacity: 1;
visibility: visible;
}
.choice-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.typewriter {
overflow: hidden;
border-right: .15em solid #3B82F6;
white-space: nowrap;
margin: 0 auto;
letter-spacing: .15em;
animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #3B82F6 }
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="mb-8 text-center">
<h1 class="text-4xl md:text-5xl font-bold text-blue-600 mb-2">Startup Empire</h1>
<p class="text-gray-600 text-lg">Construa seu império empresarial! Tome decisões estratégicas e veja seu negócio crescer.</p>
</header>
<!-- Game Container -->
<div class="bg-white rounded-xl shadow-lg overflow-hidden mb-8">
<!-- Status Bar -->
<div class="bg-gradient-to-r from-blue-500 to-blue-700 p-4 text-white flex flex-wrap justify-between items-center">
<div class="w-full sm:w-auto mb-4 sm:mb-0">
<h2 class="text-xl font-bold mb-1">Seu Negócio: <span id="business-type" class="bg-blue-800 px-2 py-1 rounded">Ainda não definido</span></h2>
<div class="flex items-center">
<span class="mr-2">Nível: <span id="level" class="font-bold">1</span></span>
<div class="w-32 bg-blue-200 rounded-full h-2.5">
<div id="level-progress" class="bg-yellow-400 h-2.5 rounded-full progress-bar" style="width: 0%"></div>
</div>
</div>
</div>
<div class="flex flex-wrap gap-4 w-full sm:w-auto justify-between">
<div>
<div class="flex items-center">
<i class="fas fa-coins text-yellow-300 mr-1"></i>
<span>Capital: R$<span id="capital">50,000</span></span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="money-bar" class="bg-green-500 h-1.5 rounded-full progress-bar" style="width: 100%"></div>
</div>
</div>
<div>
<div class="flex items-center">
<i class="fas fa-users text-blue-200 mr-1"></i>
<span>Clientes: <span id="customers">0</span></span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="customer-bar" class="bg-purple-500 h-1.5 rounded-full progress-bar" style="width: 0%"></div>
</div>
</div>
<div>
<div class="flex items-center">
<i class="fas fa-star text-yellow-300 mr-1"></i>
<span>Reputação: <span id="reputation">50</span>/100</span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="reputation-bar" class="bg-red-500 h-1.5 rounded-full progress-bar" style="width: 50%"></div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="p-6 md:p-8">
<!-- Event Display -->
<div class="bg-gray-50 rounded-lg p-4 mb-6 border-l-4 border-blue-500">
<div id="event-text" class="text-gray-800 text-lg">
Bem-vindo, ${gameState.playerName}! Você começa com R$50.000. Escolha o tipo de negócio para começar sua jornada empresarial.
</div>
</div>
<!-- Business Selection (Initial Screen) -->
<div id="business-selection" class="">
<h3 class="text-xl font-semibold mb-4 text-gray-700">Escolha seu tipo de negócio:</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="choice-card bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm cursor-pointer transition-all duration-300" onclick="selectBusiness('comercio')">
<div class="p-5 bg-gradient-to-br from-orange-100 to-orange-50">
<i class="fas fa-store text-orange-500 text-4xl mb-3"></i>
<h4 class="font-bold text-lg text-gray-800 mb-2">Comércio Varejista</h4>
<p class="text-gray-600 text-sm mb-3">Loja física com produtos diversos. Risco moderado, margens variáveis.</p>
<div class="text-xs space-y-1">
<div class="flex justify-between"><span>Investimento Inicial:</span> <span class="font-bold">R$30.000</span></div>
<div class="flex justify-between"><span>Potencial Clientes:</span> <span class="font-bold">Médio</span></div>
<div class="flex justify-between"><span>Competição:</span> <span class="font-bold">Alta</span></div>
</div>
</div>
</div>
<div class="choice-card bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm cursor-pointer transition-all duration-300" onclick="selectBusiness('cafeteria')">
<div class="p-5 bg-gradient-to-br from-amber-100 to-amber-50">
<i class="fas fa-coffee text-amber-700 text-4xl mb-3"></i>
<h4 class="font-bold text-lg text-gray-800 mb-2">Cafeteria</h4>
<p class="text-gray-600 text-sm mb-3">Ambiente acolhedor para coffee lovers. Alta rotatividade.</p>
<div class="text-xs space-y-1">
<div class="flex justify-between"><span>Investimento Inicial:</span> <span class="font-bold">R$40.000</span></div>
<div class="flex justify-between"><span>Potencial Clientes:</span> <span class="font-bold">Alto</span></div>
<div class="flex justify-between"><span>Competição:</span> <span class="font-bold">Média</span></div>
</div>
</div>
</div>
<div class="choice-card bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm cursor-pointer transition-all duration-300" onclick="selectBusiness('delivery')">
<div class="p-5 bg-gradient-to-br from-green-100 to-green-50">
<i class="fas fa-motorcycle text-green-600 text-4xl mb-3"></i>
<h4 class="font-bold text-lg text-gray-800 mb-2">Serviço de Delivery</h4>
<p class="text-gray-600 text-sm mb-3">Entrega de produtos locais. Baixa estrutura, alta demanda.</p>
<div class="text-xs space-y-1">
<div class="flex justify-between"><span>Investimento Inicial:</span> <span class="font-bold">R$25.000</span></div>
<div class="flex justify-between"><span>Potencial Clientes:</span> <span class="font-bold">Muito Alto</span></div>
<div class="flex justify-between"><span>Competição:</span> <span class="font-bold">Muito Alta</span></div>
</div>
</div>
</div>
</div>
</div>
<!-- Game Choices (Hidden Initially) -->
<div id="game-choices" class="hidden mt-6">
<h3 class="text-xl font-semibold mb-4 text-gray-700">Decisão do Mês:</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<button id="choice1" onclick="makeChoice(1)" class="bg-blue-100 hover:bg-blue-200 text-blue-800 font-medium py-3 px-4 rounded-lg border border-blue-200 transition-all duration-200 flex items-start">
<span class="bg-blue-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-0.5">1</span>
<span id="choice1-text"></span>
</button>
<button id="choice2" onclick="makeChoice(2)" class="bg-green-100 hover:bg-green-200 text-green-800 font-medium py-3 px-4 rounded-lg border border-green-200 transition-all duration-200 flex items-start">
<span class="bg-green-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-0.5">2</span>
<span id="choice2-text"></span>
</button>
<button id="choice3" onclick="makeChoice(3)" class="bg-red-100 hover:bg-red-200 text-red-800 font-medium py-3 px-4 rounded-lg border border-red-200 transition-all duration-200 flex items-start">
<span class="bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-0.5">3</span>
<span id="choice3-text"></span>
</button>
</div>
</div>
<!-- Current Stats -->
<div id="current-stats" class="hidden mt-8 bg-gray-50 p-4 rounded-lg border border-gray-200">
<h3 class="text-lg font-medium text-gray-700 mb-3">Resumo Financeiro</h3>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 text-center">
<div>
<div class="text-sm text-gray-500">Receita Mensal</div>
<div id="monthly-income" class="text-green-600 font-bold">R$0</div>
</div>
<div>
<div class="text-sm text-gray-500">Despesas Mensais</div>
<div id="monthly-expenses" class="text-red-600 font-bold">R$0</div>
</div>
<div>
<div class="text-sm text-gray-500">Lucro Líquido</div>
<div id="net-profit" class="text-blue-600 font-bold">R$0</div>
</div>
<div>
<div class="text-sm text-gray-500">Próximo Nível</div>
<div id="next-level" class="text-purple-600 font-bold">R$0</div>
</div>
</div>
</div>
<!-- Leaderboard -->
<div class="mt-10">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-semibold text-gray-700">Placar de Líderes</h3>
<div class="flex items-center bg-yellow-50 px-3 py-1 rounded-full">
<i class="fas fa-trophy text-yellow-400 mr-1"></i>
<span id="player-score" class="font-bold">0</span>
</div>
</div>
<div class="bg-white rounded-lg shadow overflow-hidden border border-gray-200">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Posição</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Negócio</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Capital</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Clientes</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Pontos</th>
</tr>
</thead>
<tbody id="leaderboard-body" class="bg-white divide-y divide-gray-200">
<!-- Leaderboard populated by JS -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Help Button -->
<button onclick="toggleModal('help-modal')" class="fixed bottom-6 right-6 bg-blue-600 text-white w-12 h-12 rounded-full shadow-lg hover:bg-blue-700 transition-all duration-200 flex items-center justify-center">
<i class="fas fa-question text-xl"></i>
</button>
<!-- Name Input Modal (shown first) -->
<div id="name-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 active">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full">
<div class="p-6 text-center">
<h3 class="text-2xl font-bold text-gray-800 mb-4">Bem-vindo ao Startup Empire!</h3>
<p class="text-gray-600 mb-6">Antes de começar, qual é o nome do seu empreendedor?</p>
<input type="text" id="player-name" placeholder="Seu nome" class="w-full px-4 py-2 border border-gray-300 rounded-lg mb-4 focus:outline-none focus:ring-2 focus:ring-blue-500">
<button onclick="startGame()" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition-colors duration-200">
Começar Jogo
</button>
</div>
</div>
</div>
<!-- Help Modal -->
<div id="help-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full max-h-screen overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-gray-800">Como Jogar</h3>
<button onclick="toggleModal('help-modal')" class="text-gray-400 hover:text-gray-600">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-4 text-gray-600">
<p><strong>Startup Empire</strong> é um simulador de negócios onde você toma decisões estratégicas para crescer sua empresa.</p>
<div class="bg-blue-50 p-3 rounded-lg">
<h4 class="font-bold text-blue-700 mb-2">Passos para Jogar:</h4>
<ol class="list-decimal list-inside space-y-1">
<li>Escolha entre os 3 tipos de negócio</li>
<li>Tome decisões mensais para sua empresa</li>
<li>Gerencie seu capital, clientes e reputação</li>
<li>Suba de nível para desafios mais complexos</li>
<li>Batalhe pelo topo do placar de líderes</li>
</ol>
</div>
<div class="bg-yellow-50 p-3 rounded-lg">
<h4 class="font-bold text-yellow-700 mb-2">Mecânicas do Jogo:</h4>
<ul class="list-disc list-inside space-y-1">
<li><strong>Capital:</strong> Dinheiro disponível para investimentos</li>
<li><strong>Clientes:</strong> Base de clientes afeta sua receita</li>
<li><strong>Reputação:</strong> Impacta na atração de clientes</li>
<li><strong>Níveis:</strong> Completar objetivos avança seu nível</li>
<li><strong>Pontuação:</strong> Baseada em todos seus indicadores</li>
</ul>
</div>
<p class="text-sm italic">Dica: Encontre o equilíbrio entre investimentos agressivos e gestão conservadora para criar um império sustentável!</p>
</div>
</div>
</div>
</div>
<!-- Game Over Modal -->
<div id="game-over-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full">
<div class="p-6 text-center">
<i class="fas fa-skull-crossbones text-red-500 text-5xl mb-4"></i>
<h3 class="text-2xl font-bold text-gray-800 mb-2">Fim de Jogo!</h3>
<p id="game-over-text" class="text-gray-600 mb-6">Você ficou sem capital e sua empresa faliu.</p>
<div class="bg-gray-100 p-4 rounded-lg mb4">
<div class="text-lg font-medium">Sua Pontuação Final:</div>
<div id="final-score" class="text-3xl font-bold text-blue-600 my-2">0</div>
</div>
<button onclick="resetGame()" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition-colors duration-200">
Jogar Novamente
</button>
</div>
</div>
</div>
<!-- Level Up Modal -->
<div id="level-up-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full">
<div class="p-6 text-center">
<div class="bg-gradient-to-r from-yellow-400 to-yellow-500 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-trophy text-white text-2xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-2">Nível Aumentado!</h3>
<p id="level-up-text" class="text-gray-600 mb-6">Você alcançou o nível 2! Novos desafios aguardam.</p>
<div class="bg-yellow-50 p-4 rounded-lg mb-4 text-left">
<h4 class="font-medium text-yellow-800 mb-2">Bônus do Nível:</h4>
<p id="level-bonus" class="text-sm">+10% nas receitas mensais</p>
</div>
<button onclick="toggleModal('level-up-modal')" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition-colors duration-200">
Continuar
</button>
</div>
</div>
</div>
</div>
<script>
// Game State
const gameState = {
playerName: "Empreendedor",
capital: 50000,
customers: 0,
reputation: 50,
level: 1,
xp: 0,
xpToNextLevel: 100,
businessType: null,
monthlyIncome: 0,
monthlyExpenses: 0,
score: 0,
month: 0,
gameOver: false,
businessData: {
comercio: {
name: "Comércio",
incomeFactor: 2.5,
expenseFactor: 1.8,
customerGrowth: 0.8,
repImpact: 1.2,
initialExpense: 30000,
icon: "fas fa-store"
},
cafeteria: {
name: "Cafeteria",
incomeFactor: 3.0,
expenseFactor: 2.2,
customerGrowth: 1.2,
repImpact: 1.5,
initialExpense: 40000,
icon: "fas fa-coffee"
},
delivery: {
name: "Delivery",
incomeFactor: 3.5,
expenseFactor: 2.5,
customerGrowth: 1.5,
repImpact: 1.3,
initialExpense: 25000,
icon: "fas fa-motorcycle"
}
},
scenarios: [
{
event: "A inflação subiu e seus custos operacionais aumentaram 15%. Como reagir?",
choices: [
{
text: "Repassar todo aumento para os clientes (risco de perder vendas)",
capital: 0,
customers: -15,
reputation: -10
},
{
text: "Absorver parte do custo e repassar apenas 5% (equilíbrio)",
capital: -5000,
customers: -5,
reputation: 5
},
{
text: "Não repassar nada e tentar cortes internos (custa mais agora, mantém clientes)",
capital: -10000,
customers: 10,
reputation: 15
}
]
},
{
event: "Sua região enfrenta um blecaute prolongado. Como manter o negócio?",
choices: [
{
text: "Alugar gerador caro para continuar operando",
capital: -15000,
customers: 10,
reputation: 10
},
{
text: "Operar com capacidade reduzida apenas de dia",
capital: -5000,
customers: -10,
reputation: -5
},
{
text: "Fechar temporariamente até normalização",
capital: 2000,
customers: -20,
reputation: -15
}
]
},
{
event: "Seu principal funcionário pediu aumento. Como lidar?",
choices: [
{
text: "Dar aumento para reter o talento",
capital: -5000,
customers: 0,
reputation: 10
},
{
text: "Oferecer bônus por metas em vez de aumento fixo",
capital: -2000,
customers: 0,
reputation: 5
},
{
text: "Recusar e arriscar perder o funcionário",
capital: 0,
customers: -5,
reputation: -10
}
]
},
{
event: "Surge oportunidade de comprar um concorrente em dificuldades. O que faz?",
choices: [
{
text: "Adquirir mesmo precisando de empréstimo",
capital: 10000,
customers: 40,
reputation: 15,
debt: 50000
},
{
text: "Comprar apenas parte dos ativos mais valiosos",
capital: -30000,
customers: 20,
reputation: 10
},
{
text: "Não comprar e focar no crescimento orgânico",
capital: 0,
customers: 0,
reputation: 0
}
]
},
{
event: "Mudanças na legislação exigem adaptações custosas. Como proceder?",
choices: [
{
text: "Investir imediatamente para estar em compliance",
capital: -25000,
customers: 0,
reputation: 15
},
{
text: "Implementar gradualmente enquanto negocia prazos",
capital: -10000,
customers: 0,
reputation: 5
},
{
text: "Esperar ser notificado para agir",
capital: 0,
customers: -5,
reputation: -15
}
]
},
{
event: "A concorrência está lançando uma promoção agressiva. O que você faz?",
choices: [
{
text: "Igualar os preços da concorrência (Reduz lucro, mas mantém clientes)",
capital: -2000,
customers: 5,
reputation: 3
},
{
text: "Manter preços e focar na qualidade (Menos clientes agora, mas reforça marca)",
capital: -1000,
customers: -10,
reputation: 5
},
{
text: "Sair da disputa de preços e inovar com novo produto (Custo alto, mas atrai atenção)",
capital: -8000,
customers: 15,
reputation: 10
}
]
},
{
event: "Um funcionário cometeu um erro caro. Como proceder?",
choices: [
{
text: "Demitir imediatamente (Mostra seriedade, mas desmotiva equipe)",
capital: -500,
customers: -5,
reputation: -3
},
{
text: "Dar feedback e treinamento (Custo de tempo, mas melhora equipe)",
capital: -2000,
customers: 0,
reputation: 7
},
{
text: "Ignorar desta vez (Arrisca repetição do erro)",
capital: -1000,
customers: 0,
reputation: -5
}
]
},
{
event: "Surgiu oportunidade de expansão. O que decide?",
choices: [
{
text: "Investir agressivamente com empréstimo (Risco alto, alta recompensa)",
capital: 20000,
customers: 30,
reputation: 15,
debt: 30000
},
{
text: "Expandir de forma gradual e sustentável (Crescimento mais lento, mas seguro)",
capital: -12000,
customers: 15,
reputation: 10
},
{
text: "Manter operação atual (Nada muda)",
capital: 0,
customers: 0,
reputation: 0
}
]
},
{
event: "Precisa melhorar sua operação. Qual estratégia adota?",
choices: [
{
text: "Investir em tecnologia e automação (Alto custo inicial, economia a longo prazo)",
capital: -15000,
customers: 10,
reputation: 8
},
{
text: "Contratar mais pessoal (Custo recorrente, mas melhora serviço)",
capital: -5000,
customers: 5,
reputation: 5
},
{
text: "Terceirizar parte do serviço (Reduz controle, mas corta custos)",
capital: -3000,
customers: 0,
reputation: -2
}
]
},
{
event: "Recebeu crítica negativa nas redes sociais. Como responde?",
choices: [
{
text: "Oferecer desconto e resolver o problema (Custo direto, mas mostra compromisso)",
capital: -3000,
customers: 2,
reputation: 10
},
{
text: "Responder educadamente pedindo feedback (Gestão de crise profissional)",
capital: 0,
customers: 0,
reputation: 5
},
{
text: "Ignorar ou responder na defensiva (Piora imagem pública)",
capital: 0,
customers: -10,
reputation: -10
}
]
},
{
event: "Estamos em uma crise econômica e as vendas caíram. Qual ação tomar?",
choices: [
{
text: "Reduzir custos drasticamente (incluindo demissões) para sobreviver",
capital: 5000,
customers: -15,
reputation: -20
},
{
text: "Focar em produtos/serviços essenciais com melhor custo-benefício",
capital: -3000,
customers: 5,
reputation: 10
},
{
text: "Manter tudo como está e torcer pela melhora da economia",
capital: -10000,
customers: -10,
reputation: -5
}
]
},
{
event: "Seu fornecedor principal aumentou os preços em 30%. Como reagir?",
choices: [
{
text: "Repassar o aumento para os clientes (arrisca perder parte deles)",
capital: 0,
customers: -20,
reputation: -5
},
{
text: "Negociar prazos mais longos ou buscar outro fornecedor",
capital: -5000,
customers: 0,
reputation: 5
},
{
text: "Comprar grande estoque agora antes de novos aumentos",
capital: -20000,
customers: 0,
reputation: 3
}
]
},
{
event: "Seu sistema teve uma falha grave que comprometeu dados de clientes. O que fazer?",
choices: [
{
text: "Notificar imediatamente os clientes e oferecer compensação",
capital: -10000,
customers: -5,
reputation: 15
},
{
text: "Resolver o problema internamente sem alarde",
capital: -5000,
customers: 0,
reputation: -10
},
{
text: "Culpar um terceiro e minimizar a responsabilidade",
capital: -2000,
customers: -15,
reputation: -20
}
]
},
{
event: "Um investidor oferece capital significativo por uma participação maior na empresa. O que decide?",
choices: [
{
text: "Aceitar o investimento para expandir rapidamente",
capital: 50000,
customers: 40,
reputation: 5,
debt: 0
},
{
text: "Negociar termos mais favoráveis mantendo controle",
capital: 30000,
customers: 20,
reputation: 10
},
{
text: "Recusar para manter independência total",
capital: 0,
customers: 0,
reputation: 0
}
]
},
{
event: "Seu estoque está ficando obsoleto. Como lidar com essa situação?",
choices: [
{
text: "Fazer liquidação para escoar o estoque rapidamente",
capital: -3000,
customers: 15,
reputation: -5
},
{
text: "Investir em marketing para dar nova vida aos produtos",
capital: -8000,
customers: 5,
reputation: 10
},
{
text: "Doar parte do estoque para ganho de imagem",
capital: -5000,
customers: 10,
reputation: 15
}
]
},
{
event: "Um cliente importante está exigindo condições especiais. Como proceder?",
choices: [
{
text: "Ceder às exigências para manter o cliente",
capital: -5000,
customers: 1,
reputation: 0
},
{
text: "Oferecer contrapartidas equilibradas",
capital: -2000,
customers: 0,
reputation: 5
},
{
text: "Manter política standard mesmo arriscando perder o cliente",
capital: 0,
customers: -1,
reputation: 10
}
]
},
{
event: "Seu sócio quer sair do negócio e vender sua parte. O que decide?",
choices: [
{
text: "Comprar a parte dele mesmo que precise de empréstimo",
capital: -40000,
customers: 0,
reputation: 5,
debt: 40000
},
{
text: "Buscar um novo sócio para assumir a parte dele",
capital: 0,
customers: 0,
reputation: 0
},
{
text: "Negociar venda parcial e transformação da sociedade",
capital: -20000,
customers: 0,
reputation: 3
}
]
},
{
event: "Uma nova tecnologia pode revolucionar seu setor. Qual estratégia adotar?",
choices: [
{
text: "Investir pesado para ser pioneiro (alto risco/alta recompensa)",
capital: -40000,
customers: 30,
reputation: 20
},
{
text: "Adotar gradualmente após validação no mercado",
capital: -15000,
customers: 10,
reputation: 10
},
{
text: "Ignorar e manter modelo atual",
capital: 0,
customers: -10,
reputation: -10
}
]
},
{
event: "Seu negócio está crescendo acima do esperado. Como escalar?",
choices: [
{
text: "Contratar gerente para delegar operações",
capital: -20000,
customers: 15,
reputation: 15
},
{
text: "Investir em automação para aumentar produtividade",
capital: -30000,
customers: 10,
reputation: 10
},
{
text: "Mantir controle total mesmo com sobrecarga",
capital: -5000,
customers: -5,
reputation: -5
}
]
},
{
event: "Seu marketing não está trazendo resultados. Como ajustar?",
choices: [
{
text: "Contratar agência profissional (custo alto, resultados garantidos)",
capital: -20000,
customers: 25,
reputation: 10
},
{
text: "Investir em redes sociais com equipe interna",
capital: -8000,
customers: 15,
reputation: 8
},
{
text: "Cortar gastos com marketing e confiar no boca a boca",
capital: 5000,
customers: -10,
reputation: -5
}
]
}
],
leaderboard: [
{ business: "Empresa Fantasma", capital: 250000, customers: 1200, score: 8450 },
{ business: "Negócio Modelo", capital: 180000, customers: 950, score: 6850 },
{ business: "Startup Inovadora", capital: 120000, customers: 700, score: 5200 },
{ business: "Você", capital: 50000, customers: 0, score: 0 }
]
};
// DOM Elements
const elements = {
capital: document.getElementById('capital'),
customers: document.getElementById('customers'),
reputation: document.getElementById('reputation'),
businessType: document.getElementById('business-type'),
eventText: document.getElementById('event-text'),
businessSelection: document.getElementById('business-selection'),
gameChoices: document.getElementById('game-choices'),
choice1: document.getElementById('choice1'),
choice2: document.getElementById('choice2'),
choice3: document.getElementById('choice3'),
choice1Text: document.getElementById('choice1-text'),
choice2Text: document.getElementById('choice2-text'),
choice3Text: document.getElementById('choice3-text'),
monthlyIncome: document.getElementById('monthly-income'),
monthlyExpenses: document.getElementById('monthly-expenses'),
netProfit: document.getElementById('net-profit'),
nextLevel: document.getElementById('next-level'),
playerScore: document.getElementById('player-score'),
leaderboardBody: document.getElementById('leaderboard-body'),
currentStats: document.getElementById('current-stats'),
moneyBar: document.getElementById('money-bar'),
customerBar: document.getElementById('customer-bar'),
reputationBar: document.getElementById('reputation-bar'),
levelProgress: document.getElementById('level-progress'),
level: document.getElementById('level'),
finalScore: document.getElementById('final-score'),
gameOverText: document.getElementById('game-over-text'),
levelUpText: document.getElementById('level-up-text'),
levelBonus: document.getElementById('level-bonus')
};
// Game Functions
function formatMoney(amount) {
return amount.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.');
}
function updateUI() {
// Update main stats
elements.capital.textContent = formatMoney(gameState.capital);
elements.customers.textContent = gameState.customers;
elements.reputation.textContent = gameState.reputation;
// Update bars
const moneyPercent = Math.min(100, (gameState.capital / 200000) * 100);
elements.moneyBar.style.width = `${moneyPercent}%`;
const customerPercent = Math.min(100, (gameState.customers / 500) * 100);
elements.customerBar.style.width = `${customerPercent}%`;
elements.reputationBar.style.width = `${gameState.reputation}%`;
// Update business stats if selected
if (gameState.businessType) {
updateBusinessStats();
}
// Update leaderboard
updateLeaderboard();
// Check for game over
if (gameState.capital <= 0 && !gameState.gameOver) {
gameOver();
}
}
function updateBusinessStats() {
const business = gameState.businessData[gameState.businessType];
// Calculate business metrics
gameState.monthlyIncome = Math.round(business.incomeFactor * gameState.customers * (1 + gameState.reputation / 200) * (1 + (gameState.level-1)*0.1));
gameState.monthlyExpenses = Math.round(business.expenseFactor * 100 * (1 + (gameState.level-1)*0.15));
const netProfit = gameState.monthlyIncome - gameState.monthlyExpenses;
// Update UI
elements.monthlyIncome.textContent = formatMoney(gameState.monthlyIncome);
elements.monthlyExpenses.textContent = formatMoney(gameState.monthlyExpenses);
elements.netProfit.textContent = formatMoney(netProfit);
// Update xp and level
const xpGain = Math.max(0, netProfit / 20) + Math.round(gameState.customers / 10);
gameState.xp += xpGain;
elements.levelProgress.style.width = `${Math.min(100, (gameState.xp / gameState.xpToNextLevel) * 100)}%`;
elements.nextLevel.textContent = formatMoney(gameState.xpToNextLevel - gameState.xp);
// Check for level up
if (gameState.xp >= gameState.xpToNextLevel) {
levelUp();
}
// Update score
gameState.score = Math.round(
gameState.capital * 0.1 +
gameState.customers * 5 +
gameState.reputation * 10 +
(gameState.level - 1) * 1000
);
elements.playerScore.textContent = gameState.score;
}
function updateLeaderboard() {
// Update player position
const playerIndex = gameState.leaderboard.findIndex(item => item.business === "Você");
if (playerIndex !== -1) {
gameState.leaderboard[playerIndex] = {
business: `${gameState.playerName} (${gameState.businessData[gameState.businessType]?.name || "..."})`,
capital: Math.round(gameState.capital),
customers: gameState.customers,
score: gameState.score
};
}
// Sort leaderboard
gameState.leaderboard.sort((a, b) => b.score - a.score);
// Update UI
elements.leaderboardBody.innerHTML = '';
gameState.leaderboard.forEach((item, index) => {
const row = document.createElement('tr');
row.className = index % 2 === 0 ? 'bg-white' : 'bg-gray-50';
row.innerHTML = `
<td class="px-4 py-3 whitespace-nowrap">
${index + 1}
${index === 0 ? ' <i class="fas fa-crown text-yellow-400"></i>' : ''}
</td>
<td class="px-4 py-3 whitespace-nowrap">${item.business}</td>
<td class="px-4 py-3 whitespace-nowrap">R$${formatMoney(item.capital)}</td>
<td class="px-4 py-3 whitespace-nowrap">${item.customers}</td>
<td class="px-4 py-3 whitespace-nowrap font-bold">${item.score}</td>
`;
elements.leaderboardBody.appendChild(row);
});
}
function selectBusiness(type) {
// Set business type
gameState.businessType = type;
// Deduct initial investment
gameState.capital -= gameState.businessData[type].initialExpense;
// Update UI
const business = gameState.businessData[type];
elements.businessType.innerHTML = `<i class="${business.icon} mr-1"></i> ${business.name}`;
elements.businessSelection.classList.add('hidden');
elements.gameChoices.classList.remove('hidden');
elements.currentStats.classList.remove('hidden');
// Show first event
gameState.customers = 20; // Starting customers
showRandomEvent();
// Update UI
updateUI();
}
function showRandomEvent() {
gameState.month++;
// Random event or monthly report
if (Math.random() < 0.85 || gameState.month === 1) {
const scenario = gameState.scenarios[Math.floor(Math.random() * gameState.scenarios.length)];
elements.eventText.textContent = scenario.event;
// Set choices
elements.choice1Text.textContent = scenario.choices[0].text;
elements.choice2Text.textContent = scenario.choices[1].text;
elements.choice3Text.textContent = scenario.choices[2].text;
} else {
// Monthly report
const business = gameState.businessData[gameState.businessType];
const income = gameState.monthlyIncome;
const expenses = gameState.monthlyExpenses;
const profit = income - expenses;
// Apply monthly changes
gameState.capital += profit;
// Natural customer growth based on reputation
const newCustomers = Math.round(
business.customerGrowth * 5 * (1 + gameState.reputation / 100) * (Math.random() * 0.5 + 0.75)
);
gameState.customers += newCustomers;
// Small reputation fluctuation
const repChange = Math.round((Math.random() * 4 - 2) * (1 + gameState.level / 10));
gameState.reputation = Math.max(0, Math.min(100, gameState.reputation + repChange));
// Show report
elements.eventText.innerHTML = `
<div class="font-bold text-lg mb-2">Relatório Mensal - Mês ${gameState.month}</div>
<div class="grid grid-cols-2 gap-2 text-sm">
<div>Receita Total: <span class="float-right font-medium text-green-600">+R$${formatMoney(income)}</span></div>
<div>Despesas: <span class="float-right font-medium text-red-600">-R$${formatMoney(expenses)}</span></div>
<div class="col-span-2 border-t border-gray-200 my-1 pt-1">
Resultado Líquido: <span class="float-right font-bold ${profit >= 0 ? 'text-green-600' : 'text-red-600'}">${profit >= 0 ? '+' : ''}R$${formatMoney(profit)}</span>
</div>
<div>Novos Clientes: <span class="float-right font-medium text-blue-600">+${newCustomers}</span></div>
<div>Reputação: <span class="float-right font-medium ${repChange >= 0 ? 'text-green-600' : 'text-red-600'}">${repChange >= 0 ? '+' : ''}${repChange}</span></div>
</div>
<div class="mt-3 text-center">
<button onclick="showRandomEvent()" class="bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium py-1 px-3 rounded">
Continuar para Próximo Mês
</button>
</div>
`;
elements.gameChoices.classList.add('hidden');
}
// Update UI
updateUI();
}
function makeChoice(choiceNumber) {
if (gameState.gameOver) return;
const scenario = gameState.scenarios.find(sc => sc.event === elements.eventText.textContent);
if (!scenario) return;
const choice = scenario.choices[choiceNumber - 1];
// Apply choice effects
gameState.capital += choice.capital || 0;
gameState.customers += choice.customers || 0;
gameState.reputation = Math.max(0, Math.min(100, gameState.reputation + (choice.reputation || 0)));
// Debt for risky choices
if (choice.debt) {
gameState.capital += choice.debt;
elements.eventText.innerHTML += `
<div class="mt-3 p-2 bg-red-50 border border-red-200 rounded text-sm">
<i class="fas fa-exclamation-triangle text-red-500 mr-1"></i>
Você contraiu uma dívida de R$${formatMoney(choice.debt)} que deverá ser paga em 3 meses!
</div>
`;
setTimeout(() => {
gameState.capital -= choice.debt * 1.1; // Pay debt with 10% interest
updateUI();
if (gameState.capital <= 0) gameOver();
}, 3000);
}
// Update UI
updateUI();
// Show next event after short delay
setTimeout(showRandomEvent, 1500);
}
function levelUp() {
gameState.level++;
gameState.xp -= gameState.xpToNextLevel;
gameState.xpToNextLevel = Math.round(gameState.xpToNextLevel * 1.5);
// Update UI
elements.level.textContent = gameState.level;
// Show level up modal
elements.levelUpText.textContent = `Você alcançou o nível ${gameState.level}! Novos desafios aguardam.`;
elements.levelBonus.textContent = [
"+10% nas receitas mensais",
"Aumento de 15% nas despesas operacionais",
"Novos desafios estratégicos",
"Crescimento mais rápido de clientes"
][Math.floor(Math.random() * 4)];
toggleModal('level-up-modal');
// Play level up sound if available
const audio = new Audio('https://assets.mixkit.co/active_storage/sfx/2577/2577-preview.mp3');
audio.volume = 0.3;
audio.play().catch(e => console.log("Audio play failed:", e));
}
function gameOver() {
gameState.gameOver = true;
elements.finalScore.textContent = gameState.score;
let message = "";
if (gameState.capital <= 0) {
message = "Você ficou sem capital e sua empresa faliu. A gestão financeira é crucial para qualquer negócio!";
} else if (gameState.reputation <= 0) {
message = "Sua reputação chegou a zero e os clientes abandonaram seu negócio. Lembre-se: reputação é tudo no mundo dos negócios!";
} else {
message = "Seu negócio teve que fechar as portas. Reflita sobre suas decisões e tente novamente!";
}
elements.gameOverText.textContent = message;
toggleModal('game-over-modal');
}
function startGame() {
const nameInput = document.getElementById('player-name');
if (nameInput.value.trim()) {
gameState.playerName = nameInput.value.trim();
}
toggleModal('name-modal', false);
// Typewriter effect for initial text
elements.eventText.classList.add('typewriter');
setTimeout(() => {
elements.eventText.classList.remove('typewriter');
}, 3500);
}
function resetGame() {
// Reset game state
gameState.capital = 50000;
gameState.customers = 0;
gameState.reputation = 50;
gameState.level = 1;
gameState.xp = 0;
gameState.xpToNextLevel = 100;
gameState.businessType = null;
gameState.monthlyIncome = 0;
gameState.monthlyExpenses = 0;
gameState.score = 0;
gameState.month = 0;
gameState.gameOver = false;
// Reset UI
elements.businessType.textContent = "Ainda não definido";
elements.businessSelection.classList.remove('hidden');
elements.gameChoices.classList.add('hidden');
elements.currentStats.classList.add('hidden');
elements.eventText.textContent = "Bem-vindo ao Startup Empire! Você começa com R$50.000. Escolha o tipo de negócio para começar sua jornada empresarial.";
elements.level.textContent = "1";
elements.levelProgress.style.width = "0%";
// Update UI
updateUI();
// Close modals
toggleModal('game-over-modal', false);
toggleModal('help-modal', false);
}
function toggleModal(modalId, show = null) {
const modal = document.getElementById(modalId);
if (show === true || (show === null && !modal.classList.contains('active'))) {
modal.classList.add('active');
} else {
modal.classList.remove('active');
}
}
// Initialize game
updateUI();
// Typewriter effect for initial text
elements.eventText.classList.add('typewriter');
setTimeout(() => {
elements.eventText.classList.remove('typewriter');
}, 3500);
</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=Fixo22/criando-uma-startup" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Startup Empire - Simulador de Negócios</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<style>
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse-effect {
animation: pulse 2s infinite;
}
.progress-bar {
transition: width 0.5s ease-in-out;
}
.modal {
transition: all 0.3s ease-out;
opacity: 0;
visibility: hidden;
}
.modal.active {
opacity: 1;
visibility: visible;
}
.choice-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.typewriter {
overflow: hidden;
border-right: .15em solid #3B82F6;
white-space: nowrap;
margin: 0 auto;
letter-spacing: .15em;
animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #3B82F6 }
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="mb-8 text-center">
<h1 class="text-4xl md:text-5xl font-bold text-blue-600 mb-2">Startup Empire</h1>
<p class="text-gray-600 text-lg">Construa seu império empresarial! Tome decisões estratégicas e veja seu negócio crescer.</p>
</header>
<!-- Game Container -->
<div class="bg-white rounded-xl shadow-lg overflow-hidden mb-8">
<!-- Status Bar -->
<div class="bg-gradient-to-r from-blue-500 to-blue-700 p-4 text-white flex flex-wrap justify-between items-center">
<div class="w-full sm:w-auto mb-4 sm:mb-0">
<h2 class="text-xl font-bold mb-1">Seu Negócio: <span id="business-type" class="bg-blue-800 px-2 py-1 rounded">Ainda não definido</span></h2>
<div class="flex items-center">
<span class="mr-2">Nível: <span id="level" class="font-bold">1</span></span>
<div class="w-32 bg-blue-200 rounded-full h-2.5">
<div id="level-progress" class="bg-yellow-400 h-2.5 rounded-full progress-bar" style="width: 0%"></div>
</div>
</div>
</div>
<div class="flex flex-wrap gap-4 w-full sm:w-auto justify-between">
<div>
<div class="flex items-center">
<i class="fas fa-coins text-yellow-300 mr-1"></i>
<span>Capital: R$<span id="capital">50,000</span></span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="money-bar" class="bg-green-500 h-1.5 rounded-full progress-bar" style="width: 100%"></div>
</div>
</div>
<div>
<div class="flex items-center">
<i class="fas fa-users text-blue-200 mr-1"></i>
<span>Clientes: <span id="customers">0</span></span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="customer-bar" class="bg-purple-500 h-1.5 rounded-full progress-bar" style="width: 0%"></div>
</div>
</div>
<div>
<div class="flex items-center">
<i class="fas fa-star text-yellow-300 mr-1"></i>
<span>Reputação: <span id="reputation">50</span>/100</span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="reputation-bar" class="bg-red-500 h-1.5 rounded-full progress-bar" style="width: 50%"></div>
</div>
</div>