/* =========================================================
   AniLog — сетка и карточки
   ========================================================= */

/* ---------- Сетка и карточки ---------- */

.anime-grid {
  display: grid;
  /* auto-fill (не auto-fit!): при одной карточке в фильтре пустые колонки не
     схлопываются, и обложка не растягивается на всю ширину экрана */
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 22px;
}

.anime-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 9px 9px 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 23px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.014)),
    rgba(13, 14, 22, 0.55);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    transform 0.4s var(--ease-out),
    border-color 0.3s ease,
    box-shadow 0.4s ease,
    background 0.3s ease;
  animation: card-in 0.55s var(--ease-out) both;
  animation-delay: calc(var(--index, 0) * 45ms);
}

.anime-grid.no-card-animation .anime-card {
  animation: none;
}

.anime-card:hover {
  border-color: rgba(167, 139, 250, 0.32);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(16, 17, 27, 0.65);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.3),
    0 0 38px rgba(139, 92, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: translateY(-8px);
}

.anime-card.menu-open {
  z-index: 15;
}

.anime-card__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 17px;
  background: #10111a;
}

.cover-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 17px;
  background: #10111a;
}

.cover-clip::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  z-index: 2;
  width: 44%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.17), transparent);
  opacity: 0;
  pointer-events: none;
  transform: rotate(22deg);
  transition: left 0.75s var(--ease-out), opacity 0.3s ease;
}

.anime-card:hover .cover-clip::before {
  left: 135%;
  opacity: 1;
}

.cover-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.94) contrast(1.025);
  transition: transform 0.75s var(--ease-out), filter 0.45s ease;
}

.anime-card:hover .cover-image {
  filter: saturate(1.07) contrast(1.03);
  transform: scale(1.055);
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 7, 12, 0.88) 0%, rgba(6, 7, 12, 0.12) 37%, transparent 55%),
    linear-gradient(to bottom, rgba(6, 7, 12, 0.42), transparent 26%);
  pointer-events: none;
}

.status-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 12;
}

.status-pill {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(7, 8, 13, 0.64);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.26);
  color: #f5f3fb;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s var(--ease-out);
}

.status-pill .status-dot {
  width: 6px;
  height: 6px;
  background: var(--status-color);
  box-shadow: 0 0 8px var(--status-color);
}

.status-pill__chevron {
  width: 11px;
  height: 11px;
  margin-left: 1px;
  color: rgba(255, 255, 255, 0.54);
  transition: transform 0.2s var(--ease-out);
}

.status-pill:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(17, 19, 30, 0.86);
  transform: translateY(-1px);
}

.status-pill[aria-expanded="true"] .status-pill__chevron {
  transform: rotate(180deg);
}
