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

:root {
  --pulsy-pink: #ff3b5c;
  --pulsy-pink-dim: rgba(255, 59, 92, 0.35);
  --pulsy-bg: #07070c;
  --pulsy-surface: #12121a;
  --pulsy-elevated: #1a1a26;
  --pulsy-border: rgba(255, 255, 255, 0.08);
  --pulsy-glow: 0 0 40px rgba(255, 59, 92, 0.15);
  --pulsy-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pulsy-ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --pulsy-dur: 0.35s;
}

html {
  font-size: calc(16px * var(--pulsy-font-scale, 1));
}

body {
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 59, 92, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(59, 130, 255, 0.06), transparent 45%),
    var(--pulsy-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] {
  --pulsy-bg: #f0f2f8;
  --pulsy-surface: #ffffff;
  --pulsy-elevated: #f8f9fc;
  --pulsy-border: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] body {
  background: radial-gradient(ellipse 100% 80% at 50% -10%, rgba(255, 59, 92, 0.12), transparent 45%),
    linear-gradient(180deg, #eef0f7 0%, #e8eaf0 100%);
  color: #1a1a22;
}

html[data-theme="light"] .pulsy-app {
  background: linear-gradient(180deg, #fafbff 0%, #fff 35%, #f5f6fb 100%);
  color: #1a1a22;
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .bottom-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 252, 0.98) 100%);
  border-top-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .nav-item {
  color: #555;
}

html[data-theme="light"] .nav-item.active {
  color: #ff3b5c;
}

html[data-theme="light"] .top-pill-btn {
  border-color: rgba(0, 0, 0, 0.1);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 242, 248, 0.88) 100%);
  color: #333;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .top-pill-btn:hover {
  border-color: rgba(255, 59, 92, 0.35);
}

