/* Explore — community discovery feed (studio marketing surface) */

.ms-explore-page {
  position: relative;
  z-index: 1;
  min-height: 50vh;
  padding-bottom: 72px;
}

.ms-explore-toolbar {
  position: sticky;
  top: 56px;
  z-index: 40;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  padding: 14px 0 16px;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.97) 0%, rgba(10, 10, 14, 0.88) 70%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ms-explore-toolbar__inner {
  max-width: min(1400px, 100% - 32px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ms-explore-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.ms-explore-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 560px;
}

.ms-explore-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  pointer-events: none;
}

.ms-explore-search__input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text, #fff);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ms-explore-search__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.ms-explore-search__input:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.ms-explore-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ms-explore-filter-group--sort {
  flex: 0 0 160px;
}

.ms-explore-filter-group--model {
  flex: 0 0 200px;
}

.ms-explore-filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.ms-explore-filter-select {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.12);
  background: rgba(6, 10, 14, 0.85);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ms-explore-filter-select:focus {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.ms-explore-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-explore-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ms-explore-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ms-explore-tab.is-active {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.12);
  color: #fff;
}

.ms-explore-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ms-explore-results-count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.ms-explore-body {
  max-width: min(1400px, 100% - 32px);
  margin: 20px auto 0;
}

.ms-explore-masonry {
  column-count: 5;
  column-gap: 14px;
}

@media (max-width: 1200px) {
  .ms-explore-masonry {
    column-count: 4;
  }
}

@media (max-width: 900px) {
  .ms-explore-masonry {
    column-count: 3;
  }
}

@media (max-width: 640px) {
  .ms-explore-masonry {
    column-count: 2;
  }

  .ms-explore-toolbar {
    top: 52px;
  }

  .ms-explore-filter-group--sort,
  .ms-explore-filter-group--model {
    flex: 1 1 140px;
  }
}

@media (max-width: 400px) {
  .ms-explore-masonry {
    column-count: 1;
  }
}

.ms-explore-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.35;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.ms-explore-card:focus {
  outline: 2px solid rgba(0, 212, 255, 0.6);
  outline-offset: 2px;
}

.ms-explore-card:hover,
.ms-explore-card:focus-visible {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 212, 255, 0.15);
}

.ms-explore-card--video-poster .ms-explore-card__thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 54% 50%;
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 1;
}

.ms-explore-card__thumb-wrap {
  position: relative;
  display: block;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.04);
}

.ms-explore-card__thumb,
.ms-explore-card__video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
}

.ms-explore-card__video {
  min-height: 180px;
  max-height: 420px;
}

.ms-explore-card__audio-wrap {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.02) 100%);
}

.ms-explore-card__grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 6, 10, 0.55) 70%, rgba(6, 6, 10, 0.92) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ms-explore-card__hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 6, 10, 0.5) 45%, rgba(6, 6, 10, 0.92) 100%);
  font-size: 11px;
  line-height: 1.35;
}

.ms-explore-card:hover .ms-explore-card__hover,
.ms-explore-card:focus-visible .ms-explore-card__hover {
  opacity: 1;
}

.ms-explore-card:hover .ms-explore-card__grad,
.ms-explore-card:focus-visible .ms-explore-card__grad {
  opacity: 0.65;
}

.ms-explore-card__creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ms-explore-card__avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.ms-explore-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(0, 212, 255, 0.9);
}

.ms-explore-card__username {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-explore-card__prompt {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-explore-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ms-explore-card__model {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.9);
}

.ms-explore-card__view {
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.ms-explore-card__view:hover {
  background: rgba(0, 212, 255, 0.35);
}

.ms-explore-card__type {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.2;
}

.ms-explore-card__type--video {
  color: #f87171;
}

.ms-explore-card__type--image {
  color: #c4b5fd;
}

.ms-explore-card__type--audio {
  color: #fb923c;
}

.ms-explore-card__stats {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 5px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.ms-explore-card__stat {
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

/* Compact inline audio player inside cards */
.ms-explore-card__audio-wrap.mediasnap-audio-player--inline {
  padding: 12px;
  gap: 10px;
  max-width: 100%;
  border: none;
  box-shadow: none;
  background: transparent;
}

.ms-explore-card__audio-wrap .mediasnap-audio-player__title {
  font-size: 11px;
  line-height: 1.3;
}

.ms-explore-card__audio-wrap .mediasnap-audio-player__btn {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.ms-explore-card__audio-wrap .mediasnap-audio-player__time {
  font-size: 10px;
}

.ms-explore-sentinel {
  height: 4px;
  margin-top: 24px;
}

.ms-explore-loading-more {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.ms-explore-loading-more.is-visible {
  display: flex;
}

.ms-explore-empty {
  text-align: center;
  padding: 80px 24px;
  border-radius: 22px;
  border: 1px solid rgba(0, 255, 255, 0.08);
  background: rgba(10, 12, 16, 0.75);
  max-width: 420px;
  margin: 32px auto;
}

.ms-explore-empty__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  color: rgba(0, 212, 255, 0.6);
}

.ms-explore-empty__title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 10px;
}

.ms-explore-empty__text {
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
}

.ms-explore-skeleton {
  column-count: 5;
  column-gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .ms-explore-skeleton { column-count: 4; }
}

@media (max-width: 900px) {
  .ms-explore-skeleton { column-count: 3; }
}

@media (max-width: 640px) {
  .ms-explore-skeleton { column-count: 2; }
}

@media (max-width: 400px) {
  .ms-explore-skeleton { column-count: 1; }
}

.ms-explore-skel-item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 14px;
  height: 200px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.05) 100%);
  background-size: 200% 100%;
  animation: ms-explore-skel 1.2s ease-in-out infinite;
}

.ms-explore-skel-item:nth-child(3n) { height: 260px; }
.ms-explore-skel-item:nth-child(5n) { height: 160px; }

@keyframes ms-explore-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.ms-explore-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ms-explore-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.ms-explore-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.ms-explore-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  max-height: min(92vh, 900px);
  overflow: auto;
  border-radius: 18px;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.ms-explore-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.ms-explore-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ms-explore-modal__media {
  position: relative;
  background: #0a0a0e;
  min-height: 200px;
}

.ms-explore-modal__media img,
.ms-explore-modal__media video {
  display: block;
  width: 100%;
  max-height: min(56vh, 520px);
  object-fit: contain;
}

.ms-explore-modal__meta {
  padding: 20px 22px 24px;
}

.ms-explore-modal__creator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ms-explore-modal__creator-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.ms-explore-modal__model {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.95);
  margin-bottom: 8px;
}

.ms-explore-modal__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ms-explore-modal__prompt {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.ms-explore-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ms-explore-modal__actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 140px;
}

.ms-explore-tag-header {
  max-width: min(1400px, 100% - 32px);
  margin: 0 auto 16px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 255, 0.1);
  background: rgba(10, 12, 16, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .ms-explore-card,
  .ms-explore-card__hover,
  .ms-explore-card__grad {
    transition: none;
  }

  .ms-explore-card:hover,
  .ms-explore-card:focus-visible {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }

  .ms-explore-skel-item {
    animation: none;
    background: rgba(255, 255, 255, 0.06);
  }
}
