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

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

body {
  font-family: "Montserrat", sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 10px;
}

.header p {
  font-size: 1.1rem;
  color: #666;
}

.controls {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 30px;
}

.controls-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media (min-width: 768px) {
  .controls-container {
    flex-direction: row;
  }
}

.search-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.add-btn {
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}

.add-btn:hover {
  background-color: #4338ca;
}

.notes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .notes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.note-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.note-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.note-content {
  padding: 20px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}
.note-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}
.note-actions {
  display: flex;
  gap: 10px;
}

.delete-btn {
  color: #999;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.3s;
}

.delete-btn:hover {
  color: #ef4444;
}

.note-text {
  color: #666;
  margin-bottom: 40px;
  white-space: pre-line;
}

.note-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  position: absolute;
  bottom: 10px;
}

.note-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  gap: 8px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.tag-work {
  background-color: #e0e7ff;
  color: #4338ca;
}

.tag-personal {
  background-color: #ede9fe;
  color: #7c3aed;
}

.tag-ideas {
  background-color: #ecfdf5;
  color: #047857;
}

.tag-reminders {
  background-color: #fef3c7;
  color: #b45309;
}

.note-date {
  font-size: 0.75rem;
  color: #999;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.6;
  display: none;
}

.empty-state i {
  font-size: 4rem;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 10px;
}

.empty-state p {
  color: #999;
  margin-bottom: 20px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  margin: 20px;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}
.modal-close:hover {
  color: #666;
}
.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.filter-group {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.filter-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag-option {
  position: relative;
}

.tag-radio {
  position: absolute;
  opacity: 0;
}

.tag-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.tag-radio:checked + .tag-label {
  color: white;
}

.tag-radio:checked + .tag-work {
  background-color: #4f46e5;
}

.tag-radio:checked + .tag-personal {
  background-color: #7c3aed;
}

.tag-radio:checked + .tag-ideas {
  background-color: #10b981;
}

.tag-radio:checked + .tag-reminders {
  background-color: #f59e0b;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-btn:hover {
  background-color: #4338ca;
}

.confirmation-modal .modal-body {
  text-align: center;
}

.confirmation-text {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.confirmation-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirmation-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.confirm-btn {
  background-color: #ef4444;
  color: white;
  border: none;
}

.confirm-btn:hover {
  background-color: #dc2626;
}

.cancel-btn {
  background-color: #e5e7eb;
  color: #333;
  border: none;
}

.cancel-btn:hover {
  background-color: #d1d5db;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding: 12px 40px 12px 15px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.filter-select:hover {
  border-color: #4f46e5;
}

.filter-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

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

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

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
