/* PromptForge Custom Styles */

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}

/* Selection */
::selection {
  background: rgba(92, 124, 250, 0.3);
  color: #fff;
}

/* Smooth transitions */
* {
  scroll-behavior: smooth;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Textarea resize handle */
textarea {
  min-height: 80px;
}

/* Pre tag styling in result */
#result-prompt {
  tab-size: 2;
  word-break: break-word;
}

/* Focus ring for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(92, 124, 250, 0.5);
  outline-offset: 2px;
}

/* Pulse animation for generate button */
@keyframes subtle-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(92, 124, 250, 0.2); }
  50% { box-shadow: 0 4px 30px rgba(92, 124, 250, 0.4); }
}
#generate-btn:not(:disabled) {
  animation: subtle-pulse 3s ease-in-out infinite;
}
#generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation: none;
}

/* Modal backdrop */
#guide-modal > div:first-child,
#history-modal > div:first-child {
  animation: fadeIn 0.2s ease-out;
}
#guide-modal > div:last-child,
#history-modal > div:last-child {
  animation: slideUp 0.25s ease-out;
}

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

/* Card hover lift */
.purpose-card:hover,
.technique-card:hover {
  transform: translateY(-1px);
}

/* Grade badge animation */
#quality-grade {
  animation: gradeReveal 0.5s ease-out;
}
@keyframes gradeReveal {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
