/* General Body Styling */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #dbe6f6, #c5796d);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: 0.3s ease;
  overflow: hidden;
}

body.dark {
  background: #1e1e2f;
  color: #eee;
}

/* Main Container */
.container {
  background: rgba(255, 255, 255, 0.95);
  width: 95%;
  max-width: 480px;
  height: 90vh;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dark .container {
  background: rgba(40, 40, 60, 0.95);
}

/* Heading */
h1 {
  text-align: center;
  color: #2f3542;
  margin-bottom: 20px;
}

body.dark h1 {
  color: #eee;
}

/* Theme Toggle Button */
.theme-toggle {
  text-align: right;
  margin-bottom: 10px;
}

/* Input Group */
.input-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.input-group input[type="text"],
.input-group input[type="date"],
.input-group select {
  padding: 10px;
  font-size: 15px;
  border: 2px solid #ccc;
  border-radius: 8px;
  flex: 1;
}

.input-group button {
  padding: 10px 18px;
  background: #30c653;
  color: white;
  border: none;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
}

.input-group button:hover {
  background: #19692b;
}

/* Search Box */
#searchBox {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 15px;
  border: 2px solid #ccc;
  border-radius: 8px;
}

/* Task Counter */
#taskCounter {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

/* Task List */
#taskList {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 10px;
}

#taskList::-webkit-scrollbar {
  width: 6px;
}

#taskList::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

/* List Items */
ul {
  list-style: none;
  padding: 0;
}

li {
  background: #f0f4f8;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}

body.dark li {
  background: #2d2d3a;
  color: #fff;
  border: 1px solid #444;
}

li.completed .task-text {
  text-decoration: line-through;
  color: #888;
}

/* Top Row Inside List Item */
.task-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Task Text */
.task-text {
  flex: 1;
  cursor: pointer;
}

/* Action Buttons */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.actions button {
  background: #e74c3c;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.actions .edit-btn {
  background-color: #3498db;
}

.actions .edit-btn:hover {
  background-color: #217dbb;
}

.actions button:hover {
  background: #c0392b;
}

/* Editing Input */
.editing {
  padding: 8px;
  font-size: 15px;
  border: 2px solid #3498db;
  border-radius: 6px;
  outline: none;
  flex: 1;
}

/* Priority Labels */
.priority-label {
  font-size: 13px;
  margin-top: 4px;
  color: #555;
}

/* Priority Colors */
.high {
  border-left: 5px solid red;
}

.medium {
  border-left: 5px solid orange;
}

.low {
  border-left: 5px solid green;
}
