body { font-family: Arial, sans-serif; margin: 0; background-color: #f4f4f4; }
header { background-color: #333; color: white; padding: 1rem; }
header nav { display: flex; justify-content: space-between; align-items: center; }
header a { color: white; text-decoration: none; margin: 0 10px; }
header span { font-weight: bold; color: #4CAF50; }

main { padding: 2rem; text-align: center; }
.card-container { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.card { border: 1px solid #ccc; border-radius: 8px; padding: 15px; width: 200px; background: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.card img { max-width: 100%; height: auto; }
.card h3 { margin: 10px 0 5px; }
.card p { color: #555; }
.buy-btn { background-color: #007BFF; color: white; border: none; padding: 10px 15px; border-radius: 5px; cursor: pointer; font-size: 16px; }
.buy-btn:hover { background-color: #0056b3; }

/* Estilos para a área do jogo */
#game-area { display: none; margin-top: 20px; }
.scratch-container { position: relative; display: inline-block; cursor: crosshair; }
#scratch-canvas { position: absolute; top: 0; left: 0; z-index: 2; }
#prize-display { width: 300px; height: 200px; background-color: #ddd; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold; color: #333; }
#message { margin-top: 20px; font-size: 20px; font-weight: bold; }
.win { color: #4CAF50; }
.lose { color: #f44336; }

/* Formulários */
form { max-width: 400px; margin: 20px auto; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
input[type="text"], input[type="email"], input[type="password"] { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 10px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
button:hover { background-color: #218838; }
/* ... (estilos anteriores) ... */

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
    text-align: center;
}

.alert.error {
    background-color: #f44336; /* Vermelho para erros */
    border-color: #d32f2f;
}

.alert.success {
    background-color: #4CAF50; /* Verde para sucesso */
    border-color: #388E3C;
}
/* ... (seus estilos anteriores) ... */

/* Estilos para a área do jogo */
#game-area {
    display: none; /* Escondido por padrão */
    margin-top: 40px;
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.scratch-container {
    position: relative; /* Necessário para posicionar o canvas sobre o prêmio */
    display: inline-block;
    cursor: crosshair;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden; /* Garante que nada saia fora dos limites */
}

#scratch-canvas {
    position: absolute; /* Posiciona o canvas sobre o conteúdo */
    top: 0;
    left: 0;
    z-index: 2; /* Garante que fique acima do #prize-display */
}

#prize-display {
    width: 300px;
    height: 200px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

#message {
    margin-top: 20px;
    font-size: 22px;
    font-weight: bold;
    min-height: 30px; /* Evita que o layout "pule" quando a mensagem aparece */
}

#message.win {
    color: #4CAF50; /* Verde para vitória */
}

#message.lose {
    color: #f44336; /* Vermelho para derrota */
}