.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 15px;
  max-width: 500px;
  width: 80%;
  max-height: 80vh;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
}

.close-button {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-button:hover {
  color: #3498db;
}

#modalTitle {
  color: #2c3e50;
  font-size: 2rem;
  margin-bottom: 10px;
  padding-right: 30px;
}

#modalContent {
  color: #34495e;
  font-size: 1rem;
  line-height: 1.6;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 10px;
  text-align: justify;
}

#modalMeta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 15px;
  border-bottom: 1px solid #ecf0f1;
  padding-bottom: 10px;
}

.modal-author,
.modal-date {
  display: flex;
  align-items: center;
}

.modal-author:before,
.modal-date:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
}

.modal-author:before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233498db"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
}

.modal-date:before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233498db"><path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"/></svg>');
}

#modalContent::-webkit-scrollbar {
  width: 8px;
}

#modalContent::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#modalContent::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

#modalContent::-webkit-scrollbar-thumb:hover {
  background: #555;
}
