/*
Theme Name: NeuralArts Theme
Author: Alexander
Description: Неоновая тема для AI-комьюнити (Арт, Музыка, Альбомы, Литература, Видео, Статьи)
Version: 5.19
*/



:root {
  --bg-main: #0b0d14;
  --bg-card: #151824;
  --bg-input: #0f111a;
  --border-color: #24283b;
  --text-primary: #ffffff;
  --text-secondary: #949cb6;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body {
  background-color: var(--bg-main) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   ШАПКА САЙТА И ЛОГОТИП
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 23, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand-logo-link:hover {
  transform: translateY(-1px);
}

.brand-icon-wrapper {
  width: 38px;
  height: 38px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.25);
  flex-shrink: 0;
}

.brand-svg-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.brand-text-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-main {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.4px;
  line-height: 1;
}

.brand-title-accent {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  background: rgba(236, 72, 153, 0.14);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #f472b6;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}

.custom-logo-link img {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
}

.main-nav { 
  display: flex; 
  gap: 6px; 
  background: #090a10; 
  padding: 4px; 
  border-radius: 10px; 
  border: 1px solid var(--border-color); 
}

.main-nav a { 
  text-decoration: none; 
  color: var(--text-secondary); 
  font-size: 0.88rem; 
  font-weight: 500; 
  padding: 8px 18px; 
  border-radius: 7px; 
  transition: all 0.2s ease; 
}

.main-nav a:hover { 
  color: #fff; 
  background: rgba(255, 255, 255, 0.05); 
}

.main-nav a.active { 
  color: #fff; 
  background: #202436; 
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); 
}

.user-actions { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.btn-create { 
  text-decoration: none; 
  background: var(--accent-gradient); 
  color: #fff; 
  font-weight: 700; 
  font-size: 0.88rem; 
  padding: 9px 20px; 
  border-radius: 8px; 
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4); 
  transition: transform 0.2s, box-shadow 0.2s; 
}

.btn-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.6);
}

.btn-login { 
  text-decoration: none; 
  color: #cbd5e1; 
  font-size: 0.88rem; 
  padding: 8px 12px; 
}

.btn-register { 
  text-decoration: none; 
  background: rgba(255, 255, 255, 0.08); 
  border: 1px solid var(--border-color); 
  color: #fff; 
  font-size: 0.88rem; 
  padding: 8px 16px; 
  border-radius: 8px; 
}

.user-profile-badge img { 
  border-radius: 50%; 
  border: 2px solid var(--accent-purple); 
  display: block; 
}

/* Мобильное меню и поведение шапки при скролле */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: #090a10;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(13, 15, 23, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px 24px 24px;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff;
  background: #202436;
}

.mobile-user-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.mobile-user-actions a {
  text-align: center;
  justify-content: center;
}

.btn-create-mobile {
  display: block;
  width: 100%;
}

/* Шапка прячется при скролле вниз и появляется при скролле вверх */
.site-header {
  transition: transform 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-wrapper { 
  max-width: 1320px; 
  margin: 0 auto; 
  padding: 24px 24px 60px 24px; 
}

/* =========================================
   ЛАКОНИЧНАЯ СТРОКА ПРИВЕТСТВИЯ КЛУБА
   ========================================= */
.welcome-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #12141f;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 22px;
  font-size: 0.9rem;
}

.welcome-bar-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
}

.welcome-pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  flex-shrink: 0;
}

