/* ZenithShowcase — shared cinematic community gallery (marketing + app) */

.zsc-root {
  display: block;
}

.zsc-empty {
  color: var(--text-tertiary);
  text-align: center;
  padding: 2rem 0;
}

/* Reveal-on-scroll */
.zsc-reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.zsc-reveal.in {
  opacity: 1;
  transform: none;
}

/* Featured hero */
.zsc-hero {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 16px;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: none;
  cursor: pointer;
  outline: none;
  background: var(--bg-elevated);
}
.zsc-hero .zsc-media-wrap {
  max-height: 560px;
  overflow: hidden;
}
.zsc-hero .zsc-media {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.zsc-hero:hover .zsc-media { transform: scale(1.04); }
.zsc-hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 11, 0.92) 0%, rgba(8, 8, 11, 0.35) 38%, transparent 70%);
  pointer-events: none;
}
.zsc-hero-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.zsc-hero-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.zsc-hero-prompt {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: #fff;
  max-width: 720px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* Masonry grid */
.zsc-masonry {
  column-count: 4;
  column-gap: 14px;
}
.zsc-masonry--stack {
  column-count: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.zsc-masonry--stack .zsc-card {
  margin-bottom: 0;
}
@media (min-width: 1400px) { .zsc-masonry:not(.zsc-masonry--stack) { column-count: 5; } }
@media (max-width: 1100px) { .zsc-masonry:not(.zsc-masonry--stack) { column-count: 3; } }
@media (max-width: 760px) { .zsc-masonry:not(.zsc-masonry--stack) { column-count: 2; } }
@media (max-width: 460px) { .zsc-masonry:not(.zsc-masonry--stack) { column-count: 1; } }

.zsc-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  border: none;
  background: var(--bg-elevated);
  cursor: pointer;
  outline: none;
}
.zsc-card:focus-visible,
.zsc-hero:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.zsc-media-wrap { position: relative; line-height: 0; }
.zsc-card .zsc-media,
.zsc-hero .zsc-media {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.zsc-card .zsc-media { height: auto; }
.zsc-media--pending {
  aspect-ratio: 4 / 5;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(var(--bg-rgb, 8, 8, 11), 0.9), rgba(139, 124, 246, 0.12)),
    var(--bg-elevated);
}
.zsc-hero .zsc-media--pending {
  aspect-ratio: 16 / 10;
  min-height: 220px;
}
.zsc-video-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}
.zsc-card:hover .zsc-media { transform: scale(1.05); }

