/* AI Prompts CSS Layout & Design System */

.prompt-list-wrapper {
  padding-top: 40px;
  padding-bottom: 80px;
  min-height: 70vh;
}

/* Breadcrumb Styling */
.breadcrumb {
  margin-bottom: 30px;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.breadcrumb li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.breadcrumb li a:hover {
  color: var(--primary);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--border-color);
  font-size: 12px;
}
.breadcrumb li.current {
  color: var(--text-main);
  font-weight: 500;
}

/* Hero Section */
.prompt-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}
.prompt-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.prompt-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Search Box */
.prompt-search-box {
  position: relative;
  max-width: 600px;
  margin: 30px auto 0 auto;
}
.prompt-search-box .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}
.prompt-search-box input {
  width: 100%;
  padding: 16px 20px 16px 54px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  color: var(--text-main);
  font-size: 16px;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.prompt-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--border-focus);
  background: var(--bg-card-hover);
}

/* Categories Grid */
.prompt-categories-section {
  margin-top: 40px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  padding: 30px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: var(--transition);
}
.cat-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-md);
}
.cat-card:hover::before {
  opacity: 1;
}
.cat-card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 20px;
  transition: var(--transition);
}
.cat-card:hover .cat-card-icon {
  background: var(--grad-primary);
  color: white;
  transform: rotate(5deg) scale(1.05);
}
.cat-card h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cat-card-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: auto;
}
.cat-card-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 16px;
  color: var(--text-muted);
  transition: var(--transition);
  opacity: 0.6;
}
.cat-card:hover .cat-card-arrow {
  transform: translateX(5px);
  color: var(--secondary);
  opacity: 1;
}

/* Category Layout */
.prompt-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}

/* Sidebar Navigation */
.prompt-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 12px;
  margin-bottom: 16px;
}
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.sidebar-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}
.sidebar-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-weight: 600;
}
html.light-theme .sidebar-item.active {
  background: rgba(99, 102, 241, 0.06);
}

/* Content List Section */
.category-header {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}
.cat-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
}
.cat-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}
.prompt-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.prompt-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.prompt-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.prompt-card h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}
.prompt-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.prompt-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}
.prompt-card:hover .prompt-card-link {
  color: var(--secondary);
}

/* Search results cards */
.prompt-search-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 40px;
}
.prompt-search-results {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 40px;
}
.prompt-search-results .section-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.search-card-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* Prompt Detail Card */
.prompt-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.detail-header {
  margin-bottom: 30px;
}
.prompt-cat-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}
.prompt-detail-card h1 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
}

/* Markdown prompt-body content */
.prompt-body {
  font-size: 15px;
  line-height: 1.7;
}
.prompt-body p {
  margin-bottom: 20px;
  color: var(--text-main);
}
.prompt-body h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  margin-top: 35px;
  margin-bottom: 16px;
  color: var(--text-main);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}
.prompt-body h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  margin-top: 25px;
  margin-bottom: 12px;
}
.prompt-body ul {
  margin-bottom: 20px;
  padding-left: 20px;
}
.prompt-body li {
  margin-bottom: 8px;
}
.prompt-body strong {
  font-weight: 600;
  color: var(--text-main);
}
.prompt-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  margin-bottom: 25px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.prompt-body th, .prompt-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.prompt-body th {
  background: rgba(99, 102, 241, 0.05);
  font-weight: 600;
  color: var(--text-main);
}
.prompt-body tr:last-child td {
  border-bottom: none;
}
.prompt-body a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.prompt-body a:hover {
  text-decoration: underline;
}

/* MacOS Terminal Styled Card */
.terminal-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  margin: 30px 0;
}
.terminal-header {
  background: #0f1422;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-dots .dot.red { background-color: #ff5f56; }
.terminal-dots .dot.yellow { background-color: #ffbd2e; }
.terminal-dots .dot.green { background-color: #27c93f; }

.terminal-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
}

/* Copy button */
.copy-prompt-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.copy-prompt-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  transform: translateY(-1px);
}
.copy-prompt-btn.copied {
  background: rgba(39, 201, 63, 0.15);
  border-color: rgba(39, 201, 63, 0.4);
  color: #27c93f;
}
.copy-prompt-btn i {
  font-size: 14px;
}

.terminal-body {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  max-height: 500px;
}
.terminal-body code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  color: #a5b4fc;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
}

/* Tags section at bottom */
.prompt-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-pill {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
html.light-theme .tag-pill {
  background: rgba(0, 0, 0, 0.02);
}

/* ===== Responsive Adaptations ===== */
@media (max-width: 991px) {
  .prompt-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .prompt-sidebar {
    position: sticky;
    top: 80px;
    z-index: 10;
  }
  .sidebar-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 10px;
  }
  .sidebar-item {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 16px;
  }
  .sidebar-title {
    display: none;
  }
}

@media (max-width: 640px) {
  .prompt-hero {
    margin-bottom: 30px;
  }
  .prompt-detail-card {
    padding: 24px;
  }
  .terminal-header {
    padding: 12px 16px;
  }
  .terminal-title {
    display: none;
  }
  .terminal-body {
    padding: 16px;
  }
  .terminal-body code {
    font-size: 13px;
  }
  .copy-prompt-btn span {
    display: none; /* Hide button text on extra small screens */
  }
  .copy-prompt-btn {
    padding: 8px 10px;
  }
}

/* Related Prompts & Recommended Templates Section */
.related-prompts-section,
.recommended-templates-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.related-prompts-section h3,
.recommended-templates-section h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-prompts-grid,
.recommended-templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.related-prompt-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.related-prompt-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.related-prompt-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 50%;
  font-size: 16px;
  flex-shrink: 0;
  transition: var(--transition);
}

.related-prompt-item:hover .related-prompt-icon {
  background: var(--primary);
  color: #fff;
}

.related-prompt-info {
  overflow: hidden;
}

.related-prompt-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-prompt-info span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Recommended Templates Cards */
.rec-template-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.rec-template-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.rec-template-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.rec-template-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-template-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-template-content span {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .related-prompts-grid,
  .recommended-templates-grid {
    grid-template-columns: 1fr;
  }
}

/* Custom styles for prompt intro, how-to-use, and FAQs */
.prompt-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.prompt-intro strong {
  color: var(--text-main);
  font-weight: 600;
}

.prompt-how-to-use {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}
.prompt-how-to-use h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompt-how-to-use h3 i {
  color: var(--primary);
}
.prompt-how-to-use ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.prompt-how-to-use li {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}
.prompt-how-to-use li:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}
.light-theme .prompt-how-to-use li {
  background: rgba(0, 0, 0, 0.005);
}
.light-theme .prompt-how-to-use li:hover {
  background: rgba(0, 0, 0, 0.01);
}
.prompt-how-to-use li strong {
  color: var(--text-main);
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 600;
}

.prompt-faq-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}
.prompt-faq-section h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompt-faq-section h3 i {
  color: var(--primary);
}
.prompt-faq-section .faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prompt-faq-section .faq-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: var(--transition);
}
.prompt-faq-section .faq-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(99, 102, 241, 0.2);
}
.light-theme .prompt-faq-section .faq-item {
  background: rgba(0, 0, 0, 0.005);
}
.light-theme .prompt-faq-section .faq-item:hover {
  background: rgba(0, 0, 0, 0.01);
}
.prompt-faq-section .faq-item h4 {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompt-faq-section .faq-item h4::before {
  content: 'Q:';
  color: var(--primary);
  font-weight: 800;
}
.prompt-faq-section .faq-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

