<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>เกมทายคำผะหมี</title>
<style>
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
font-family: sans-serif;
background: linear-gradient(135deg, #d8f4ff, #fdf5d9);
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.game {
width: 100%;
max-width: 480px;
background: white;
border-radius: 28px;
overflow: hidden;
box-shadow: 0 12px 35px rgba(22,91,130,0.2);
text-align: center;
border: 3px solid #f2d58b;
}
.header {
background: linear-gradient(135deg, #087eaa, #25b8c5);
color: white;
padding: 30px 15px;
}
.header h1 {
font-size: 29px;
margin: 8px 0;
}
.content {
padding: 25px 22px 30px;
}
.subtitle {
color: #bd8c32;
font-weight: bold;
font-size: 19px;
line-height: 1.7;
}
.poem {
background: #fff9e9;
border: 2px dashed #e6bd64;
border-radius: 18px;
padding: 22px 12px;
margin: 20px 0;
color: #36566b;
font-size: 17px;
line-height: 2.2;
}
input {
width: 100%;
padding: 15px;
border: 2px solid #9dd9e6;
border-radius: 12px;
font-size: 18px;
text-align: center;
outline: none;
}
input:focus {
border-color: #0785aa;
}
button {
width: 100%;
padding: 15px;
margin-top: 15px;
border: none;
border-radius: 12px;
background: linear-gradient(90deg, #0785aa, #22b6bd);
color: white;
font-size: 18px;
font-weight: bold;
cursor: pointer;
}
#result {
margin-top: 20px;
font-size: 18px;
font-weight: bold;
}
.footer {
background: #e9f9fa;
color: #43869a;
padding: 13px;
font-size: 13px;
}
</style>
</head>
<body>
<div class="game">
<div class="header">
<h1>เกมทายคำผะหมี</h1>
</div>
<div class="content">
<div class="subtitle">
มาร่วมสนุกกับปริศนาของดีสมุทรปราการ
</div>
<div class="poem">
อยู่บางบ่อขึ้นชื่อเลื่องลือนาม<br>
รสหอมตามติดใจใครได้ชิม<br>
ตากแดดแห้งทอดกรอบชวนให้อิ่ม<br>
ของดีถิ่นนี้หนาเรียกว่าอะไร<br>
</div>
<form id="quiz">
<input
type="text"
id="answer"
placeholder="พิมพ์คำตอบของคุณ..."
autocomplete="off"
required
>
<button type="submit">ตรวจคำตอบ</button>
</form>
<div id="result"></div>
</div>
<div class="footer">
เรียนรู้ภูมิปัญญาและของดีประจำจังหวัดสมุทรปราการ
</div>
</div>
<script>
document.getElementById("quiz").addEventListener(
"submit", function(event) {
event.preventDefault();
const answer = document.getElementById("answer")
.value.trim().replace(/\s+/g, "");
const result = document.getElementById("result");
if (answer === "ปลาสลิดบางบ่อ") {
result.textContent = "ถูกต้อง! เก่งมาก เยี่ยมไปเลย";
result.style.color = "#15965a";
} else {
result.textContent = "ยังไม่ถูกต้อง ลองใหม่อีกครั้งนะ!";
result.style.color = "#dc5555";
}
}
);
</script>
</body>
</html>