.welcome-bar-stats {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Фильтры ленты */
.feed-filter-bar {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.feed-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex: 1 1 auto;
}

.feed-search-form {
  display: flex;
  align-items: center;
  background: #141724;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 4px 4px 16px;
  flex: 0 0 auto;
  transition: border-color 0.2s ease;
}

.feed-search-form:focus-within {
  border-color: rgba(168, 85, 247, 0.5);
}

.feed-search-form input[type="search"] {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.85rem;
  width: 190px;
  max-width: 40vw;
}

.feed-search-form input[type="search"]::placeholder {
  color: var(--text-secondary);
}

.feed-search-form button {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.feed-search-form button:hover {
  opacity: 0.85;
}

/* Кнопка подписки на автора («Фанат») */
.btn-fan-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e2030;
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fan-toggle:hover {
  border-color: rgba(251, 191, 36, 0.5);
}

.btn-fan-toggle.is-fan {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: transparent;
  color: #1a1025;
}

.btn-fan-toggle .fan-icon {
  font-size: 1rem;
  line-height: 1;
}

.feed-tab {
  text-decoration: none;
  background: #141724;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.feed-tab:hover {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.4);
}

.feed-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

/* =========================================
   ФИЛЬТРЫ ПО АВТОРУ / НЕЙРОСЕТИ / СТИЛЮ
   (разделы Арт, Музыка, Литература, Видео)
   ========================================= */
.media-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -6px 0 20px;
}

.media-filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  max-width: 220px;
}

.media-filter-select:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.media-filter-submit {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.media-filter-reset {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
  padding: 7px 4px;
  white-space: nowrap;
}

.media-filter-reset:hover {
  color: #fff;
}

/* =========================================
   ЛЕНТА ПОСЛЕДНИХ НОВОСТЕЙ (главная страница)
   ========================================= */
.news-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px 20px;
  margin-bottom: 30px;
}

.news-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.news-strip-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.news-strip-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.news-strip-item {
  scroll-snap-align: start;
  background: #141724;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-strip-item:hover {
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.news-strip-thumb {
  width: 100%;
  height: 110px;
  background: #0f111a;
  overflow: hidden;
}

.news-strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-strip-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.news-strip-item-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-strip-date {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.news-strip-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   БЛОКИ И КАРТОЧКИ ВИТРИНЫ
   ========================================= */
.section-block { 
  margin-bottom: 48px; 
}

.section-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end; 
  margin-bottom: 20px; 
  border-bottom: 1px solid var(--border-color); 
  padding-bottom: 10px; 
}

.section-title { 
  font-size: 1.35rem; 
  font-weight: 800; 
  color: #fff; 
}

.section-subtitle { 
  font-size: 0.85rem; 
  color: var(--text-secondary); 
  margin-top: 4px; 
}

.see-all-link { 
  text-decoration: none; 
  color: #c084fc; 
  font-weight: 600; 
  font-size: 0.88rem; 
}

.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 20px; 
}

