body {
  font-family: Arial, sans-serif;
}

table {
  border-collapse: collapse;
  width: auto; /* Table width is automatically adjusted */
  max-width: 100%; /* Prevent tables from exceeding container width */
  margin: 20px auto; /* Center tables and add spacing */
}

th, td {
  border: 2px solid black;
  padding: 5px; /* Adjusted padding */
  text-align: center; /* Center text in cells */
  white-space: nowrap; /* Prevent line breaks in cells */
}

th {
  background-color: #f2f2f2;
  cursor: pointer;
}

#resultTable, #summaryTable {
  background-color: #fff;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  max-width: 800px; /* Limit maximum width for better alignment */
}

#resultTable th, #resultTable td,
#summaryTable th, #summaryTable td {
  padding: 8px; /* Adjusted padding for readability */
  font-weight: bold;
  color: #333;
}

#resultTable th, #summaryTable th {
  background-color: black;
  color: white;
}

#resultTable td, #summaryTable td {
  background-color: #fff;
  border: 2px solid black;
}

#summaryHeading, .comments-container h2 {
  text-align: center;
}

.centered {
  text-align: center;
}

.red-background {
  background-color: red;
}

.strike-through {
  text-decoration: line-through;
}

.comments-container {
  margin: 20px auto;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  max-width: 800px; /* Limit width for better alignment */
}

.comments-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.comment-item {
  margin-bottom: 15px;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.comment-timestamp, .comment-email {
  font-size: 0.9em;
  color: #555;
}

.comment-timestamp strong, .comment-email strong {
  color: #333;
}

.comment-text {
  font-size: 1em;
  color: #555;
  word-wrap: break-word; /* Allow text to wrap properly */
}

/* Centering Forms and Headers */
.form-container {
  margin: 20px auto;
  padding: 15px;
  max-width: 800px; /* Limit width for better alignment */
  text-align: center; /* Center content */
}

form {
  display: inline-block; /* Center the form element */
  width: 100%; /* Make form fill the container */
}

textarea {
  width: 100%; /* Make textarea fill the form width */
  box-sizing: border-box; /* Include padding in width calculation */
}

input[type="email"], input[type="text"] {
  width: calc(100% - 20px); /* Adjust width to fit with padding */
  box-sizing: border-box; /* Include padding in width calculation */
}

button {
  margin-top: 10px;
}
