/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Light Theme (default) ===== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #c6cedd, #93f0f3);
  color: #1f2937;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 800px;
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.8s ease-in-out;
  transition: background 0.3s, color 0.3s;
}

/* ===== Header ===== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.app-header h1 {
  font-size: 1.8rem;
  color: #111827;
}

.header-actions button {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: 10px;
  color: #6b7280;
  transition: transform 0.3s, color 0.3s;
}

.header-actions button:hover {
  transform: scale(1.2);
  color: #3B82F6;
}

/* ===== Notification Bell Badge ===== */
#notifyBtn {
  position: relative;
}

#notifyBtn .bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53e3e;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  display: none;
}

/* ===== Bell Dropdown ===== */
.bell-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  width: 220px;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.bell-dropdown li {
  padding: 10px;
  border-bottom: 1px solid #f3f4f6;
  cursor: default;
}

.bell-dropdown li:last-child {
  border-bottom: none;
}

.bell-dropdown li.completed {
  text-decoration: line-through;
  color: #9ca3af;
}

/* ===== Add Task ===== */
.add-task-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.add-task-box input,
.add-task-box select,
.add-task-box button {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  transition: background 0.3s, color 0.3s, border 0.3s;
}

.add-task-box button {
  background: #3B82F6;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.add-task-box button:hover {
  background: #1D4ED8;
}

/* ===== Controls ===== */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.controls select,
.controls input {
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  flex: 1;
}

/* ===== Task List ===== */
.task-list-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: 15px;
  min-height: 150px;
  transition: background 0.3s, color 0.3s;
}

#taskList {
  list-style: none;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  animation: slideIn 0.4s ease;
  transition: background 0.3s, color 0.3s;
}

.task-item.done {
  text-decoration: line-through;
  background: #dcfce7;
  color: #166534;
  opacity: 0.95;
}

.task-item.overdue {
  background: #fee2e2;
  color: #991b1b;
}

/* ===== Footer ===== */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.app-footer button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  transition: opacity 0.3s;
}

.app-footer button:hover {
  opacity: 0.9;
}

/* ===== Dark Mode ===== */
body.dark-mode {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f3f4f6;
}

body.dark-mode .container {
  background: #1e293b;
  color: #f9fafb;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

body.dark-mode .app-header h1 {
  color: #f9fafb;
}

body.dark-mode .header-actions button {
  color: #d1d5db;
}

body.dark-mode .header-actions button:hover {
  color: #60a5fa;
}

body.dark-mode .add-task-box input,
body.dark-mode .add-task-box select,
body.dark-mode .controls input,
body.dark-mode .controls select {
  background: #334155;
  color: #f9fafb;
  border: 1px solid #475569;
}

body.dark-mode .task-list-box {
  background: #273244;
}

body.dark-mode .task-item {
  background: #2d3748;
  color: #e5e7eb;
}

body.dark-mode .task-item.done {
  background: #14532d;
  color: #a7f3d0;
}

body.dark-mode .task-item.overdue {
  background: #7f1d1d;
  color: #fecaca;
}

body.dark-mode .app-footer button {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(20px);}
  to {opacity: 1; transform: translateY(0);}
}

@keyframes slideIn {
  from {opacity: 0; transform: translateX(-20px);}
  to {opacity: 1; transform: translateX(0);}
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .add-task-box,
  .controls,
  .app-footer {
    flex-direction: column;
  }
}
