/* assets/css/episodes.css — episode tiles with first-frame thumbnails, shared by
   the series page grid and the player dock. Locked tiles blur their art and show
   a small lock; the active tile gets a red frame; watched tiles a red underline. */

.episode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 560px) {
  .episode-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .episode-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
  }
}
.ep-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: #0a1622;
  color: var(--chalk);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ep-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.2s ease;
}
.ep-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}
.ep-tile:hover img {
  transform: scale(1.05);
}
.ep-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.ep-tile.is-locked img {
  filter: blur(3px) brightness(0.45) saturate(0.8);
  transform: scale(1.08);
}
.ep-tile.is-locked:hover {
  border-color: rgba(237, 27, 36, 0.6);
}
.ep-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}
.ep-lock svg {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}
.ep-tile.is-active {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red), 0 10px 26px rgba(237, 27, 36, 0.35);
}
.ep-tile.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(237, 27, 36, 0) 60%, rgba(237, 27, 36, 0.45));
}
.ep-tile.is-watched::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 3px;
  background: var(--red-soft);
}
.episode-note {
  margin-top: 10px;
  color: var(--steel);
  font-size: 0.84rem;
}

/* Tag pills used on series + player pages. */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mist);
  font-size: 0.72rem;
  font-weight: 700;
}
.tag-red {
  background: rgba(237, 27, 36, 0.18);
  color: #ff9aa0;
}
.tag svg {
  width: 11px;
  height: 11px;
  margin-right: 4px;
}
