/* Section Titles */
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin: 0 auto 1.5rem;
  color: var(--on-surface);
  background: linear-gradient(
    135deg,
    var(--on-surface) 0%,
    var(--seed-color) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 800px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  text-align: center;
  margin: 0 auto 3rem;
  color: var(--on-surface-variant);
  max-width: 700px;
  line-height: 1.6;
  opacity: 0.9;
}

/* Editor Preview Section */
.editor-preview {
  padding: 6rem 2rem;
  background: var(--surface-variant);
}

.preview-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.preview-card {
  background: rgba(14, 17, 23, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(33, 150, 243, 0.15);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(33, 150, 243, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.preview-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--seed-color),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-card:hover::before {
  opacity: 1;
}

.preview-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(33, 150, 243, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

.preview-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(
    135deg,
    rgba(14, 17, 23, 0.9) 0%,
    rgba(28, 31, 36, 0.9) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--seed-color);
  position: relative;
  border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.preview-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(33, 150, 243, 0.1) 0%,
    transparent 70%
  );
}

.preview-text {
  padding: 1.5rem;
  text-align: center;
}

.preview-text h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--on-surface);
}

.preview-text p {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
}

/* Modal Styles */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(14, 17, 23, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 24px;
  max-width: min(90vw, fit-content);
  max-height: 90vh;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(33, 150, 243, 0.3);
  transform: scale(0.8) translateY(50px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
}

.preview-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(33, 150, 243, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--on-surface);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--on-surface-variant);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(33, 150, 243, 0.1);
  color: var(--seed-color);
}

.modal-body {
  width: min-content;
  padding: 0;
}

.modal-media {
  width: auto;
  max-width: min(800px, 85vw);
  width: fit-content;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.modal-description {
  padding: 1.5rem;
  color: var(--on-surface-variant);
  text-align: center;
  border-top: 1px solid rgba(33, 150, 243, 0.1);
}

/* Clickable cursor for preview cards */
.preview-card {
  cursor: pointer;
}

.preview-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(33, 150, 243, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    max-width: min(95vw, fit-content);
    max-height: 95vh;
    width: fit-content;
  }

  .modal-media {
    max-height: 50vh;
    max-width: 90vw;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-description {
    padding: 1rem;
  }
}
