.prompt-lib {
  padding-bottom: 4rem;
}

.prompt-hero {
  max-width: 760px;
  margin-bottom: 1.75rem;
}

.prompt-hero h1 {
  margin: 0 0 0.75rem;
  color: #171a18;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.prompt-hero p {
  margin: 0 0 0.6rem;
  color: #4a524a;
  font-size: 1.02rem;
  line-height: 1.75;
}

.prompt-meta {
  color: #6b7a66 !important;
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prompt-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.prompt-cats a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border: 1px solid #d9dcd5;
  border-radius: 3px;
  background: #fbfbf8;
  color: #3f473f;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.prompt-cats a.active,
.prompt-cats a:hover {
  border-color: #8ca67f;
  background: #e7ece3;
  color: #33422f;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.prompt-tile {
  margin: 0;
  background: #fff;
  border: 1px solid #e4e7df;
  border-radius: 4px;
  overflow: hidden;
}

.prompt-tile-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.prompt-tile-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7ece3;
}

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

.prompt-tile-kind {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  z-index: 1;
  padding: 0.22rem 0.5rem;
  border-radius: 2px;
  background: rgba(23, 26, 24, 0.78);
  color: #f4f6f0;
  font-family: var(--font-mono), monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-tile.is-video .prompt-tile-media::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.55rem;
  height: 2.55rem;
  margin: -1.275rem 0 0 -1.275rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(23, 26, 24, 0.55);
  pointer-events: none;
}

.prompt-tile.is-video .prompt-tile-media::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin: -0.48rem 0 0 -0.18rem;
  border-style: solid;
  border-width: 0.48rem 0 0.48rem 0.78rem;
  border-color: transparent transparent transparent #fff;
  pointer-events: none;
}

.prompt-tile.is-resim .prompt-tile-kind { background: rgba(47, 78, 52, 0.86); }
.prompt-tile.is-video .prompt-tile-kind { background: rgba(92, 28, 28, 0.86); }
.prompt-tile.is-icerik .prompt-tile-kind { background: rgba(46, 62, 88, 0.86); }
.prompt-tile.is-kod .prompt-tile-kind { background: rgba(36, 36, 36, 0.88); }

.prompt-tile-body {
  display: block;
  padding: 0.95rem 1rem 1.1rem;
}

.prompt-tile-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: #6b7a66;
  font-family: var(--font-mono), monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-tile-body strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #171a18;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.prompt-tile-summary {
  display: block;
  color: #5e665e;
  font-size: 0.88rem;
  line-height: 1.55;
}

.prompt-tile-open:hover .prompt-tile-body strong {
  color: #4f7047;
}

.prompt-guide {
  max-width: 720px;
  margin-top: 3rem;
}

.prompt-guide h2 {
  margin: 0 0 1rem;
  color: #171a18;
  font-size: 1.4rem;
}

.prompt-guide ol {
  margin: 0;
  padding-left: 1.15rem;
  color: #4a524a;
  line-height: 1.7;
}

.prompt-guide li {
  margin-bottom: 0.65rem;
}

.prompt-modal[hidden] {
  display: none !important;
}

.prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
}

.prompt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 26, 24, 0.55);
}

.prompt-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 2rem));
  max-height: calc(100vh - 3rem);
  margin: 1.5rem auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.prompt-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid #eceee8;
  color: #4a524a;
  font-size: 0.82rem;
}

.prompt-modal-x {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: #171a18;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.prompt-modal-scroll {
  overflow: auto;
  padding: 1.25rem 1.35rem 1.6rem;
}

.prompt-modal-scroll h2 {
  margin: 0 0 0.55rem;
  color: #171a18;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
}

.prompt-modal-scroll > p {
  margin: 0 0 1rem;
  color: #5e665e;
  line-height: 1.65;
}

.prompt-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
  color: #6b7a66;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prompt-share a,
.prompt-share button {
  border: 0;
  background: transparent;
  color: #3f473f;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.prompt-modal-scroll img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.2rem;
  border-radius: 3px;
}

.prompt-modal-copyrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.prompt-modal-copyrow h3 {
  margin: 0;
  font-size: 1rem;
}

.prompt-body {
  margin: 0 0 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 3px;
  background: #151816;
  color: #e8ece4;
  font-family: var(--font-mono), monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.prompt-copy {
  padding: 0.45rem 0.8rem;
  border: 0;
  border-radius: 3px;
  background: #61775b;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.prompt-copy:hover,
.prompt-copy.is-done {
  background: #3d5438;
}

.prompt-models {
  margin: 0 0 1.4rem;
  color: #4f7047;
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.prompt-result-wrap[hidden] {
  display: none !important;
}

.prompt-result-wrap h3 {
  margin: 0 0 0.35rem;
  color: #171a18;
  font-size: 1rem;
}

.prompt-result-note {
  margin: 0 0 0.75rem !important;
  color: #6b7a66;
  font-size: 0.82rem;
  line-height: 1.5;
}

.prompt-result {
  margin: 0;
  padding: 1.05rem 1.1rem;
  border: 1px solid #e6e8e1;
  border-radius: 3px;
  background: #f6f7f3;
  color: #2a2e2a;
  font-family: var(--font-mono), monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 960px) {
  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .prompt-modal-dialog {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
    max-height: calc(100vh - 1rem);
  }
}
