/* Community — creator spotlight page */

body.ms-page-community-marketing {
  --ms-comm-fg: rgba(255, 255, 255, 0.95);
  --ms-comm-fg-strong: #fff;
  --ms-comm-muted: rgba(255, 255, 255, 0.72);
  --ms-comm-muted-2: rgba(255, 255, 255, 0.45);
  --ms-comm-muted-3: rgba(255, 255, 255, 0.62);
  --ms-comm-border: rgba(255, 255, 255, 0.08);
  --ms-comm-border-2: rgba(255, 255, 255, 0.1);
  --ms-comm-border-3: rgba(255, 255, 255, 0.06);
  --ms-comm-toolbar-bg: linear-gradient(180deg, rgba(10, 10, 14, 0.97) 0%, rgba(10, 10, 14, 0.88) 70%, transparent 100%);
  --ms-comm-input-bg: rgba(0, 0, 0, 0.35);
  --ms-comm-tab-bg: rgba(255, 255, 255, 0.04);
  --ms-comm-tab-bg-hover: rgba(255, 255, 255, 0.08);
  --ms-comm-card-bg: linear-gradient(160deg, rgba(24, 24, 32, 0.92) 0%, rgba(12, 12, 18, 0.96) 100%);
  --ms-comm-card-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --ms-comm-card-hover-shadow: 0 20px 50px rgba(124, 58, 237, 0.18);
  --ms-comm-media-bg: #0a0a10;
  --ms-comm-avatar-fallback-bg: rgba(255, 255, 255, 0.08);
  --ms-comm-avatar-fallback-fg: rgba(255, 255, 255, 0.6);
  --ms-comm-link-hover: #c4b5fd;
  --ms-comm-cta-text: rgba(255, 255, 255, 0.65);
  --ms-comm-cta-border: rgba(255, 255, 255, 0.06);
  --ms-comm-cta-bg:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.18), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  --ms-comm-search-icon: rgba(255, 255, 255, 0.35);
  --ms-comm-cta-title-gradient: linear-gradient(90deg, #fff, #c4b5fd 50%, #f9a8d4);
  --ms-comm-empty-title: #fff;
}

html[data-theme="light"] body.ms-page-community-marketing,
body.light-mode.ms-page-community-marketing {
  --ms-comm-fg: rgba(15, 23, 42, 0.92);
  --ms-comm-fg-strong: #0f172a;
  --ms-comm-muted: rgba(15, 23, 42, 0.68);
  --ms-comm-muted-2: rgba(15, 23, 42, 0.52);
  --ms-comm-muted-3: rgba(15, 23, 42, 0.62);
  --ms-comm-border: rgba(15, 23, 42, 0.1);
  --ms-comm-border-2: rgba(15, 23, 42, 0.12);
  --ms-comm-border-3: rgba(15, 23, 42, 0.08);
  --ms-comm-toolbar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 241, 245, 0.94) 70%, transparent 100%);
  --ms-comm-input-bg: rgba(255, 255, 255, 0.98);
  --ms-comm-tab-bg: rgba(15, 23, 42, 0.04);
  --ms-comm-tab-bg-hover: rgba(15, 23, 42, 0.07);
  --ms-comm-card-bg: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  --ms-comm-card-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --ms-comm-card-hover-shadow: 0 20px 40px rgba(124, 58, 237, 0.12);
  --ms-comm-media-bg: #e2e8f0;
  --ms-comm-avatar-fallback-bg: rgba(15, 23, 42, 0.08);
  --ms-comm-avatar-fallback-fg: rgba(15, 23, 42, 0.55);
  --ms-comm-link-hover: #7c3aed;
  --ms-comm-cta-text: rgba(15, 23, 42, 0.65);
  --ms-comm-cta-border: rgba(15, 23, 42, 0.08);
  --ms-comm-cta-bg:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.08), transparent 65%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), transparent);
  --ms-comm-search-icon: rgba(15, 23, 42, 0.4);
  --ms-comm-cta-title-gradient: linear-gradient(90deg, #0f172a, #7c3aed 50%, #db2777);
  --ms-comm-empty-title: #0f172a;
}

html[data-theme="light"] body.ms-page-community-marketing.ms-landing-generator-body,
body.light-mode.ms-page-community-marketing.ms-landing-generator-body {
  background: #f0f1f5;
  color: var(--ms-comm-fg-strong);
}

html[data-theme="light"] body.ms-page-community-marketing .ms-studio-page,
body.light-mode.ms-page-community-marketing .ms-studio-page {
  background: transparent;
}

html[data-theme="light"] body.ms-page-community-marketing .ms-studio-page::before,
html[data-theme="light"] body.ms-page-community-marketing .ms-studio-page::after,
body.light-mode.ms-page-community-marketing .ms-studio-page::before,
body.light-mode.ms-page-community-marketing .ms-studio-page::after {
  display: none;
}

.ms-community-page {
  position: relative;
  z-index: 1;
  min-height: 50vh;
  padding-bottom: 48px;
}

