/* ==========================================================================
   QUBENIX AI PROMPT LIBRARY STYLESHEET
   Brand Palette:
     Primary: #3C32A3
     Accent: #6B5FD1
     Background: #FFFFFF
     Text: #141225
     Muted: #5B5975
     Border: #E5E7EB
   ========================================================================== */

:root {
  --prompt-primary: #3C32A3;
  --prompt-primary-hover: #312885;
  --prompt-accent: #6B5FD1;
  --prompt-accent-light: #F0EFFF;
  --prompt-text: #141225;
  --prompt-muted: #5B5975;
  --prompt-subtle: #8A889D;
  --prompt-bg: #F8F3F0;
  --prompt-surface: #F9FAFC;
  --prompt-card-bg: #FFFFFF;
  --prompt-border: #E5E7EB;
  --prompt-border-light: rgba(60, 50, 163, 0.08);
  --prompt-shadow-sm: 0 2px 8px rgba(20, 18, 37, 0.04);
  --prompt-shadow-md: 0 8px 24px -4px rgba(60, 50, 163, 0.08);
  --prompt-shadow-lg: 0 20px 40px -8px rgba(60, 50, 163, 0.14);
  --prompt-radius-pill: 9999px;
  --prompt-radius-card: 18px;
  --prompt-radius-inner: 12px;
  --prompt-radius-btn: 10px;
  --prompt-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --prompt-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --prompt-container: 1280px;
}

/* Base resets & typography */
.prompts-body,
.prompts-body *,
.prompts-body *::before,
.prompts-body *::after {
  box-sizing: border-box;
}

.prompts-body {
  font-family: var(--prompt-font);
  color: var(--prompt-text);
  background: var(--prompt-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

/* ==========================================================================
   1. HERO SECTION (Lavender Flow Atmosphere)
   ========================================================================== */
.prompts-hero {
  position: relative;
  width: 100%;
  padding: clamp(70px, 8vw, 110px) clamp(20px, 4vw, 40px) clamp(50px, 6vw, 80px);
  overflow: hidden;
  box-sizing: border-box;
  background: linear-gradient(180deg, #F5F3FF 0%, #FFFFFF 100%);
  border-bottom: 1px solid rgba(107, 95, 209, 0.12);
}

.prompts-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/images/prompts-bg.webp');
  background-size: cover;
  background-position: center 25%;
  opacity: 0.28;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.prompts-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(107, 95, 209, 0.18) 0%, rgba(245, 243, 255, 0) 70%);
  pointer-events: none;
  filter: blur(60px);
}

.prompts-hero-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}

.prompts-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--prompt-primary);
  background: #FFFFFF;
  padding: 6px 16px;
  border-radius: var(--prompt-radius-pill);
  border: 1px solid rgba(60, 50, 163, 0.16);
  box-shadow: 0 2px 10px rgba(60, 50, 163, 0.06);
  margin-bottom: 20px;
}

.prompts-hero-badge svg {
  color: var(--prompt-accent);
}

.prompts-hero-title {
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--prompt-text);
  margin: 0 0 18px;
}

