/* --- ESTILO GERAL --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    /* "Segoe UI Emoji" é essencial para o Windows mostrar os ícones coloridos */
    font-family: 'Fredoka One', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    background: linear-gradient(180deg, #81d4fa 0%, #a5d6a7 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container-login {
    background-color: #ffffff;
    width: 100%;
    max-width: 500px;
    padding: 25px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    border: 6px solid #4caf50;
}

/* --- HUD --- */
.hud {
    display: flex;
    justify-content: space-between;
    background: #f1f8e9;
    padding: 10px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    color: #33691e;
    font-weight: bold;
    font-size: 1.2rem;
}

/* --- ÁREA DA IMAGEM (CENÁRIO) --- */
.cenario-container {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 15px;
    border: 3px solid #b2dfdb;
    overflow: hidden;
    background-color: #e0f2f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagem-cenario {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback: Se a imagem quebrar, mostramos isso */
.cenario-fallback {
    display: none; /* Escondido por padrão */
    font-size: 5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.cenario-fallback span { font-size: 1rem; margin-top: 10px; color: #555; }

/* --- TEXTO DA HISTÓRIA --- */
.texto-historia {
    font-size: 1.3rem;
    color: #37474f;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: bold;
}

/* --- ATUALIZAÇÃO NO ESTILO.CSS --- */

/* Área onde os itens aparecem */
.game-area {
    min-height: 120px; /* Garante altura mínima */
    margin: 15px 0;
    background-color: #fff3e0;
    padding: 20px;
    border-radius: 15px;
    border: 3px dashed #ffb74d;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Permite quebrar linha se tiver muitos itens */
    gap: 10px; /* Espaço entre os itens */
}

/* NOVO: Estilo para os ícones dos itens (substituindo emojis) */
.icone-item {
    width: 60px;  /* Tamanho fixo */
    height: 60px;
    object-fit: contain;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito de "Pulo" ao aparecer */
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.2));
}

/* Símbolo de + e = na soma */
.sinal-matematico {
    font-size: 3rem;
    color: #e65100;
    font-weight: bold;
    margin: 0 10px;
}

/* Animaçãozinha para dar vida */
@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- INPUT E BOTÃO --- */
.input-resposta {
    width: 100%;
    height: 70px;
    font-size: 2.5rem;
    text-align: center;
    border: 4px solid #ff9800;
    border-radius: 20px;
    background-color: #fffde7;
    color: #e65100;
    margin-bottom: 15px;
    outline: none;
    font-family: inherit;
}

.btn-start {
    background-color: #ff9800;
    color: white;
    font-family: inherit;
    font-size: 1.5rem;
    padding: 15px 0;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 5px 0 #ef6c00;
}
.btn-start:active { transform: translateY(5px); box-shadow: none; }

/* --- ADICIONAR AO FINAL DO ESTILO.CSS --- */

/* Aumenta o texto da pergunta "Qual é o seu nome?" */
label[for="nome"] {
    font-size: 1.5rem;
    color: #2e7d32; /* Verde escuro */
    margin-bottom: 10px;
    display: block;
    font-weight: bold;
}

/* Estilo do novo Input de Login */
.input-login {
    width: 100%; /* Ocupa a largura toda */
    height: 70px; /* Bem alto para ser fácil de clicar */
    padding: 10px;
    font-size: 1.8rem; /* Texto grande */
    font-family: 'Fredoka One', cursive; /* Fonte do jogo */
    text-align: center; /* Texto no meio */
    
    /* Cores e Bordas divertidas */
    border: 4px solid #ff9800; /* Borda laranja grossa */
    background-color: #fff3e0; /* Fundo laranjinha claro */
    color: #e65100; /* Cor da letra */
    border-radius: 25px; /* Cantos bem redondos */
    
    outline: none; /* Tira a borda azul feia do navegador */
    margin-bottom: 25px; /* Espaço para o botão de baixo */
    transition: all 0.3s ease;
}

/* Efeito quando a criança clica para digitar */
.input-login:focus {
    background-color: #ffffff; /* Fica branco */
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5); /* Brilho laranja em volta */
    transform: scale(1.02); /* Cresce um pouquinho */
}

/* Ajuste para o placeholder (o texto "Digite seu nome aqui...") ficar na cor certa */
.input-login::placeholder {
    color: #ffcc80;
}

/* --- ADICIONAR AO FINAL DO ESTILO.CSS --- */

/* Container da Tabela com rolagem se necessário */
.tabela-container {
    width: 100%;
    overflow-x: auto;
    background-color: #fff;
    border-radius: 15px;
    border: 3px solid #b2dfdb;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fredoka One', sans-serif;
}

thead {
    background-color: #00bcd4;
    color: white;
}

th {
    padding: 15px;
    font-size: 1.2rem;
}

td {
    padding: 12px;
    font-size: 1.1rem;
    color: #555;
    border-bottom: 1px solid #eee;
}

/* Efeito Zebrado (uma linha cinza, uma branca) */
tbody tr:nth-child(even) {
    background-color: #e0f7fa;
}

/* Destaque para o primeiro lugar */
tbody tr:first-child {
    background-color: #fff9c4; /* Amarelo clarinho */
    font-size: 1.3rem;
    color: #fbc02d;
}

/* Botão Voltar */
.btn-voltar {
    display: inline-block;
    background-color: #78909c;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 5px 0 #546e7a;
    transition: transform 0.1s;
}

.btn-voltar:active {
    transform: translateY(5px);
    box-shadow: none;
}

/* --- ESTILO DO CHEFÃO FINAL --- */
.boss-fight {
    border: 8px solid #c62828; /* Borda vermelha intimidadora */
    background-color: #ffcdd2; /* Fundo avermelhado */
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both infinite;
}

/* Animação de tremor para o container do chefe */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
