/* ============================================================
   Sacred XP – Watch page (watch.css)
   Loaded only on watch.html via base.njk extraCss frontmatter.
   ============================================================ */

/* ── Player ─────────────────────────────────────────────── */
.watch-player-wrap {
  max-width: 960px;
  margin: 0 auto 1.25rem;
}

.watch-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.watch-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.watch-player-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.watch-player-empty p { margin: 0; }
.watch-player-icon {
  font-size: 2.25rem;
  color: var(--accent);
  animation: watchPulse 2.4s ease-in-out infinite;
}
@keyframes watchPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.08); }
}

.watch-now-playing {
  padding: 1rem 0.25rem 0.25rem;
}
.watch-np-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
  color: var(--text);
  line-height: 1.25;
}
.watch-np-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ── Category filters ───────────────────────────────────── */
.watch-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 1.25rem;
  justify-content: center;
}
.watch-filter {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}
.watch-filter:hover {
  color: var(--text);
  border-color: var(--accent);
}
.watch-filter.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Curated grid ───────────────────────────────────────── */
.watch-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.watch-list-loading,
.watch-list-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-family: var(--font-body);
}

.watch-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-card);
}
.watch-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.watch-card.is-playing {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.watch-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.watch-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.watch-card:hover .watch-card-thumb img {
  transform: scale(1.04);
}
.watch-card-dur {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-body);
}
.watch-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  opacity: 0;
  transition: opacity 0.18s ease;
  padding-left: 3px;
}
.watch-card:hover .watch-card-play,
.watch-card.is-playing .watch-card-play {
  opacity: 1;
}
.watch-card.is-playing .watch-card-play {
  background: var(--accent);
}

.watch-card-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.watch-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.watch-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* ── Footnote ───────────────────────────────────────────── */
.watch-footnote {
  max-width: 680px;
  margin: 2.5rem auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.55;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .watch-list { grid-template-columns: 1fr; }
  .watch-np-title { font-size: 1.2rem; }
}
