/* ==========================================================================
   PromptKaro - Prompt Detail Page Stylesheet (Polished UI & Responsive UX)
   ========================================================================== */

/* ── Page Setup ─────────────────────────────────────────────────────────── */
.pp-page-body {
  background-color: #ffffff;
  color: var(--text-primary);
  min-height: 100vh;
}

.pp-main-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Breadcrumbs & Back Navigation ─────────────────────────────────────────── */
.breadcrumb-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
}

.breadcrumb-back-btn:hover {
  background: var(--accent-black);
  color: #ffffff;
  border-color: var(--accent-black);
  transform: translateX(-2px);
}

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  overflow: hidden;
  max-width: 1040px;
  margin: 0 auto;
}

.breadcrumb-bar a {
  color: var(--text-secondary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.breadcrumb-bar a:hover {
  color: var(--accent-blue);
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 10px;
}

.breadcrumb-title {
  color: var(--text-primary);
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 500px) {
  .breadcrumb-title {
    max-width: 180px;
  }
}

/* ── Loading & 404 States ────────────────────────────────────────────────── */
.prompt-page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid var(--border-medium);
  border-top-color: var(--accent-black);
  border-radius: 50%;
  animation: ppSpin 0.8s linear infinite;
}

@keyframes ppSpin {
  to { transform: rotate(360deg); }
}

.prompt-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
  gap: 12px;
  padding: 40px 20px;
}

.prompt-not-found i {
  font-size: 48px;
  color: var(--text-muted);
}

.prompt-not-found h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.prompt-not-found p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

/* ── Main Layout Container & Grid ────────────────────────────────────────── */
.prompt-page-wrap {
  padding: 24px 0 60px 0;
}

.prompt-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 768px) {
  .prompt-page-grid {
    grid-template-columns: 290px 1fr;
    gap: 28px;
  }
}

@media (min-width: 960px) {
  .prompt-page-grid {
    grid-template-columns: 310px 1fr;
    gap: 36px;
  }
}

/* ── Left Column: Sticky Image Showcase ──────────────────────────────────── */
.prompt-image-col {
  min-width: 0;
  width: 100%;
}

.prompt-image-sticky {
  position: relative;
}

@media (min-width: 768px) {
  .prompt-image-sticky {
    position: sticky;
    top: 80px;
  }
}

.prompt-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 9/16;
  max-height: 540px;
  background: #09090b;
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-medium);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.prompt-image-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.12);
}

.prompt-page-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prompt-image-wrapper .card-tool-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Image Semantic Caption & Social Actions (Google Image SEO) ── */
.prompt-image-figure {
  margin: 0;
  display: block;
}

.prompt-image-caption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

@media (max-width: 767px) {
  .prompt-page-wrap {
    padding: 16px 0 40px 0;
  }

  .prompt-page-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .prompt-image-col {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 2px;
  }

  .prompt-image-sticky {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .prompt-image-wrapper {
    width: 100%;
    max-width: 230px;
    aspect-ratio: 9/16;
    max-height: 390px;
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
  }

  .prompt-page-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .prompt-image-wrapper .card-tool-tag {
    top: 8px;
    left: 8px;
    font-size: 10.5px;
    padding: 3px 8px;
    border-radius: 5px;
  }

  .pp-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }

  .pp-category-badge {
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid #bfdbfe;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: var(--transition);
  }

  .pp-category-badge:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-1px);
  }

  .pp-meta-item {
    font-size: 12px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .pp-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
    margin: 4px 0 12px 0;
  }

  .prompt-box {
    padding: 14px 14px;
    font-size: 13.5px;
    line-height: 1.65;
  }

  .pp-prompt-actions {
    margin-top: 14px;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .prompt-image-wrapper {
    max-width: 200px;
    max-height: 350px;
  }

  .pp-title {
    font-size: 18px;
  }
}

/* ── Right Column: Details ───────────────────────────────────────────────── */
.prompt-details-col {
  min-width: 0;
}

.pp-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pp-category-badge {
  background: #eff6ff;
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #bfdbfe;
}

.pp-meta-item {
  font-size: 12.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pp-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 10px 0 16px 0;
}

@media (max-width: 767px) {
  .pp-title {
    font-size: 21px;
    margin: 8px 0 14px 0;
  }
}

/* ── Prompt Card ─────────────────────────────────────────────────────────── */
.pp-prompt-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.04);
}

.pp-prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.pp-prompt-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pp-card-copy-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pp-card-copy-btn:hover {
  background: #09090b;
  color: #ffffff;
  border-color: #09090b;
}

.prompt-box {
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.7;
  color: #1e293b;
  word-break: break-word;
  white-space: pre-wrap;
  user-select: text;
  background: #ffffff;
}

@media (max-width: 767px) {
  .prompt-box {
    padding: 14px 14px;
    font-size: 13.5px;
    line-height: 1.65;
  }
}

/* ── Prompt Action Buttons ───────────────────────────────────────────────── */
.pp-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

/* Primary Hero Copy Button */
.pp-btn-copy {
  background: #09090b;
  color: #ffffff;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.18);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.pp-btn-copy:hover {
  background: #27272a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.28);
}

.pp-btn-copy:active {
  transform: scale(0.99);
}

.pp-btn-copy.pp-btn-copied {
  background: #10b981 !important;
  box-shadow: 0 6px 16px -2px rgba(16, 185, 129, 0.4) !important;
}

/* Secondary AI Launchers (ChatGPT & Gemini) */
.pp-ai-launchers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pp-btn-chatgpt,
.pp-btn-gemini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pp-btn-chatgpt:active,
.pp-btn-gemini:active {
  transform: scale(0.98);
}

/* ChatGPT */
.pp-btn-chatgpt {
  background: #10a37f;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 163, 127, 0.22);
}

.pp-btn-chatgpt:hover {
  background: #0d8f6f;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 163, 127, 0.32);
}

/* Gemini */
.pp-btn-gemini {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pp-btn-gemini:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

@media (max-width: 480px) {
  .pp-btn-copy {
    padding: 12px 16px;
    font-size: 14px;
  }

  .pp-ai-launchers {
    gap: 8px;
  }

  .pp-btn-chatgpt,
  .pp-btn-gemini {
    padding: 10px 12px;
    font-size: 12.5px;
    gap: 5px;
  }
}

/* ── Related Prompts Section ─────────────────────────────────────────────── */
.pp-related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-medium);
}

.pp-related-section .section-header {
  margin-bottom: 16px;
}

@media (max-width: 767px) {
  body.pp-page-body {
    padding-bottom: 70px;
  }

  .prompt-page-wrap {
    padding: 16px 0 50px 0;
  }

  .pp-related-section {
    margin-top: 32px;
    padding-top: 20px;
  }
}