.card { 
  background: var(--bg-card); 
  border: 1px solid var(--border-color); 
  border-radius: 16px; 
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease; 
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.media-container { 
  width: 100%; 
  height: 240px; 
  background: #000; 
  position: relative; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.media-container img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.meta { 
  padding: 16px; 
  display: flex; 
  flex-direction: column; 
  flex-grow: 1; 
}

.item-title { 
  font-size: 1.05rem; 
  font-weight: 700; 
  color: #fff; 
  margin-bottom: 8px; 
}

.author-row { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-bottom: 12px; 
}

.author-row img { 
  border-radius: 50%; 
  object-fit: cover;
}

.author-name { 
  font-size: 0.82rem; 
  color: #cbd5e1; 
}

.badge { 
  align-self: flex-start; 
  background: rgba(139, 92, 246, 0.15); 
  border: 1px solid rgba(139, 92, 246, 0.3); 
  color: #c4b5fd; 
  font-size: 0.72rem; 
  font-weight: 600; 
  padding: 3px 8px; 
  border-radius: 6px; 
}

.badge-album { 
  background: rgba(59, 130, 246, 0.15); 
  border: 1px solid rgba(59, 130, 246, 0.3); 
  color: #93c5fd; 
}

.badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Литературные карточки */
.text-card-top {
  display: flex;
  gap: 14px;
  padding: 16px 16px 10px 16px;
  align-items: center;
}

.text-card-thumb {
  width: 60px;
  height: 85px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.text-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 12px;
  /* Ограничиваем описание 3 строками, чтобы карточки в сетке были
     одной высоты — иначе плеер уезжает то выше, то ниже */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   МУЗЫКАЛЬНЫЕ КАРТОЧКИ
   ========================================= */
.audio-track-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: 14px;
}

.audio-cover-box {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.audio-cover-box img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.audio-details { 
  flex-grow: 1; 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
}

.audio-header-line { 
  display: flex; 
  justify-content: space-between; 
  align-items: baseline; 
}

.custom-audio-player { 
  width: 100%; 
  height: 32px; 
  filter: invert(0.9) hue-rotate(180deg); 
}

/* Обёртка плеера в карточке: прижимает плеер к низу, чтобы у всех
   карточек он был на одной высоте, независимо от длины заголовка и описания */
.card .meta .card-audio-player-wrap {
  margin-top: auto;
  padding-top: 10px;
}

.track-bottom-meta { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin-top: 4px; 
}

/* =========================================
   СТРАНИЦА АРТА: ДВУХКОЛОНОЧНАЯ СЕТКА
   ========================================= */
.art-viewer-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
  min-height: 70vh;
}

.viewer-media-panel {
  background: #090a10;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  padding: 14px;
  min-height: 480px;
}

.media-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.art-display-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.protected-media img {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.viewer-sidebar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

/* Обложка на странице прослушивания трека: тянется пропорционально,
   пока не упрётся в ширину или в высоту панели (панель по высоте равна
   боковой колонке с описанием/промптом, поэтому при длинном промпте
   обложка получается крупной). Плеер под ней — на всю ширину. */
.audio-viewer-frame {
  width: 100%;
  height: 100%;
  min-height: 440px;
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

.audio-cover-wrap {
  flex: 1 1 0;
  min-height: 260px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Запасной вариант для старых браузеров без container queries */
.audio-cover-img {
  width: clamp(150px, 42vw, 420px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

@supports (container-type: size) {
  .audio-cover-wrap {
    container-type: size;
  }
  .audio-cover-img {
    width: min(100cqw, 100cqh);
    height: min(100cqw, 100cqh);
  }
}

.audio-player-control {
  width: 100%;
  max-width: 640px;
  flex: 0 0 auto;
}

/* Умная буферизация видео на странице работы */
.smart-video-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  justify-content: center;
}

.smart-video-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
  background: rgba(9, 10, 16, 0.78);
  border-radius: 10px;
}

.smart-video-overlay.is-visible {
  display: flex;
}

.smart-video-label {
  color: #e5e7eb;
  font-size: 0.9rem;
}

.smart-video-bar {
  width: min(320px, 80%);
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.smart-video-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent-gradient);
  transition: width 0.4s ease;
}

.smart-video-skip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
}

.smart-video-skip:hover {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.6);
}

.author-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.author-avatar-link img {
  border-radius: 50%;
  border: 2px solid var(--accent-purple);
  object-fit: cover;
  display: block;
}

.author-name-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.author-rating-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.post-pub-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: block;
}

.viewer-work-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 8px 0 12px 0;
  line-height: 1.25;
}

.sidebar-prompt-wrap {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 180px;
  background: #10121d;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.btn-copy-prompt {
  background: none;
  border: none;
  color: var(--accent-purple);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.prompt-scrollbox {
  overflow-y: auto;
  flex-grow: 1;
  color: #cbd5e1;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 6px;
}

.prompt-scrollbox::-webkit-scrollbar {
  width: 5px;
}
.prompt-scrollbox::-webkit-scrollbar-track {
  background: transparent;
}
.prompt-scrollbox::-webkit-scrollbar-thumb {
  background: #2b3046;
  border-radius: 10px;
}

.sidebar-download-wrap {
  margin-top: auto;
}

.btn-block-download {
  display: block;
  text-align: center;
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
}

/* =========================================
   НИЖНЯЯ ЗОНА: ЛАЙКИ И КОММЕНТАРИИ
   ========================================= */
.art-content-bottom {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.reactions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: 14px;
  margin-bottom: 25px;
}

.reactions-buttons {
  display: flex;
  gap: 12px;
}

.btn-reaction {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #10121d;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-reaction:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

.like-btn:hover { color: #4ade80; }
.dislike-btn:hover { color: #f87171; }

.btn-reaction.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-reaction.disabled:hover {
  transform: none;
  border-color: var(--border-color);
}

.btn-reaction.like-btn.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.6);
  color: #86efac;
}

.btn-reaction.dislike-btn.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.post-total-rating {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.post-total-rating strong {
  color: #fff;
  font-size: 1.1rem;
}

.work-description-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 30px;
}

.bottom-section-title {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 14px;
}

.work-desc-text {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.7;
}

.comments-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 30px;
}

.comment-respond {
  margin-bottom: 30px;
}

.comment-respond textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-family: inherit;
  margin-top: 10px;
  font-size: 0.95rem;
}