/* Hover overlay */
.zsc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  background: linear-gradient(to top, rgba(8, 8, 11, 0.88) 0%, rgba(8, 8, 11, 0.15) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.zsc-card:hover .zsc-overlay,
.zsc-card:focus-within .zsc-overlay { opacity: 1; }

.zsc-prompt {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.zsc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.zsc-meta-tags {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

/* Vote controls */
.zsc-vote-pill {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
  pointer-events: auto;
}
.zsc-vote-pill--hero {
  right: 1rem;
  bottom: 1rem;
}
.zsc-vote {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.15rem 0.45rem 0.15rem 0.35rem;
  backdrop-filter: blur(6px);
}
.zsc-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.zsc-vote-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.zsc-up.on { color: var(--accent-teal, #4ecdc4); }
.zsc-vote--seeder {
  border-color: rgba(78, 205, 196, 0.35);
  box-shadow: 0 0 0 1px rgba(78, 205, 196, 0.12);
}
.zsc-vote-score {
  min-width: 1.4rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.zsc-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  backdrop-filter: blur(6px);
}

/* Lightbox */
.zsc-lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.zsc-lb-backdrop { position: absolute; inset: 0; background: var(--scrim-strong); backdrop-filter: blur(6px); }
.zsc-lb-card {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 24px 80px var(--shadow-lg);
}
.zsc-lb-media-wrap {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 70vh;
  overflow: hidden;
}
.zsc-lb-media { max-width: 100%; max-height: 70vh; display: block; }
.zsc-lb-info { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.zsc-lb-prompt { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--text); }
.zsc-lb-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; color: var(--text-tertiary); font-size: 0.75rem; }
.zsc-lb-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.zsc-lb-close {
  position: absolute; top: 0.5rem; right: 0.7rem; z-index: 2;
  background: rgba(0, 0, 0, 0.5); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 999px; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.zsc-lb-close:hover { background: rgba(0, 0, 0, 0.75); }

@media (prefers-reduced-motion: reduce) {
  .zsc-reveal { opacity: 1; transform: none; transition: none; will-change: auto; }
  .zsc-card .zsc-media, .zsc-hero .zsc-media { transition: none; }
}

@media (max-width: 760px) {
  .zsc-reveal { will-change: auto; }
  .zsc-hero .zsc-media-wrap { max-height: 360px; }
  .zsc-hero .zsc-media { max-height: 360px; }
  .zsc-hero-prompt {
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .zsc-hero-body { padding: 1rem 1.1rem; }
}

/* Loading skeleton (marketing deferred fetch) */
.zsc-root--loading .zsc-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.zsc-skeleton-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 360px;
  border-radius: var(--radius-lg, 16px);
  background: linear-gradient(
    110deg,
    var(--bg-elevated) 8%,
    var(--surface, rgba(255, 255, 255, 0.06)) 18%,
    var(--bg-elevated) 33%
  );
  background-size: 200% 100%;
  animation: zsc-shimmer 1.4s ease-in-out infinite;
}
.zsc-skeleton-card {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius, 12px);
  background: linear-gradient(
    110deg,
    var(--bg-elevated) 8%,
    var(--surface, rgba(255, 255, 255, 0.06)) 18%,
    var(--bg-elevated) 33%
  );
  background-size: 200% 100%;
  animation: zsc-shimmer 1.4s ease-in-out infinite;
}
.zsc-skeleton-card:nth-child(3) { animation-delay: 0.15s; }
.zsc-skeleton-card:nth-child(4) { animation-delay: 0.3s; }
.zsc-skeleton-card:nth-child(5) { animation-delay: 0.45s; }
@keyframes zsc-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .zsc-skeleton-hero,
  .zsc-skeleton-card { animation: none; }
}

/* Explore view controls */
.explore-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}
.explore-sort {
  display: inline-flex;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
}
.explore-sort-btn {
  border: none;
  background: none;
  color: var(--text-secondary);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  cursor: pointer;
}
.explore-sort-btn.active { background: var(--accent-muted); color: var(--accent-bright); }
.explore-status { font-size: 0.8125rem; color: var(--text-tertiary); }
.explore-empty { color: var(--text-tertiary); padding: 2rem 0; text-align: center; }
.explore-more { display: flex; justify-content: center; margin-top: 1rem; }

.home-explore-link { color: var(--accent-bright); text-decoration: none; }
.home-explore-link:hover { text-decoration: underline; }

/* Hero stream — vertical scrolling columns (marketing) */
.zsc-stream {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  height: 100%;
  width: 100%;
}
.zsc-stream-col {
  overflow: hidden;
  height: 100%;
}
.zsc-stream-track {
  display: flex;
  flex-direction: column;
  animation: zsc-stream-scroll var(--zsc-stream-duration, 40s) linear infinite;
  will-change: transform;
}
.zsc-stream-track--reverse {
  animation-direction: reverse;
}
.zsc-stream-set {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zsc-stream-tile {
  border-radius: 12px;
  overflow: hidden;
  border: none;
  background: var(--bg-elevated);
  aspect-ratio: 4 / 5;
  flex-shrink: 0;
}
.zsc-stream-tile--tall { aspect-ratio: 2 / 3; }
.mkt-hero-stream .zsc-stream-tile { aspect-ratio: 5 / 6; }
.mkt-hero-stream .zsc-stream-tile--tall { aspect-ratio: 3 / 4; }
.zsc-stream-tile .zsc-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zsc-stream--static .zsc-stream-static {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  height: 100%;
}
@keyframes zsc-stream-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.zsc-stream--loading .zsc-stream-track {
  animation: none;
}
.zsc-stream-skeleton {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  height: 100%;
  width: 100%;
}
.zsc-stream-skeleton-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zsc-stream-skeleton-col span {
  display: block;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-surface) 50%, var(--bg-elevated) 100%);
  background-size: 200% 100%;
  animation: zsc-shimmer 1.4s ease-in-out infinite;
  aspect-ratio: 5 / 6;
  flex-shrink: 0;
}
.zsc-stream-skeleton-col span:nth-child(2) { aspect-ratio: 3 / 4; animation-delay: 0.12s; }
.zsc-stream-skeleton-col span:nth-child(3) { animation-delay: 0.24s; }
@media (max-width: 760px) {
  .zsc-stream-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .zsc-stream-track { animation: none; }
}
