/* LordFilm — новый шаблон DLE */
:root {
  --bg: #0c0c0f;
  --bg-card: #16161a;
  --bg-elevated: #1c1c22;
  --border: #2a2a32;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --radius: 6px;
  --header-h: 52px;
  --poster-w: 160px;
  --poster-ratio: 2/3;
  --font: system-ui, -apple-system, Segoe UI, sans-serif;
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.45; color: var(--text); background: var(--bg); }

/* Header — компактный */
.site-header {
  height: var(--header-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 12px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: var(--fs-lg);
}
.site-logo img { height: 26px; width: auto; display: block; }
.site-search { flex: 1; max-width: 280px; }
.site-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: var(--fs-sm);
}
.site-search input::placeholder { color: var(--text-muted); }
.site-search-wrap { position: relative; }
.site-search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-muted); }
.theme-btn {
  width: 34px; height: 34px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-btn:hover { color: var(--text); background: var(--border); }

/* Контент */
.site-main { max-width: 1100px; margin: 0 auto; padding: 20px 12px; }
.section-title { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 12px 0; color: var(--text); }

/* Слайдер популярного */
.slider-wrap { margin-bottom: 24px; }
.slider-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.slider-list::-webkit-scrollbar { height: 5px; }
.slider-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Карточка фильма — единый размер */
.card {
  flex: 0 0 var(--poster-w);
  text-decoration: none;
  color: inherit;
  display: block;
}
.card-poster {
  position: relative;
  aspect-ratio: var(--poster-ratio);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.card:hover .card-poster img { transform: scale(1.04); }
.card-badges { position: absolute; inset: 0; pointer-events: none; }
.card-year { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: var(--fs-xs); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.card-rating { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.75); color: #fff; font-size: var(--fs-xs); padding: 2px 6px; border-radius: 4px; display: flex; align-items: center; gap: 3px; }
.card-rating svg { width: 10px; height: 10px; fill: #fbbf24; }
.card-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 36px; height: 36px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.card:hover .card-play { opacity: 1; }
.card-play svg { width: 14px; height: 14px; fill: #fff; margin-left: 2px; }
.card-title { font-size: var(--fs-sm); font-weight: 500; margin: 6px 0 2px 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .card-title { color: var(--accent); }
.card-meta { font-size: var(--fs-xs); color: var(--text-muted); }

/* Сетка контента */
.content-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.content-grid .card { flex: 0 0 var(--poster-w); }

/* Пагинация */
.pagi-nav { text-align: center; margin: 20px 0; font-size: var(--fs-sm); }
.navigation { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.navigation a, .navigation span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-weight: 500;
}
.navigation a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.navigation span { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
.navigation span.nav_ext { background: transparent; border-color: transparent; color: var(--text-muted); }

/* Подвал */
.site-footer {
  margin-top: 40px;
  padding: 24px 12px 16px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-logo img { height: 22px; }
.footer-logo span { font-weight: 700; font-size: var(--fs-base); color: var(--text); }
.footer-text { max-width: 320px; margin-bottom: 16px; line-height: 1.5; }
.footer-bottom { padding-top: 12px; border-top: 1px solid var(--border); text-align: center; font-size: var(--fs-xs); }

/* Слайдер топ — компактные карточки */
.slider-list .card { flex: 0 0 100px; }
.slider-list .card-title { font-size: var(--fs-xs); -webkit-line-clamp: 2; }
.slider-list .card-year { font-size: 10px; padding: 1px 4px; }
.slider-list .card-rating { font-size: 10px; padding: 1px 4px; }
.slider-list .card-play { width: 30px; height: 30px; }
.slider-list .card-play svg { width: 10px; height: 10px; }

/* Страница материала (fullstory) */
.fullstory-wrap { padding: 16px 0 32px; position: relative; }
.fullstory-wrap > * { position: relative; z-index: 1; }
.fs-bg-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  filter: blur(14px);
  pointer-events: none;
}
#top-ad-wrapper { margin-bottom: 12px; }
.fs-player-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 20px; }
.fs-player-block h2 { font-size: var(--fs-base); font-weight: 600; margin: 0 0 12px 0; color: var(--text); }
.fs-player-block iframe { max-width: 100%; width: 100%; height: 400px; display: block; border-radius: 4px; }
.fs-layout { display: flex; flex-wrap: wrap; gap: 24px; }
.fs-poster { flex: 0 0 220px; }
.fs-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); display: block; }
.fs-vote { display: flex; gap: 8px; margin-top: 12px; }
.fs-vote button { flex: 1; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-muted); font-size: var(--fs-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.fs-vote .like-btn:hover { border-color: var(--accent); color: var(--accent); }
.fs-vote .dislike-btn:hover { border-color: #dc2626; color: #dc2626; }
.btnnew { width: 100%; margin-top: 8px; padding: 10px; text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: var(--fs-sm); cursor: pointer; }
.btnnew:hover { border-color: var(--accent); color: var(--accent); }
.fs-info { flex: 1; min-width: 0; }
.fs-info h1 { font-size: var(--fs-xl); font-weight: 600; margin: 0 0 12px 0; color: var(--text); line-height: 1.3; }
.fs-desc { font-size: var(--fs-base); color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.fs-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; font-size: var(--fs-sm); margin-bottom: 16px; }
.fs-meta span:first-child { color: var(--text-muted); }
.fs-ratings { display: flex; gap: 16px; margin-bottom: 12px; font-size: var(--fs-sm); }
.fs-related { text-align: center; margin: 28px 0; }
.fs-related h2 { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 16px 0; }
.fs-related .slider-list { margin-bottom: 0; justify-content: center; gap: 14px; }
.fs-related .slider-list .card { flex: 0 0 120px; }
.fs-related .slider-list .card-title { font-size: var(--fs-sm); }
.fs-related .slider-list .card-year,
.fs-related .slider-list .card-rating { font-size: 11px; padding: 2px 5px; }
.fs-related .slider-list .card-play { width: 34px; height: 34px; }
.fs-related .slider-list .card-play svg { width: 12px; height: 12px; }
.fs-comments { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.fs-comments h2 { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 12px 0; }
.fs-comments > div:first-of-type { margin-bottom: 14px !important; }
.fs-comments .bg-white,
.fs-comments [class*="bg-gray-900"] { background: var(--bg-card) !important; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px !important; }
.fs-comments .rounded-lg { border-radius: var(--radius); }
.fs-comments h3 { font-size: var(--fs-base); margin-bottom: 10px; color: var(--text); }
.fs-comments label { font-size: var(--fs-sm); color: var(--text-muted); }
.fs-comments input[type="text"],
.fs-comments textarea { background: var(--bg) !important; border-color: var(--border) !important; color: var(--text) !important; font-size: var(--fs-sm); padding: 8px 10px; }
.fs-comments button[type="submit"] { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.comments-list { display: flex; flex-direction: column; gap: 10px; }
.comments-list .bg-white,
.comments-list [class*="bg-gray-900"] { background: var(--bg-card) !important; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px !important; margin-bottom: 0 !important; }
.comments-list .w-10, .comments-list .w-12, .comments-list .lg\:w-14 { width: 36px !important; height: 36px !important; min-width: 36px; min-height: 36px; }
.comments-list .bg-gray-200,
.comments-list .dark\:bg-gray-700 { background: var(--border) !important; }
.comments-list h4 { font-size: var(--fs-sm); }
.comments-list p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }
.comments-list .text-gray-700,
.comments-list .dark\:text-gray-300 { color: var(--text) !important; font-size: var(--fs-sm); }
.comments-list button { font-size: var(--fs-xs); color: var(--text-muted); }

.search-page { padding: 0 0 24px; }
.search-page .section-title { margin-bottom: 12px; }
.search-form-wrap { margin-bottom: 20px; }
.search-form-wrap input[type="text"] { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text); font-size: var(--fs-sm); width: 100%; max-width: 320px; }
.search-form-wrap input:focus { outline: none; border-color: var(--accent); }

.blockhiddentext:before { background: linear-gradient(180deg, transparent, var(--bg)); }
.fs-reactions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; justify-content: center; align-items: center; }
.fs-reactions button { padding: 12px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-muted); font-size: var(--fs-sm); cursor: pointer; }
.fs-reactions button:hover { border-color: var(--accent); color: var(--accent); }
