html, body {
    min-height: 150vh;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 30px;
  padding: 0 20px;
}

.card {
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  flex: 1 1 calc(25% - 20px);
  min-width: 250px;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid #d2b356 !important; /* Gold border on hover */
  cursor: pointer;
}

.card h1 {
  font-size: 1.2rem;
  margin: 0;
  padding: 0;
  color: #333;
  font-weight: 600;
}

.card-separator {
  width: 85%;
  height: 1px;
  background-color: #e0e0e0;
  margin: 10px 0;
}

.card h2 {
  font-size: 0.9rem;
  font-weight: normal;
  margin: 10px 0 0 0;
  padding: 0;
  color: #666;
  width: 85%;
  line-height: 1.4;
}

.loading {
  text-align: center;
  padding: 20px;
  font-style: italic;
  color: #999;
  width: 100%;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
  display: none;
}

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalFadeIn 0.3s ease;
  padding: 20px;
  border: 3px solid #d2b356; /* Added gold border */
  transition: height 0.3s ease;
}

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

.modal-close:hover {
  color: #000;
}

.modal-add {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #4CAF50;
}

.modal-add:hover {
  color: #388E3C;
}

.modal-content.expanded {
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
}

.tale-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

@keyframes modalFadeIn {
  from {
      opacity: 0;
      transform: scale(0.9);
  }
  to {
      opacity: 1;
      transform: scale(1);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
    .card {
    flex: 1 1 calc(33.33% - 20px);
    }
}

@media (max-width: 900px) {
    .card {
    flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .card {
    flex: 1 1 100%;
    }
}