header {
  /* text-align: center; */
  border-bottom: 2px solid var(--accent-bg-color);
}

footer {
  padding: 10px;
  text-align: center;
  border-top: 1px solid var(--accent-bg-color);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}




.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}




.preview-frame .preview-draggable {
  position: relative; /* Ensures proper positioning */
  cursor: grab; /* Indicates draggable behavior */
}
.preview-frame .preview-draggable::before {
  content: "☰"; /* Unicode for a "hamburger" menu icon */
  position: absolute;
  left: -20px; /* Adjust to position handle */
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  cursor: grab;
  color: #666;
  padding: 4px;
}
.preview-frame .preview-draggable:active::before {
  cursor: grabbing;
  color: #333;
}


/* ==========================================================================
   7. Modals
   ========================================================================== */


.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  border-radius: var(--radius-lg);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-body {
  background: #52718f;
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  background: #52718f;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.modal-header-gradient {
  gap: 1.5rem;
  background: linear-gradient(135deg, #2c3e50 0%, #52718f 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px 12px 0 0;
}

.modal-header-gradient h2,
.modal-header-gradient h3 {
  color: white;
}

.modal-header-gradient .modal-close {
  color: white;
}

.modal-header-gradient .modal-close:hover {
  color: gray;
}


/* Modal Sizes */
.modal-content.modal-sm { width: 400px; height: 600px; }
.modal-content.modal-md { width: 600px; height: 800px; }
.modal-content.modal-lg { width: 800px; height: 1000px; }
.modal-content.modal-xl { width: 1200px; height: 1400px; }

/* SweetAlert2-style animations */
@keyframes modal-show {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  45% {
    transform: scale(1.05);
    opacity: 1;
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes modal-hide {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}

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

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

/* Apply SweetAlert2-style animation to modal */
#modal-container .modal-backdrop {
  animation: fadeIn 0.15s ease-out;
}

#modal-container .modal-content {
  animation: modal-show 0.3s ease-out;
}

/* Closing animations */
#modal-container.modal-closing .modal-backdrop {
  animation: fadeOut 0.15s ease-out forwards;
  pointer-events: none;
}

#modal-container.modal-closing .modal-content {
  animation: modal-hide 0.2s ease-out forwards;
  pointer-events: none;
}


/* ==========================================================================
   8. THUMBNAILS
   ========================================================================== */

/* Screenshot Thumbnails */
.screenshots-thumbnails {
  margin-top: 1rem;
  padding-top: 1rem;
  padding-left: .4rem;
  padding-right: .4rem;
  border-top: 1px solid var(--primary-bg-color);
}

.thumbnails-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.thumbnail-link {
  display: block;
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  /* border: 2px solid #e2e8f0; */
  transition: all 0.2s ease;
  position: relative;
}

.thumbnail-link:hover {
  border-color: var(--primary-color);
  transform: scale(1.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}