/* Prompts Market Page Styles */

.nav-active {
  color: var(--text-main) !important;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 2px;
}

.prompts-main {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 5%;
  padding-right: 5%;
}

.prompts-header {
  text-align: center;
  margin-bottom: 3rem;
}

.prompts-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #f8fafc, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prompts-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Filter Bar */
.prompts-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
}

.filter-tab:hover {
  color: var(--text-main);
  border-color: rgba(139, 92, 246, 0.4);
}

.filter-tab.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.6);
  color: #c4b5fd;
}

.filter-search input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-main);
  font-size: 0.9rem;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
}

.filter-search input:focus {
  border-color: rgba(139, 92, 246, 0.5);
}

.filter-search input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Prompts Grid */
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Prompt Card */
.prompt-card {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prompt-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.prompt-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.prompt-card-category {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  white-space: nowrap;
}

.prompt-card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.prompt-card-author {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.prompt-card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-copy {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
  color: #67e8f9;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
}

.btn-copy:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.7);
}

.btn-copy.copied {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

/* Empty State */
.prompts-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Submit CTA */
.prompts-submit {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
}

.prompts-submit h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.prompts-submit p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-full {
  width: 100%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid var(--glass-border);
  padding: 2rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(139, 92, 246, 0.5);
}

.form-group textarea {
  resize: vertical;
  min-height: 160px;
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .prompts-header h1 {
    font-size: 1.8rem;
  }

  .prompts-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search input {
    width: 100%;
  }

  .prompts-grid {
    grid-template-columns: 1fr;
  }
}

/* Auth Button */
.nav-auth-btn {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.nav-auth-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.8);
}

.nav-auth-btn.logged-in {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac !important;
}

/* Ranking Section */
.prompts-ranking {
  margin-bottom: 2.5rem;
  padding: 1.5rem 2rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.03);
  backdrop-filter: blur(12px);
}

.ranking-header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.ranking-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #c4b5fd;
  margin-bottom: 0;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ranking-row {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  text-align: center;
}

.ranking-row-meta {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.ranking-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
  font-size: 0.85rem;
}

/* Use count badge on prompt cards */
.prompt-card-uses {
  font-size: 0.7rem;
  color: #fb923c;
  font-weight: 500;
}
