/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Neon Color Palette */
  --neon-cyan: #0ff0fc;
  --neon-purple: #bf00ff;
  --neon-blue: #0066ff;
  --neon-pink: #ff00ff;
  --neon-green: #00ff9d;

  /* Dark Background Colors */
  --bg-dark: #0a0a1a;
  --bg-card: #12122e;
  --bg-darker: #050510;

  /* Text Colors */
  --text-light: #ffffff;
  --text-muted: #a0a0d0;

  /* Shadows and Glows */
  --shadow-neon-cyan: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 30px var(--neon-cyan);
  --shadow-neon-purple: 0 0 10px var(--neon-purple), 0 0 20px var(--neon-purple), 0 0 30px var(--neon-purple);
  --shadow-neon-blue: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue);
  --shadow-neon-pink: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink), 0 0 30px var(--neon-pink);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Neon Background Elements */
.neon-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.neon-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.circle-1 {
  width: 500px;
  height: 500px;
  background: var(--neon-cyan);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.circle-2 {
  width: 400px;
  height: 400px;
  background: var(--neon-purple);
  top: 50%;
  right: -150px;
  animation-delay: 5s;
}

.circle-3 {
  width: 300px;
  height: 300px;
  background: var(--neon-blue);
  bottom: -100px;
  left: 30%;
  animation-delay: 10s;
}

.circle-4 {
  width: 350px;
  height: 350px;
  background: var(--neon-pink);
  top: 20%;
  left: 60%;
  animation-delay: 15s;
}

/* Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: var(--shadow-neon-blue);
  }

  50% {
    box-shadow: 0 0 20px var(--neon-blue), 0 0 40px var(--neon-blue), 0 0 60px var(--neon-blue);
  }

  100% {
    box-shadow: var(--shadow-neon-blue);
  }
}

@keyframes glow {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
  animation: fadeIn 1s ease-out;
}

.neon-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.neon-text {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation: glow 2s infinite;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Cards */
.neon-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition-medium);
}

.neon-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-5px);
}

/* Input Card */
.input-card {
  margin-bottom: 30px;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.input-card h2 {
  margin-bottom: 20px;
  color: var(--neon-cyan);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-field label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-field input {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition-fast);
}

.input-field input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.datetime-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Buttons */
.neon-btn {
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.neon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: -1;
}

.neon-btn:hover::before {
  transform: translateX(100%);
}

.neon-btn:active {
  transform: scale(0.98);
}

.add-btn {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: white;
  align-self: flex-end;
  max-width: 200px;
}

.add-btn:hover {
  transform: translateY(-3px);
}

.save-btn {
  background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
  color: white;
}

.save-btn:hover {
  transform: translateY(-3px);
}

.cancel-btn {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.cancel-btn:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

/* Controls */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px 0;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.control-label {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.sort-btn.active {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: white;
  border-color: transparent;
  box-shadow: 0 0 10px rgba(191, 0, 255, 0.5);
}

.stats {
  display: flex;
  gap: 20px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
}

.stat.pending {
  background: rgba(255, 200, 0, 0.1);
  color: #ffcc00;
}

.stat.completed {
  background: rgba(0, 255, 157, 0.1);
  color: var(--neon-green);
}

/* Tasks Container */
.tasks-container {
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.tasks-container h2 {
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 200px;
}

/* Task Item */
.task-item {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-left: 4px solid var(--neon-blue);
  transition: var(--transition-medium);
  animation: fadeIn 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.task-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--neon-cyan), var(--neon-purple));
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.task-item:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.task-item:hover::before {
  opacity: 1;
}

.task-item.completed {
  border-left-color: var(--neon-green);
  opacity: 0.8;
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.5;
}

.task-meta {
  display: flex;
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.task-date,
.task-time {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.task-status.pending {
  background: rgba(255, 200, 0, 0.15);
  color: #ffcc00;
}

.task-status.completed {
  background: rgba(0, 255, 157, 0.15);
  color: var(--neon-green);
}

.task-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.action-btn.complete:hover {
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.action-btn.edit:hover {
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.action-btn.delete:hover {
  color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: none;
}

.empty-state i {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.1);
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-light);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.neon-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  animation: fadeIn 0.5s ease-out 0.1s both;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  color: var(--neon-cyan);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.close-modal:hover {
  color: var(--neon-pink);
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 50px;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.neon-heart {
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
  animation: glow 1.5s infinite;
  outline: none;
}

.tech-stack {
  margin-top: 10px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .neon-title {
    font-size: 2.5rem;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .datetime-inputs {
    grid-template-columns: 1fr;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .task-actions {
    align-self: flex-end;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .neon-title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .sort-options {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .modal-actions {
    flex-direction: column;
  }

  .neon-btn {
    width: 100%;
  }
}