/*
Theme Name: OM Editing Top
Theme URI: https://omeditingtop.in
Author: OM Editing Top
Author URI: https://omeditingtop.in
Description: A fast, SEO-friendly AI prompt gallery theme. Browse prompts by category and AI tool, copy prompts, save images, comment, and chat in the community.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prompt-gallery
*/

/* ---------- Base / reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.site-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}
.main-nav a:hover { color: #000; }
.btn-join {
  background: #000;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; }

/* ---------- Search ---------- */
.search-bar {
  border-bottom: 1px solid #eee;
  padding: 16px 0;
}
.search-bar form {
  display: flex;
  align-items: center;
  background: #f2f2f2;
  border-radius: 12px;
  padding: 12px 18px;
}
.search-bar input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  width: 100%;
  margin-left: 10px;
}

/* ---------- Filter chips ---------- */
.filters {
  padding: 18px 0 8px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.chip {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.chip:hover { border-color: #999; }
.chip.active {
  background: #000;
  color: #fff;
  border-color: #000;
}
.chip.tool { font-weight: 500; }

/* ---------- Gallery grid ---------- */
.gallery {
  padding: 20px 0 60px;
}
.grid {
  columns: 5;          /* laptop/desktop: smaller cards */
  column-gap: 16px;
}
.card {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f3f3;
  display: block;
}
.card img {
  width: 100%;
  height: auto;
  transition: transform .3s ease;
}
.card:hover img { transform: scale(1.04); }
.card .pin {
  position: absolute;
  top: 10px; left: 10px;
  background: #000;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
/* Admin pin/unpin icon (top-right of each card) */
.card .pin-toggle {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 6;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: .5;
  filter: grayscale(1);
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.card .pin-toggle:hover { transform: scale(1.12); opacity: 1; }
.card .pin-toggle.pinned {
  opacity: 1;
  filter: none;
  background: #e0245e;
}
/* Community board header */
.community-wrap { padding: 24px 0 60px; }
.community-head { text-align: center; margin-bottom: 18px; }
.community-head h1 { margin: 8px 0 6px; }
.community-head p { color: #555; line-height: 1.7; }
.card .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .25s;
}
.card:hover .overlay { opacity: 1; }
.card .overlay .lock-emoji { font-size: 30px; }

/* Lock badge (top-right) shown on every card */
.card .lock-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  backdrop-filter: blur(2px);
}

.no-prompts {
  text-align: center;
  padding: 80px 20px;
  color: #888;
}

/* Pagination */
.pg-pagination ul,
.pagination .nav-links,
.comments-area .navigation .nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 30px 0 0;
  margin: 0;
  flex-wrap: wrap;
}
.page-numbers {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 600;
}
.page-numbers.current { background: #000; color: #fff; border-color: #000; }
.page-numbers:hover { border-color: #999; }

/* ---------- Single prompt ---------- */
.single-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}
.back-link {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
}
.single-image {
  background: #f2f2f2;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
}
.single-image img { margin: 0 auto; max-height: 70vh; width: auto; }
.single-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  font-size: 14px;
  color: #666;
}
.tool-badge {
  background: #eee;
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 600;
  color: #333;
}
.single-title {
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0 18px;
}
.prompt-box {
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  color: #5a4a2a;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.action-row {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}
.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid #000;
  transition: opacity .2s;
}
.btn-primary { background: #000; color: #fff; }
.btn-outline { background: #fff; color: #000; }
.btn:hover { opacity: .85; }
.btn.copied { background: #1a8917; border-color: #1a8917; color: #fff; }

/* ---------- Comments ---------- */
.comments-area {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.comments-title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.comment-form {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.comment-form label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
  font-family: inherit;
}
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-form .form-submit { margin: 0; }
.comment-form .form-submit input,
.comment-form input#submit {
  background: #000;
  color: #fff;
  border: 0;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.commentlist { list-style: none; padding: 0; margin: 0; }
.commentlist li { display: flex; gap: 12px; margin-bottom: 22px; }
.comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #d6336c;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.comment-body .author { font-weight: 700; }
.comment-body .date { color: #888; font-size: 13px; }
.comment-body .text { margin-top: 4px; }
.commentlist .children { list-style: none; padding-left: 52px; margin-top: 18px; }

/* ---------- Community page ---------- */
.community-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}
.community-header h1 { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.community-header p { color: #666; margin: 0 0 22px; }
.community-intro {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
/* Reuse comment styles, just remove side padding wrapper */
.community-board .comments-area { padding: 0; }

/* Coming soon */
.coming-soon {
  text-align: center;
  padding: 60px 20px;
}
.coming-soon-icon { font-size: 56px; margin-bottom: 10px; }
.coming-soon h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; }
.coming-soon h2 { font-size: 22px; color: #d6336c; margin: 0 0 20px; }
.coming-soon p { color: #555; max-width: 480px; margin: 0 auto 14px; line-height: 1.7; }
.coming-soon p a { color: #000; font-weight: 700; text-decoration: underline; }
.coming-soon-btn { display: inline-flex; max-width: 240px; margin: 24px auto 0; }

/* ---------- Static page (Privacy / Terms / Connect) ---------- */
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}
.page-wrap h1 { font-size: 28px; font-weight: 800; margin: 0 0 18px; }
.page-wrap h2 { font-size: 20px; font-weight: 700; margin: 26px 0 10px; }
.page-wrap p, .page-wrap li { color: #333; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #eee;
  padding: 30px 0;
  text-align: center;
  color: #888;
  font-size: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-bottom: 14px;
}
.footer-links a { color: #555; font-weight: 600; }
.footer-links a:hover { color: #000; }
.footer-copy { color: #999; }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 4px 0;
  color: #888;
  font-size: 12px;
  font-weight: 600;
}
.bn-item.active { color: #000; }
.bn-icon { font-size: 20px; line-height: 1; }
.bn-label { font-size: 12px; }

/* Space at page bottom so the fixed nav never hides content */
body { padding-bottom: 64px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #000; color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .grid { columns: 4; }   /* small laptop */
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .grid { columns: 3; }   /* tablet */
}
@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .grid { columns: 2; column-gap: 10px; }   /* mobile */
  .card { margin-bottom: 10px; }
  .action-row { flex-direction: column; }
  .single-title { font-size: 22px; }
}
