/* TOPNET — современная тёмная тема в стиле podster.fm */

:root {
  --bg: #0b0d12;
  --bg-2: #10141d;
  --bg-card: #161b26;
  --bg-hover: #1b2230;
  --line: #232b3a;
  --text: #f5f7fa;
  --text-2: #9aa6b8;
  --text-3: #6b7690;
  --accent: #6e5bff;
  --accent-2: #8b7bff;
  --radius: 14px;
  --radius-sm: 10px;
  --playbar-h: 76px;
  --maxw: 1200px;
  --shadow: 0 10px 34px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; margin: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--playbar-h);
  min-height: 100vh;
}
.site-shell { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 0; width: auto; }
.site-main > .container { flex: 1 0 auto; width: 100%; min-height: 60vh; padding: 0 20px; align-self: stretch; max-width: var(--maxw); margin: 0 auto; }
.site-footer { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { margin: 0 0 .4em; font-weight: 700; line-height: 1.2; }

/* ===== Раскладка: боковое меню (десктоп) / верхнее меню (мобильный) ===== */
/* Боковое меню (десктоп) */
.sidebar {
  display: none;
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo-img { height: 34px; width: auto; object-fit: contain; display: block; }
.sidebar-logo .logo-img { height: 30px; }
.mobile-logo .logo-img { height: 26px; }
.footer-logo .logo-img { height: 30px; }
.logo .logo-dot { color: var(--accent); }
.logo-ico { font-size: 24px; line-height: 1; }
.logo-text { display: inline-flex; align-items: center; gap: 2px; }
/* Верхняя шапка (мобильный по умолчанию) */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,13,18,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
}
.mobile-logo { display: inline-flex; }
.sidebar-logo { display: none; }
.mobile-theme-toggle { display: inline-flex; }
.sidebar-theme-toggle { display: none; }
.sidebar-search { position: relative; margin: 0; }
.sidebar-search input { width: 100%; padding: 10px 12px 10px 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text); font-size: 13px; outline: none; }
.sidebar-search input:focus { border-color: var(--accent); }
.sidebar-search .search-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; font-size: 13px; }
.sidebar-search .live-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 300px; overflow-y: auto; z-index: 30; }
@media (min-width: 1001px) {
  .sidebar { display: flex; flex-direction: column; gap: 20px; width: 220px; flex: 0 0 220px; padding: 24px 16px 100px; border-right: 1px solid var(--line); background: var(--bg-2); position: fixed; top: 0; left: 0; height: 100vh; z-index: 120; overflow: hidden; }
  .sidebar-close { display: none; }
  .site-main { margin-left: 220px; }
  .site-footer { margin-left: 220px; }
  .sidebar-logo { display: inline-flex; padding: 0 8px 8px; border-bottom: 1px solid var(--line); align-self: stretch; }
  .sidebar-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar-nav a, .sidebar-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-nav a:hover, .sidebar-nav a.active, .sidebar-menu a:hover, .sidebar-menu a.active { color: var(--text); background: var(--bg-card); }
  .sidebar-theme-toggle { display: inline-flex; margin-top: auto; }
  .sidebar-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; }
  .site-header { display: none; }
}
@media (max-width: 1000px) {
  .site-main { margin-left: 0; }
  .mobile-logo { display: inline-flex; }
  .site-header { position: relative; }
}
.header-search { flex: 1; max-width: 520px; position: relative; margin-left: auto; }
.header-search input {
  width: 100%; padding: 11px 16px 11px 42px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--text);
  font-size: 14px; outline: none; transition: border .15s;
}
.header-search input:focus { border-color: var(--accent); }
.header-search .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
/* Выпадающий список live-поиска */
.header-search { position: relative; }
.live-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; z-index: 120;
  max-height: 340px; overflow-y: auto;
}
.live-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.live-item:last-child { border-bottom: none; }
.live-item:hover { background: var(--bg-hover); }
.live-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.live-t { display: flex; flex-direction: column; min-width: 0; }
.live-t-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-t-cat { font-size: 12px; color: var(--accent-2); }
.live-empty { color: var(--text-3); font-size: 13px; padding: 12px; text-align: center; }
.header-nav { display: flex; gap: 6px; align-items: center; }
.header-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.header-nav a:hover, .header-nav a.active { color: var(--text); background: var(--bg-card); }
.nav-fav-ico { color: #ff4d6d; font-size: 12px; margin-left: 2px; }

/* ===== Контейнер и сетки ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; width: 100%; min-width: 0; }
.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; margin: 0; }
.section-head .sub { color: var(--text-2); font-size: 14px; }
.section-head .btn-all { margin-left: auto; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); cursor: pointer;
  transition: background .15s, border .15s;
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-3); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; }
.ep-load-more { display: block; margin: 22px auto 0; padding: 12px 26px; font-size: 15px; border-radius: 30px; }
.ep-load-more[disabled] { opacity: .6; cursor: default; }

/* ===== Герой (главная) ===== */
.hero { padding: 44px 20px 24px; }
.hero-inner { text-align: center; width: 100%; max-width: 100%; margin: 0 auto; }
.hero h1 { font-size: 40px; line-height: 1.12; margin-bottom: 12px; }
.hero p { color: var(--text-2); font-size: 18px; }
.hero .hero-search { max-width: 520px; margin: 26px auto 0; }

/* ===== Сетка карточек подкастов ===== */
.grid-pods { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.pod-card {
  display: block; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s, box-shadow .18s, border .18s;
}
.pod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #2e3446; }
.pod-card { position: relative; }
.fav-btn {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; padding: 0;
  transition: transform .15s, background .15s, color .15s;
}
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.active { color: #ff4d6d; background: rgba(255,77,109,.16); }
.fav-toast {
  position: fixed; z-index: 9999; transform: translateX(-50%);
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); border-radius: 30px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .3s, transform .3s;
  pointer-events: none; white-space: nowrap;
}
.fav-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.pod-card .cover { aspect-ratio: 1/1; background: var(--bg-2); position: relative; }
.pod-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.pod-card .cover .play-badge {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; opacity: 0; transition: opacity .18s;
}
.pod-card:hover .cover .play-badge { opacity: 1; }
.pod-card .body { padding: 12px 14px 14px; }
.pod-card .p-title { font-size: 15px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-card .p-cat { color: var(--accent-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.pod-card .p-desc { color: var(--text-2); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }

/* ===== Сетка категорий ===== */
.grid-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.cat-tile {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 24px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .15s, border .15s, box-shadow .15s;
  min-width: 0;
}
.cat-tile:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.cat-tile .cat-ico { font-size: 40px; margin-bottom: 12px; }
.cat-tile .cat-name { font-weight: 700; font-size: 15px; }
.cat-tile .cat-count { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.cats-all-wrap { display: flex; justify-content: center; margin-top: 24px; }
.cats-all-wrap .btn { padding: 12px 30px; border-radius: 30px; font-size: 15px; }
.hide-mobile { display: block; }

/* ===== Страница подкаста ===== */
.pod-head {
  display: flex; gap: 30px; align-items: flex-start;
  padding: 34px 0 26px; flex-wrap: wrap;
}
.pod-cover { width: 220px; height: 220px; border-radius: 16px; object-fit: cover; box-shadow: var(--shadow); flex-shrink: 0; }
.pod-info { flex: 1; min-width: 260px; }
.pod-kicker { color: var(--text-3); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.pod-info h1 { font-size: 34px; margin-bottom: 8px; }
.pod-meta { color: var(--text-2); font-size: 14px; margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.pod-meta span::after { content: "·"; margin-left: 8px; color: var(--text-3); }
.pod-meta span:last-child::after { content: ""; }
.pod-desc { color: var(--text-2); line-height: 1.65; }
/* Скрытие длинного описания подкаста с кнопкой «Раскрыть» */
.pod-desc-wrap { position: relative; }
.pod-desc.clamped { max-height: 6.6em; overflow: hidden; }
.pod-desc-toggle {
  margin-top: 6px; color: var(--accent-2); background: none; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 0;
}
.pod-desc-toggle:hover { text-decoration: underline; }
/* Модал «Поделиться» */
.share-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.share-modal-box {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; width: 100%; max-width: 420px; position: relative; box-shadow: var(--shadow);
}
.share-modal-box h3 { margin: 0 0 14px; font-size: 18px; }
.share-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-3); font-size: 18px; cursor: pointer; }
.share-modal-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-2); color: var(--text); font-size: 14px; margin-bottom: 12px;
}
.share-modal-copy { width: 100%; justify-content: center; }
.pod-act { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.pod-fav-header { display: inline-flex; align-items: center; gap: 6px; }
.pod-fav-header .fav-ico { font-size: 17px; line-height: 1; }
.pod-fav-header.active { color: #ff4d6d; border-color: #ff4d6d; background: rgba(255,77,109,.1); }
/* На странице подкаста кнопка избранного — как на карточке: круглое сердце без текста.
   Отменяем absolute (чтобы не улетала в угол обложки), но сохраняем круглый вид fav-btn. */
.pod-act #pod-fav-btn.fav-btn {
  position: static; width: 44px; height: 44px; padding: 0;
}
.pod-act #pod-fav-btn.fav-btn .fav-ico { font-size: 20px; line-height: 1; }
.pod-act #pod-fav-btn.fav-btn:hover { background: var(--bg-hover); transform: none; }
.pod-act #pod-fav-btn.fav-btn.active { color: #ff4d6d; background: rgba(255,77,109,.16); }
.pod-stats { color: var(--text-3); font-size: 13px; }

/* Табы */
.pod-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.pod-tabs button {
  background: none; border: none; color: var(--text-2); font-size: 15px; font-weight: 600;
  padding: 12px 18px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pod-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
/* Вкладки на странице «Избранное» */
.fav-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.fav-tab {
  padding: 11px 20px; font-size: 15px; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.fav-tab:hover { color: var(--text); }
.fav-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.fav-tab-count { background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; padding: 1px 8px; margin-left: 4px; }
.fav-tab.active .fav-tab-count { background: var(--accent); color: #fff; border-color: var(--accent); }
.fav-empty-msg { color: var(--text-2); padding: 24px 0; font-size: 15px; }
/* Вкладки на странице поиска */
.search-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.search-tab {
  padding: 11px 20px; font-size: 15px; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.search-tab:hover { color: var(--text); }
.search-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.search-tab-count { background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; padding: 1px 8px; margin-left: 4px; }
.search-tab.active .search-tab-count { background: var(--accent); color: #fff; border-color: var(--accent); }
.search-block-title { font-size: 19px; font-weight: 700; margin: 0 0 16px; }
.grid-pods + .search-block-title, .ep-list + .search-block-title, .grid-cats + .search-block-title { margin-top: 30px; }
.pod-tabs .badge {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; padding: 1px 8px; margin-left: 4px; color: var(--text-2);
}
.pod-tabs button.active .badge { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-panel { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Список выпусков */
.ep-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ep-toolbar .ep-search { flex: 1; max-width: 300px; }
.ep-toolbar input, .ep-toolbar select {
  width: 100%; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text); font-size: 14px; outline: none;
}
.ep-toolbar select {
  width: auto; min-width: 180px; cursor: pointer; margin-left: auto; appearance: none;
  padding-right: 34px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238b94a5' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.ep-list { display: flex; flex-direction: column; gap: 6px; }
.ep-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  transition: background .13s; cursor: pointer;
}
.ep-item:hover { background: var(--bg-card); }
.ep-item:hover .ep-title { text-decoration: underline; text-underline-offset: 2px; color: var(--accent); }
.ep-item.playing { background: var(--playing-bg, rgba(110,91,255,.22)); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.ep-item.playing .ep-play { background: var(--accent); color: #fff; }
/* Бейдж «Новое» */
.ep-item { position: relative; }
.ep-new {
  display: inline-block; vertical-align: 1px; margin-right: 6px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; letter-spacing: .4px; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
/* Прослушанный выпуск: приглушаем название и ставим пометку галочкой справа */
.ep-item.played .ep-title { opacity: .55; }
.ep-item.played .ep-title::after { content: ' ✓'; color: var(--accent-2); font-size: 12px; }
.ep-item .ep-cover { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ep-item .ep-num { width: 16px; color: var(--text-3); font-size: 13px; text-align: center; }
.ep-item .ep-mid { flex: 1; min-width: 0; }
.ep-item .ep-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-item .ep-date { color: var(--text-3); font-size: 13px; }
.ep-item .ep-play { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: var(--text); cursor: pointer; font-size: 15px; flex-shrink: 0; transition: background .13s; }
.ep-item .ep-fav { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--text-3); cursor: pointer; font-size: 19px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; transition: background .13s, color .13s; }
.ep-item .ep-fav:hover { background: var(--bg-card); }
.ep-item .ep-fav.active { color: #ff4d6d; }
.ep-fav-btn.active { color: #ff4d6d; border-color: #ff4d6d; background: rgba(255,77,109,.1); }
.ep-fav-btn .fav-ico { font-size: 17px; line-height: 1; }
.ep-item:hover .ep-play, .ep-item .ep-play:hover { background: var(--bg-hover); }
.ep-item.playing .ep-play { background: var(--accent); }

/* Пагинация */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pagination span, .pagination a, .pagination button {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--line); font-size: 14px; cursor: pointer;
}
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Футер ===== */
.site-footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 30px 0; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.footer-inner, .footer-inner a { color: var(--text-2); font-size: 14px; }
.footer-inner > div:first-child { max-width: 340px; }
.footer-inner .logo { font-size: 20px; }
.footer-inner p { margin: 8px 0 0; line-height: 1.5; }
.footer-inner div:nth-child(2) { white-space: nowrap; }
.footer-inner div:nth-child(3) { text-align: right; }

/* ===== Закреплённый плеер (как podster) ===== */
.playbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: rgba(12,14,20,.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.playbar.visible { transform: translateY(0); }
.playbar-inner {
  max-width: var(--maxw); margin: 0 auto; height: var(--playbar-h);
  padding: 12px 20px; display: flex; align-items: center; gap: 14px;
}
.pb-cover { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pb-info { min-width: 0; flex: 0 1 220px; }
.pb-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-pod { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pb-pod:hover { color: var(--accent-2); text-decoration: underline; }
.pb-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pb-btn {
  width: 40px; height: 40px; border: none; background: none; color: var(--text);
  border-radius: 50%; cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; justify-content: center;
  transition: background .13s; padding: 0; line-height: 0;
}
.pb-btn svg { display: block; flex-shrink: 0; }
.pb-btn:hover { background: var(--bg-card); }
.pb-play { width: 48px; height: 48px; background: var(--accent); border-color: var(--accent); }
.pb-play:hover { background: var(--accent-2); }
.pb-speed { font-size: 13px; font-weight: 700; min-width: 36px; }
/* Регулятор громкости (только десктоп) */
.pb-volume { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pb-vol-btn { color: var(--text-2); }
.pb-vol-slider {
  width: 78px; height: 20px; margin: 0; -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer; flex-shrink: 0;
}
.pb-vol-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: var(--bg-hover); }
.pb-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); margin-top: -4px; border: none; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.pb-vol-slider::-moz-range-track { height: 4px; border-radius: 99px; background: var(--bg-hover); }
.pb-vol-slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: none; }
/* Кнопки перемотки ±30с меньше */
.pb-30 { width: 32px; height: 32px; font-size: 15px; font-weight: 700; }
/* Панель списка выпусков в плеере */
.pb-queue-panel {
  position: absolute; bottom: calc(100% + 4px); right: 16px; width: 340px; max-width: 92vw;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; z-index: 210;
}
.pb-queue-head { padding: 12px 16px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line); }
.pb-queue-list { max-height: 320px; overflow-y: auto; }
.pb-queue-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.pb-queue-item:hover { background: var(--bg-hover); }
.pb-queue-item.current { color: var(--accent-2); font-weight: 700; }
.pb-queue-item img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.playbar { position: fixed; }
/* Переключатель темы */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
  flex-shrink: 0; transition: background .15s, transform .15s;
}
.theme-toggle:hover { background: var(--bg-hover); transform: scale(1.08); }
/* Кнопка-сердечко «Избранное» рядом с кнопкой темы */
.fav-nav-btn { color: #ff4d6d; font-size: 20px; text-decoration: none; }
.fav-nav-btn:hover { color: #ff4d6d; background: rgba(255,77,109,.12); transform: scale(1.08); }
@media (min-width: 1001px) {
  .fav-nav-btn { margin-left: 4px; }
}
/* Гамбургер-меню (мобильные) */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; border: 1px solid var(--line);
  background: var(--bg-card); border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Светлая тема ===== */
html[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-2: #e8ecf2;
  --bg-card: #ffffff;
  --bg-hover: #f0f3f8;
  --line: #dfe4ec;
  --text: #171a21;
  --text-2: #4b5568;
  --text-3: #8b94a5;
  --accent: #5a4bcf;
  --accent-2: #6e5bff;
  --shadow: 0 10px 30px rgba(20,30,60,.10);
}
html[data-theme="light"] .site-header { background: rgba(255,255,255,.88); }
html[data-theme="light"] .playbar { background: rgba(255,255,255,.97); }
html[data-theme="light"] .pod-card, html[data-theme="light"] .cat-tile { box-shadow: 0 2px 10px rgba(20,30,60,.05); }
html[data-theme="light"] .live-results { background: #fff; }
.pb-progress { flex: 1; display: flex; align-items: center; gap: 10px; }
.pb-bar { flex: 1; height: 6px; background: var(--bg-card); border-radius: 3px; cursor: pointer; position: relative; }
.pb-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; width: 0; }
.pb-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 96px; text-align: center; }
.pb-close { color: var(--text-3); }

/* ===== Адаптивность ===== */
@media (max-width: 1000px) {
  .site-main { width: 100%; }
  .site-main > .container { width: 100%; max-width: 100%; align-self: stretch; padding-left: 20px; padding-right: 20px; }
  .nav-burger { display: flex; }
  .sidebar {
    display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 160;
    padding: 16px; background: var(--bg-2); border-bottom: 1px solid var(--line);
    max-height: 80vh; overflow-y: auto;
  }
  .sidebar.open { display: flex; flex-direction: column; gap: 10px; }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .sidebar-close { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; background: none; border: none; color: var(--text-2); font-size: 20px; cursor: pointer; flex-shrink: 0; }
  .sidebar .sidebar-logo { display: inline-flex; }
  .sidebar .sidebar-theme-toggle { display: inline-flex; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar-nav a, .sidebar-menu a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-bottom { display: flex; align-items: center; gap: 8px; }
  .ep-item .ep-title { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word; }
  .ep-item .ep-mid { min-width: 0; }
}
@media (max-width: 1000px) and (min-width: 641px) {
  .container { overflow: hidden; width: 100%; max-width: 100%; }
  .grid-pods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .grid-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .grid-cats, .grid-pods { min-width: 0; }
}
@media (max-width: 900px) {
  .hero h1 { font-size: 30px; }
  .pod-cover { width: 160px; height: 160px; }
}
@media (max-width: 640px) {
  .container { overflow: hidden; width: 100%; max-width: 100%; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .logo { margin-right: auto; }
  .header-search { order: 3; max-width: 100%; flex-basis: 100%; margin-left: 0; flex: 0 0 100%; }
  .nav-burger { display: flex; margin-left: 4px; }
  .theme-toggle { margin-left: auto; }
  .sidebar {
    display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 150;
    height: auto; max-height: 70vh; overflow-y: auto; padding: 12px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line); gap: 8px;
  }
  .sidebar.open { display: flex; flex-direction: column; }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
  .sidebar-close { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; background: none; border: none; color: var(--text-2); font-size: 20px; cursor: pointer; flex-shrink: 0; }
  .sidebar .sidebar-logo { display: inline-flex; padding-bottom: 0; margin-bottom: 0; }
  .sidebar .sidebar-theme-toggle { display: inline-flex; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar-nav a, .sidebar-menu a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .theme-toggle.sidebar-theme-toggle { margin-left: 0; }
  .fav-nav-btn { margin-left: 0; }
  .grid-pods { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-tile { padding: 18px 12px; }
  .cat-tile .cat-ico { font-size: 32px; }
  .pod-head { flex-direction: column; gap: 18px; align-items: center; text-align: center; }
  .pod-cover { width: 120px; height: 120px; }
  .pod-info h1 { font-size: 26px; }
  .pod-info { min-width: 0; max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
  .pod-desc, .pod-meta, .pod-act { max-width: 100%; overflow-wrap: break-word; }
  .pod-meta { justify-content: center; }
  .pod-act { justify-content: center; }
  .pod-desc a { word-break: break-all; }
  .section-head { flex-direction: column; gap: 6px; }
  .section-head .btn-all { margin-left: 0; }
  .playbar-inner { gap: 8px 10px; padding: 10px 12px 14px; flex-wrap: wrap; height: auto; min-height: var(--playbar-h); }
  .pb-cover { width: 44px; height: 44px; }
  .pb-info { flex-basis: 0; flex: 1 1 0; min-width: 0; }
  .pb-controls { flex: 0 0 100%; order: 4; justify-content: center; }
  .pb-volume { display: none; }
  .pb-progress { flex: 0 0 100%; order: 5; }
  .pb-time { display: flex; }
  .hide-mobile { display: none; }
}

@media (max-width: 420px) {
  .playbar-inner { gap: 6px 8px; padding: 8px 10px; }
  .pb-cover { display: none; }
  .pb-info { flex: 1 1 auto; min-width: 0; }
  .pb-close { display: none; }
  .pb-btn { width: 40px; height: 40px; font-size: 15px; flex: 1 1 0; max-width: 48px; }
  .pb-btn + .pb-btn { margin-left: 2px; }
  .pb-controls { gap: 4px; }
  .pb-play { width: 46px; height: 46px; max-width: none; }
  .pb-30 { width: 38px; height: 38px; font-size: 15px; }
  .pb-speed { min-width: 40px; font-size: 13px; }
  .pb-queue-panel { right: 8px; left: 8px; width: auto; max-width: none; }
}
@media (max-width: 360px) {
  .pb-btn { width: 34px; height: 34px; max-width: 38px; }
  .pb-play { width: 40px; height: 40px; }
  .pb-30 { width: 32px; height: 32px; }
  .pb-speed { min-width: 32px; }
  .pb-controls { gap: 2px; }
  .playbar-inner { padding-left: 6px; padding-right: 6px; }
}

/* ===== Кнопка «Мне повезет!» + анимация эпизодов ===== */
.lucky-section { padding: 8px 0 4px; }
.lucky-wrap {
  display: flex; align-items: stretch; gap: 20px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px;
}
.lucky-btn {
  display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; color: var(--text); flex: 0 0 auto; min-width: 320px; max-width: 460px;
  transition: background .15s, transform .15s, border-color .15s;
}
.lucky-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; white-space: normal; }
.lucky-title { font-size: 20px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.lucky-sub { font-size: 13px; color: var(--text-2); line-height: 1.35; white-space: nowrap; }
.lucky-mark {
  margin-left: auto; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
}
.lucky-play {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.lucky-ticker { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; overflow: hidden; position: relative; }
.lucky-ticker::before, .lucky-ticker::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 48px; z-index: 2; pointer-events: none;
}
.lucky-ticker::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.lucky-ticker::after { right: 0; background: linear-gradient(270deg, var(--bg-2), transparent); }
.lucky-track {
  display: flex; gap: 14px; align-items: center; white-space: nowrap;
  animation: luckyScroll var(--lucky-speed, 28s) linear infinite; will-change: transform; width: max-content;
}
@keyframes luckyScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.lucky-tick-item {
  display: inline-flex; align-items: center; gap: 10px; cursor: default; pointer-events: none;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 14px 8px 8px; width: 260px; max-width: none; flex: 0 0 260px; min-width: 0; overflow: hidden;
}
.lucky-tick-item img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.lucky-tick-title {
  font-size: 13px; font-weight: 600; color: var(--text-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
@media (max-width: 1000px) {
  .lucky-wrap { flex-direction: column; gap: 16px; }
  .lucky-btn { min-width: 0; max-width: none; width: 100%; }
}
@media (max-width: 480px) {
  .lucky-btn { flex-wrap: wrap; justify-content: center; align-items: center; padding: 16px 18px; gap: 14px 28px; }
  .lucky-text { order: -1; flex: 1 0 100%; min-width: 0; text-align: center; }
  .lucky-title { font-size: 18px; white-space: normal; line-height: 1.25; }
  .lucky-sub { font-size: 12px; white-space: normal; line-height: 1.35; }
  .lucky-play { flex: 0 0 46px; width: 46px; height: 46px; }
  .lucky-mark { flex: 0 0 46px; width: 46px; height: 46px; margin-left: 0; }
}

/* ---- Фильтр «настроение/ситуация» на странице «Все подкасты» ---- */
.mood-filter { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 22px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; }
.mood-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mood-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); min-width: 96px; }
.mood-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-size: 13px; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.mood-chip:hover { border-color: var(--accent); color: var(--text); }
.mood-chip .mood-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--line); color: var(--text-3); font-size: 9px; font-weight: 700; line-height: 1; }
.mood-chip:hover .mood-count { background: var(--accent); color: #fff; }
.mood-chip.mood-on .mood-count { background: rgba(255,255,255,.25); color: #fff; }
.mood-chip.mood-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mood-chip.mood-on a { color: inherit; margin-left: 4px; text-decoration: none; font-weight: 800; opacity: .8; }
.mood-chip.mood-on a:hover { opacity: 1; }
.mood-active { align-items: center; }
.mood-clear { font-size: 13px; font-weight: 600; color: var(--text-3); text-decoration: underline; margin-left: auto; }
.mood-clear:hover { color: var(--text); }
@media (max-width: 480px) {
  .mood-label { min-width: 0; flex: 1 0 100%; }
  .mood-clear { margin-left: 0; }
}

/* ---- Блок-навигация «Подкасты по настроению» на главной ---- */
#mood-nav .section-head { margin-bottom: 16px; }
.mood-nav { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; }
.mood-nav-group { display: flex; align-items: center; gap: 10px; }
.mood-nav-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); min-width: 96px; flex-shrink: 0; }
.mood-nav-chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) and (min-width: 1px) {
  .mood-nav-group { align-items: flex-start; flex-direction: column; gap: 6px; }
  .mood-nav-label { min-width: 0; }
}
@media (max-width: 640px) {
  #mood-nav { display: none; }
}

/* ---- Компактное сворачивание фильтра настроения на мобильных ---- */
.mood-filter-toggle { display: none; }
@media (max-width: 640px) {
  .mood-filter.has-toggle { padding: 0; border: 0; background: var(--bg-card); border-radius: 14px; }
  .mood-filter.has-toggle .mood-group,
  .mood-filter.has-toggle .mood-clear,
  .mood-filter.has-toggle .mood-active { display: none; }
  .mood-filter-toggle { display: inline-flex; align-items: center; justify-content: space-between; width: 100%; gap: 10px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; }
  .mood-filter-toggle-label { text-align: left; }
  .mood-filter-toggle-ico { font-size: 12px; color: var(--text-3); transition: transform .2s; }
  .mood-filter.has-toggle.open .mood-filter-toggle-ico { transform: rotate(180deg); }
  .mood-filter.has-toggle.open { padding: 14px 16px; border: 1px solid var(--line); }
  .mood-filter.has-toggle.open .mood-group,
  .mood-filter.has-toggle.open .mood-clear { display: flex; }
  .mood-filter.has-toggle.open .mood-active { display: block; }
  .mood-filter.has-toggle.open .mood-filter-toggle { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 10px; margin-bottom: 12px; }
}
@media (min-width: 641px) {
  .mood-filter.has-toggle .mood-group,
  .mood-filter.has-toggle .mood-clear,
  .mood-filter.has-toggle .mood-active { display: flex; }
}

/* Активный фильтр на мобильном — компактной строкой: пилюля выбранного тега + «Сбросить». */
@media (max-width: 640px) {
  .mood-filter.mood-active { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; }
  .mood-filter.mood-active .mood-clear { margin-left: 0; }
}