body[data-page="prompt-detail"] {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 46%, rgba(255, 255, 255, 0.5), transparent 22%),
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(135deg, #6eb5ff 0%, #86c2ff 50%, #6eb5ff 100%);
}

body[data-page="prompt-detail"] .site-header::before {
  content: "AI-анимация";
  color: rgba(18, 23, 34, 0.82);
}

.prompt-detail-page {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 116px clamp(18px, 5vw, 72px) 72px;
}

.prompt-back-button {
  min-height: 42px;
  margin: 0 0 22px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  font-weight: 900;
  box-shadow: 0 16px 42px rgba(31, 56, 83, 0.1);
  backdrop-filter: blur(16px);
}

.prompt-detail-hero,
.prompt-section,
.prompt-main-card,
.prompt-side-card {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 24px 70px rgba(40, 45, 66, 0.09);
  backdrop-filter: blur(22px);
}

.prompt-detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1.18fr);
  gap: clamp(20px, 3.4vw, 42px);
  align-items: stretch;
  padding: clamp(16px, 2.2vw, 26px);
}

.prompt-detail-cover {
  position: relative;
  min-height: 430px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(16, 17, 25, 0.2)),
    var(--cover-gradient, linear-gradient(135deg, rgba(244, 87, 126, 0.28), rgba(124, 92, 255, 0.22))),
    var(
      --prompt-cover,
      radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.82), transparent 20%),
      radial-gradient(circle at 74% 32%, rgba(215, 255, 89, 0.38), transparent 21%),
      linear-gradient(135deg, #8fcfff, #f7e5ee 52%, #7c5cff)
    );
  background-position: center;
  background-size: auto, auto, cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  overflow: hidden;
}

.prompt-detail-cover::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  pointer-events: none;
}

.prompt-detail-cover::after {
  content: attr(data-cover-label);
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #171821;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.prompt-detail-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(8px, 1.5vw, 18px) 0;
}

.prompt-detail-intro h1 {
  max-width: 15ch;
  margin: 0 0 18px;
  font-size: clamp(40px, 4.4vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

.prompt-detail-intro > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.55;
}

.prompt-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.prompt-section {
  margin-top: 22px;
  padding: clamp(20px, 3vw, 34px);
}

.prompt-section h2,
.prompt-main-card h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
}

.prompt-guide-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.prompt-guide-grid article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(16, 17, 25, 0.08);
  border-radius: 12px;
  background:
    radial-gradient(circle at 84% 12%, rgba(24, 200, 223, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.72);
}

.prompt-guide-grid span {
  display: block;
  margin-bottom: 18px;
  color: #ff5475;
  font-size: 18px;
  font-weight: 950;
}

.prompt-guide-grid h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.15;
}

.prompt-guide-grid p,
.prompt-tips p,
.prompt-steps li,
.prompt-side-card dd {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.prompt-steps ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prompt-steps li {
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(16, 17, 25, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.prompt-steps li strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 16px;
}

.prompt-steps li span {
  display: block;
}

.prompt-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
  margin-top: 22px;
}

.prompt-main-card,
.prompt-side-card {
  padding: clamp(20px, 3vw, 34px);
}

body[data-page="prompt-detail"] .prompt-box {
  display: block;
  max-height: 520px;
  margin: 0 0 14px;
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(16, 17, 25, 0.08);
  border-radius: 12px;
  background: rgba(247, 250, 252, 0.92);
  color: #191923;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body[data-page="prompt-detail"] .section-shell {
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 48px rgba(40, 45, 66, 0.08);
  backdrop-filter: blur(18px);
}

body[data-page="prompt-detail"] .section-shell h2 {
  margin-top: 0;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.1;
}

body[data-page="prompt-detail"] .prompt-text {
  max-height: 500px;
  overflow: auto;
  background: rgba(247, 250, 252, 0.94);
  color: #191923;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prompt-side-card dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.prompt-side-card dt {
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 950;
}

.prompt-side-card dd {
  margin: 0;
}

.prompt-empty-state {
  max-width: 760px;
  margin: 140px auto 0;
  padding: 28px;
  text-align: center;
}

.prompt-edit-card textarea {
  min-height: 96px;
}

.prompt-edit-card [name="prompt"] {
  min-height: 180px;
}

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

  .prompt-detail-hero,
  .prompt-detail-layout {
    grid-template-columns: 1fr;
  }

  .prompt-detail-cover {
    min-height: 360px;
  }
}

@media (max-width: 800px) {
  .prompt-detail-page {
    padding: 96px 14px 42px;
  }

  .prompt-back-button {
    width: 100%;
  }

  .prompt-detail-hero,
  .prompt-section,
  .prompt-main-card,
  .prompt-side-card {
    border-radius: 16px;
  }

  .prompt-detail-cover {
    min-height: 250px;
  }

  .prompt-detail-intro h1 {
    max-width: 14ch;
    font-size: clamp(34px, 9.6vw, 42px);
    line-height: 1.04;
  }

  .prompt-guide-grid,
  .prompt-steps ol {
    grid-template-columns: 1fr;
  }

  .prompt-guide-grid article,
  .prompt-steps li {
    min-height: 0;
  }

  .prompt-detail-actions .button,
  .prompt-detail-actions .cover-upload,
  .prompt-detail-actions .admin-card-button {
    width: 100%;
  }
}
