/* Modal Styles */

/* Modal Base */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

/* Dark theme modal overlay */
body.dark-mode .modal {
  background: rgba(0, 0, 0, 0.85);
}

.modal-content {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.95));
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: slideInUp 0.4s ease-out;
  color: var(--text-primary);
}

/* Dark mode for modal content */
body.dark-mode .modal-content {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: white;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  z-index: 10;
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover {
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
}

/* Dark theme close button */
body.dark-mode .close {
  color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.modal-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 15px;
  flex-shrink: 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  background: white;
  padding: 4px;
}

/* Dark theme modal image */
body.dark-mode .modal-image {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.5);
}

.modal-info {
  flex: 1;
}

.modal-info h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.modal-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
}

/* Dark mode for modal text */
body.dark-mode .modal-info h2 {
  color: white;
}

body.dark-mode .modal-info p {
  color: rgba(255, 255, 255, 0.8);
}

.modal-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
  width: 100%;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* Dark mode for modal links section */
body.dark-mode .modal-links {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-links .btn {
  min-width: 180px;
  text-align: center;
  justify-content: center;
  margin: 0.25rem;
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

/* Fix for modal button styles to ensure they are visible */
.modal-links .btn-secondary {
  background: rgba(102, 126, 234, 0.2);
  color: white;
  border: 2px solid var(--primary-color);
}

.modal-links .btn-secondary:hover {
  background: rgba(102, 126, 234, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-disabled {
  background: var(--border-color) !important;
  color: var(--text-secondary) !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.btn-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Modal Tech Stack */
.modal-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Dark theme tech tags */
body.dark-mode .tech-tag {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Contact Success Notification */
.contact-success-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  cursor: pointer;
  animation: slideIn 0.3s ease-out;
}

.contact-success-notification .success-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-success-notification .success-content i {
  font-size: 1.5rem;
}

.contact-success-notification .success-content h3 {
  margin: 0;
  font-size: 1.1rem;
}

.contact-success-notification .success-content p {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Demo and Share Notifications */
.demo-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
}

.demo-notification.info {
  background: linear-gradient(135deg, #2196F3, #1976D2);
}

.demo-notification.warning {
  background: linear-gradient(135deg, #FF9800, #F57C00);
}

.demo-notification.error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.demo-notification .notification-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.demo-notification .notification-content i {
  font-size: 1.5rem;
  margin-top: 0.2rem;
  color: #ffd700;
}

.demo-notification .notification-text h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.demo-notification .notification-text p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.demo-notification .notification-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.demo-notification .notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.demo-notification .notification-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.demo-notification .notification-actions small {
  font-size: 0.8rem;
  opacity: 0.8;
  word-break: break-all;
  flex: 1;
}

.copy-url-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.copy-url-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.copy-url-btn i {
  font-size: 0.7rem;
}

.share-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  animation: slideInUp 0.3s ease-out;
}

.share-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Notification Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.demo-notification.fade-out,
.share-notification.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Enhanced Modal Buttons */
.modal-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-links .btn {
  flex: 1;
  min-width: 150px;
  text-align: center;
  justify-content: center;
}

/* Project Modal Buttons - Light Theme (Default) */
.modal .btn-primary,
.modal .btn-secondary,
.modal .btn-outline {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  min-width: 160px;
  text-align: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem;
}

.modal .btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white !important;
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal .btn-secondary {
  background: #2563eb !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
}

.modal .btn-outline {
  background: transparent;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color);
}

.modal .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a72e0, #6a41a0);
}

.modal .btn-secondary:hover {
  background: #1d4ed8 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4) !important;
}

.modal .btn-outline:hover {
  background: var(--primary-color);
  color: white !important;
  transform: translateY(-3px);
}

/* Dark Theme Modal Buttons */
body.dark-mode .modal .btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7e22ce);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

body.dark-mode .modal .btn-secondary {
  background: #3b82f6 !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

body.dark-mode .modal .btn-outline {
  color: #a5b4fc !important;
  border: 2px solid #a5b4fc;
}

body.dark-mode .modal .btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #7e22ce);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

body.dark-mode .modal .btn-outline:hover {
  background: #a5b4fc;
  color: #1e1b4b !important;
}

.modal .btn-outline:hover {
  background: var(--primary-color);
  color: white !important;
}

/* Special styling for project details modal - Light Theme */
.project-details-modal .modal-content {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.95));
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05), 0 0 20px rgba(102, 126, 234, 0.1);
}

.project-details-modal .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  min-width: 170px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.project-details-modal .modal-links {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Special styling for project details modal - Dark Theme */
body.dark-mode .project-details-modal .modal-content {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(102, 126, 234, 0.2);
}

body.dark-mode .project-details-modal .modal-links {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Share Project button styling to match the screenshot */
.modal a.btn-primary,
.modal a.btn-secondary,
.modal button.btn-outline {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02rem !important;
  min-width: 160px !important;
  min-height: 45px !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

/* Ensure the SHARE PROJECT button matches the style in the screenshot */
.modal a.btn-secondary,
body.dark-mode .modal a.btn-secondary {
  background: #3b82f6 !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .modal-header {
    flex-direction: column;
    text-align: center;
  }
  
  .modal-image {
    width: 100px;
    height: 100px;
    margin: 0 auto;
  }
  
  .modal-links {
    justify-content: center;
  }
  
  .demo-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 1rem;
  }
  
  .share-notification {
    bottom: 10px;
    right: 10px;
    left: 10px;
    text-align: center;
  }
  
  .modal-links {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-links .btn {
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .modal-links a.btn-primary,
  .modal-links a.btn-secondary,
  .modal-links button.btn-outline {
    min-height: 50px;
    font-size: 1rem !important;
  }
}

/* Loading States for URL Check */
.project-card.checking-demo {
  opacity: 0.7;
  position: relative;
}

.project-card.checking-demo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

/* Demo Status Info - Light Theme */
.demo-status-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.demo-status-info i.fa-check-circle {
  color: #10b981;
}

.demo-status-info i.fa-exclamation-triangle {
  color: #f59e0b;
}

/* Demo Status Info - Dark Theme */
body.dark-mode .demo-status-info {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .demo-status-info i.fa-check-circle {
  color: #34d399;
}

body.dark-mode .demo-status-info i.fa-exclamation-triangle {
  color: #fbbf24;
}
