/* Import font chữ từ Google Fonts (tùy chọn) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Reset CSS mặc định của trình duyệt */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif; /* Sử dụng font chữ Roboto */
  background-color: #f8f8f8; /* Màu nền nhạt */
  color: #333; /* Màu chữ tối */
  line-height: 1.5; /* Khoảng cách dòng */
}

.container {
  max-width: 960px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
  font-weight: 700;
  margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem;
    color: #343a40; /* Màu xám đậm */
    text-align: center;
    margin-bottom: 2rem;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  background-color: #007bff; /* Màu xanh dương */
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0062cc; /* Màu xanh dương đậm hơn khi hover */
}

#message {
  margin-top: 10px;
  font-weight: bold;
  color: #dc3545; /* Màu đỏ */
}

/* CSS cho bảng lịch sử */
#historyTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#historyTable th, #historyTable td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

#historyTable th {
  background-color: #f0f0f0;
  font-weight: bold;
}




/* CSS cho thống kê */
#statsContainer {
  margin-top: 20px;
}

#statsContainer table {
  width: 100%;
  border-collapse: collapse;
}

#statsContainer th, #statsContainer td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

#statsContainer th {
  background-color: #f0f0f0;
  font-weight: bold;
}
/* Style for fractions */
.fraction {
    display: inline-block;
    text-align: center;
    margin: 0 2px;
}

.fraction sup {
    display: block;
    font-size: smaller;
	margin-bottom: -40px;
}

.fraction sub {
    display: block;
    font-size: smaller;
}


/* Fraction styling */
.fraction {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
}

.fraction .numerator {
    display: block;
    font-size: smaller;
    border-bottom: 1px solid black; /* This will create the fraction line */
    margin-bottom: 2px;
}

.fraction .denominator {
    display: block;
    font-size: smaller;
}

/* Ensure that in history or problem display, fractions are displayed correctly */
.history .fraction,
#problem .fraction {
    display: inline-block;
    text-align: center;
    margin: 0 5px;
}
