/* Import font chữ từ Google Fonts (ví dụ: Roboto) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
  font-family: 'Roboto', sans-serif; /* Sử dụng font chữ Roboto */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f8f8f8; /* Màu nền nhạt */
  flex-direction: column; /* Bố cục theo cột */
  gap: 20px; /* Khoảng cách giữa các phần tử */
}

.container {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
 
  width: 85%;
}

h1 {
    font-size: 2.5rem;
    color: #343a40; /* Màu xám đậm */
    text-align: center;
    margin-bottom: 2rem;
}

.stats {
  font-size: 1.2em; /* Kích thước chữ lớn hơn */
  margin-bottom: 20px;
  display: flex; /* Sử dụng flexbox */
  justify-content: center; /* Căn giữa các phần tử */
  align-items: center;
  gap: 10px; /* Khoảng cách giữa các phần tử */
}

#percentage {
  font-weight: bold; /* Làm đậm phần trăm */
  color: #007bff; /* Màu xanh dương */
}

.problem {
  font-size: 1.8em;
  margin-bottom: 25px;
  line-height: 1.5; /* Khoảng cách giữa các dòng */
}

.input-group {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px; /* Khoảng cách giữa input và button */
}

input[type="text"] {
  padding: 12px;
  border: 1px solid #ced4da; /* Màu viền nhạt */
  border-radius: 5px;
  width: 150px;
  font-size: 1em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Hiệu ứng đổ bóng tinh tế */
  transition: border-color 0.3s ease; /* Hiệu ứng chuyển màu viền */
}

input[type="text"]:focus {
  outline: none; /* Loại bỏ viền mặc định khi focus */
  border-color: #007bff; /* Màu xanh dương khi focus */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); /* Hiệu ứng đổ bóng nổi bật khi focus */
}

button {
  padding: 12px 24px;
  background-color: #28a745; /* Màu xanh lá cây */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); /* Hiệu ứng đổ bóng nổi bật */
  transition: background-color 0.3s ease; /* Hiệu ứng chuyển màu khi hover */
}

button:hover {
  background-color: #218838; /* Màu xanh lá cây đậm */
}

.new-problem {
  background-color: #007bff; /* Màu xanh dương */
}

.new-problem:hover {
  background-color: #0069d9; /* Màu xanh dương đậm */
}

.result {
  font-size: 1.4em;
  margin-top: 15px;
  font-weight: bold; /* Làm đậm kết quả */
}

.analysis {
  margin-top: 20px;
  text-align: left;
  line-height: 1.6; /* Khoảng cách giữa các dòng */
}

/* Kiểu dáng cho bảng lịch sử */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
 
}

.history-table th, .history-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.history-table th {
  background-color: #f2f2f2;
  font-weight: bold; /* Làm đậm tiêu đề cột */
}

/* Thêm viền cho các phần tử trong lịch sử */
#history div {
  border-bottom: 1px dotted lightgray; /* Đường phân cách mờ */
  padding-bottom: 10px; /* Khoảng cách giữa các phần tử lịch sử */
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 600px) {
  .problem {
    font-size: 1.4em;
  }

  input[type="text"] {
    width: 120px;
  }
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

table th {
    background-color: #f2f2f2;
    color: #333;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

table td {
    vertical-align: top;
}