/* Additional showcase styles */

/* Smooth animations */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
  background: #1f2937;
}

/* Code block enhancements */
.ProseMirror pre {
  position: relative;
  overflow-x: auto;
}

.ProseMirror pre::before {
  content: 'Code';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Table enhancements */
.ProseMirror table {
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Link hover effects */
.ProseMirror a {
  position: relative;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.ProseMirror a:hover {
  border-bottom-color: currentColor;
}

/* Task list styling */
.ProseMirror ul[data-type="taskList"] {
  padding-left: 0;
}

.ProseMirror li[data-type="taskItem"] {
  display: flex;
  align-items: flex-start;
  margin: 0.5rem 0;
}

.ProseMirror li[data-type="taskItem"] > label {
  margin-right: 0.5rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

.ProseMirror li[data-type="taskItem"] > label > input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-radius: 3px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.ProseMirror li[data-type="taskItem"] > label > input:checked {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #667eea;
}

.ProseMirror li[data-type="taskItem"] > label > input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Dark mode task list */
.dark .ProseMirror li[data-type="taskItem"] > label > input {
  border-color: #4b5563;
  background: #374151;
}

/* Blockquote enhancements */
.ProseMirror blockquote {
  position: relative;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.dark .ProseMirror blockquote {
  background: rgba(102, 126, 234, 0.1);
}

/* Heading enhancements */
.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3 {
  position: relative;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.ProseMirror h1 {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
  font-weight: 700;
}

/* Editor focus enhancement */
.ProseMirror:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
  border-radius: 8px;
}

/* Toolbar enhancements */
.toolbar-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(209, 213, 219, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dark .toolbar-container {
  background: rgba(17, 24, 39, 0.95);
  border-color: rgba(75, 85, 99, 0.3);
}

/* Image enhancements */
.ProseMirror img {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ProseMirror img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Selection styling */
.ProseMirror ::selection {
  background: rgba(102, 126, 234, 0.2);
}

.ProseMirror ::-moz-selection {
  background: rgba(102, 126, 234, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .ProseMirror {
    padding: 1rem;
  }
  
  .ProseMirror h1 {
    font-size: 1.5rem;
  }
  
  .ProseMirror table {
    font-size: 0.875rem;
  }
  
  .toolbar-container {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Success animation */
@keyframes checkmark {
  0% {
    transform: scale(0) rotate(45deg);
  }
  100% {
    transform: scale(1) rotate(45deg);
  }
}

.success-checkmark {
  animation: checkmark 0.3s ease-in-out;
}

/* Error animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.error-shake {
  animation: shake 0.5s ease-in-out;
}

/* Gradient text utilities */
.gradient-text-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-purple {
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-green {
  background: linear-gradient(135deg, #10b981, #047857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
