/* ===== Prompts gallery & admin ===== */
.prompts-page {
  min-height: 100vh;
  padding: 6rem 1.5rem 4rem;
}

.prompts-page .container {
  max-width: 1100px;
  margin: 0 auto;
}

.prompts-crumb {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.prompts-crumb a {
  color: var(--accent-light);
  text-decoration: none;
}

.prompts-crumb a:hover {
  text-decoration: underline;
}

.prompts-header {
  margin-bottom: 2.5rem;
}

.prompts-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.prompts-header p {
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.prompt-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.prompt-card-image {
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
  cursor: zoom-in;
  border: none;
  padding: 0;
  width: 100%;
  display: block;
}

.prompt-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prompt-card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.prompt-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.prompt-card-tool {
  font-size: 0.78rem;
  color: var(--accent-light);
  background: rgba(124, 124, 255, 0.12);
  border: 1px solid var(--accent-dim);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  align-self: flex-start;
}

.prompt-card-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.prompt-btn {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.prompt-btn:hover {
  border-color: var(--accent-dim);
  color: var(--accent-light);
}

.prompt-btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a5ae0);
  border-color: transparent;
  color: #fff;
  flex: 1;
}

.prompt-btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.prompts-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.prompt-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 10000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.2, 1);
  pointer-events: none;
}

.prompt-toast.show {
  transform: translateX(-50%) translateY(0);
}

.prompt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.prompt-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.prompt-lightbox img {
  max-width: min(92vw, 900px);
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.prompt-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

[dir="ltr"] .prompt-lightbox-close {
  right: auto;
  left: 1rem;
}

/* ===== Admin ===== */
.admin-page {
  min-height: 100vh;
  padding: 2rem 1.5rem 4rem;
}

.admin-page .container {
  max-width: 960px;
  margin: 0 auto;
}

.admin-login {
  max-width: 380px;
  margin: 4rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.admin-login h1 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.admin-login p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.admin-field label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.admin-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.admin-toolbar h1 {
  font-size: 1.4rem;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.admin-preview {
  margin-top: 0.75rem;
  max-width: 280px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-item-thumb {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
}

.admin-item-info {
  flex: 1;
  min-width: 0;
}

.admin-item-info strong {
  display: block;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-info span {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.admin-item-actions button {
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}

.admin-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.65rem 0.85rem;
  background: rgba(124, 124, 255, 0.08);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.admin-status.error {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

.admin-status.success {
  color: var(--accent-cyan);
  border-color: rgba(110, 231, 224, 0.35);
  background: rgba(110, 231, 224, 0.08);
}

.admin-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.admin-file-input {
  font-size: 0.88rem;
  color: var(--text-muted);
}
