@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  background: #050714;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  overflow-x: hidden;
}

canvas#galaxy {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 650px;
}

h1 {
  text-align: center;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.subtitle {
  text-align: center;
  color: #a0aec0;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.card {
  background: rgba(103, 126, 234, 0.15);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(103, 126, 234, 0.35);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 0 30px rgba(103, 126, 234, 0.15);
}

input, textarea {
  width: 100%;
  padding: 12px 16px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.3s;
}

input::placeholder, textarea::placeholder {
  color: #718096;
}

input:focus, textarea:focus {
  border: 1px solid #667eea;
}

textarea {
  resize: none;
  height: 120px;
}

button {
  width: 100%;
  padding: 13px;
  margin-top: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: opacity 0.3s, transform 0.2s;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

h2 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 15px;
}

.note-card {
  background: rgba(0, 180, 255, 0.08);
  border: 1px solid rgba(0, 180, 255, 0.25);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid #00b4ff;
  transition: transform 0.2s;
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.08);
}
.note-card:hover {
  transform: translateX(5px);
}

.note-card h3 {
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.note-card p {
  color: #a0aec0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.note-card .date {
  color: #4a5568;
  font-size: 0.75rem;
  margin-top: 10px;
}

.empty {
  text-align: center;
  color: #4a5568;
  font-size: 0.9rem;
  padding: 20px;
}

.search-wrapper {
  margin-bottom: 20px;
}

.search-wrapper input {
  background: rgba(0, 180, 255, 0.08);
  border: 1px solid rgba(0, 180, 255, 0.25);
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.08);
}

.search-wrapper input:focus {
  border: 1px solid #00b4ff;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.delete-btn {
  width: auto;
  padding: 6px 14px;
  font-size: 0.8rem;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  border-radius: 8px;
  margin-top: 0;
}

.delete-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #0d1b3e;
  border: 1px solid rgba(103, 126, 234, 0.4);
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 0 40px rgba(103, 126, 234, 0.2);
}

.modal-box h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.save-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.save-btn:hover {
  opacity: 0.9;
}

/* Edit and Delete buttons side by side */
.action-buttons {
  display: flex;
  gap: 8px;
}

.edit-btn {
  width: auto;
  padding: 6px 14px;
  font-size: 0.8rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 8px;
  margin-top: 0;
}

.edit-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
/* Responsive */

@media (max-width: 600px) {
  body {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .card {
    padding: 20px 15px;
    margin-bottom: 30px;
  }

  input, textarea {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  button {
    font-size: 0.9rem;
    padding: 11px;
  }

  h2 {
    font-size: 1.1rem;
  }

  .note-card {
    padding: 15px;
  }

  .note-card h3 {
    font-size: 0.95rem;
  }

  .note-card p {
    font-size: 0.85rem;
  }

  .note-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .delete-btn {
    width: 100%;
    text-align: center;
  }
}