.form-submit input[type="submit"] {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}

.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

.comment-body {
  background: #10121d;
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 10px;
}

.comment-author {
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.comment-body p {
  color: #cbd5e1;
  line-height: 1.5;
  font-size: 0.92rem;
}

/* =========================================
   РЕЖИМ ЧИТАЛКИ ДЛЯ ЛИТЕРАТУРЫ (READER MODE)
   ========================================= */
.reading-progress-track {
  position: fixed;
  top: 61px;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 99;
}

.reading-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
  transition: width 0.1s ease-out;
}

.reader-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 40px;
  margin-bottom: 28px;
  position: relative;
  transition: background 0.3s, color 0.3s;
}

.reader-header {
  display: flex;
  gap: 35px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 30px;
  margin-bottom: 25px;
}

.reader-header-meta {
  flex-grow: 1;
}

.reader-book-cover {
  width: 170px;
  height: 240px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
}

.reader-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reader-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 14px 0 8px 0;
  letter-spacing: -0.5px;
}

.reader-stats-bar {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.reader-annotation {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 14px;
}

.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f111a;
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: 10px;
  margin-bottom: 35px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
}

.reader-theme-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-btn {
  background: #1e2235;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.theme-btn.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.reader-font-controls button {
  background: #1e2235;
  border: 1px solid var(--border-color);
  color: #fff;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s;
}

.reader-font-controls button:hover {
  background: var(--accent-purple);
}

.reader-container.theme-sepia-mode {
  background: #25221e !important;
  color: #e6dfd5 !important;
}
.reader-container.theme-sepia-mode .reader-content-body {
  color: #f3ece1 !important;
}

.reader-container.theme-black-mode {
  background: #030304 !important;
  border-color: #1a1c29 !important;
}

.reader-content-body {
  max-width: 820px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.95;
  color: #e5e7eb;
  font-family: Georgia, 'Times New Roman', serif;
}

.reader-content-body p {
  margin-bottom: 1.5em;
  text-indent: 1.8em;
}

.reader-content-body blockquote {
  border-left: 3px solid var(--accent-purple);
  padding-left: 18px;
  margin: 25px 0;
  font-style: italic;
  color: #cbd5e1;
}

.reader-pagination-nav {
  max-width: 820px;
  margin: 35px auto 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.reader-pagination-nav .pages-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  margin-right: 6px;
}

.reader-pagination-nav .page-num {
  padding: 6px 14px;
  background: #10121d;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.reader-pagination-nav a .page-num {
  color: var(--text-secondary);
}

.reader-pagination-nav a:hover .page-num {
  background: var(--accent-purple);
  color: #fff;
}

.reader-floating-dock {
  position: fixed;
  right: 30px;
  bottom: 35px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 0.3s, transform 0.3s;
}

.reader-floating-dock.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dock-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 25, 38, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}

.dock-btn:hover {
  background: var(--accent-purple);
  transform: scale(1.08);
}

.reader-prompt-details {
  max-width: 820px;
  margin: 40px auto 0 auto;
  background: #0f111a;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.reader-prompt-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #cbd5e1;
}