.prompts-hero-title .gradient-text {
  background: linear-gradient(135deg, #3C32A3 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.prompts-hero-desc {
  font-size: clamp(16px, 1.8vw, 19.5px);
  color: var(--prompt-muted);
  line-height: 1.65;
  max-width: 760px;
  margin: 0 auto 36px;
}

/* ==========================================================================
   2. SEARCH & CONTROL BAR
   ========================================================================== */
.prompts-search-container {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.prompts-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 2px solid rgba(60, 50, 163, 0.18);
  border-radius: var(--prompt-radius-pill);
  padding: 6px 10px 6px 20px;
  box-shadow: 0 10px 30px -4px rgba(60, 50, 163, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.prompts-search-wrapper:focus-within {
  border-color: var(--prompt-accent);
  box-shadow: 0 12px 36px -4px rgba(107, 95, 209, 0.22), 0 0 0 4px rgba(107, 95, 209, 0.15);
  transform: translateY(-1px);
}

.prompts-search-icon {
  flex-shrink: 0;
  color: var(--prompt-muted);
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.prompts-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-family: inherit;
  color: var(--prompt-text);
  outline: none;
  padding: 10px 0;
}

.prompts-search-input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

.prompts-search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #E5E7EB;
  border: none;
  cursor: pointer;
  color: #4B5563;
  margin-right: 8px;
  padding: 0;
  transition: background 0.15s ease;
}

.prompts-search-clear:hover {
  background: #D1D5DB;
  color: #111827;
}

.prompts-search-clear.is-visible {
  display: flex;
}

.prompts-search-shortcut {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--prompt-muted);
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  padding: 4px 8px;
  border-radius: 6px;
  user-select: none;
}

@media (max-width: 640px) {
  .prompts-search-shortcut {
    display: none;
  }
}

/* ==========================================================================
   3. CATEGORY NAV & FILTERS SECTION
   ========================================================================== */
.prompts-filter-bar {
  max-width: var(--prompt-container);
  margin: 32px auto 0;
  padding: 0 clamp(16px, 3vw, 32px);
  box-sizing: border-box;
}

.prompts-categories-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 95, 209, 0.3) transparent;
  -webkit-overflow-scrolling: touch;
}

.prompts-categories-scroll::-webkit-scrollbar {
  height: 5px;
}

.prompts-categories-scroll::-webkit-scrollbar-thumb {
  background: rgba(107, 95, 209, 0.25);
  border-radius: 10px;
}

.prompts-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--prompt-radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  background: #FFFFFF;
  color: var(--prompt-muted);
  border: 1px solid #E5E7EB;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.prompts-cat-btn:hover {
  border-color: rgba(107, 95, 209, 0.4);
  color: var(--prompt-primary);
  background: #FAF9FF;
  transform: translateY(-1px);
}

.prompts-cat-btn.is-active {
  background: var(--prompt-primary);
  color: #FFFFFF !important;
  border-color: var(--prompt-primary);
  box-shadow: 0 4px 14px rgba(60, 50, 163, 0.25);
}

.prompts-cat-btn .cat-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(20, 18, 37, 0.06);
  color: inherit;
  font-weight: 700;
}

.prompts-cat-btn.is-active .cat-count {
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

/* Secondary Controls (Difficulty + Sorting + Status) */
.prompts-subcontrols {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 18px;
  padding: 12px 16px;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  width: 100%;
  box-sizing: border-box;
}

.prompts-results-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--prompt-text);
  min-width: 0;
}

.prompts-results-count span {
  color: var(--prompt-primary);
  font-weight: 700;
}

.prompts-difficulty-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.prompts-difficulty-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--prompt-muted);
  margin-right: 4px;
  white-space: nowrap;
}

.prompts-diff-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: var(--prompt-muted);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.prompts-diff-btn:hover {
  border-color: var(--prompt-primary);
  color: var(--prompt-primary);
}

.prompts-diff-btn.is-active {
  background: #EBE8FF;
  border-color: var(--prompt-primary);
  color: var(--prompt-primary);
  font-weight: 700;
}

