/* Body and Container */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Title */
h1 {
  text-align: center;
  color: #333;
  font-size: 2.5em;
  margin-bottom: 20px;
}

/* Form */
form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

form input, form textarea, form select, form button {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

form textarea {
  grid-column: span 2;
  resize: vertical;
}

form button {
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #45a049;
}

/* Charts Section */
/* Charts Section */
.charts {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 20px;
}

/* Pie chart: 24% width and height = width (circle) */
.pie-chart {
  width: 24%;
  aspect-ratio: 1 / 1;
  max-width: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

/* Bar chart: 50% width */
.bar-chart {
  width: 50%;
  max-width: 600px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

/* Ensure the canvas doesn't overflow or add spacing */
canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Sort Buttons */
.sort-options {
  text-align: center;
  margin-bottom: 20px;
}

.sort-options button {
  padding: 10px 20px;
  font-size: 1em;
  margin: 5px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.sort-options button:hover {
  background-color: #0b7dda;
}

/* Table Design */
#problemTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#problemTable th, #problemTable td {
  padding: 12px;
  text-align: left;
  border: 1px solid #ddd;
}

#problemTable th {
  background-color: #4CAF50;
  color: white;
}

#problemTable td {
  background-color: #f9f9f9;
}

#problemTable tr:nth-child(even) td {
  background-color: #f1f1f1;
}

#problemTable button {
  padding: 5px 10px;
  background-color: #f87b1b;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#problemTable button:hover {
  background-color: #eb090c;
}

/* Footer */
footer {
  text-align: center;
  font-size: 1em;
  color: #777;
  margin-top: 30px;
}

footer a {
  text-decoration: none;
  color: #4CAF50;
}

footer a:hover {
  color: #388E3C;
}
