@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2, #6dd5ed);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  transition: background 0.5s ease, color 0.5s ease;
}

/* Gradient animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Dark mode */
body.dark-mode {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #ddd;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 700px;
  text-align: center;
}

.app-title {
  font-weight: 700;
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Input Area */
.note-input {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: background 0.4s ease;
}

body.dark-mode .note-input {
  background: rgba(255, 255, 255, 0.05);
}

/* Textarea */
textarea {
  border: none;
  border-radius: 12px;
  padding: 1rem;
  resize: none;
  font-size: 1rem;
  height: 120px;
  outline: none;
  color: #333;
  transition: 0.4s ease;
}

body.dark-mode textarea {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Buttons */
.modern-btn {
  border: none;
  border-radius: 50px;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background-size: 200% auto;
  transition: 0.4s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-add {
  background-image: linear-gradient(to right, #00c6ff, #0072ff);
}

.btn-clear {
  background-image: linear-gradient(to right, #ff416c, #ff4b2b);
}

.modern-btn:hover {
  background-position: right center;
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* Notes List */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.note-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.note-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .note-card {
  background: rgba(255, 255, 255, 0.08);
}

.note-text {
  flex: 1;
  text-align: left;
  word-wrap: break-word;
  color: #fff;
}

.note-actions i {
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 12px;
  transition: 0.2s ease;
}

.note-actions i:hover {
  transform: scale(1.25);
}

.fa-pen-to-square {
  color: #00e5ff;
}

.fa-trash {
  color: #ff6b6b;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 25px;
  font-size: 1.6rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  gap: 10px;
}

#darkIcon { display: none; }

body.dark-mode #lightIcon { display: none; }
body.dark-mode #darkIcon { display: inline; }

/* Responsive */
@media (max-width: 768px) {
  .app-title {
    font-size: 2.2rem;
  }

  .note-input {
    padding: 1.5rem;
  }

  textarea {
    height: 100px;
    font-size: 0.95rem;
  }

  .modern-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .app-title {
    font-size: 1.8rem;
  }

  .theme-toggle {
    font-size: 1.4rem;
    right: 15px;
  }

  .note-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .note-actions {
    margin-top: 10px;
    align-self: flex-end;
  }
}