@media (max-width: 640px) {
  .prompts-subcontrols {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }
  .prompts-results-count {
    width: 100%;
  }
  .prompts-difficulty-filters {
    width: 100%;
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .prompts-diff-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* ==========================================================================
   4. PROMPT GRID & CARDS
   ========================================================================== */
.prompts-grid-section {
  max-width: var(--prompt-container);
  width: 100%;
  margin: 30px auto 80px;
  padding: 0 clamp(16px, 3vw, 32px);
  box-sizing: border-box;
  min-width: 0;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Laptops & Smaller Desktops */
@media (max-width: 1199px) {
  .prompts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Tablets & Mobile Screens */
@media (max-width: 767px) {
  .prompts-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

.prompt-card {
  background-color: #F8F7FF;
  background-image: url('../assets/images/prompt-card-bg.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border: 1px solid rgba(107, 95, 209, 0.16);
  border-radius: var(--prompt-radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px -2px rgba(107, 95, 209, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.prompt-card:hover {
  border-color: rgba(107, 95, 209, 0.45);
  box-shadow: 0 12px 28px -4px rgba(107, 95, 209, 0.16), 0 4px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.prompt-category-badge {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--prompt-primary);
  background: var(--prompt-accent-light);
  padding: 4px 10px;
  border-radius: var(--prompt-radius-pill);
  border: 1px solid rgba(60, 50, 163, 0.1);
  text-decoration: none;
  transition: background 0.15s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-category-badge:hover {
  background: #E2DFFF;
}

.prompt-difficulty-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;
}

.difficulty-Beginner {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.difficulty-Intermediate {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.difficulty-Advanced {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.prompt-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--prompt-text);
  margin: 0 0 8px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.prompt-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
  overflow-wrap: break-word;
  word-break: break-word;
}

.prompt-title a:hover {
  color: var(--prompt-primary);
}

.prompt-description {
  font-size: 14px;
  color: var(--prompt-muted);
  line-height: 1.55;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Prompt Code Preview Block */
.prompt-preview-block {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--prompt-radius-inner);
  padding: 12px 14px;
  margin-bottom: 16px;
  position: relative;
  font-family: var(--prompt-font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #374151;
  max-height: 96px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.prompt-preview-block mark {
  background: rgba(107, 95, 209, 0.18);
  color: var(--prompt-primary);
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 4px;
}

/* Tags */
.prompt-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  max-width: 100%;
  min-width: 0;
}

.prompt-tag {
  font-size: 11.5px;
  color: var(--prompt-muted);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(229, 231, 235, 0.8);
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-tag:hover {
  background: #E5E7EB;
  color: var(--prompt-text);
}

/* Card Actions */
.prompt-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #F3F4F6;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.btn-copy-prompt {
  flex: 1 1 120px;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--prompt-primary);
  color: #FFFFFF !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--prompt-radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy-prompt:hover {
  background: var(--prompt-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 50, 163, 0.2);
}

.btn-chatgpt {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #10A37F;
  color: #FFFFFF !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--prompt-radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-chatgpt:hover {
  background: #0E8C6D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 163, 127, 0.25);
}

.btn-claude {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #D97757;
  color: #FFFFFF !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--prompt-radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-claude:hover {
  background: #C15F3C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.28);
}

.btn-dedicated-prompt {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #F3F0FF;
  color: var(--prompt-primary) !important;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--prompt-radius-btn);
  border: 1px solid rgba(107, 95, 209, 0.25);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.btn-dedicated-prompt:hover {
  background: var(--prompt-primary);
  color: #FFFFFF !important;
  border-color: var(--prompt-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 50, 163, 0.18);
}

.btn-expand-prompt {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--prompt-radius-btn);
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  color: var(--prompt-muted);
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.btn-expand-prompt:hover {
  background: #E5E7EB;
  color: var(--prompt-text);
}

@media (max-width: 900px) {
  .prompt-card {
    padding: 20px 18px;
  }
}

@media (max-width: 480px) {
  .prompt-card {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .prompt-card-actions {
    gap: 6px;
    padding-top: 12px;
  }
  .btn-copy-prompt {
    font-size: 12px;
    padding: 7px 10px;
    min-width: 95px;
  }
  .btn-chatgpt,
  .btn-claude {
    font-size: 11.5px;
    padding: 7px 8px;
    gap: 4px;
  }
  .btn-dedicated-prompt {
    font-size: 11px;
    padding: 7px 8px;
  }
  .btn-expand-prompt {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }
}

@media (max-width: 360px) {
  .prompt-card {
    padding: 14px 12px;
  }
  .btn-copy-prompt {
    flex: 1 1 100%;
    width: 100%;
    margin-bottom: 2px;
  }
  .btn-chatgpt,
  .btn-claude,
  .btn-dedicated-prompt {
    flex: 1 1 auto;
    font-size: 11px;
    padding: 6px 6px;
    justify-content: center;
  }
  .btn-expand-prompt {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
  }
}

.btn-modal-dedicated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EDE9FE;
  color: #3C32A3 !important;
  border: 1px solid rgba(107, 95, 209, 0.3);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--prompt-radius-btn);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
  transition: all 0.2s ease;
}

.btn-modal-dedicated:hover {
  background: #3C32A3;
  color: #FFFFFF !important;
  border-color: #3C32A3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 50, 163, 0.2);
}

/* Empty State */
.prompts-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #FFFFFF;
  border: 1px dashed #D1D5DB;
  border-radius: 16px;
}

.prompts-empty-icon {
  width: 48px;
  height: 48px;
  color: var(--prompt-accent);
  margin: 0 auto 16px;
}

.prompts-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--prompt-text);
  margin-bottom: 8px;
}

.prompts-empty-desc {
  font-size: 15px;
  color: var(--prompt-muted);
  max-width: 440px;
  margin: 0 auto 20px;
}

.prompts-empty-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--prompt-primary);
  color: #FFFFFF;
  border-radius: var(--prompt-radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   5. EXPANDED MODAL / DRAWER
   ========================================================================== */
.prompt-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 18, 37, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.prompt-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.prompt-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: 92%;
  max-width: 860px;
  max-height: 88vh;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(20, 18, 37, 0.3);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
}

.prompt-modal-backdrop.is-open .prompt-modal {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.prompt-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
}

.prompt-modal-title-wrap {
  flex: 1;
  padding-right: 20px;
}

.prompt-modal-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.prompt-modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--prompt-text);
  margin: 0 0 6px;
}

.prompt-modal-subtitle {
  font-size: 14.5px;
  color: var(--prompt-muted);
  line-height: 1.5;
  margin: 0;
}

.prompt-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prompt-modal-close:hover {
  background: #E5E7EB;
  color: #111827;
}

.prompt-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
}

.prompt-modal-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--prompt-primary);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-modal-text-wrap {
  position: relative;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}

.prompt-modal-text {
  font-family: var(--prompt-font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: #1E293B;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.prompt-modal-text mark {
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.prompt-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .prompt-info-grid {
    grid-template-columns: 1fr;
  }
}

.prompt-info-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
}

.prompt-info-card h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--prompt-muted);
  margin: 0 0 6px;
}

