/* Nhập font từ Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Reset CSS cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

#container {
  max-width: 800px;
  margin: 50px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #007bff; /* Màu xanh dương */
}

#canvas {
  border: 2px solid #ddd;
  margin-bottom: 20px;
}

#question {
  font-size: 18px;
  margin-bottom: 15px;
}

input[type="number"] {
  width: 100px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-right: 10px;
}

button {
  background-color: #007bff;
  color: #fff;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

#result {
  margin-top: 15px;
  font-weight: 600;
}

#history {
  margin-top: 30px;
}

#history h2 {
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #f0f0f0;
}
#history table {
  counter-reset: rowNumber -1; /* Đặt giá trị ban đầu là -1 */
}

#history table tr {
  counter-increment: rowNumber; 
}

#history table tr td:first-child::before {
  content: counter(rowNumber) ". "; 
  margin-right: 5px;
}
#canvas {
  border: 1px solid black;
  margin: 20px auto;
  display: none; /* Ẩn canvas theo mặc định */
}

#canvas.show {
  display: block; /* Hiển thị canvas khi có class "show" */
}