/* Project Viewer Styles - Enhanced with Tailwind CSS */

/* Project Card Animations */
.project-card-wrapper {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-wrapper:hover {
  transform: translateY(-8px) scale(1.02);
}

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

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

.animate-fadeOut {
  animation: fadeOut 0.2s ease-in;
}

.animate-scaleIn {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Modal Styles */
#project-modal {
  z-index: 9999;
}

#project-modal.fullscreen-mode .bg-gray-900 {
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

#project-modal iframe {
  background: white;
  border-radius: 12px;
}

/* Tooltip Styles */
.tooltip {
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

.tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
}

/* Loading Animation */
#loading {
  z-index: 1000;
}

/* Responsive Grid Enhancements */
#profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Stagger Animation Support */
.project-card-wrapper {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Button Hover Effects */
.project-card-wrapper button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-wrapper button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced Error Message */
.error-message {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 16px;
  padding: 3rem;
  margin: 2rem;
  color: white;
  text-align: center;
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.3);
}

/* Technology Tag Enhancements */
.tech-tag {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
  #project-modal .bg-gray-900 {
    background-color: #111827 !important;
    border-color: #374151;
  }
  
  #project-modal h3 {
    color: #f9fafb;
  }
  
  .tooltip:hover::after {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(8px);
  }
}

/* Enhanced responsiveness */
@media (max-width: 1024px) {
  #profile-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  #profile-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  #project-modal .bg-gray-900 {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }
  
  .project-card-wrapper .flex-col {
    gap: 0.75rem;
  }
  
  .project-card-wrapper button {
    width: 100%;
    justify-content: center;
  }
  
  /* Stack modal header buttons on mobile */
  #project-modal .flex.items-center.space-x-3 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  #project-modal .flex.space-x-3 {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .project-card-wrapper {
    margin: 0;
  }
  
  #project-modal .p-6 {
    padding: 1rem;
  }
  
  #project-modal .p-4 {
    padding: 0.75rem;
  }
}

/* Custom scrollbar for modal */
#project-modal iframe {
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

#project-modal iframe::-webkit-scrollbar {
  width: 6px;
}

#project-modal iframe::-webkit-scrollbar-track {
  background: transparent;
}

#project-modal iframe::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

#project-modal iframe::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Filter button active state */
.filter-btn.active {
  background: linear-gradient(to right, #3b82f6, #1d4ed8) !important;
  transform: scale(1.05);
}

/* Coffee Modal Styles */
#coffeeModal {
  backdrop-filter: blur(8px);
  z-index: 9999;
}

#coffeeModal .transform {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#coffeeModal.animate-fadeOut .transform {
  animation: fadeOut 0.2s ease-in;
}

/* Coffee Modal Button Hover Effects */
#coffeeModal a:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Coffee icon animation */
#coffeeModal .fa-coffee {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}