.reader-prompt-content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

/* =========================================
   ВИЗУАЛЬНЫЙ РЕДАКТОР
   ========================================= */
.content-toggle-block {
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.content-toggle-block.is-visible {
  position: static !important;
  left: auto !important;
  top: auto !important;
  height: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.custom-wp-editor-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #10121d;
}

.custom-wp-editor-wrap .wp-editor-container {
  border: none !important;
  background: #10121d !important;
}

.custom-wp-editor-wrap .wp-editor-tabs {
  margin-bottom: 0 !important;
}

.custom-wp-editor-wrap .wp-switch-editor {
  background: #181b29 !important;
  border: 1px solid var(--border-color) !important;
  border-bottom: none !important;
  color: #9aa1b9 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: 6px 6px 0 0 !important;
  top: 1px;
}

.custom-wp-editor-wrap .tmce-active .switch-tmce,
.custom-wp-editor-wrap .html-active .switch-html {
  background: #141724 !important;
  color: #ffffff !important;
  border-color: var(--border-color) !important;
}

.custom-wp-editor-wrap div.mce-toolbar-grp,
.custom-wp-editor-wrap .mce-top-part,
.custom-wp-editor-wrap .quicktags-toolbar {
  background: #141724 !important;
  border-bottom: 1px solid var(--border-color) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

.custom-wp-editor-wrap .mce-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
}

.custom-wp-editor-wrap .mce-btn:hover,
.custom-wp-editor-wrap .mce-btn.mce-active {
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.custom-wp-editor-wrap .mce-btn button {
  padding: 4px 6px !important;
}

.custom-wp-editor-wrap .mce-ico {
  color: #cbd5e1 !important;
}

.custom-wp-editor-wrap .mce-btn:hover .mce-ico,
.custom-wp-editor-wrap .mce-btn.mce-active .mce-ico {
  color: #ffffff !important;
}

.custom-wp-editor-wrap textarea.wp-editor-area {
  color: #f1f5f9 !important;
  background: #10121d !important;
  font-family: monospace !important;
  font-size: 14px !important;
  padding: 14px !important;
  line-height: 1.6 !important;
  border: none !important;
  outline: none !important;
}

.custom-wp-editor-wrap .quicktags-toolbar input.button {
  background: #1c2030 !important;
  border: 1px solid var(--border-color) !important;
  color: #cbd5e1 !important;
  border-radius: 6px !important;
  margin: 3px 2px !important;
  font-size: 0.8rem !important;
  padding: 4px 10px !important;
}

.custom-wp-editor-wrap .quicktags-toolbar input.button:hover {
  background: var(--accent-purple) !important;
  color: #fff !important;
}

.custom-wp-editor-wrap .mce-statusbar {
  background: #141724 !important;
  border-top: 1px solid var(--border-color) !important;
}

.custom-wp-editor-wrap .mce-path-item,
.custom-wp-editor-wrap .mce-statusbar * {
  color: #64748b !important;
}

/* =========================================
   СТРАНИЦА АВТОРИЗАЦИИ И РЕГИСТРАЦИИ
   ========================================= */
.auth-card {
  max-width: 620px;
  margin: 30px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 35px 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.auth-tabs {
  display: flex;
  background: #0b0d14;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #262a3d;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form .form-group span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="date"],
.auth-form textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.auth-form input:focus,
.auth-form textarea:focus {
  border-color: var(--accent-purple);
}

.btn-submit {
  width: 100%;
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

/* =========================================
   ПРИВЕТСТВЕННЫЙ БАННЕР
   ========================================= */
.na-welcome-banner {
  position: relative;
  width: 100%;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.na-welcome-banner-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 48px 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.na-welcome-banner-text {
  font-size: 0.9rem;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.na-welcome-banner-text p {
  margin: 0;
}

.na-welcome-banner-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.25);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.na-welcome-banner-close:hover {
  background: rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
  .na-welcome-banner-inner {
    padding: 12px 42px 12px 16px;
  }
  .na-welcome-banner-text {
    font-size: 0.82rem;
  }
}

/* =========================================
   КОНКУРСЫ
   ========================================= */
.contest-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}

.contest-status-active {
  background: rgba(34, 197, 94, 0.9);
}

.contest-status-upcoming {
  background: rgba(251, 191, 36, 0.9);
  color: #1a1a1a;
}

.contest-status-finished {
  background: rgba(148, 163, 184, 0.85);
  color: #1a1a1a;
}

.contest-winner-card {
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.contest-rank-medal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.6rem;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.contest-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 18px;
}

.contest-entry-badge:hover {
  background: rgba(251, 191, 36, 0.2);
}
/* Список авторов (/avtory/) */
/* Поле с живыми подсказками (жанры/стили/модели в форме загрузки) */
/* Поле нескольких тегов (жанры/стили) в форме загрузки */
.tag-input-wrap {
  position: relative;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #fff;
  font-size: 0.82rem;
  padding: 5px 6px 5px 12px;
  border-radius: 20px;
}

.tag-chip-remove {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.tag-chip-remove:hover {
  color: #fff;
}

.autocomplete-wrap {
  position: relative;
}

.autocomplete-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  background: #141724;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.autocomplete-list.is-open {
  display: block;
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #e5e7eb;
  cursor: pointer;
}

.autocomplete-item:hover,
.autocomplete-item.is-active {
  background: rgba(168, 85, 247, 0.18);
  color: #fff;
}

/* Альбомы на странице автора */
/* Лента альбомов на странице автора: горизонтальный скролл + кнопки
   навигации слева/справа. Системную полосу прокрутки прячем — она
   портит вид, а её роль выполняют кнопки. */
.albums-strip {
  position: relative;
  margin-bottom: 30px;
}

.albums-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
  /* Скрываем системную полосу прокрутки во всех движках */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* старый Edge/IE */
}
.albums-row::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, новый Edge */
}

.album-card {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.album-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.album-card.is-active {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.08);
}

.album-card-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #141724;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card-name {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-count {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Кнопки прокрутки ленты альбомов */
.albums-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 17, 26, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.albums-nav-btn:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.albums-nav-btn[disabled] {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.albums-nav-btn.is-hidden {
  display: none;
}

.albums-nav-prev { left: -8px; }
.albums-nav-next { right: -8px; }

@media (max-width: 640px) {
  /* На телефоне кнопки не нужны — там всё листается свайпом */
  .albums-nav-btn { display: none; }
  .albums-row { padding-left: 0; padding-right: 0; }
}


.footer-social-links {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-social-link:hover {
  background: var(--accent-purple);
  color: #fff;
}

/* =========================================
   ЛИЧНЫЙ КАБИНЕТ (DASHBOARD)
   ========================================= */
.dashboard-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 30px;
}

.dashboard-user-info {
  display: flex;
  gap: 24px;
  align-items: center;
}

.dashboard-avatar-wrap img {
  border-radius: 50%;
  border: 3px solid var(--accent-purple);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  width: 100px;
  height: 100px;
  object-fit: cover;
  display: block;
}

.dashboard-role-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dashboard-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 6px 0 2px 0;
}

.dashboard-login {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.dashboard-bio {
  color: #d1d5db;
  font-size: 0.92rem;
  margin-top: 10px;
  max-width: 550px;
  line-height: 1.5;
}

.dashboard-stats {
  display: flex;
  gap: 15px;
}

.stat-box {
  background: #10121d;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px 22px;
  text-align: center;
  min-width: 90px;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.cabinet-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.cab-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.cab-tab-btn.active {
  background: #262a3d;
  color: #fff;
}

.cab-tab-content { 
  display: none; 
}

.cab-tab-content.active { 
  display: block; 
}

.cabinet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cabinet-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: 12px;
  transition: border-color 0.2s;
}

.cabinet-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.cabinet-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #10121d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cabinet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cabinet-info {
  flex-grow: 1;
}

.cabinet-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.cabinet-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cabinet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-delete {
  text-decoration: none;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #ef4444;
  color: #fff;
}

/* =========================================
   СТИЛИ ДЛЯ СТАТЕЙ (GUTENBERG / ОФОРМЛЕНИЕ)
   ========================================= */
.article-content-body {
  color: #e2e8f0;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content-body h1,
.article-content-body h2,
.article-content-body h3,
.article-content-body h4,
.article-content-body h5,
.article-content-body h6 {
  color: #fff;
  font-weight: 800;
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  line-height: 1.3;
}

.article-content-body h1 { font-size: 2rem; }
.article-content-body h2 { font-size: 1.6rem; }
.article-content-body h3 { font-size: 1.35rem; }
.article-content-body h4 { font-size: 1.15rem; }

.article-content-body p {
  margin-bottom: 1.2em;
}

.article-content-body ul,
.article-content-body ol {
  margin-bottom: 1.2em;
  padding-left: 24px;
  color: #cbd5e1;
}

.article-content-body li {
  margin-bottom: 6px;
}

.article-content-body blockquote {
  border-left: 3px solid var(--accent-purple);
  background: rgba(139, 92, 246, 0.08);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  color: #f1f5f9;
  font-style: italic;
}

/* =========================================
   АДАПТИВНОСТЬ
   ========================================= */
.empty-state { 
  color: var(--text-secondary); 
  font-size: 0.95rem; 
}

@media (max-width: 960px) {
  .art-viewer-grid {
    grid-template-columns: 100%;
  }
  .viewer-sidebar-panel {
    height: auto;
  }
  .viewer-media-panel {
    min-height: 0;
  }
  .audio-viewer-frame {
    height: auto;
    min-height: 0;
    padding: 24px 12px;
  }
  .audio-cover-wrap {
    flex: none;
    min-height: 0;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
  }
  @supports (container-type: size) {
    .audio-cover-wrap {
      container-type: normal;
    }
    .audio-cover-img {
      width: 100%;
      height: 100%;
    }
  }
  .welcome-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .header-inner { 
    flex-direction: row; 
    gap: 12px; 
    align-items: center; 
    padding: 10px 16px;
  }
  .main-nav,
  .user-actions-desktop { 
    display: none; 
  }
  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }
  .brand-title-main {
    font-size: 1.15rem;
  }
  .brand-badge {
    font-size: 0.6rem;
    padding: 1px 4px;
  }
  .site-wrapper {
    padding: 16px 16px 40px 16px;
  }
  .welcome-bar {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .welcome-bar-stats {
    display: none;
  }
  .feed-filter-bar {
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
  }
  .feed-tabs {
    gap: 6px;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }
  .feed-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .feed-search-form {
    order: -1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .feed-search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .media-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .media-filter-select {
    width: 100%;
    max-width: none;
  }
  .grid {
    grid-template-columns: 1fr !important;
  }
  .news-strip-track {
    grid-template-columns: 1fr;
  }
  .news-strip-thumb {
    height: 90px;
  }
  .audio-track-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .audio-cover-box {
    width: 100%;
    height: 180px;
  }
  .media-container {
    height: 220px;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .reader-header {
    flex-direction: column-reverse;
  }
  .reader-book-cover {
    width: 140px;
    height: 195px;
    margin: 0 auto;
  }
  .reader-container {
    padding: 24px 16px;
  }
  .reader-floating-dock {
    right: 15px;
    bottom: 20px;
  }
  .reactions-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .dashboard-header-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .dashboard-user-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .dashboard-stats {
    width: 100%;
    justify-content: flex-start;
  }
  .cabinet-tabs {
    flex-wrap: wrap;
  }
  .cabinet-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cabinet-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .auth-card { 
    padding: 25px 20px; 
  }
  .auth-form .form-row { 
    grid-template-columns: 1fr; 
  }
}

/* =========================================
   ПОДВАЛ САЙТА (FOOTER)
   ========================================= */
.site-footer {
  background: #090a10;
  border-top: 1px solid var(--border-color);
  padding: 50px 24px 40px 24px;
  margin-top: auto; /* Прижимает футер к низу, если контента мало */
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand {
  max-width: 280px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 14px 0;
  line-height: 1.6;
}

.footer-copy {
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  gap: 70px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-purple);
}

/* Адаптивность для планшетов и телефонов */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 35px;
  }
  .footer-nav {
    gap: 40px;
    flex-direction: column;
  }
  .site-footer {
    padding: 40px 20px 30px 20px;
  }
}
/* =========================================
   СПИСОК АВТОРОВ — ТАБЛИЦА (/avtory/)
   ========================================= */
.authors-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}

.authors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.authors-table thead {
  background: #0f111a;
}

.authors-table th {
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.authors-table th.col-count {
  text-align: center;
  width: 90px;
}

.authors-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: #e5e7eb;
  vertical-align: middle;
}

.authors-table tbody tr:last-child td {
  border-bottom: none;
}

.authors-table tbody tr:hover {
  background: rgba(168, 85, 247, 0.05);
}

.authors-table-name {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.authors-table-name:hover {
  color: var(--accent-purple);
}

.authors-table-login {
  display: block;
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin-top: 2px;
}

.authors-table td.col-count {
  text-align: center;
  width: 90px;
}

.authors-table-count {
  display: inline-block;
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
  font-weight: 700;
  font-size: 0.85rem;
}

.authors-table-count.is-empty {
  background: transparent;
  border-color: transparent;
  color: #3a4055;
  font-weight: 400;
}

.authors-table td .col-bio {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 420px;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
}

.authors-table-empty {
  color: #4b5165;
  font-style: italic;
  font-size: 0.82rem;
}

/* На узких экранах таблица превращается в набор карточек.
   Каждая строка становится блоком, а ячейки — строками «метка: значение». */
@media (max-width: 780px) {
  .authors-table thead {
    display: none;
  }

  .authors-table,
  .authors-table tbody,
  .authors-table tr,
  .authors-table td {
    display: block;
    width: 100%;
  }

  .authors-table tr {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
  }

  .authors-table tbody tr:last-child {
    border-bottom: none;
  }

  .authors-table td {
    padding: 6px 0;
    border-bottom: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }

  .authors-table td::before {
    content: attr(data-label);
    flex: 0 0 90px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-top: 4px;
  }

  .authors-table td.col-author {
    display: block;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 6px;
  }

  .authors-table td.col-author::before {
    display: none;
  }

    .authors-table td .col-bio {
    max-width: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    box-orient: initial !important;
    overflow: visible !important;
  }
}
/* Исправление прижима футера для страницы со списком авторов */
body.page-template-template-authors {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.page-template-template-authors .site-wrapper {
  flex: 1 0 auto;
  width: 100%;
}

/* 1. Делаем сайт широким, но ставим разумный лимит (1800px), чтобы на огромных мониторах он не разваливался в "кашу" */
.header-inner, 
.site-wrapper, 
.footer-inner, 
.na-welcome-banner-inner {
  max-width: 1800px !important;
  width: 96% !important; /* Оставляем красивые отступы по краям */
}

/* 2. Базовая сетка: делаем карточки чуть крупнее (от 320px) */
.grid { 
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; 
}

/* 3. МАГИЯ ДЛЯ БОЛЬШИХ ЭКРАНОВ: увеличиваем минимальный размер карточки на широких мониторах */
@media (min-width: 1400px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
  }
}

/* 4. Фиксируем красивые кинематографичные пропорции (16:10) для всех картинок, чтобы ничего не плющило */
.card .media-container {
  width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 10 !important; 
  display: block !important; 
  position: relative;
  overflow: hidden;
}

/* 5. Идеальное заполнение превью без искажений (лишнее аккуратно обрежется) */
.card .media-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
}

/* 6. Центрируем иконки-заглушки для текстов/музыки без обложек */
.card .media-container > div {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}