html[data-theme="light"] .feed-more-sheet-inner {
  background: linear-gradient(180deg, #fff 0%, #f4f5fa 100%);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a1a22;
}

html[data-theme="light"] .feed-more-sheet-title {
  color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .feed-more-item {
  background: rgba(0, 0, 0, 0.04);
  color: #1a1a22;
}

html[data-theme="light"] .feed-more-cancel {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #444;
}

html[data-theme="light"] .search-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #555;
}

html[data-theme="light"] .search-chip.active {
  color: #fff;
}

html[data-theme="light"] .pulsy-toolbar-link {
  background: rgba(0, 0, 0, 0.04);
  color: #1a1a22;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .pulsy-segment {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .profile-tabs {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .profile-tab {
  color: #666;
}

html[data-theme="light"] .profile-tab.active {
  color: #1a1a22;
  background: rgba(255, 59, 92, 0.12);
}

html[data-theme="light"] .settings-card,
html[data-theme="light"] .pulsy-form-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .settings-card select,
html[data-theme="light"] .pulsy-form-card input:not([type="file"]),
html[data-theme="light"] .pulsy-form-card textarea,
html[data-theme="light"] .pulsy-form-card select {
  background: #f4f5f8;
  color: #1a1a22;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .follow-modal-content {
  background: #fff;
  color: #1a1a22;
}

html[data-theme="light"] .follow-item {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .messages-container {
  background: #f0f2f6;
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .message-input input {
  background: #fff;
  color: #1a1a22;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .chat-item {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .modal-card {
  background: #fff;
  color: #1a1a22;
}

html[data-theme="light"] .modal-card input:not([type="checkbox"]):not([type="radio"]) {
  background: #f4f5f8;
  color: #1a1a22;
  border-color: rgba(0, 0, 0, 0.1);
}

.pulsy-app {
  max-width: 400px;
  width: 100%;
  max-height: min(92vh, calc(100vw * 19.5 / 9));
  background: linear-gradient(180deg, #0e0e14 0%, #000 28%, #000 100%);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--pulsy-glow), 0 40px 80px rgba(0, 0, 0, 0.75);
  border: 1px solid var(--pulsy-border);
  aspect-ratio: 9 / 19.5;
  display: flex;
  flex-direction: column;
  position: relative;
}

.admin-strip {
  display: block;
  padding: 8px;
  text-align: center;
  background: #1a1a24;
  color: #ff3b5c;
  text-decoration: none;
  font-size: 13px;
  flex-shrink: 0;
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  background: transparent;
  color: white;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* Лента: без боковых отступов — карточка на всю ширину, выше не «съезжает» */
.app-content--feed {
  padding: 0;
}

/* Нижняя навигация */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 12px 14px;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.92) 0%, rgba(0, 0, 0, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--pulsy-border);
  border-radius: 24px 24px 0 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease, transform 0.2s ease;
}

/* Счётчик непрочитанных сообщений */
.nav-badge {
  position: absolute;
  top: -4px;
  right: 2px;
  background: #ff3b5c;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-item i {
  font-size: 22px;
  margin-bottom: 2px;
}

.nav-item.active {
  color: #ff3b5c;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff3b5c, #ff8fa3);
  box-shadow: 0 0 10px rgba(255, 59, 92, 0.5);
}

/* 4 пункта: лента · запись · чаты · профиль */
.bottom-nav--4 {
  padding-left: 6px;
  padding-right: 6px;
}
.bottom-nav--4 .nav-item {
  flex: 1;
  min-width: 0;
  font-size: 10px;
}
.bottom-nav--4 .nav-item i {
  font-size: 20px;
}
.bottom-nav--4 .nav-item--record i {
  font-size: 22px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(150deg, #ff4d6d 0%, #c42d48 55%, #9a1f3a 100%);
  color: #fff;
  margin-bottom: 2px;
  box-shadow: 0 8px 28px rgba(255, 59, 92, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 2px 0 rgba(255, 255, 255, 0.15) inset;
}
.bottom-nav--4 .nav-item--record.active i {
  box-shadow: 0 8px 28px rgba(255, 59, 92, 0.55), 0 0 0 3px rgba(255, 255, 255, 0.28);
}
.bottom-nav--4 .nav-item--record::after {
  display: none;
}
.bottom-nav--4 .nav-item--record span:last-of-type {
  font-weight: 600;
}

/* Лента: скролл на контейнере с роликами — полноэкранный snap по каждому клипу */
.feed-section {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#videoFeedContainer {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.video-card {
  width: 100%;
  min-height: var(--feed-card-h, 100%);
  height: var(--feed-card-h, 100%);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  background: #000;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Появление карточки в ленте */
.video-card--enter {
  animation: pulsyCardEnter 0.55s var(--pulsy-ease-out) both;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: layout style;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #000;
}

.overlay-ui {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 2;
}

.ui-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 0;
  pointer-events: auto;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-shadow: 0 0 15px #ff3b5c;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulsyLogoGlow 4s ease-in-out infinite;
}

.logo i {
  color: #ff3b5c;
}

.top-actions {
  display: flex;
  gap: 10px;
  color: white;
  font-size: 18px;
  align-items: center;
}

.top-actions a.search-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Кнопки шапки ленты: стекло + скругление */
.top-pill-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.38) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--pulsy-ease-out), box-shadow 0.25s ease, border-color 0.2s ease, background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.top-pill-btn:hover {
  border-color: rgba(255, 59, 92, 0.45);
  box-shadow: 0 6px 22px rgba(255, 59, 92, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.top-pill-btn:active {
  transform: scale(0.93);
}

.feed-more-btn.top-pill-btn {
  border: none;
  font: inherit;
}

.top-pill-btn--ghost {
  cursor: pointer;
}

.sound-toggle-wrap .sound-toggle {
  pointer-events: none;
}

.bottom-panel {
  padding: 0 16px 20px;
  pointer-events: auto;
}

.video-info {
  color: white;
  text-shadow: 0 2px 8px black;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

a.author-row:focus-visible {
  outline: 2px solid #ff3b5c;
  outline-offset: 2px;
  border-radius: 8px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--pulsy-pink);
  background: linear-gradient(145deg, #ff3b5c, #ff7b2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.author-details {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.author-name {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-badge {
  color: #3b9eff;
}

.action-bar {
  position: absolute;
  right: 12px;
  bottom: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  pointer-events: auto;
  z-index: 15;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  text-shadow: 0 2px 6px black;
  cursor: pointer;
  background: none;
  border: none;
}

.action-btn i {
  font-size: 34px;
  margin-bottom: 4px;
}

.action-btn span {
  font-size: 13px;
  font-weight: 600;
}

.subscribe-btn {
  position: relative;
  background: linear-gradient(145deg, #ff3b5c, #e62e52);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
  box-shadow: 0 4px 24px rgba(255, 59, 92, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.95);
  transition: background 0.4s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.4s ease,
    transform 0.2s ease;
}

.subscribe-btn.subscribed {
  background: linear-gradient(145deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 24px rgba(46, 204, 113, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.9);
}

.like-btn.active i {
  color: #ff3b5c;
  font-weight: 900;
}

/* Комментарии */
.comments-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 18, 28, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: white;
  padding: 16px;
  max-height: 60%;
  overflow-y: auto;
  z-index: 30;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  display: none;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}

.comments-panel.comments-panel--open {
  animation: pulsySheetUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff3b5c, #ff7b2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  overflow: hidden;
  flex-shrink: 0;
}

.comment-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: 600;
}

.add-comment {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.add-comment input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 22px;
  color: white;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.add-comment input:focus {
  outline: none;
  border-color: rgba(255, 59, 92, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.15);
}

.add-comment button {
  flex-shrink: 0;
  background: linear-gradient(145deg, #ff4d6d, #c42d48);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 59, 92, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.add-comment button:hover {
  box-shadow: 0 6px 22px rgba(255, 59, 92, 0.55);
}

.add-comment button:active {
  transform: scale(0.94);
}

/* ===== Общий UI: ссылки, вкладки, настройки, модалки профиля ===== */

.pulsy-link-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px 8px 4px;
  border-radius: 12px;
  color: #9ecbff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.pulsy-link-back:hover {
  background: rgba(126, 184, 255, 0.1);
  color: #c8e4ff;
}

.pulsy-page-title {
  font-size: 1.38rem;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulsy-page-title i {
  color: var(--pulsy-pink);
  font-size: 1.05em;
}

.pulsy-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pulsy-toolbar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pulsy-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pulsy-toolbar-link:hover {
  border-color: rgba(255, 59, 92, 0.45);
  background: rgba(255, 59, 92, 0.12);
  box-shadow: 0 4px 16px rgba(255, 59, 92, 0.15);
}

.pulsy-toolbar-link:active {
  transform: scale(0.97);
}

/* Сегментированные вкладки (вход / регистрация, загрузка / запись) */
.pulsy-segment {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--pulsy-border);
}

.pulsy-segment__btn,
.pulsy-segment a.pulsy-segment__btn {
  flex: 1;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #9a9aaa;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pulsy-segment__btn:hover,
.pulsy-segment a.pulsy-segment__btn:hover {
  color: #e8e8f0;
}

.pulsy-segment__btn.active,
.pulsy-segment a.pulsy-segment__btn.active {
  background: linear-gradient(135deg, #ff4d6d 0%, #c42d48 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 59, 92, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Вкладки профиля (подчёркивание) */
.profile-tabs {
  display: flex;
  gap: 0;
  margin: 16px 0 12px;
  padding: 0 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--pulsy-border);
}

.profile-tab {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  color: #9a9aaa;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 12px;
  margin: 4px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.profile-tab:hover {
  color: #ddd;
}

.profile-tab.active {
  color: #fff;
  background: rgba(255, 59, 92, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 59, 92, 0.25);
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: block;
}

/* Настройки */
.settings-page {
  padding: 16px 16px 100px;
  max-width: 440px;
  margin: 0 auto;
}

.settings-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid var(--pulsy-border);
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.settings-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 10px;
}

.settings-card select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--pulsy-border);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-card select:focus {
  outline: none;
  border-color: rgba(255, 59, 92, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.12);
}

.settings-card input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  accent-color: var(--pulsy-pink);
  margin-top: 4px;
}

.settings-hint {
  font-size: 12px;
  opacity: 0.65;
  margin-top: 8px;
  line-height: 1.45;
}

.settings-save {
  width: 100%;
  margin-top: 4px;
  padding: 15px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d6d 0%, #c42d48 100%);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 59, 92, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.settings-save:hover {
  box-shadow: 0 10px 34px rgba(255, 59, 92, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.settings-save:active {
  transform: scale(0.98);
}

#settingsStatus {
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.85;
}

/* Загрузка / формы страниц */
.upload-page {
  padding: 16px 16px 100px;
  max-width: 440px;
  margin: 0 auto;
}

.pulsy-form-card {
  width: 100%;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--pulsy-border);
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.pulsy-form-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.pulsy-form-card input:not([type="file"]),
.pulsy-form-card textarea,
.pulsy-form-card select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--pulsy-border);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pulsy-form-card input:focus,
.pulsy-form-card textarea:focus,
.pulsy-form-card select:focus {
  outline: none;
  border-color: rgba(255, 59, 92, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.1);
}

.pulsy-form-card textarea {
  min-height: 88px;
  resize: vertical;
}

.pulsy-form-card input[type="file"] {
  width: 100%;
  margin-bottom: 12px;
  font-size: 13px;
}

.pulsy-submit-wide {
  width: 100%;
  margin-top: 4px;
  padding: 15px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d6d 0%, #c42d48 100%);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 59, 92, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.pulsy-submit-wide:hover:not(:disabled) {
  box-shadow: 0 10px 34px rgba(255, 59, 92, 0.5);
}

.pulsy-submit-wide:active:not(:disabled) {
  transform: scale(0.98);
}

.pulsy-submit-wide:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pulsy-chat-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.35);
  color: #ff8fa3;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.15s ease;
}

.pulsy-chat-back:hover {
  background: rgba(255, 59, 92, 0.2);
  color: #fff;
}

.pulsy-chat-back:active {
  transform: scale(0.97);
}

.record-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.record-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #b8d9ff;
  border: 1px solid rgba(126, 184, 255, 0.35);
  background: rgba(126, 184, 255, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.record-links a:hover {
  background: rgba(126, 184, 255, 0.16);
  border-color: rgba(126, 184, 255, 0.55);
  color: #fff;
}

.record-links a:active {
  transform: scale(0.97);
}

.record-hero h1 i {
  color: var(--pulsy-pink);
}

/* Модалка подписчиков / подписок */
.follow-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 16px;
  animation: pulsyModalBackdrop 0.3s ease both;
}

.follow-modal-content {
  position: relative;
  background: linear-gradient(180deg, #22222e 0%, #18181f 100%);
  border-radius: 24px;
  padding: 48px 16px 16px;
  width: 100%;
  max-width: 360px;
  max-height: 72vh;
  overflow-y: auto;
  color: #fff;
  border: 1px solid var(--pulsy-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pulsyModalCard 0.4s var(--pulsy-ease-spring) both;
}

.follow-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.follow-item:last-child {
  border-bottom: none;
}

.follow-item-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.follow-mini-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ff4d6d, #c42d48);
  color: #fff;
  box-shadow: 0 2px 12px rgba(255, 59, 92, 0.35);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.follow-mini-btn:hover {
  filter: brightness(1.06);
}

.follow-mini-btn:active {
  transform: scale(0.96);
}

.follow-mini-btn.subscribed {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  box-shadow: none;
  border: 1px solid var(--pulsy-border);
}

.follow-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff3b5c, #ff7b2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--pulsy-border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.close-modal:hover {
  background: rgba(255, 59, 92, 0.2);
}

.close-modal:active {
  transform: scale(0.94);
}

/* Теги интересов (регистрация) */
.interest-tag {
  display: inline-block;
  padding: 9px 16px;
  margin: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pulsy-border);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s var(--pulsy-ease-spring), background 0.25s ease, border-color 0.2s ease;
}

.interest-tag:hover {
  transform: scale(1.05);
  border-color: rgba(255, 59, 92, 0.35);
}

.interest-tag.selected {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.45), rgba(196, 45, 72, 0.35));
  border-color: rgba(255, 59, 92, 0.55);
  color: #fff;
  animation: pulsyTagPop 0.45s var(--pulsy-ease-spring);
}

/* Чаты */
.chats-list {
  margin-bottom: 20px;
}

.chats-list-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chats-list-title i {
  color: var(--pulsy-pink);
}

.chats-view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.chats-view-header .avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: linear-gradient(145deg, rgba(30, 30, 42, 0.95), rgba(20, 20, 30, 0.9));
  border-radius: 18px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 1px solid var(--pulsy-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s var(--pulsy-ease-out), border-color 0.2s ease, box-shadow 0.25s ease;
}

.chat-item:hover {
  transform: translateX(3px);
  border-color: rgba(255, 59, 92, 0.3);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3), -4px 0 0 0 rgba(255, 59, 92, 0.45);
}

.chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff3b5c, #ff7b2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

.chat-info {
  flex: 1;
}

.chat-name {
  font-weight: 600;
}

.chat-last-message {
  opacity: 0.7;
  font-size: 14px;
}

.messages-container {
  height: min(42vh, 320px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(14, 14, 20, 0.95) 0%, rgba(22, 22, 30, 0.98) 100%);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--pulsy-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.message {
  margin-bottom: 8px;
  max-width: 80%;
}

.message.sent {
  margin-left: auto;
  background: #ff3b5c;
  padding: 8px 12px;
  border-radius: 18px 18px 4px 18px;
}

.message.received {
  background: #2a2a35;
  padding: 8px 12px;
  border-radius: 18px 18px 18px 4px;
}

.message-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.message-input input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--pulsy-border);
  padding: 12px 18px;
  border-radius: 22px;
  color: white;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.message-input input:focus {
  outline: none;
  border-color: rgba(255, 59, 92, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.12);
}

.message-input button {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff4d6d, #c42d48);
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 59, 92, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.message-input button:hover {
  box-shadow: 0 6px 22px rgba(255, 59, 92, 0.55);
}

.message-input button:active {
  transform: scale(0.94);
}

/* Профиль */
.profile-hero {
  position: relative;
  text-align: center;
  margin: 0 -8px 20px;
  padding: 28px 16px 24px;
  border-radius: 28px;
  background: radial-gradient(ellipse 80% 120% at 50% -30%, rgba(255, 59, 92, 0.35), transparent 55%),
    linear-gradient(165deg, rgba(30, 30, 45, 0.9) 0%, rgba(10, 10, 16, 0.6) 100%);
  border: 1px solid var(--pulsy-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-header {
  text-align: center;
  margin-bottom: 24px;
}

.avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff3b5c, #ff7b2c);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: bold;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px var(--pulsy-pink-dim), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-row {
  margin-top: 12px;
}

.btn-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--pulsy-border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, border-color 0.2s, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-avatar:active {
  transform: scale(0.97);
}

.btn-avatar:hover {
  background: rgba(255, 59, 92, 0.15);
  border-color: rgba(255, 59, 92, 0.45);
}

.display-name {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.username {
  opacity: 0.7;
  margin: 4px 0 8px;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 16px 8px;
  border: 1px solid var(--pulsy-border);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  opacity: 0.6;
  font-size: 14px;
}

.stat-row-hint {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 2px;
}

.video-thumb .views {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 3px #000;
}

.btn {
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #32323e 0%, #2a2a35 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s var(--pulsy-ease-out), box-shadow 0.25s ease, filter 0.2s ease;
}

.btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #ff4d6d 0%, #c42d48 55%, #a82540 100%);
  box-shadow: 0 6px 22px rgba(255, 59, 92, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: rgba(255, 59, 92, 0.45);
  background: rgba(255, 59, 92, 0.08);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 16px;
}

.video-thumb {
  aspect-ratio: 9/16;
  background: #1a1a1e;
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

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

/* Модальное окно — выше прелоадера, иначе гость не видит форму входа */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
}

.modal-card {
  background: linear-gradient(180deg, #24242e 0%, #18181f 100%);
  border-radius: 28px;
  padding: 28px 22px;
  width: 90%;
  max-width: 360px;
  color: white;
  border: 1px solid var(--pulsy-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.modal-card input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 16px;
  border: 1px solid var(--pulsy-border);
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-card input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: rgba(255, 59, 92, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.12);
}

.auth-btn {
  width: 100%;
  padding: 16px;
  border-radius: 60px;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #34343f 0%, #2a2a35 100%);
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.auth-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.auth-btn.primary {
  border: none;
  background: linear-gradient(135deg, #ff4d6d 0%, #c42d48 100%);
  box-shadow: 0 8px 26px rgba(255, 59, 92, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-btn.primary:hover {
  box-shadow: 0 10px 32px rgba(255, 59, 92, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Прелоадер — ниже модалки авторизации; после скрытия не перехватывает клики */
#preloader {
  position: fixed;
  inset: 0;
  background: #0b0b0f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  transition: opacity 0.35s ease;
}

#preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff3b5c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Индикатор загрузки видео */
.video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  z-index: 5;
  background: rgba(0,0,0,0.5);
  padding: 12px 20px;
  border-radius: 40px;
  backdrop-filter: blur(4px);
}
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #ff3b5c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 8px;
}
.loading-text {
  font-size: 14px;
}

/* ——— Микроанимации: подписка, лайк, кнопки ——— */
.subscribe-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.subscribe-btn.subscribe-btn--pulse {
  animation: pulsySubscribePop 0.65s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.subscribe-btn.subscribe-btn--ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 59, 92, 0.85);
  animation: pulsyRingOut 0.75s ease-out forwards;
  pointer-events: none;
}

.subscribe-btn.subscribed.subscribe-btn--ring::before {
  border-color: rgba(46, 204, 113, 0.9);
}

@keyframes pulsySubscribePop {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(0.88) rotate(-8deg); }
  55% { transform: scale(1.12) rotate(4deg); }
  80% { transform: scale(0.98) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes pulsyRingOut {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

.like-btn.like-btn--pop {
  animation: pulsyLikeBump 0.45s cubic-bezier(0.34, 1.5, 0.64, 1);
}

@keyframes pulsyLikeBump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.18); }
}

.action-btn:active {
  transform: scale(0.92);
  transition: transform 0.12s ease;
}

.sound-toggle-wrap {
  transition: transform 0.2s var(--pulsy-ease-out);
}

.sound-toggle-wrap:active {
  transform: scale(0.92);
}

.sound-toggle {
  font-size: 17px;
}

@keyframes pulsySheetUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nav-item:active {
  transform: scale(0.94);
}

.nav-item.active i {
  animation: pulsyNavPulse 0.5s ease;
}

@keyframes pulsyNavPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes pulsyLogoGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

/* ——— Страница поиска ——— */
.app-content--search {
  padding: 14px 14px 8px;
}

.search-page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(255, 59, 92, 0.25);
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.search-bar input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--pulsy-border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.search-bar input:focus {
  border-color: rgba(255, 59, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.search-bar button {
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff3b5c 0%, #e62d50 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 59, 92, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.search-bar button:active {
  transform: scale(0.96);
}

.search-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin: 20px 0 12px;
}

.search-user-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(145deg, rgba(30, 30, 42, 0.95), rgba(18, 18, 28, 0.9));
  border-radius: 18px;
  border: 1px solid var(--pulsy-border);
  text-decoration: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-user-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 59, 92, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.search-user-card:active {
  transform: scale(0.98);
}

.search-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff3b5c, #ff7b2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.25);
}

.search-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-user-meta {
  flex: 1;
  min-width: 0;
}

.search-user-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}

.search-user-handle {
  font-size: 13px;
  opacity: 0.55;
  margin-top: 2px;
}

.search-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.search-video-card {
  display: block;
  text-decoration: none;
  color: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--pulsy-border);
  background: var(--pulsy-surface);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.search-video-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 59, 92, 0.4);
  box-shadow: 0 16px 40px rgba(255, 59, 92, 0.12), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-video-card:active {
  transform: scale(0.97);
}

/* Прямоугольник 9:16 — превью ролика */
.search-video-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  background: #0a0a0f;
  overflow: hidden;
}

.search-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.search-video-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0.92) 100%
  );
  pointer-events: none;
}

.search-video-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 10px 12px;
  z-index: 2;
  pointer-events: none;
}

.search-video-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-video-user {
  display: block;
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.search-stagger {
  opacity: 0;
  animation: pulsyFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pulsyFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-empty-hint {
  opacity: 0.65;
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 4px;
}

.search-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.search-results-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

/* ========== Анимации и полировка UI ========== */

@keyframes pulsyCardEnter {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(12px);
    filter: brightness(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

@keyframes pulsyRecordGlow {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(255, 59, 92, 0.35), 0 0 0 0 rgba(255, 59, 92, 0.25);
  }
  50% {
    box-shadow: 0 8px 28px rgba(255, 59, 92, 0.55), 0 0 0 10px rgba(255, 59, 92, 0);
  }
}

.bottom-nav--4 .nav-item--record:not(.active) i {
  animation: pulsyRecordGlow 2.8s ease-in-out infinite;
}

.bottom-nav {
  position: relative;
}

.bottom-nav::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 59, 92, 0.45) 30%,
    rgba(59, 130, 255, 0.35) 70%,
    transparent
  );
  opacity: 0.9;
  animation: pulsyNavLineFlow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulsyNavLineFlow {
  0%, 100% {
    opacity: 0.5;
    transform: scaleX(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

.nav-item {
  transition: color 0.28s var(--pulsy-ease-out), transform 0.22s var(--pulsy-ease-out);
}

.nav-item:hover:not(.active) {
  color: #ddd;
  transform: translateY(-1px);
}

.pulsy-app {
  transition: box-shadow 0.45s ease, border-color 0.35s ease;
}

.pulsy-app:hover {
  box-shadow: var(--pulsy-glow), 0 44px 88px rgba(0, 0, 0, 0.78);
}

.video-thumb {
  transition: transform 0.28s var(--pulsy-ease-out), box-shadow 0.3s ease;
}

.video-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.video-thumb:active {
  transform: scale(0.98);
}

.profile-hero {
  animation: pulsyHeroDrift 14s ease-in-out infinite alternate;
}

@keyframes pulsyHeroDrift {
  from {
    filter: saturate(1) hue-rotate(0deg);
  }
  to {
    filter: saturate(1.08) hue-rotate(6deg);
  }
}

.modal {
  animation: pulsyModalBackdrop 0.35s var(--pulsy-ease-out) both;
}

@keyframes pulsyModalBackdrop {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

.modal-card {
  animation: pulsyModalCard 0.45s var(--pulsy-ease-spring) both;
}

@keyframes pulsyModalCard {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.btn-primary {
  transition: transform 0.2s var(--pulsy-ease-out), box-shadow 0.3s ease, filter 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 8px 28px rgba(255, 59, 92, 0.45);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.stat-item {
  transition: transform 0.2s ease;
}

.stat-item:hover .stat-value {
  color: #ff3b5c;
  transition: color 0.25s ease;
}

.search-play-icon {
  animation: pulsyPlayPulse 2.2s ease-in-out infinite;
}

@keyframes pulsyPlayPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 0.92;
  }
}

.comment-item {
  animation: pulsyCommentFade 0.4s var(--pulsy-ease-out) both;
}

.comment-item:nth-child(1) {
  animation-delay: 0.02s;
}
.comment-item:nth-child(2) {
  animation-delay: 0.06s;
}
.comment-item:nth-child(3) {
  animation-delay: 0.1s;
}
.comment-item:nth-child(4) {
  animation-delay: 0.14s;
}
.comment-item:nth-child(5) {
  animation-delay: 0.18s;
}

@keyframes pulsyCommentFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.description {
  animation: pulsyDescReveal 0.65s var(--pulsy-ease-out) 0.1s both;
}

@keyframes pulsyDescReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar {
  transition: transform 0.3s var(--pulsy-ease-spring), box-shadow 0.3s ease;
}

.author-row:hover .avatar {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.35);
}

.search-bar button {
  transition: transform 0.2s var(--pulsy-ease-out), filter 0.25s ease, box-shadow 0.25s ease;
}

.search-bar button:hover {
  transform: scale(1.03);
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(255, 59, 92, 0.35);
}

.search-bar button:active {
  transform: scale(0.97);
}

.admin-strip {
  transition: background 0.25s ease, letter-spacing 0.3s ease;
}

.admin-strip:hover {
  background: #252532;
  letter-spacing: 0.02em;
}

.action-btn {
  transition: transform 0.2s var(--pulsy-ease-out), filter 0.2s ease;
}

.action-btn:hover {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
}

.subscribe-btn:hover {
  transform: scale(1.04);
}

.subscribe-btn.subscribed:hover {
  transform: scale(1.04);
}

#preloader .loader {
  animation: spin 0.85s linear infinite, pulsyLoaderHue 5s linear infinite;
}

@keyframes pulsyLoaderHue {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

.search-video-card {
  transition: transform 0.28s var(--pulsy-ease-out), box-shadow 0.3s ease;
}

.search-video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.search-video-card:active {
  transform: translateY(0) scale(0.98);
}

.auth-btn.primary {
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.auth-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.35);
}

@keyframes pulsyTagPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* Скелетон ленты, меню «ещё», поиск */
.feed-skeleton-card {
  min-height: var(--feed-card-h, 60vh);
  background: linear-gradient(110deg, #14141c 0%, #22222e 45%, #14141c 90%);
  background-size: 200% 100%;
  animation: pulsyShimmerBar 1.15s ease-in-out infinite;
}

@keyframes pulsyShimmerBar {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.feed-more-sheet {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 35;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: 96px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: feedMoreBackdropIn 0.28s ease both;
}

@keyframes feedMoreBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feed-more-sheet--open {
  display: flex;
}

.feed-more-sheet-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 312px;
  background: linear-gradient(180deg, rgba(32, 32, 44, 0.98) 0%, rgba(16, 16, 24, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 10px 10px 12px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 59, 92, 0.08) inset, 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transform-origin: 50% 100%;
}

.feed-more-sheet--open .feed-more-sheet-inner {
  animation: feedMoreSheetPop 0.4s cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

@keyframes feedMoreSheetPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.feed-more-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  margin: 4px auto 12px;
}

.feed-more-sheet-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  margin: 0 0 10px;
}

.feed-more-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  margin: 0;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.feed-more-item:active {
  transform: scale(0.98);
}

.feed-more-item-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-more-item--warn .feed-more-item-icon {
  background: rgba(255, 183, 77, 0.12);
  border-color: rgba(255, 183, 77, 0.25);
  color: #ffb74d;
}

.feed-more-item--neutral .feed-more-item-icon {
  background: rgba(130, 170, 255, 0.12);
  border-color: rgba(130, 170, 255, 0.22);
  color: #9cb4ff;
}

.feed-more-item--mute .feed-more-item-icon {
  background: rgba(255, 128, 171, 0.12);
  border-color: rgba(255, 128, 171, 0.22);
  color: #ff8fab;
}

.feed-more-item:hover {
  background: rgba(255, 59, 92, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 59, 92, 0.15);
}

.feed-more-item-label {
  flex: 1;
  line-height: 1.3;
}

.feed-more-cancel {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.feed-more-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.search-filter-chips {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9a9aaa;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--pulsy-ease-out), box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-chip:hover {
  color: #e8e8f0;
  border-color: rgba(255, 59, 92, 0.35);
  transform: translateY(-1px);
}

.search-chip.active {
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.35) 0%, rgba(200, 45, 72, 0.28) 100%);
  color: #fff;
  border-color: rgba(255, 59, 92, 0.55);
  box-shadow: 0 4px 18px rgba(255, 59, 92, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

@media (prefers-reduced-motion: reduce) {
  .search-stagger,
  .subscribe-btn.subscribe-btn--pulse,
  .like-btn.like-btn--pop,
  .comments-panel.comments-panel--open,
  .logo,
  .video-card--enter,
  .bottom-nav--4 .nav-item--record:not(.active) i,
  .bottom-nav::after,
  .profile-hero,
  .modal,
  .modal-card,
  .search-play-icon,
  .comment-item,
  .description,
  .interest-tag.selected,
  #preloader .loader,
  .feed-skeleton-card,
  .feed-more-sheet,
  .feed-more-sheet--open .feed-more-sheet-inner {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .search-stagger {
    animation-delay: 0s !important;
  }
  .nav-item:hover,
  .chat-item:hover,
  .video-thumb:hover,
  .btn-primary:hover,
  .subscribe-btn:hover,
  .pulsy-app:hover {
    transform: none !important;
  }
  .search-stagger,
  .comment-item,
  .description {
    opacity: 1 !important;
    transform: none !important;
  }
}