* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 5%;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 700px;
  width: 100%;
  text-align: center;
}

h1 {
  font-size: 40px;
  margin-bottom: 20px;
  text-align: center;
}

h2 {
  margin: 30px 0 15px;
  font-size: 28px;
  color: inherit;
  text-align: center;
}

#darkModeToggle {
  margin: 15px auto;
  display: block;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
}

.controls {
  display: flex;
  gap: 10px;
  margin: 20px auto 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls input,
.controls button {
  padding: 14px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.controls input[type="text"] {
  flex: 1;
  min-width: 200px;
}

.controls input[type="date"] {
  flex: 0.5;
  min-width: 140px;
}

.controls button {
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

.controls button:hover {
  background-color: #45a049;
}

.task-section {
  margin-bottom: 30px;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
}

li {
  background-color: #fff;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.task-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.task-text {
  font-size: 20px;
}

.task-date {
  margin-left: 8px;
  font-size: 14px;
  color: #777;
}

.task-buttons {
  display: flex;
  gap: 10px;
}

.task-buttons button {
  padding: 8px 14px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.task-buttons .edit {
  background-color: #2196f3;
  color: white;
}

.task-buttons .delete {
  background-color: #f44336;
  color: white;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode li {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .controls input {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #555;
}

body.dark-mode .controls button {
  background-color: #388e3c;
}

body.dark-mode .task-buttons .edit {
  background-color: #1976d2;
}

body.dark-mode .task-buttons .delete {
  background-color: #d32f2f;
}

body.dark-mode .task-date {
  color: #bbb;
}

@media (max-width: 600px) {
  h1 {
    font-size: 30px;
  }

  .controls input,
  .controls button {
    font-size: 16px;
    padding: 12px;
  }

  .task-text {
    font-size: 18px;
  }
}
/* Full-page Auth Styles */
#authSection {
  position: fixed;              /* cover the whole screen */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6200ea, #3700b3);
  color: white;
  font-family: "Arial", sans-serif;
  z-index: 1000; 
   padding-top: 8rem;
  /* keep it on top */
}

#authSection h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#authSection input {
  width: 260px;
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
}

#authSection button {
  width: 260px;
  padding: 12px;
  margin: 8px 0;
  background: white;
  color: #6200ea;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

#authSection button:hover {
  background: #bb86fc;
  color: white;
}

#authMessage {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: yellow;
}


.popup {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
}


