/* Global styles for body and html to enable scrolling */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #1e1e1e;
  margin: 0;
  padding: 0;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align items at the top */
  min-height: 100vh;
  overflow-y: auto; /* Ensure the body allows vertical scrolling */
}

html {
  overflow-y: auto; /* Ensure the html element allows vertical scrolling */
}

/* Container styling */
.container {
  max-width: 600px;
  width: 100%;
  padding: 20px;
  background-color: #2c2c2c;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-top: 100px; /* Adjust this value to move the container up or down */
  height: auto; /* Ensures the container height adjusts to its content */
  margin-bottom: 100px;
}

/* Dark mode styles */
.dark-mode {
  background-color: #2c2c2c;
  color: #ffffff;
}

/* Light mode styles */
.light-mode {
  background-color: #fcf5c7;
  color: #333333;
}

.light-mode h1 {
  color: #333333;
  background: none;
}

.light-mode select,
.light-mode input[type="text"],
.light-mode button {
  border-color: #8ac6d1;
  background-color: #ddeff5;
  color: #333333;
}

.light-mode button:hover {
  background-color: #a3d3e1;
}

.light-mode .sort-container {
  background: none;
}

.light-mode ul {
  background: none;
}

.light-mode form {
  background: none;
}

.light-mode label {
  background: none;
}

.light-mode div {
  background: none;
}

.light-mode h2 {
  background: none;
}

.light-mode ul {
  border-color: #8ac6d1;
}

.light-mode li {
  background-color: #ddeff5;
}

.light-mode .completed {
  color: #888888;
}

.light-mode footer {
  background-color: #ffee93;
}

.light-mode footer p {
  background: none;
}

.light-mode .container {
  background-color: #FAC898;
}

/* Heading styles */
h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #f0f0f0;
}

h2 {
  text-align: center;
  margin-top: 30px;
}

/* Form styling */
form {
  display: flex;
  margin-bottom: 20px;
}

select,
input[type="text"] {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #555;
  border-radius: 5px;
  margin-right: 10px;
  flex: 1;
}

/* Button styles */
button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #388e3c;
}

/* Sort container styles */
.sort-container {
  display: flex;
  justify-content: right;
  align-items: center;
  margin-bottom: 20px;
}

/* List styles */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #555;
}

li .buttons {
  display: flex;
  gap: 10px;
}

.completed {
  color: #888;
}

.completed button {
  text-decoration: none;
}

/* Footer styles */
footer {
  width: 100%;
  height: 60px;
  background-color: #2c2c2c;
  text-align: center;
  color: #999;
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #555;
}

/* Toggle container styles */
.toggle-container {
  position: absolute;
  top: 50px;
  right: 50px;
  display: flex;
  align-items: center;
}

.mode-label {
  margin-right: 10px;
}

/* Switch styles */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* Slider styles for different modes */
.dark-mode .slider {
  background-color: #ccc;
}

.light-mode .slider {
  background-color: #f0f0f0;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Completed task list styles */
.completed-task-list {
  margin-top: 20px;
}