/* Bookmark Manager Styles */
.bookmark-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* Bookmark section styles for navigation */
.bookmark-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.bookmark-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bookmark-section h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
}

.bookmark-section .section-actions {
  display: flex;
  gap: 0.5rem;
}

/* Remove duplicate styles - already defined above */

.bookmarks-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bookmark-category {
  margin-bottom: 1.5rem;
}

.category-title {
  color: #e5e7eb;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Category titles */
.category-title {
  color: #e5e7eb;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bookmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.bookmark-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.bookmark-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bookmark-item:hover::after {
  content: "Click to open";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
}

.bookmark-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  color: white;
  font-weight: bold;
}

.bookmark-content {
  flex: 1;
  min-width: 0;
}

.bookmark-title {
  margin: 0 0 0.25rem 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-url {
  margin: 0;
  color: #9ca3af;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bookmark-item:hover .bookmark-actions {
  opacity: 1;
}

.btn-bookmark-open,
.btn-bookmark-edit,
.btn-bookmark-delete {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.btn-bookmark-open {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.btn-bookmark-open:hover {
  background: rgba(34, 197, 94, 0.3);
  transform: scale(1.1);
}

.btn-bookmark-edit {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.btn-bookmark-edit:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: scale(1.1);
}

.btn-bookmark-delete {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.btn-bookmark-delete:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #9ca3af;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h4 {
  color: #e5e7eb;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Bookmark Modal */
.bookmark-modal {
  max-width: 500px;
  width: 90%;
}

.bookmark-modal .form-group {
  margin-bottom: 1.5rem;
}

.bookmark-modal label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
  font-weight: 500;
  font-size: 0.9rem;
}

.bookmark-modal input,
.bookmark-modal select,
.bookmark-modal textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.bookmark-modal input:focus,
.bookmark-modal select:focus,
.bookmark-modal textarea:focus {
  outline: none;
  border-color: #06b6d4;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.bookmark-modal input::placeholder,
.bookmark-modal textarea::placeholder {
  color: #9ca3af;
}

.bookmark-modal small {
  display: block;
  margin-top: 0.25rem;
  color: #9ca3af;
  font-size: 0.8rem;
}

.bookmark-modal textarea {
  resize: vertical;
  min-height: 80px;
}

/* Input with button layout */
.input-with-button {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.input-with-button input {
  flex: 1;
  margin-bottom: 0;
}

.input-with-button button {
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.input-with-button button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #06b6d4;
}

/* Platform-specific colors */
.bookmark-item[data-platform="leetcode"] .bookmark-icon {
  background: linear-gradient(135deg, #FFA116, #FF8C00);
}

.bookmark-item[data-platform="udemy"] .bookmark-icon {
  background: linear-gradient(135deg, #A435F0, #8B5CF6);
}

.bookmark-item[data-platform="github"] .bookmark-icon {
  background: linear-gradient(135deg, #24292e, #1a1a1a);
}

.bookmark-item[data-platform="coursera"] .bookmark-icon {
  background: linear-gradient(135deg, #0056D3, #1e40af);
}

.bookmark-item[data-platform="google-classroom"] .bookmark-icon {
  background: linear-gradient(135deg, #4285F4, #3b82f6);
}

.bookmark-item[data-platform="youtube"] .bookmark-icon {
  background: linear-gradient(135deg, #FF0000, #dc2626);
}

.bookmark-item[data-platform="stackoverflow"] .bookmark-icon {
  background: linear-gradient(135deg, #F48024, #ea580c);
}

.bookmark-item[data-platform="medium"] .bookmark-icon {
  background: linear-gradient(135deg, #00AB6C, #059669);
}

.bookmark-item[data-platform="custom"] .bookmark-icon {
  background: linear-gradient(135deg, #6B7280, #4b5563);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .bookmark-section {
    margin: 1rem 0;
    padding: 1rem;
  }
  
  .bookmark-section .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .bookmark-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .bookmark-item {
    padding: 0.75rem;
  }
  
  .bookmark-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin-right: 0.75rem;
  }
  
  .bookmark-title {
    font-size: 0.9rem;
  }
  
  .bookmark-url {
    font-size: 0.75rem;
  }
  
  .bookmark-actions {
    opacity: 1; /* Always show on mobile */
  }
  
  .btn-bookmark-open,
  .btn-bookmark-edit,
  .btn-bookmark-delete {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
  
  .bookmark-modal {
    width: 95%;
    margin: 1rem;
  }
  
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .bookmark-section {
    padding: 0.75rem;
  }
  
  .bookmark-item {
    padding: 0.5rem;
  }
  
  .bookmark-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    margin-right: 0.5rem;
  }
  
  .bookmark-title {
    font-size: 0.85rem;
  }
  
  .bookmark-url {
    font-size: 0.7rem;
  }
}

/* Animation for new bookmarks */
@keyframes bookmarkSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bookmark-item {
  animation: bookmarkSlideIn 0.3s ease-out;
}

/* Loading state */
.bookmark-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #9ca3af;
}

.bookmark-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid #06b6d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
