/* Default Light Mode Styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
  color: #333;
}

.container {
  max-width: 100%; /* Make container flexible for smaller screens */
  margin: 2px auto;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow-x: auto; /* Enable scrolling for small screens */
}

h1 {
  text-align: center;
  color: inherit;
}

table {
  width: 100%; /* Table will span the full width of the container */
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: right;
}

th {
  background-color: #f4f4f4;
  position: sticky;
  top: 0;
  z-index: 2; /* Ensure it stays above content */
}

td:first-child {
  text-align: left;
}

.total {
  font-weight: bold;
  background-color: #f4f4f4;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #333;
  color: #f9f9f9;
}

.dark-mode .container {
  background-color: #444;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.dark-mode th {
  background-color: #555;
}

.dark-mode td {
  border-color: #666;
}
.header-container {
  display: flex;
  justify-content: space-between; /* Space between heading and button */
  align-items: center; /* Vertically align items */
  margin-bottom: 5px;
  margin-top: 5px;
}

#mode-toggle {
  width: 50px;
  height: 25px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  text-align: center;
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
  margin-left: 5px; /* Add space between button and heading */
}

#mode-toggle:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}

h4 {
  margin: 0;
  font-size: 18px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 8px;
  }

  h1,
  h4 {
    font-size: 18px;
    text-align: center;
  }

  table {
    font-size: 14px;
    width: 100%; /* Ensure table spans full width on smaller screens */
  }

  th,
  td {
    padding: 8px;
  }

  th {
    top: 0;
  }
}

@media (max-width: 480px) {
  th,
  td {
    font-size: 12px;
    padding: 6px;
  }

  .container {
    padding: 5px;
    border-radius: 5px;
  }

  table {
    width: 100%; /* Ensure table utilizes full width */
  }

  h1,
  h4 {
    font-size: 16px;
  }
}

#mode-toggle {
  margin-right: 10px;
}

nav {
  background-color: #007bff;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000; /* Ensures the navbar stays on top of other elements */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

nav ul li a:hover {
  background-color: #0056b3;
}
