/* Prompt catalog screen. Loaded after hero styles. */
body[data-active-panel="library"] {
  min-height: 100vh;
  overflow: auto;
  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-active-panel="library"] .hero-carousel {
  display: none;
}

body[data-active-panel="library"] .panel-stage {
  min-height: 100vh;
  margin: 0;
}

body[data-active-panel="library"] .site-header {
  top: 22px;
  right: 28px;
  left: 28px;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 18px;
}

body[data-active-panel="library"] .site-header::before {
  content: "AI-анимация на Syntx";
}

body[data-active-panel="library"] .main-menu-bar {
  grid-column: auto;
  justify-self: center;
  width: auto;
  min-width: min(710px, 54vw);
  height: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 22px 70px rgba(31, 56, 83, 0.16);
}

body[data-active-panel="library"] .main-menu-link {
  min-width: 128px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 13px;
  font-size: 15px;
  color: #50586b;
}

body[data-active-panel="library"] .main-menu-link[data-panel-target="home"] {
  position: relative;
  top: auto;
  left: auto;
  z-index: auto;
  width: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-active-panel="library"] .auth-button {
  grid-column: auto;
  justify-self: end;
  width: auto;
  min-width: 174px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.prompt-catalog-page {
  position: relative;
  min-height: 100vh;
  padding: 112px 4.5vw 34px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  overflow: hidden;
}

.prompt-catalog-page::before {
  content: "PROMPTS";
  position: fixed;
  z-index: 0;
  top: 88px;
  left: 4vw;
  color: rgba(255, 255, 255, 0.78);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(116px, 17vw, 245px);
  line-height: 0.8;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 20px 60px rgba(35, 39, 54, 0.07);
}

.prompt-catalog-side,
.prompt-catalog-shell {
  position: relative;
  z-index: 2;
}

.prompt-catalog-side {
  min-height: 0;
  padding-top: 34px;
  display: flex;
  flex-direction: column;
}

.prompt-kicker {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(207, 255, 91, 0.88);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.prompt-catalog-side h1 {
  margin: 16px 0 14px;
  font-size: clamp(52px, 5.2vw, 78px);
  line-height: 0.96;
}

.prompt-catalog-lead {
  margin: 0 0 22px;
  color: #586174;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 650;
}

.prompt-filters {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 26px 70px rgba(62, 66, 86, 0.12);
  backdrop-filter: blur(24px);
}

.prompt-filters h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.prompt-search {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(25, 25, 35, 0.08);
  border-radius: 14px;
  background: #fff;
  color: #303746;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.prompt-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.prompt-filter,
.prompt-page-button {
  border: 1px solid rgba(25, 25, 35, 0.08);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.prompt-filter {
  padding: 9px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #465064;
  font-size: 12px;
}

.prompt-filter.is-active {
  color: #fff;
  background: #191923;
}

.prompt-catalog-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 30px 90px rgba(62, 66, 86, 0.15);
  backdrop-filter: blur(28px);
}

.prompt-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 16px;
}

.prompt-catalog-head h2 {
  margin: 0;
  font-size: 26px;
}

.prompt-catalog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5c6375;
  font-size: 12px;
  font-weight: 900;
}

.prompt-sort {
  height: 39px;
  padding: 0 12px;
  border: 1px solid rgba(25, 25, 35, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: #465064;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.prompt-grid {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.prompt-card {
  min-height: 228px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(40, 45, 66, 0.08);
}

.prompt-thumb {
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 85, 119, 0.18), rgba(68, 214, 255, 0.25), rgba(123, 85, 255, 0.16));
}

.prompt-thumb img {
  width: 88%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(25, 25, 35, 0.16));
}

.prompt-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prompt-tag {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(207, 255, 91, 0.64);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.prompt-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.15;
}

.prompt-card p {
  margin: 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 650;
}

.prompt-card-actions {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.prompt-detail-button,
.prompt-admin-button {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  background: #191923;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.prompt-admin-button {
  border: 1px solid rgba(25, 25, 35, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(255, 255, 255, 0.92);
}

.prompt-admin-button.is-danger {
  color: #b43648;
}

.prompt-empty {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #586174;
  font-weight: 800;
  text-align: center;
}

.prompt-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 14px;
  color: #5b6274;
  font-size: 12px;
  font-weight: 900;
}

.prompt-page-button {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #5b6274;
}

.prompt-page-button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff527d, #8659ff);
}

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

