body {
  font-family: sans-serif;
  margin: 20px;
  background-color: #f4f4f4;
}

h1 {
  text-align: center;
}

main {
  display: flex;
  gap: 20px;
}

section {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#template-management {
  flex: 1;
}

#template-list-section {
  flex: 2;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.form-actions {
  display: flex;
  gap: 10px;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  color: #fff;
}

#save-btn {
  background-color: #28a745;
}

#update-btn {
  background-color: #007bff;
}

#delete-btn {
  background-color: #dc3545;
}

#template-list {
  list-style: none;
  padding: 0;
}

#template-list li {
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: block; /* Ensure list items can contain block elements */
}

#template-list li:hover {
  background-color: #f9f9f9;
}

#template-list li.selected {
  background-color: #e0e0e0;
}

.template-name {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}

.template-content-preview {
  font-size: 0.9em;
  color: #666;
  white-space: pre-wrap; /* Preserve whitespace and break lines */
}

#file-operations {
  margin-top: 20px; /* Add some space between form and file operations */
}

.file-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