.ms-community-toolbar {
  position: sticky;
  top: 56px;
  z-index: 40;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  padding: 12px 0 18px;
  background: var(--ms-comm-toolbar-bg);
  border-bottom: 1px solid var(--ms-comm-border-3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ms-community-toolbar__inner {
  max-width: min(1400px, 100% - 32px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ms-community-search {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  max-width: 520px;
}

.ms-community-search__icon {
  position: absolute;
  left: 14px;
  color: var(--ms-comm-search-icon);
  font-size: 0.9rem;
  pointer-events: none;
}

.ms-community-search__input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  border: 1px solid var(--ms-comm-border-2);
  background: var(--ms-comm-input-bg);
  color: var(--ms-comm-fg-strong);
  font-family: inherit;
  font-size: 0.9375rem;
}

.ms-community-search__input::placeholder {
  color: var(--ms-comm-muted-2);
}

.ms-community-search__input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.ms-community-search__btn {
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(236, 72, 153, 0.25));
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ms-community-search__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.ms-community-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-community-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--ms-comm-border-2);
  background: var(--ms-comm-tab-bg);
  color: var(--ms-comm-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ms-community-tab:hover {
  color: var(--ms-comm-fg-strong);
  border-color: var(--ms-comm-border);
  background: var(--ms-comm-tab-bg-hover);
}

.ms-community-tab.is-active {
  color: var(--ms-comm-fg-strong);
  border-color: rgba(168, 85, 247, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(236, 72, 153, 0.18));
}

.ms-community-grid {
  max-width: min(1400px, 100% - 32px);
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.ms-community-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ms-comm-border);
  background: var(--ms-comm-card-bg);
  box-shadow: var(--ms-comm-card-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ms-community-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: var(--ms-comm-card-hover-shadow);
}

.ms-community-card--wide {
  grid-column: span 2;
}

.ms-community-card--production {
  border-color: rgba(236, 72, 153, 0.22);
}

.ms-community-card--production .ms-community-card__badge {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.85), rgba(124, 58, 237, 0.85));
}

.ms-community-card__media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ms-community-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ms-comm-media-bg);
}

.ms-community-card__video,
.ms-community-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ms-community-card__audio {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(124, 58, 237, 0.35), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(236, 72, 153, 0.25), transparent 50%),
    linear-gradient(145deg, #14101f, #0a0a12);
}

.ms-community-card__audio-icon {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.ms-community-card__audio-waves {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 0 24px 28px;
  opacity: 0.55;
}

.ms-community-card__audio-waves span {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c4b5fd, #f472b6);
  animation: msCommunityWave 1.2s ease-in-out infinite;
}

.ms-community-card__audio-waves span:nth-child(1) { height: 28px; animation-delay: 0s; }
.ms-community-card__audio-waves span:nth-child(2) { height: 44px; animation-delay: 0.15s; }
.ms-community-card__audio-waves span:nth-child(3) { height: 56px; animation-delay: 0.3s; }
.ms-community-card__audio-waves span:nth-child(4) { height: 38px; animation-delay: 0.45s; }
.ms-community-card__audio-waves span:nth-child(5) { height: 24px; animation-delay: 0.6s; }

@keyframes msCommunityWave {
  0%, 100% { transform: scaleY(0.55); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

.ms-community-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.ms-community-card:hover .ms-community-card__shine {
  transform: translateX(120%);
}

.ms-community-card__duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ms-community-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-community-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-community-card__creator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ms-comm-fg);
  width: fit-content;
}

.ms-community-card__creator:hover {
  color: var(--ms-comm-fg-strong);
}

.ms-community-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, 0.35);
}

.ms-community-card__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ms-comm-avatar-fallback-bg);
  color: var(--ms-comm-avatar-fallback-fg);
  font-size: 14px;
}

.ms-community-card__avatar--initials {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ms-community-card__username {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ms-community-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.ms-community-card__title a {
  color: var(--ms-comm-fg);
  text-decoration: none;
}

.ms-community-card__title a:hover {
  color: var(--ms-comm-link-hover);
}

.ms-community-card__meta {
  margin: 0;
  font-size: 0.7rem !important;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ms-comm-muted-2);
}

.ms-community-category-filter {
  margin-top: 10px;
}

.ms-community-category-filter__select {
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 13px;
}

.ms-community-empty {
  position: relative;
  max-width: 560px;
  margin: 64px auto;
  padding: 48px 24px;
  text-align: center;
}

.ms-community-empty__glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2), transparent 70%);
  pointer-events: none;
}

.ms-community-empty__icon {
  font-size: 2.5rem;
  color: #a855f7;
  margin-bottom: 16px;
}

.ms-community-empty__title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ms-comm-empty-title);
}

.ms-community-empty__text {
  margin: 0 0 24px;
  color: var(--ms-comm-muted-3);
  line-height: 1.55;
}

.ms-community-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.ms-community-cta {
  margin: 72px calc(50% - 50vw) 0;
  width: 100vw;
  padding: 56px 24px;
  background: var(--ms-comm-cta-bg);
  border-top: 1px solid var(--ms-comm-cta-border);
}

.ms-community-cta__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.ms-community-cta__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--ms-comm-cta-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ms-community-cta__text {
  margin: 0 0 24px;
  color: var(--ms-comm-cta-text);
  line-height: 1.6;
}

.ms-community-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 900px) {
  .ms-community-card--wide {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .ms-community-search {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .ms-community-search__icon {
    top: 14px;
    transform: none;
  }

  .ms-community-search__btn {
    width: 100%;
  }

  .ms-community-grid {
    grid-template-columns: 1fr;
  }
}