@media (max-width: 920px) {
  body[data-active-panel="library"] .site-header {
    top: 12px;
    right: 12px;
    left: 12px;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body[data-active-panel="library"] .main-menu-bar {
    display: none;
  }

  body[data-active-panel="library"] .main-menu-link {
    min-height: 38px;
    padding: 0 10px;
    font-size: 10px;
    line-height: 1.05;
  }

  body[data-active-panel="library"] .main-menu-link[data-panel-target="home"] {
    position: relative;
  }

  body[data-active-panel="library"] .auth-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: auto;
    min-width: 156px;
    min-height: 49px;
    font-size: 15px;
  }

  .prompt-catalog-page {
    min-height: 100vh;
    padding: 178px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
  }

  .prompt-catalog-page::before {
    top: 204px;
    left: 18px;
    font-size: 76px;
  }

  .prompt-catalog-side {
    display: block;
    padding-top: 0;
  }

  .prompt-kicker {
    padding: 7px 11px;
    font-size: 10px;
  }

  .prompt-catalog-side h1 {
    max-width: 300px;
    margin: 12px 0 8px;
    font-size: 35px;
  }

  .prompt-catalog-lead {
    max-width: 330px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.36;
  }

  .prompt-filters {
    padding: 10px;
    border-radius: 18px;
  }

  .prompt-filters h2 {
    display: none;
  }

  .prompt-search {
    height: 40px;
    border-radius: 12px;
    font-size: 11px;
  }

  .prompt-filter-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 8px;
    gap: 6px;
    scrollbar-width: none;
  }

  .prompt-filter-list::-webkit-scrollbar {
    display: none;
  }

  .prompt-filter {
    flex: 0 0 auto;
    padding: 7px 9px;
    font-size: 10px;
  }

  .prompt-catalog-shell {
    min-height: 0;
    flex: 1;
    padding: 10px;
    border-radius: 20px;
  }

  .prompt-catalog-head {
    padding: 2px 2px 10px;
  }

  .prompt-catalog-head h2 {
    font-size: 17px;
  }

  .prompt-catalog-meta {
    font-size: 9px;
  }

  .prompt-sort {
    display: none;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 420px;
    overflow: hidden;
  }

  .prompt-card {
    min-height: 118px;
    display: grid;
    grid-template-columns: 94px 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 6px 10px;
    padding: 8px;
  }

  .prompt-thumb {
    grid-row: 1 / 5;
    height: 102px;
  }

  .prompt-tag-row {
    gap: 4px;
  }

  .prompt-tag {
    padding: 3px 6px;
    font-size: 8px;
  }

  .prompt-card h3 {
    font-size: 12px;
  }

  .prompt-card p {
    font-size: 9px;
    line-height: 1.22;
  }

  .prompt-card-actions {
    grid-column: 2;
  }

  .prompt-detail-button,
  .prompt-admin-button {
    min-height: 29px;
    font-size: 10px;
    border-radius: 9px;
  }

  .prompt-pager {
    padding-top: 8px;
    font-size: 10px;
  }

  .prompt-page-button {
    min-width: 26px;
    height: 26px;
  }
}

/* Keep the top menu identical to the home/courses hero on the prompt page. */
body[data-active-panel="library"] .site-header {
  position: fixed;
  top: 22px;
  right: 28px;
  left: 28px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

body[data-active-panel="library"] .site-header::before {
  content: "AI-анимация на Syntx";
  justify-self: start;
  color: #191923;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
  line-height: 1.1;
  text-transform: uppercase;
}

body[data-active-panel="library"] .main-menu-bar {
  justify-self: center;
  width: auto;
  min-width: min(710px, 54vw);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 22px 70px rgba(31, 56, 83, 0.16);
  backdrop-filter: blur(18px) saturate(1.15);
}

body[data-active-panel="library"] .main-menu-link {
  min-width: 128px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 13px;
  color: rgba(18, 23, 34, 0.76);
  font-size: 15px;
  font-weight: 900;
}

body[data-active-panel="library"] .main-menu-link[data-panel-target="home"] {
  position: relative;
  top: auto;
  left: auto;
  z-index: auto;
  width: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-active-panel="library"] .main-menu-link[data-panel-target="home"]::before {
  display: none;
}

body[data-active-panel="library"] .main-menu-link.is-active,
body[data-active-panel="library"] .main-menu-link.is-active:not(.main-menu-order) {
  background: rgba(255, 255, 255, 0.58);
  color: #151822;
  box-shadow: inset 0 -3px 0 #6858ff;
}

body[data-active-panel="library"] .main-menu-order,
body[data-active-panel="library"] .main-menu-order.is-active,
body[data-active-panel="library"] .main-menu-order:hover {
  color: #fff;
  background: linear-gradient(135deg, #f4577e, #8759f4);
  box-shadow: 0 20px 48px rgba(164, 78, 215, 0.36);
}

body[data-active-panel="library"] .auth-button {
  justify-self: end;
  min-width: 174px;
  min-height: 58px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.38);
  color: rgba(18, 23, 34, 0.78);
  font-size: 15px;
  box-shadow: none;
  backdrop-filter: blur(18px);
}

@media (max-width: 800px) {
  body[data-active-panel="library"] .site-header {
    top: 22px;
    right: 16px;
    left: 16px;
    grid-template-columns: 1fr auto;
  }

  body[data-active-panel="library"] .site-header::before {
    max-width: 150px;
    font-size: 12px;
    line-height: 1.2;
  }

  body[data-active-panel="library"] .main-menu-bar {
    display: none;
  }

  body[data-active-panel="library"] .auth-button {
    min-width: 156px;
    min-height: 49px;
    padding: 0 16px;
    font-size: 15px;
  }
}
