/* ============================================
   LeTube — доп. стили: обложки профиля + поиск постов
   Подключается ОТДЕЛЬНО после app.css.
   Если что-то не так — просто убери подключение этого файла.
   ============================================ */

/* === Обложка профиля === */
.lt-profile__cover {
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: 320px;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fdfaf3, #e7e0d0);
  position: relative;
}
.lt-profile__cover img,
.lt-profile__cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lt-profile__cover--empty {
  background: linear-gradient(135deg, #f3efe6 0%, #e7e0d0 50%, #d4cdb9 100%);
}
html[data-theme="dark"] .lt-profile__cover--empty {
  background: linear-gradient(135deg, #1c1c1f 0%, #2a2a2d 50%, #1c1c1f 100%);
}

/* Аватар наезжает на обложку */
.lt-profile__cover + .lt-profile__head .lt-profile__avatar-wrap {
  margin-top: -54px;
  position: relative;
  z-index: 2;
}
.lt-profile__cover + .lt-profile__head .lt-profile__avatar {
  border: 4px solid var(--bg);
}

/* === Превью обложки в настройках === */
.lt-settings__cover {
  margin-top: 14px;
  margin-bottom: 14px;
}
.lt-settings__cover-preview {
  width: 100%;
  aspect-ratio: 3 / 1;
  background-color: #f3efe6;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.lt-settings__cover-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lt-settings__cover-placeholder {
  font-size: 13px;
  color: var(--muted);
}
.lt-settings__cover-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.lt-settings__cover-del {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}

/* === Поиск постов === */
.lt-search-posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.lt-search-post {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s;
}
.lt-search-post:hover {
  border-color: var(--ink);
  text-decoration: none;
}
.lt-search-post__media {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lt-search-post__media img,
.lt-search-post__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lt-search-post__text {
  font-size: 32px;
  opacity: 0.5;
}
.lt-search-post__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 99px;
}
.lt-search-post__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lt-search-post__author {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.lt-search-post__cap {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .lt-profile__cover {
    border-radius: 12px;
  }
}

/* === Анонс алгоритма "Он всё видит" === */
.lt-announce {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 12, 13, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lt-announce-fade 0.25s ease;
}
@keyframes lt-announce-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lt-announce__box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  padding: 0 0 28px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: lt-announce-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes lt-announce-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lt-announce__img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 240px;
  object-fit: cover;
}
.lt-announce__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lt-announce__close:hover { background: rgba(0, 0, 0, 0.7); }
.lt-announce__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 34px;
  margin: 22px 24px 10px;
  color: #0c0c0d;
}
.lt-announce__text {
  font-size: 14.5px;
  line-height: 1.6;
  color: #555;
  margin: 0 28px 22px;
}
.lt-announce__text strong { color: #0c0c0d; }
.lt-announce__btn {
  background: #0c0c0d;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 40px;
  cursor: pointer;
}
.lt-announce__btn:hover { background: #1d1d1f; }

html[data-theme="dark"] .lt-announce__box { background: #1c1c1f; }
html[data-theme="dark"] .lt-announce__title { color: #fff; }
html[data-theme="dark"] .lt-announce__text { color: #aaa; }
html[data-theme="dark"] .lt-announce__text strong { color: #fff; }
html[data-theme="dark"] .lt-announce__btn { background: #fff; color: #0c0c0d; }

/* === Палитра цветов в настройках === */
.lt-palette-field {
  margin-bottom: 18px;
}
.lt-palette-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft, #555);
  margin-bottom: 8px;
}
.lt-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lt-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line, #e7e0d0);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, border-color 0.12s;
  position: relative;
}
.lt-swatch:hover {
  transform: scale(1.15);
}
.lt-swatch.is-active {
  border-color: var(--ink, #0c0c0d);
  box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--ink, #0c0c0d);
}
.lt-swatch.is-active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
/* Опция "без цвета" — перечёркнутый кружок */
.lt-swatch--none {
  background: var(--bg-2, #f3efe6);
  position: relative;
  overflow: hidden;
}
.lt-swatch--none::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  height: 2px;
  background: #e74c3c;
  transform: rotate(-45deg);
}
.lt-swatch--none.is-active::after {
  color: var(--ink, #0c0c0d);
  text-shadow: none;
}

/* === Хаб всех ссылок в настройках === */
.lt-links-hub h2 {
  margin-top: 0;
}
.lt-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.lt-link-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  background: var(--bg-2, #f3efe6);
  border: 1px solid var(--line, #e7e0d0);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.lt-link-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ink, #0c0c0d);
  text-decoration: none;
}
.lt-link-tile__icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.lt-link-tile__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #0c0c0d);
}
.lt-link-tile__desc {
  font-size: 12px;
  color: var(--muted, #888);
}

/* === Шаблоны обложек === */
.lt-cover-templates {
  margin: 12px 0;
}
.lt-cover-templates__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft, #555);
  margin-bottom: 8px;
}
.lt-cover-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.lt-cover-tpl {
  aspect-ratio: 3 / 1;
  border-radius: 8px;
  border: 2px solid var(--line, #e7e0d0);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, border-color 0.12s;
  position: relative;
}
.lt-cover-tpl:hover {
  transform: scale(1.04);
  border-color: var(--ink-soft, #888);
}
.lt-cover-tpl.is-selected {
  border-color: var(--ink, #0c0c0d);
  box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--ink, #0c0c0d);
}
.lt-cover-tpl.is-selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* === Админская приписка к профилю === */
.lt-profile__admin-note {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink, #0c0c0d);
  margin: 6px 0 0;
  padding: 8px 12px;
  background: var(--bg-2, #f3efe6);
  border-left: 3px solid var(--ink, #0c0c0d);
  border-radius: 0 8px 8px 0;
}
.lt-profile__admin-note a { color: inherit; text-decoration: underline; }

/* === Блок "Аккаунт заморожен" === */
.lt-frozen-block {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted, #888);
}
.lt-frozen-block__icon { font-size: 48px; margin-bottom: 12px; }
.lt-frozen-block h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  margin: 0;
  color: var(--ink-soft, #555);
}

/* === Кнопка жалобы === */
.lt-report-btn { cursor: pointer; }

/* === Строчка музыки на профиле === */
.lt-profile__music-line {
  font-size: 13.5px;
  color: var(--muted, #888);
  margin: 6px 0 0;
}

/* === Админка с боковым меню === */
.admin-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.admin-side {
  flex: 0 0 180px;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-side__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft, #555);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.admin-side__btn:hover {
  background: var(--bg-2, #f3efe6);
  text-decoration: none;
}
.admin-side__btn.is-active {
  background: var(--ink, #0c0c0d);
  color: var(--bg, #fff);
}
.admin-content {
  flex: 1;
  min-width: 0;
}
.admin-section { display: none; }
.admin-section.is-active { display: block; }
.admin-section > h2:first-child { margin-top: 0; }

@media (max-width: 720px) {
  .admin-layout { flex-direction: column; }
  .admin-side {
    flex: none;
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .admin-side__btn { width: auto; }
}

/* === Модалка выбора причины жалобы === */
.lt-report-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lt-report-modal__box {
  background: var(--surface, #fff); border-radius: 18px; padding: 22px;
  max-width: 340px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.lt-report-modal__box h3 {
  margin: 0 0 16px; font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 22px; text-align: center; color: var(--ink);
}
.lt-report-modal__opt {
  display: block; width: 100%; text-align: left; padding: 12px 14px;
  margin-bottom: 6px; background: var(--bg-2, #f3efe6); border: 1px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
}
.lt-report-modal__opt:hover { background: var(--ink); color: var(--bg); }
.lt-report-modal__cancel {
  display: block; width: 100%; padding: 12px; margin-top: 8px;
  background: transparent; border: none; color: var(--muted);
  font-family: inherit; font-size: 14px; cursor: pointer;
}

/* === Кнопка блокировки === */
.lt-block-btn { cursor: pointer; }

/* === Кнопка входа через Яндекс === */
.lt-yandex-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  background: #fc3f1d;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.1s ease;
}
.lt-yandex-btn:hover { background: #e0350f; text-decoration: none; }
.lt-yandex-btn:active { transform: scale(0.98); }
.lt-yandex-btn__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #fff;
  color: #fc3f1d;
  border-radius: 50%;
  font-weight: 800;
  font-size: 15px;
  font-family: Georgia, serif;
}
.lt-oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted, #888);
  font-size: 13px;
}
.lt-oauth-divider::before, .lt-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line, #e2dccf);
}

/* === Плашка "привяжи Яндекс" на главной === */
.lt-yandex-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fff4f0, #ffe8e0);
  border: 1px solid #ffd4c7;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
  color: #7a3a28;
}
.lt-yandex-hint span { flex: 1; }
.lt-yandex-hint__btn {
  background: #fc3f1d;
  color: #fff;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.lt-yandex-hint__btn:hover { background: #e0350f; text-decoration: none; }
.lt-yandex-hint__close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #b0705f;
  cursor: pointer;
  padding: 0 4px;
}
