* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f0f2f5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-layout {
  display: flex;
  width: 900px;
  height: 600px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: #2c3e50;
  padding: 30px 20px;
  color: white;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 40px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-btn {
  background: none;
  border: none;
  color: #bdc3c7;
  padding: 15px;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  font-size: 1rem;
  transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: #34495e;
  color: white;
}

.content {
  flex: 1;
  padding: 40px;
  background: #ffffff;
  overflow-y: auto;
}

header h1 {
  color: #2c3e50;
  margin-bottom: 5px;
}
header p {
  color: #7f8c8d;
  margin-bottom: 25px;
}

.input-section {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

#todo-input {
  flex: 1;
  padding: 12px;
  border: 2px solid #eee;
  border-radius: 8px;
  outline: none;
}

#add-btn {
  padding: 12px 25px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: #f8f9fa;
  margin-bottom: 10px;
  border-radius: 10px;
  position: relative;
}

.todo-item.completed span {
  text-decoration: line-through;
  color: #95a5a6;
}

.actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.actions i {
  cursor: pointer;
  font-size: 1.1rem;
}

.fa-circle-check {
  color: #2ecc71;
}
.fa-pen {
  color: #f1c40f;
}
.fa-trash {
  color: #e74c3c;
}

.action-popup {
  position: absolute;
  background: #333;
  color: white;
  padding: 10px;
  border-radius: 10px;
  bottom: 50px;
  right: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.action-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 15px;
  border: 6px solid transparent;
  border-top-color: #333;
}

.edit-input-field {
  background: #444;
  border: 1px solid #666;
  color: white;
  padding: 5px;
  border-radius: 4px;
  outline: none;
  font-size: 12px;
  width: 150px;
}

.action-popup button {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
}

.btn-confirm {
  background-color: #2ecc71;
  color: white;
}
.btn-cancel {
  background-color: #555;
  color: white;
}

/* Toast Notification */
.toast-hidden {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: white;
  padding: 10px 30px;
  border-radius: 0 0 10px 10px;
  transition: 0.5s;
  z-index: 2000;
}

.toast-show {
  top: 0px;
}
/* --- Mobile Responsiveness --- */

@media (max-width: 768px) {
  body {
    height: auto; /* Mobile par flex center ki wajah se content kat sakta hai */
    padding: 20px;
    align-items: flex-start;
  }

  .main-layout {
    flex-direction: column; /* Sidebar aur Content ko ek ke upar ek kar diya */
    width: 100%;
    height: auto;
    min-height: 500px;
  }

  .sidebar {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .logo {
    margin-bottom: 20px;
  }

  .menu {
    flex-direction: row; /* Mobile par buttons ko line mein kar diya */
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .content {
    padding: 20px;
  }

  .input-section {
    flex-direction: column; /* Input aur Button ko upar niche kar diya */
  }

  #add-btn {
    width: 100%;
  }

  .todo-item {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 10px;
  }

  /* Popup ko mobile par adjust kiya */
  .action-popup {
    right: 0;
    left: 0;
    bottom: 60px;
    justify-content: center;
  }

  .action-popup::after {
    right: 50%;
    transform: translateX(50%);
  }
}
