#popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(109, 66, 193, 0.85), rgba(173, 143, 222, 0.85));
  backdrop-filter: blur(10px);
  justify-content: center; align-items: center;
  z-index: 1000;
  animation: fadeIn 0.4s ease;
}

#popupContent {
  background: linear-gradient(145deg, #ffffff, #f8f9ff);
  padding: 32px;
  border-radius: 20px;
  width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 
    0 20px 60px rgba(109, 66, 193, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: slideInUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#popupContent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6f42c1, #AD8FDE, #ff6b6b, #4ecdc4);
  border-radius: 20px 20px 0 0;
}

#popupContent h3 {
  margin-top: 8px;
  margin-bottom: 24px;
  color: #2c3e50;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  position: relative;
  padding-bottom: 16px;
}

#popupContent h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #6f42c1, #AD8FDE);
  border-radius: 2px;
}

.popup-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  z-index: 1001;
}

.popup-close-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
  background: linear-gradient(135deg, #ff5252, #f44336);
}

.popup-close-btn:active {
  transform: scale(0.95);
}

.projectItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin: 12px 0;
  background: linear-gradient(135deg, #ffffff, #f8f9ff);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(109, 66, 193, 0.1);
  position: relative;
  overflow: hidden;
}

.projectItem::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, #6f42c1, #AD8FDE);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.projectItem:hover {
  background: linear-gradient(135deg, #f0f4ff, #e8f2ff);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(109, 66, 193, 0.15);
  border-color: rgba(109, 66, 193, 0.3);
}

.projectItem:hover::before {
  transform: scaleY(1);
}

/* Updated project name styling */
.projectItem span {
  flex: 1;
  cursor: pointer;
  color: #6f42c1;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.projectItem span::before {
  content: '📁';
  font-size: 18px;
  transition: transform 0.3s ease;
}

.projectItem span:hover {
  color: #5a32a3;
  transform: translateX(4px);
}

.projectItem span:hover::before {
  transform: scale(1.2) rotate(5deg);
}

.closeBtn {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.closeBtn:hover {
  background: linear-gradient(135deg, #ff5252, #f44336);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.closeBtn:active {
  transform: translateY(0);
}

/* Custom scrollbar for popup content */
#popupContent::-webkit-scrollbar {
  width: 8px;
}

#popupContent::-webkit-scrollbar-track {
  background: rgba(109, 66, 193, 0.1);
  border-radius: 4px;
}

#popupContent::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6f42c1, #AD8FDE);
  border-radius: 4px;
}

#popupContent::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a32a3, #9c7bc7);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  } 
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  } 
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loading and empty states */
.popup-loading {
  text-align: center;
  padding: 40px 20px;
  color: #6f42c1;
  font-size: 16px;
  font-weight: 500;
}

.popup-loading::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(111, 66, 193, 0.3);
  border-radius: 50%;
  border-top-color: #6f42c1;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

.popup-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-style: italic;
}

.popup-empty::before {
  content: '📂';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Enhanced project actions */
.project-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-name {
  flex: 1;
  cursor: pointer;
  color: #6f42c1;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.project-name::before {
  content: '📁';
  font-size: 18px;
  transition: transform 0.3s ease;
}

.project-name:hover {
  color: #5a32a3;
  transform: translateX(4px);
}

.project-name:hover::before {
  transform: scale(1.2) rotate(5deg);
}

/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Enhanced delete button */
.deleteBtn {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  border: none;
  cursor: pointer;
  font-size: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  position: relative;
  overflow: hidden;
}

.deleteBtn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.deleteBtn:hover {
  background: linear-gradient(135deg, #ff5252, #f44336);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
}

.deleteBtn:hover::before {
  width: 100%;
  height: 100%;
}

.deleteBtn:active {
  transform: scale(0.95);
}

/* Add new project button styles */
.add-project-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
  justify-content: center;
}

.add-project-btn:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.add-project-btn:active {
  transform: translateY(0);
}

/* Spin animation for loading */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modern Notification System */
#notificationContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.notification {
  min-width: 320px;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: 12px;
  color: white;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0.6), rgba(255,255,255,0.3));
}

.notification.success {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.notification.error {
  background: linear-gradient(135deg, #dc3545, #ff6b6b);
}

.notification.warning {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.notification.info {
  background: linear-gradient(135deg, #17a2b8, #6610f2);
}

.notification-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.notification-message {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.notification.removing {
  animation: slideOutRight 0.3s ease forwards;
}

/* Progress bar for auto-dismiss */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 12px 12px;
  animation: progressBar 4s linear forwards;
}

/* Confirmation Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(109, 66, 193, 0.85), rgba(173, 143, 222, 0.85));
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(145deg, #ffffff, #f8f9ff);
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  box-shadow: 
    0 20px 60px rgba(109, 66, 193, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.15);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(109, 66, 193, 0.1);
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

.modal-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  margin: 0;
  color: #5a6c7d;
  font-size: 15px;
  line-height: 1.5;
}

.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  justify-content: center;
}

.btn-cancel {
  background: linear-gradient(135deg, #6c757d, #8b9da9);
  color: white;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-cancel:hover {
  background: linear-gradient(135deg, #5a6268, #798690);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-confirm {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-confirm:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-confirm.danger {
  background: linear-gradient(135deg, #dc3545, #ff6b6b);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-confirm.danger:hover {
  background: linear-gradient(135deg, #c82333, #e55a5a);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile responsiveness */
@media (max-width: 576px) {
  #popupContent {
    width: 90%;
    margin: 0 5%;
    padding: 24px;
  }
  
  .projectItem {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .project-actions {
    justify-content: space-between;
    width: 100%;
  }
  
  .project-name {
    font-size: 14px;
  }
  
  .deleteBtn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  #notificationContainer {
    right: 10px;
    left: 10px;
    top: 10px;
  }
  
  .notification {
    min-width: unset;
    width: 100%;
  }
  
  .modal-content {
    margin: 20px;
    width: calc(100% - 40px);
  }
}