/* PromptKaro Components Styling */

/* Grid Section */
.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 16px 40px 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 12px 0;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-count-badge {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Prompt Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

/* Card */
.card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 9/16;
  background-color: var(--bg-card);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s;
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.03);
}

.card-tool-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.card-quick-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.card:hover .card-quick-actions {
  opacity: 1;
  transform: translateX(0);
}

.card-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
}

.card-action-btn:hover {
  background: #ffffff;
  color: var(--accent-black);
  transform: scale(1.1);
}

.card-action-btn.liked {
  color: var(--accent-red);
}

.card-action-btn.saved {
  color: var(--accent-indigo);
}

/* Card Overlay */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 45px 12px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  color: #ffffff;
  z-index: 2;
}

.card .title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.card-stats {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 6px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Load More & Infinite Scroll */
.load-more-wrap {
  text-align: center;
  margin: 30px 0 10px 0;
}

.load-more-btn {
  padding: 12px 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-more-btn:hover {
  background: #ffffff;
  border-color: var(--accent-black);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-medium);
}

.empty-state i {
  font-size: 42px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 16px auto;
}

/* MODAL STYLING */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.modal-close-btn:hover {
  background: var(--border-medium);
}

.modal-body {
  padding: 20px;
}

/* Prompt Detail Image */
.prompt-detail-image-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.prompt-detail-image {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 10px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.tool-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin: 14px 0;
  border: 1px solid var(--border-subtle);
}

.author-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.author-info div {
  font-size: 11px;
  color: var(--text-muted);
}

.author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.prompt-box {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  font-size: 14px;
  line-height: 1.6;
  color: #27272a;
  word-wrap: break-word;
  user-select: text;
  position: relative;
}

/* Prompt Customizer Box */
.prompt-customizer-box {
  background: #fdfdfd;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 16px 0;
}

.customizer-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-gold-hover);
}

.customizer-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.custom-field-row label {
  font-weight: 600;
  width: 100px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.custom-field-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 10px 0;
}

.btn {
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn-black {
  background: var(--accent-black);
  color: #ffffff;
}

.btn-black:hover {
  background: #27272a;
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--border-strong);
}

.like-save-row {
  display: flex;
  gap: 10px;
  margin: 10px 0 16px 0;
}

.like-save-row .btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
}

.like-save-row .btn.active-like {
  background: var(--accent-red-bg);
  color: var(--accent-red);
  border-color: #fca5a5;
}

.like-save-row .btn.active-save {
  background: var(--accent-indigo-bg);
  color: var(--accent-indigo);
  border-color: #c7d2fe;
}

/* AI Model Launchers */
.ai-launchers-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ai-launcher-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ai-launcher-btn:hover {
  background: #ffffff;
  border-color: var(--accent-black);
}

/* Variants Section */
.variants-section {
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.variant-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.variant-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.variant-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Comments Section */
.comments-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  margin-top: 20px;
}

.comment-form {
  background: var(--bg-secondary);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.comment-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  outline: none;
}

.comment-form textarea:focus {
  border-color: var(--accent-black);
}

.comment-form-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.comment-form-bottom input {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-size: 12px;
  width: 180px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.comment-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  color: var(--text-primary);
}

.comment-date {
  color: var(--text-muted);
}

.comment-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Form Styles for Creator & Request Modals */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-size: 14px;
  outline: none;
  background: var(--bg-secondary);
  transition: var(--transition);
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--accent-black);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

/* Toast Alerts */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s, opacity 0.2s;
}

.toast.toast-success i {
  color: #34d399;
}

.toast.toast-info i {
  color: #60a5fa;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Hero Showcase Section ──────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(79, 70, 229, 0.08) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 12px auto 16px auto;
  border: 1px solid var(--border-medium);
  text-align: center;
  max-width: 1300px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-blue-bg);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-stat-item i {
  color: var(--accent-blue);
}

/* ── Interactive Name Customizer Box ────────────────── */
.customizer-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

.customizer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.customizer-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.customizer-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.customizer-field input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.customizer-field input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ── FAQ Accordion ──────────────────────────────────── */
.faq-section {
  max-width: 1300px;
  margin: 40px auto 20px auto;
  padding: 0 16px;
}

.faq-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-answer {
  padding: 0 18px 14px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

