/* Public creator profiles and Outpost grid */

.hidden { display: none !important; }

.community-page {
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
}

.community-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.community-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.community-hero p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.5;
}

@media (min-width: 900px) {
  .community-hero p {
    white-space: nowrap;
  }
}

.community-search {
  display: flex;
  gap: 0.5rem;
  width: min(22rem, 100%);
}

.community-search input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 15, 30, 0.7);
  color: #f8fafc;
}

.community-search button,
.profile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.outpost-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
}

.outpost-filters button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.outpost-filters button:hover {
  border-color: #818cf8;
  color: #f8fafc;
}

.outpost-filters button.is-on {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.22);
  color: #e0e7ff;
}

.outpost-filters select {
  min-width: 11rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 15, 30, 0.8);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.78rem;
}

.outpost-reuse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #4ade80, #22c55e 55%, #15803d);
  color: #052e16;
  font-weight: 700;
  cursor: pointer;
}

.outpost-reuse:hover {
  filter: brightness(1.06);
}

.outpost-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 0.85rem;
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
  font-weight: 700;
  cursor: pointer;
}

.outpost-remove[hidden] {
  display: none;
}

.outpost-remove:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.45);
}

.outpost-remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.community-status {
  color: #94a3b8;
  margin: 0 0 1rem;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
}

.community-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: #0b1220;
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
}

.community-card img,
.community-card video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.community-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.55rem 0.5rem;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.92));
  font-size: 0.72rem;
  font-weight: 700;
}

.community-card__meta a {
  color: #e2e8f0;
  text-decoration: none;
}

.community-card__meta a:hover {
  color: #c4b5fd;
}

.community-more {
  display: none;
  margin: 1.25rem auto 0;
  padding: 0.7rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.9rem;
  background: transparent;
  color: #cbd5e1;
  font-weight: 700;
  cursor: pointer;
}

.community-more.is-on {
  display: inline-flex;
}

.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.profile-avatar,
.profile-avatar-fallback {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(165, 180, 252, 0.35);
  flex-shrink: 0;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: #1e1b4b;
  color: #c4b5fd;
  font-weight: 800;
  font-size: 1.6rem;
}

.profile-head h1 {
  margin: 0 0 0.2rem;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.profile-realm {
  margin: 0 0 0.55rem;
  color: #a5b4fc;
  font-weight: 700;
}

.profile-bio {
  margin: 0;
  color: #cbd5e1;
  max-width: 38rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-empty,
.community-empty {
  color: #64748b;
  padding: 2.5rem 0;
}

.community-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(2, 6, 23, 0.94);
}

.community-lightbox.open {
  display: flex;
  align-items: stretch;
}

.community-lightbox__layout {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

.community-lightbox .gen-inspect {
  width: 19.25rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden auto;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 20, 0.96);
  padding: 0.9rem 1rem 1rem;
}

.community-lightbox .gen-inspect__title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.community-lightbox .gen-inspect__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.community-lightbox .gen-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.community-lightbox .gen-inspect__prompt-wrap {
  position: relative;
  background: rgba(10, 15, 30, 0.72);
  border: 1px solid rgba(165, 180, 252, 0.16);
  border-radius: 0.9rem;
  padding: 0.7rem 0.75rem 2.15rem;
  margin-bottom: 0.35rem;
}

.community-lightbox .gen-inspect__prompt {
  margin: 0.35rem 0 0;
  max-height: 14rem;
  overflow: auto;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-lightbox .gen-inspect__copy {
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  border: 0;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.community-lightbox .gen-inspect__copy:hover {
  background: rgba(99, 102, 241, 0.32);
  color: #eef2ff;
}

.community-lightbox .gen-inspect__copy[hidden] {
  display: none;
}

.community-lightbox .gen-inspect__rows {
  margin: 0;
  overflow: auto;
  min-height: 0;
}

.community-lightbox .gen-inspect__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.58rem 0.05rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.community-lightbox .gen-inspect__row dt {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.community-lightbox .gen-inspect__row dd {
  margin: 0;
  text-align: right;
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.community-lightbox .gen-inspect__row a {
  color: #c4b5fd;
  text-decoration: none;
}

.community-lightbox .gen-inspect__row a:hover {
  color: #e9d5ff;
}

.community-lightbox__media {
  flex: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.community-lightbox__media img,
.community-lightbox__media video {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 3.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.community-lightbox__close {
  position: absolute;
  top: 0.65rem;
  right: calc(19.25rem + 0.65rem);
  z-index: 2;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 860px) {
  .community-lightbox__layout {
    flex-direction: column;
  }

  .community-lightbox .gen-inspect {
    width: 100%;
    max-height: 42vh;
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
  }

  .community-lightbox__close {
    right: 1rem;
  }

  .community-lightbox__media {
    padding: 3rem 0.75rem 0.75rem;
  }

  .community-lightbox__media img,
  .community-lightbox__media video {
    max-height: 48dvh;
  }

  .community-lightbox .gen-inspect__prompt {
    max-height: 8rem;
  }
}