.prompt-info-card p {
  font-size: 13.5px;
  color: var(--prompt-text);
  line-height: 1.5;
  margin: 0;
}

/* Service CTA Callout Inside Modal */
.prompt-service-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #F0EFFF 0%, #FAF5FF 100%);
  border: 1px solid rgba(107, 95, 209, 0.25);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 10px;
}

.prompt-service-content h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--prompt-primary);
  margin: 0 0 4px;
}

.prompt-service-content p {
  font-size: 13px;
  color: var(--prompt-muted);
  line-height: 1.45;
  margin: 0;
}

.btn-service-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--prompt-primary);
  color: #FFFFFF !important;
  border-radius: var(--prompt-radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-service-cta:hover {
  background: var(--prompt-accent);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .prompt-service-callout {
    flex-direction: column;
    align-items: flex-start;
  }
}

.prompt-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px;
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
}

/* ==========================================================================
   6. TOAST NOTIFICATIONS
   ========================================================================== */
.prompt-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #1E1B4B;
  color: #FFFFFF;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.prompt-toast.is-active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.prompt-toast-icon {
  color: #34D399;
  flex-shrink: 0;
}

/* ==========================================================================
   7. BREADCRUMBS & SEO CONTENT
   ========================================================================== */
.prompts-breadcrumbs {
  max-width: var(--prompt-container);
  margin: 18px auto 0;
  padding: 0 clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--prompt-muted);
}

.prompts-breadcrumbs a {
  color: var(--prompt-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.prompts-breadcrumbs a:hover {
  color: var(--prompt-primary);
}

.prompts-breadcrumbs .sep {
  color: #9CA3AF;
}

.prompts-breadcrumbs .current {
  color: var(--prompt-text);
  font-weight: 600;
}

/* Category Intro Content */
.category-intro-box {
  max-width: var(--prompt-container);
  margin: 20px auto 0;
  padding: 24px 28px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-sizing: border-box;
}

.category-intro-box h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--prompt-text);
  margin: 0 0 10px;
}

