/* Keyframe animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px #0ff; }
  50% { box-shadow: 0 0 20px #0ff, 0 0 30px #0ff; }
  100% { box-shadow: 0 0 5px #0ff; }
}

body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.8), rgba(0, 0, 0, 0.6));
  color: #e0f7ff;
  overflow-y: scroll;
  animation: fadeIn 1s ease-out;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://www.transparenttextures.com/patterns/noise.png');
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') no-repeat center center;
  background-size: cover;
  filter: blur(10px) brightness(0.4);
  z-index: -1;
}

.command-bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
  z-index: 100;
  animation: slideIn 0.8s ease-out;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}



.filters button, #sort {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.5);
  color: #e0f7ff;
  margin: 0 8px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.4s ease;
  border-radius: 20px;
  font-size: 0.9em;
  animation: fadeIn 1.2s ease-out;
}

.filters button:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
  transform: translateY(-2px);
}

.filters button.active {
  background: #0ff;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

#clock {
  font-size: 1.3em;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  animation: glow 2s infinite;
}

.container {
  padding: 30px;
  display: grid;
  gap: 20px;
  animation: fadeIn 1.5s ease-out;
}

/* Improved spacing and alignment for Enter Task menu */
.task-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  animation: slideIn 1s ease-out;
}

#taskInput {
  width: 85%;
  padding: 15px;
  border: 2px solid rgba(0, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  color: #e0f7ff;
  text-align: center;
  outline: none;
  transition: all 0.4s ease;
  border-radius: 25px;
  font-size: 1em;
  animation: fadeIn 1.3s ease-out;
}

#taskInput:focus {
  border-color: #0ff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
}

#dueDate {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(0, 255, 255, 0.5);
  color: #e0f7ff;
  padding: 12px;
  border-radius: 20px;
  outline: none;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  font-family: 'Orbitron', sans-serif;
  transition: all 0.4s ease;
  font-weight: bold;
  animation: fadeIn 1.4s ease-out;
}

#dueDate:focus {
  border-color: #0ff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
}

#dueDate::-webkit-calendar-picker-indicator {
  filter: invert(100%);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(100%); /* Changes the calendar icon to light white */
}

#addTask {
  background: linear-gradient(45deg, #0ff, #00ffaa);
  color: #000;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.4s ease;
  border-radius: 25px;
  font-size: 1em;
  animation: pulse 2s infinite;
}

#addTask:hover {
  background: linear-gradient(45deg, #00ffaa, #0ff);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
  transform: scale(1.05);
}

.advanced {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 25px;
  align-items: center;
  animation: fadeIn 1.6s ease-out;
}

.priority-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.priority-group label {
  color: #e0f7ff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.priority-group label:hover {
  color: #0ff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  animation: fadeIn 1.8s ease-out;
}

.task {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.3);
  padding: 20px;
  border-radius: 15px;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  position: relative;
  font-family: Arial, sans-serif;
  animation: slideIn 0.6s ease-out;
}

.task:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
  border-color: rgba(0, 255, 255, 0.6);
}

.task.priority-high:hover {
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.6);
}

.task.priority-medium:hover {
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.6);
}

.task.priority-low:hover {
  box-shadow: 0 8px 25px rgba(255, 255, 0, 0.6);
}

.completed {
  opacity: 0.6;
  text-decoration: line-through;
  transition: all 0.5s ease;
  transform: scale(0.98);
}

.delete-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: linear-gradient(45deg, #ff4444, #ff6666);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.4s ease;
  font-size: 0.85em;
  opacity: 0.8;
}

.delete-btn:hover {
  background: linear-gradient(45deg, #ff0000, #ff4444);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
  transform: scale(1.1);
  opacity: 1;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.5);
  border-radius: 10px;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.8);
}

label[for="dueDate"] {
  font-weight: bold;
  color: #e0f7ff;
  transition: color 0.3s ease;
}

label[for="dueDate"]:hover {
  color: #0ff;
}
