.prompt-copy-page {
  align-items: stretch;
}

.prompt-copy-shell {
  width: 100%;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
}

.prompt-detail {
  display: grid;
  gap: 14px;
}

.prompt-copy-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.prompt-copy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.prompt-copy-header h2 {
  font-size: 17px;
}

.prompt-copy-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.copy-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 133, 124, 0.28);
  border-radius: 12px;
  background: rgba(0, 133, 124, 0.08);
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 13px;
  transition:
    background 0.12s ease,
    transform 0.12s ease;
}

.copy-btn:hover {
  background: rgba(0, 133, 124, 0.14);
  transform: translateY(-1px);
}

.prompt-text {
  margin: 14px 0 0;
  max-height: 440px;
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
  color: var(--text);
  font: 13px/1.7 "Poppins", system-ui, sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.result-card h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.example-pair-card {
  display: grid;
}

.example-carousel {
  min-width: 0;
  overflow: hidden;
}

.carousel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.carousel-top h2 {
  font-size: 17px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-btn {
  border: 1px solid rgba(0, 133, 124, 0.28);
  border-radius: 12px;
  background: rgba(0, 133, 124, 0.08);
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
}

.carousel-indicator {
  min-width: 42px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.carousel-viewport {
  display: flex;
  transition: transform 0.22s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.example-result-image {
  margin-top: 14px;
}

.result-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.result-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  transition: transform 0.16s ease;
}

.result-image:hover img {
  transform: scale(1.015);
}

.result-video-button {
  position: relative;
  display: block;
  width: min(210px, 100%);
  aspect-ratio: 9 / 16;
  margin: 14px auto 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #111827;
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.result-video-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-video-button span {
  position: absolute;
  inset: auto 10px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  text-align: center;
}

.result-video-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.result-video-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-34%, -50%);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid var(--brand);
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 18px 24px;
  background: rgba(15, 23, 42, 0.78);
}

.image-modal.is-open {
  display: flex;
}

.image-modal img {
  max-width: min(980px, 100%);
  max-height: 82vh;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.image-modal video {
  width: min(430px, 100%);
  max-width: calc(100vw - 36px);
  max-height: calc(100dvh - 116px);
  border-radius: 14px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 200;
  max-width: calc(100vw - 28px);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: var(--shadow);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .prompt-copy-header {
    display: grid;
  }

  .prompt-copy-card {
    padding: 14px;
  }

  .copy-btn {
    width: 100%;
  }

  .prompt-text {
    max-height: 360px;
    padding: 12px;
    font-size: 12.5px;
  }

  .result-image img {
    aspect-ratio: 16 / 9;
  }

  .result-video-button {
    width: min(170px, 72vw);
    border-radius: 10px;
  }

  .result-video-button::before {
    width: 42px;
    height: 42px;
  }

  .result-video-button span {
    inset: auto 8px 8px;
    font-size: 11.5px;
    padding: 6px 8px;
  }

  .image-modal {
    padding: 64px 12px 16px;
  }

  .image-modal img {
    max-height: calc(100dvh - 96px);
    border-radius: 12px;
  }

  .image-modal video {
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100dvh - 96px);
    border-radius: 12px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .carousel-top {
    display: grid;
  }

  .carousel-controls {
    justify-content: space-between;
  }
}
