* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 10px;
  min-height: 100vh; /* Ensure body takes at least full viewport height */
  display: flex; /* Use flexbox to layout the content */
  flex-direction: column; /* Stack children vertically */
}

.container {
  flex: 1; /* Allow the container to grow and take up available space */
  max-width: 70%;
  min-width: 60%;
  margin: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Navbar Styles */
.navbar {
  background-color: #388e3c;
  color: #f0f0f0;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  border-radius: 10px;
  padding: 25px;
}

.notes {
  min-height: 72vh;
  padding: 20px;
}

h1 {
  font-size: 1.7rem;
}

h2 {
  font-size: 1.3rem;
}

.section {
  margin-top: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  min-width: 600px; /* Sets minimum width for the table */
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #4caf50;
  color: #fdfdfd;
  text-align: center;
}

th:nth-child(1),
td:nth-child(1) {
  width: 10%; /* Serial Number column */
}

th:nth-child(2),
td:nth-child(2) {
  width: 50%; /* Name column */
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  width: 20%; /* Link and Date columns */
}

tr:hover {
  background-color: #f1f1f1;
}

/* Alert Icon for new note update */
.alert-icon {
  color: red;
  margin-left: 5px;
  font-size: 0.9em;
  font-weight: bolder;
  display: inline-block;
  transform: rotate(-26deg);
  user-select: none;
}

/* Footer Styles */
.footer {
  background-color: #388e3c;
  color: white;
  text-align: center;
  padding: 10px 15px;
  font-size: 1.2rem;
  margin-top: 25px;
  border-radius: 8px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.footer-links {
  margin-top: 15px;
}

.footer-icon {
  margin: 0 10px;
  display: inline-block;
}

.footer-icon img {
  width: 28px;
  height: 28px;
  vertical-align: middle;
}

.notes {
  position: relative; /* Positioning context for absolute children */
}

/* Loading animation overlay */
.loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9996;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loading {
  display: flex !important;
}

/* Loader animation */
.loader {
  border: 6px solid #388e3c;
  border-radius: 50%;
  border-top: 6px solid transparent;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Styles */
@media (max-width: 878px) {
  body {
    padding: 0;
  }

  .container {
    max-width: 100%;
  }

  .notes {
    padding: 15px;
  }

  .data-table {
    overflow-x: auto;
  }

  table {
    min-width: 600px; /* Maintains minimum width on small screens */
  }
}

.center {
  text-align: center !important;
}
