/*
 * Каталог авторских визуальных новелл — Nflix Stories (2026-05-19)
 *
 * Mobile-first. Тёмная подложка (наследуется от nflix-base.css).
 * Акцент розовый #e91e8c. Карточки 2:3 в Netflix-стиле.
 */

.vn-stories-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px 80px;
  color: #fff;
}

/* ── HERO ───────────────────────────────────────────────────────────────── */
.vn-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0 16px;
  min-height: 220px;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-color: #1a1a22;
}
.vn-hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.55) 50%,
    rgba(0,0,0,.15) 100%
  );
}
.vn-hero-content {
  position: relative;
  padding: 20px 18px 18px;
  z-index: 1;
}
.vn-hero-pill {
  display: inline-block;
  background: rgba(233, 30, 140, .18);
  color: #ff7cc4;
  font-size: 11px; font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: .02em;
  margin-bottom: 10px;
  border: 1px solid rgba(233, 30, 140, .35);
}
.vn-hero-title {
  font-size: 22px; line-height: 1.15; font-weight: 800;
  margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.vn-hero-meta {
  font-size: 12px; color: rgba(255,255,255,.72);
  margin-bottom: 10px;
}
.vn-hero-meta span { margin-right: 4px; }
.vn-hero-desc {
  font-size: 13px; line-height: 1.45;
  color: rgba(255,255,255,.85);
  margin: 0 0 14px;
  max-width: 540px;
}
.vn-hero-cta { display: flex; gap: 8px; }

@media (min-width: 768px) {
  .vn-hero { min-height: 360px; }
  .vn-hero-content { padding: 36px 32px 30px; max-width: 600px; }
  .vn-hero-title { font-size: 34px; }
  .vn-hero-meta { font-size: 14px; }
  .vn-hero-desc { font-size: 15px; }
}

/* ── FILTER BAR ─────────────────────────────────────────────────────────── */
.vn-filter-bar {
  position: sticky; top: 0;
  background: #0f0f12;
  padding: 10px 0;
  margin: 0 0 14px;
  z-index: 5;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.vn-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.vn-filter-row:last-child { margin-bottom: 0; }
.vn-filter-label {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  flex-shrink: 0;
}
.vn-chips {
  display: flex; gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.vn-chips::-webkit-scrollbar { display: none; }
.vn-chip {
  flex-shrink: 0;
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.vn-chip:hover { background: rgba(255,255,255,.12); }
.vn-chip.is-on {
  background: #e91e8c;
  color: #fff;
}
.vn-sort {
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
/* В нативном выпадающем списке опции рендерятся ОС-стилем (белый фон) —
   без явного цвета был белый текст на белом = невидим. Делаем тёмный. */
.vn-sort option { color: #1f2937; background: #fff; }

/* ── RAIL «Продолжить читать» ───────────────────────────────────────────── */
.vn-rail-section {
  margin: 0 0 22px;
}
.vn-rail-title, .vn-grid-title {
  font-size: 16px; font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}
.vn-grid-count {
  font-size: 12px; font-weight: 400;
  color: rgba(255,255,255,.45);
  margin-left: 6px;
}
.vn-rail {
  display: flex; gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.vn-rail::-webkit-scrollbar { display: none; }
.vn-rail-card {
  flex: 0 0 130px;
}
@media (min-width: 768px) { .vn-rail-card { flex: 0 0 170px; } }

/* ── GRID «Все новеллы» ─────────────────────────────────────────────────── */
.vn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 480px) { .vn-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .vn-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .vn-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .vn-grid { grid-template-columns: repeat(6, 1fr); } }

/* ── CARD ───────────────────────────────────────────────────────────────── */
.vn-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .15s;
}
.vn-card:hover { transform: translateY(-2px); }
.vn-card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a22;
  margin-bottom: 8px;
}
.vn-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.vn-card-cover-empty {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(255,255,255,.25);
  background: linear-gradient(135deg, #23232e, #15151c);
}
.vn-card-badge {
  position: absolute;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.vn-badge-type {
  top: 6px; left: 6px;
  background: rgba(0,0,0,.65);
  color: #fff;
}
/* Возраст — bottom-left (top-right занят сердечком-лайком). */
.vn-badge-age {
  bottom: 6px; left: 6px;
  background: rgba(0,0,0,.7);
  color: #ffd97a;
  border: 1px solid rgba(255,217,122,.3);
}
.vn-badge-completed {
  bottom: 6px; right: 6px;
  background: rgba(76, 175, 80, .85);
  color: #fff;
}
/* «Новинка» — top-left под значком типа (📖). Розовый акцент = свежесть/FOMO. */
.vn-badge-new {
  top: 30px; left: 6px;
  background: linear-gradient(135deg, #e91e8c, #ff3aa3);
  color: #fff;
  box-shadow: 0 2px 8px rgba(233,30,140,.45);
}
.vn-card-info {
  padding: 0 2px;
}
.vn-card-title {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.vn-card-author {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-style: italic;
  margin-bottom: 4px;
}
.vn-card-wrap { display: flex; flex-direction: column; }
.vn-card-author-link {
  display: block;
  font-size: 11px; font-style: italic;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  padding: 4px 2px 0;
  transition: color .15s;
}
.vn-card-author-link:hover { color: #ff7cc4; text-decoration: underline; }
.vn-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,.6);
}
.vn-card-cost { color: #ffd97a; font-weight: 600; }
.vn-card-free { color: #6ad06a; font-weight: 600; }

.vn-card-progress { margin-top: 4px; }
.vn-progress-bar {
  height: 3px;
  background: rgba(255,255,255,.12);
  border-radius: 2px;
  overflow: hidden;
}
.vn-progress-fill {
  height: 100%;
  background: #e91e8c;
  transition: width .3s;
}

/* ── EMPTY STATE ────────────────────────────────────────────────────────── */
.vn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px 80px;
  max-width: 520px;
  margin: 0 auto;
}
.vn-empty-art {
  font-size: 80px;
  line-height: 1;
  margin-bottom: 24px;
  opacity: .85;
  filter: drop-shadow(0 4px 16px rgba(233, 30, 140, .25));
}
.vn-empty-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.vn-empty-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,.7);
  margin: 0 0 26px;
}
.vn-empty-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 18px;
}
.vn-empty-hint {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  margin: 0;
}
.vn-empty-hint a { color: #ff7cc4; text-decoration: none; }
.vn-empty-hint a:hover { text-decoration: underline; }

@media (min-width: 768px) {
  .vn-empty { padding: 100px 24px 120px; }
  .vn-empty-art { font-size: 100px; }
  .vn-empty-title { font-size: 28px; }
  .vn-empty-text { font-size: 15px; }
  .vn-empty-cta { flex-direction: row; max-width: none; justify-content: center; }
}

/* ── BUTTONS (общие, локально для этой страницы) ────────────────────────── */
.vn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.vn-btn-primary {
  background: #e91e8c;
  color: #fff;
}
.vn-btn-primary:hover {
  background: #ff3aa3;
  box-shadow: 0 4px 14px rgba(233, 30, 140, .35);
}
.vn-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.18);
}
.vn-btn-ghost:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.35);
}

/* ── Действия на карточке: избранное + лайк (top-right стек) ─────────────── */
.vn-card-wrap { position: relative; }   /* якорь для absolute действий */
.vn-card-actions {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.vn-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background .15s, transform .12s;
}
@media (hover: hover) { .vn-fav-btn:hover { background: rgba(0,0,0,.66); } }
.vn-fav-btn:active { transform: scale(.92); }
.vn-fav-ico { font-size: 15px; filter: grayscale(1) brightness(1.6); opacity: .9; transition: filter .15s; }
.vn-fav-btn.is-faved { background: rgba(56,135,255,.9); }
.vn-fav-btn.is-faved .vn-fav-ico { filter: none; opacity: 1; }
@keyframes vnFavPop { 0% { transform: scale(1); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }
.vn-fav-pop .vn-fav-ico { animation: vnFavPop .3s ease-out; display: inline-block; }

/* ── LIKE (сердечко на карточке) ────────────────────────────────────────── */
.vn-like-btn {
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 6px 10px 6px 9px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
@media (hover: hover) {
  .vn-like-btn:hover { background: rgba(0,0,0,.66); }
}
.vn-like-btn:active { transform: scale(.92); }
.vn-like-ico { font-size: 15px; color: rgba(255,255,255,.85); transition: color .15s; }
.vn-like-btn.is-liked { background: rgba(233,30,140,.85); }
.vn-like-btn.is-liked .vn-like-ico { color: #fff; }
.vn-like-cnt { min-width: 6px; }
.vn-like-cnt:empty { display: none; }
@keyframes vnLikePop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.vn-like-pop .vn-like-ico { animation: vnLikePop .32s ease-out; }

/* Жанр под названием карточки */
.vn-card-genre {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────────────────────────────────────────────────────────────────────────
   СВЕТЛАЯ ТЕМА (body.light-theme). Каталог сверстан под тёмную (белый текст),
   карточки прозрачные → текст лежит на фоне страницы. В светлом режиме фон
   светлый, поэтому переопределяем текст/чипы/селект на тёмные. Hero и бейджи
   лежат поверх обложек (тёмный градиент) — их не трогаем, читаемы в обеих.
   ─────────────────────────────────────────────────────────────────────────── */
body.light-theme .vn-stories-page { color: #1a1a1a; }
body.light-theme .vn-filter-label { color: #666; }
body.light-theme .vn-chip { background: #f0f0f0; color: #333; }
body.light-theme .vn-chip:hover { background: #e6e6e6; }
body.light-theme .vn-chip.is-on { background: #e91e8c; color: #fff; }
body.light-theme .vn-sort { background: #f5f5f5; color: #1a1a1a; border-color: #e0e0e0; }
body.light-theme .vn-rail-title,
body.light-theme .vn-grid-title { color: #1a1a1a; }
body.light-theme .vn-grid-count { color: #999; }
body.light-theme .vn-card-title { color: #1a1a1a; }
body.light-theme .vn-card-author,
body.light-theme .vn-card-author-link { color: #777; }
body.light-theme .vn-card-author-link:hover { color: #c5070f; }
body.light-theme .vn-card-genre { color: #888; }
body.light-theme .vn-card-meta { color: #666; }
body.light-theme .vn-card-cost { color: #b8860b; }
body.light-theme .vn-card-free { color: #2e9e2e; }
body.light-theme .vn-card-cover-empty { background: #ececec; color: #aaa; }
body.light-theme .vn-empty-title { color: #1a1a1a; }
body.light-theme .vn-empty-text { color: #555; }
body.light-theme .vn-empty-hint { color: #888; }
body.light-theme .vn-filter-bar { background: #fff; border-bottom-color: #e0e0e0; }
body.light-theme .vn-progress-bar { background: rgba(0,0,0,.1); }