.category-intro-box p {
  font-size: 14.5px;
  color: var(--prompt-muted);
  line-height: 1.6;
  margin: 0;
}

/* Bottom CTA section */
.prompts-bottom-cta {
  background: linear-gradient(135deg, #3C32A3 0%, #2A2175 100%);
  color: #FFFFFF;
  padding: clamp(60px, 7vw, 90px) clamp(20px, 4vw, 40px);
  text-align: center;
  border-radius: 24px;
  max-width: var(--prompt-container);
  margin: 40px auto 80px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(60, 50, 163, 0.4);
}

.prompts-bottom-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(107, 95, 209, 0.3) 0%, transparent 60%);
  pointer-events: none;
}

.prompts-bottom-cta h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.prompts-bottom-cta p {
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.prompts-bottom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #FFFFFF;
  color: var(--prompt-primary) !important;
  border-radius: var(--prompt-radius-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.prompts-bottom-btn:hover {
  background: #F0EFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   RTL (RIGHT-TO-LEFT) SUPPORT FOR ARABIC
   ========================================================================== */
html[dir="rtl"] .prompts-hero-inner,
body.rtl-mode .prompts-hero-inner {
  direction: rtl;
}

html[dir="rtl"] .prompts-search-wrapper,
body.rtl-mode .prompts-search-wrapper {
  direction: rtl;
}

html[dir="rtl"] .prompts-search-icon,
body.rtl-mode .prompts-search-icon {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .prompts-search-clear,
body.rtl-mode .prompts-search-clear {
  right: auto;
  left: 18px;
}

html[dir="rtl"] .prompts-search-input,
body.rtl-mode .prompts-search-input {
  padding-left: 48px;
  padding-right: 54px;
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .prompts-cat-btn .cat-count,
body.rtl-mode .prompts-cat-btn .cat-count {
  margin-left: 0;
  margin-right: 8px;
}

html[dir="rtl"] .prompts-diff-filters,
body.rtl-mode .prompts-diff-filters {
  direction: rtl;
}

html[dir="rtl"] .prompts-results-bar,
body.rtl-mode .prompts-results-bar {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .prompt-card,
body.rtl-mode .prompt-card {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .prompt-card-header,
body.rtl-mode .prompt-card-header {
  flex-direction: row;
  justify-content: space-between;
}

/* Code blocks, bracketed tokens [VARIABLE], and prompt pre-blocks MUST remain LTR monospace */
html[dir="rtl"] .prompt-preview-block,
body.rtl-mode .prompt-preview-block,
html[dir="rtl"] .prompt-modal-text,
body.rtl-mode .prompt-modal-text,
html[dir="rtl"] .single-prompt-box pre,
body.rtl-mode .single-prompt-box pre,
html[dir="rtl"] pre.prompt-modal-text,
body.rtl-mode pre.prompt-modal-text {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext;
  font-family: var(--prompt-font-mono) !important;
}

html[dir="rtl"] .prompt-card-actions,
body.rtl-mode .prompt-card-actions {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

html[dir="rtl"] .prompt-modal,
body.rtl-mode .prompt-modal {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .prompt-modal-close,
body.rtl-mode .prompt-modal-close {
  right: auto;
  left: 20px;
}

html[dir="rtl"] .prompt-modal-footer,
body.rtl-mode .prompt-modal-footer {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

html[dir="rtl"] .prompts-breadcrumbs,
body.rtl-mode .prompts-breadcrumbs {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .prompts-breadcrumbs .sep,
body.rtl-mode .prompts-breadcrumbs .sep {
  transform: scaleX(-1);
  display: inline-block;
}

html[dir="rtl"] .prompt-service-callout,
body.rtl-mode .prompt-service-callout {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .category-intro-box,
body.rtl-mode .category-intro-box {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] article[data-single-prompt="true"],
body.rtl-mode article {
  text-align: right;
}

