/* === ИСПРАВЛЕНИЯ ДЛЯ СТРАНИЦЫ ПОЛЬЗОВАТЕЛЕЙ === */

/* 1. Исправление заголовка: прижимаем к верхнему краю */
.users-header {
    top: -20px !important;
    margin-left: -20px !important;
    margin-right: -20px !important;
    position: sticky !important;
}

/* 2. Исправление размера аватара в списке пользователей */
.user-card .user-avatar {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
}

/* === ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ АВАТАРОК === */

/* 3. Контейнер для аватара (картинка или инициалы) */
.avatar-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0; /* Светлый фон на случай проблем */
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4. Стиль для сгенерированных инициалов */
.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em; /* Делаем букву крупнее */
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

/* =================================================================== */

/* При просмотре Shorts скрываем нижнюю панель для полного погружения */
.body-shorts-view .bottom-tabs {
    display: none;
}

/* ----- ГЛОБАЛЬНОЕ ОТКЛЮЧЕНИЕ СИНЕЙ ПОДСВЕТКИ ПРИ КЛИКАХ ----- */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    outline: none !important;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
}

button, a, input, textarea, select, video, .shorts-video, .short-video-wrapper {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    outline: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* ----- СКРЫВАЕМ .bottom-tabs на Shorts БЕЗ ВАРИАНТОВ И УБИРАЕМ ВСЕ ОТСТУПЫ ----- */
/* Скрываем панель навигации ТОЛЬКО на странице Shorts */
body.body-shorts-view .bottom-tabs,
.body-shorts-view .bottom-tabs,
html[data-page="shorts"] .bottom-tabs,
.shorts-container ~ .bottom-tabs {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Скрываем панель навигации на страницах входа и регистрации */
.auth-page .bottom-tabs,
body.auth-page .bottom-tabs {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
}

/* На всех остальных страницах панель должна быть видна */
.bottom-tabs {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Плавающие кнопки для Shorts (без шапки) */
.shorts-floating-controls {
    position: fixed !important;
    top: 16px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 20px !important;
    pointer-events: none !important;
}
.shorts-floating-controls .btn-home,
.shorts-floating-controls .create-short-btn {
    pointer-events: all !important;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 12px; text-decoration: none;
    color: #fff !important;
    background: rgba(0,0,0,0.35) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    backdrop-filter: blur(12px) !important;
}
.shorts-floating-controls .btn-home:hover,
.shorts-floating-controls .create-short-btn:hover { background: rgba(0,0,0,0.45) !important; }

/* УБИРАЕМ ЛИНИЮ ФОНА ПОД BODY - ЗАПОЛНЯЕМ ВСЮ ВЫСОТУ БЕЗ ОТСТУПОВ */
html.body-shorts-view,
body.body-shorts-view {
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* УБИРАЕМ ПСЕВДОЭЛЕМЕНТЫ BODY, КОТОРЫЕ СОЗДАЮТ ЛИНИЮ ФОНА */
body.body-shorts-view::before,
body.body-shorts-view::after {
    display: none !important;
    content: none !important;
}

/* Адаптируем плеер под новый размер - ВСЕ КОНТЕЙНЕРЫ ЗАНИМАЮТ ВСЮ ВЫСОТУ ЭКРАНА БЕЗ ОТСТУПОВ */
/* ПЕРЕОПРЕДЕЛЯЕМ ВСЕ КОНТЕЙНЕРЫ - УБИРАЕМ ЛЮБЫЕ ВЫЧЕТЫ ИЗ ВЫСОТЫ */
body.body-shorts-view .app-container,
body.body-shorts-view .shorts-container,
.shorts-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important; /* ТОЧНО 100vh БЕЗ ВЫЧЕТОВ */
    min-height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    padding: 0;
    margin: 0;
}

.shorts-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    margin: 0;
}

.shorts-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* ПЕРЕОПРЕДЕЛЯЕМ ВСЕ СТИЛИ ИЗ style.css ДЛЯ КОНТЕЙНЕРА - УБИРАЕМ calc(100vh - 70px) - МАКСИМАЛЬНАЯ СПЕЦИФИЧНОСТЬ */
html body.body-shorts-view .app-container .shorts-container .shorts-player .shorts-video-container,
body.body-shorts-view body.body-shorts-view .shorts-video-container,
body.body-shorts-view .shorts-video-container,
.body-shorts-view .shorts-video-container,
.shorts-container .shorts-video-container,
.shorts-player .shorts-video-container,
.shorts-video-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important; /* УБИРАЕМ calc(100vh - 70px) - ИСПОЛЬЗУЕМ ТОЧНО 100vh */
    max-height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    max-width: none !important; /* Убираем ограничение max-width: 900px из style.css */
    margin-left: 0 !important; /* Убираем margin: 0 auto из style.css */
    margin-right: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    /* УБИРАЕМ ВСЕ НАСЛЕДОВАНИЯ ИЗ style.css */
    overflow: visible !important;
}

/* ВИДЕО ВПЛОТНУЮ К ВЕРХНЕМУ И НИЖНЕМУ КРАЮ ЭКРАНА - МАКСИМАЛЬНАЯ СПЕЦИФИЧНОСТЬ */
.shorts-video-container .short-video-wrapper,
.short-video-wrapper.enter,
.short-video-wrapper.next,
.short-video-wrapper.prev,
.short-video-wrapper {
    position: absolute !important;
    top: 0 !important; /* ВПЛОТНУЮ К ВЕРХУ */
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important; /* Центрирование только по горизонтали */
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 100vh !important; /* ВСЯ ВЫСОТА ЭКРАНА */
    max-height: 100vh !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
}

/* ПЛАВНАЯ АНИМАЦИЯ ПЕРЕХОДА МЕЖДУ ВИДЕО - ВЕРТИКАЛЬНОЕ СКОЛЬЖЕНИЕ (УСКОРЕНА В 3 РАЗА) */
.short-video-wrapper {
    top: 0 !important;
    height: 100vh !important;
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.17s ease !important;
    will-change: transform, opacity;
}

/* Новое видео входит снизу при переходе вперед */
.short-video-wrapper.next {
    transform: translateX(-50%) translateY(100vh) !important;
    opacity: 0 !important;
}

/* Новое видео входит сверху при переходе назад */
.short-video-wrapper.prev {
    transform: translateX(-50%) translateY(-100vh) !important;
    opacity: 0 !important;
}

/* Текущее видео - плавное появление */
.short-video-wrapper.enter {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
}

/* Старое видео уходит вверх при переходе вперед */
.short-video-wrapper.exit-up {
    transform: translateX(-50%) translateY(-100vh) !important;
    opacity: 0 !important;
}

/* Старое видео уходит вниз при переходе назад */
.short-video-wrapper.exit-down {
    transform: translateX(-50%) translateY(100vh) !important;
    opacity: 0 !important;
}

/* Визуальная рамка расчётного бокса 9:16 для отладки */
#shorts-debug-frame {
    position: fixed !important;
    top: 0 !important; left: 50% !important;
    transform: translateX(-50%) !important;
    border: 3px dashed rgba(255,255,255,0.85) !important;
    border-radius: 16px !important;
    z-index: 20 !important;
    pointer-events: none !important;
    display: none;
}

.shorts-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* вписываемся в 9:16 бокс, показывая черные поля */
    object-position: center center !important;
    background: #000 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    cursor: pointer !important;
}

/* Красивая анимация паузы/воспроизведения при клике - позиционирование через JS */
.play-pause-overlay {
    position: fixed !important; /* Fixed для точного позиционирования относительно viewport */
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(15px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important; /* ОЧЕНЬ ВЫСОКИЙ z-index чтобы быть поверх всего */
    pointer-events: none !important;
    opacity: 0 !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.2s ease !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6) !important;
    margin: 0 !important; /* Убираем margin, позиционирование через left/top из JS */
    /* left и top устанавливаются через JS для точного центрирования */
}

.play-pause-overlay i {
    font-size: 42px !important;
    color: #fff !important;
    margin-left: 4px !important; /* Смещение для иконки play для визуального центрирования */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7) !important;
}

.play-pause-overlay.show {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.play-pause-overlay.hide {
    opacity: 0 !important;
    transform: translate(-50%, -50%) scale(0.7) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 1, 1),
                opacity 0.2s ease !important;
}

/* Поправляем позиционирование UI-элементов - БЕЗ ОТСТУПОВ СНИЗУ */
.shorts-ui-overlay {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Прижимаем инфо ВПЛОТНУЮ в левый нижний угол ЭКРАНА БЕЗ ФОНА */
.video-info {
    position: fixed !important;
    left: 0 !important; /* ВПЛОТНУЮ К ЛЕВОМУ КРАЮ ЭКРАНА */
    right: auto !important;
    bottom: 0 !important; /* ВПЛОТНУЮ К НИЖНЕМУ КРАЮ ЭКРАНА */
    top: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: calc(100vw - 140px) !important; /* учитываем кнопки справа */
    padding: 12px 16px !important; /* Небольшой внутренний отступ для текста */
    text-align: left !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    z-index: 30 !important;
    margin: 0 !important;
}

.video-info .video-author,
.video-info .video-title,
.video-info .video-description {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
}

@media (max-width: 768px) {
    .video-info { left: 0 !important; bottom: 0 !important; padding: 10px 12px !important; max-width: calc(100vw - 100px) !important; }
    .side-controls { right: 2px !important; padding-right: 0 !important; gap: 14px !important; bottom: auto !important; }
    .side-btn { width: 48px !important; height: 48px !important; font-size: 18px !important; }
    .side-btn i { font-size: 20px !important; }
}

/* БОКОВЫЕ КНОПКИ УПРАВЛЕНИЯ (ЛАЙК, ДИЗЛАЙК, КОММЕНТАРИЙ) - ПРИЖАТЫ К ПРАВОМУ КРАЮ ЭКРАНА */
.side-controls {
    position: fixed !important;
    right: 4px !important; /* МИНИМАЛЬНЫЙ отступ от правого края ЭКРАНА */
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    z-index: 30 !important;
    pointer-events: auto !important;
    padding-right: 0 !important;
    margin: 0 !important;
    left: auto !important;
    width: auto !important;
    max-width: none !important;
    bottom: auto !important; /* Отменяем bottom из других стилей */
}

.side-btn {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(12px) !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 20px !important;
    padding: 0 !important;
}

.side-btn:hover {
    background: rgba(0, 0, 0, 0.7) !important;
    transform: scale(1.1) !important;
}

.side-btn.like-btn:hover {
    color: #ff3040 !important;
}

.side-btn.dislike-btn:hover {
    color: #6c63ff !important;
}

.side-btn.comment-btn:hover {
    color: #ffd700 !important;
}

.side-btn span {
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    margin-top: 0 !important;
    display: block !important;
    min-height: 12px !important;
    overflow: visible !important;
    position: relative !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
}

.side-btn i {
    font-size: 22px !important;
}

/* ЖЕСТКО СКРЫВАЕМ УДАЛЕННЫЕ ЭЛЕМЕНТЫ */
.short-skeleton,
.skeleton-player,
.skeleton-ui,
.skeleton-actions,
.skeleton-btn,
.navigation-hints,
.swipe-hint {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
}

/* === ПАНЕЛЬ КОММЕНТАРИЕВ ДЛЯ SHORTS === */

/* Полностью отключаем старую модалку комментариев */
.comments-modal,
.modal.comments-modal,
#commentsModal,
.modal#commentsModal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: fixed !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Переопределяем старые стили для комментариев, чтобы они не влияли на новую панель */
.comments-panel .comment,
.comments-panel .comments-list,
.comments-panel .comment-item,
.comments-panel #commentsList {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    max-height: none !important;
    overflow: visible !important;
}

.comments-panel .add-comment {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    display: none !important;
}

/* Панель комментариев - темная, на весь экран, снизу выезжает */
.comments-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    overflow: hidden !important;
}

.comments-panel.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.comments-panel-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh !important;
    background: #1a1a1a !important;
    border-radius: 24px 24px 0 0 !important; /* Скругления только сверху */
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
}

.comments-panel.is-visible .comments-panel-content {
    transform: translateY(0) !important;
}

/* Заголовок панели */
.comments-panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

.comments-panel-header h3 {
    margin: 0 !important;
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}

.comments-close-btn {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
}

.comments-close-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Контейнер списка комментариев */
.comments-list-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
}

.comments-list {
    padding: 0 !important;
    margin: 0 !important;
}

/* Элемент комментария - без скругленных прямоугольников, только тонкая линия */
.comment-item {
    padding: 16px 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
    border-radius: 0 !important;
    transition: background 0.2s ease !important;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.comment-item:last-child {
    border-bottom: none !important;
}

/* Заголовок комментария */
.comment-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
}

.comment-user {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
}

.comment-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
}

.comment-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.comment-username {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.comment-time {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 12px !important;
}

/* Кнопка лайка комментария */
.comment-like-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    font-size: 14px !important;
}

.comment-like-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ff3040 !important;
}

.comment-like-btn.liked {
    color: #ff3040 !important;
    animation: likePulse 0.3s ease !important;
}

@keyframes likePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.comment-like-btn i {
    font-size: 14px !important;
}

.comment-likes-count {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* Содержимое комментария */
.comment-content {
    margin-top: 8px !important;
    padding-left: 52px !important;
}

.comment-content p {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
}

/* Форма ввода комментария */
.comments-input-form {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: #1a1a1a !important;
    flex-shrink: 0 !important;
}

.comments-input-form input {
    flex: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 24px !important;
    padding: 12px 20px !important;
    color: #fff !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.comments-input-form input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.comments-input-form input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.comments-send-btn {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.comments-send-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4) !important;
}

.comments-send-btn i {
    font-size: 16px !important;
}

/* Состояния загрузки и пустоты */
.comments-loading,
.comments-empty,
.comments-error {
    padding: 40px 24px !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 14px !important;
}

/* Скроллбар для списка комментариев */
.comments-list-container::-webkit-scrollbar {
    width: 6px !important;
}

.comments-list-container::-webkit-scrollbar-track {
    background: transparent !important;
}

.comments-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 3px !important;
}

.comments-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* === СОЗДАНИЕ SHORTS - МНОГОШАГОВАЯ ФОРМА === */

/* ЖЕСТКО ОТКЛЮЧАЕМ ВСЮ СТАРУЮ МОДАЛКУ */
.modal.create-short-modal,
.create-short-modal.modal,
#createShortModal.modal,
#createShortModal.create-short-modal:not(.create-short-modal-fullscreen),
#createShortModal:not(.create-short-modal-fullscreen) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: fixed !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

/* Старые элементы формы скрываем */
.create-short-content:not(.create-short-container),
.modal-content.create-short-content {
    display: none !important;
    visibility: hidden !important;
}

.create-short-form:not(.step-content) {
    display: none !important;
}

/* Полноэкранное модальное окно - НОВАЯ ВЕРСИЯ */
.create-short-modal-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 20000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    visibility: visible !important;
}

.create-short-modal-fullscreen.active,
#createShortModal.create-short-modal-fullscreen.active,
#createShortModal.create-short-modal-fullscreen[style*="display: flex"],
#createShortModal.create-short-modal-fullscreen[style*="display:flex"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.create-short-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 1 !important;
}

.create-short-container {
    position: relative !important;
    width: 100% !important;
    max-width: 600px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    background: #1a1a1a !important;
    overflow: hidden !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 auto !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8) !important;
    pointer-events: all !important;
}

/* Шаги формы */
.create-short-step {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 0 !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease !important;
    pointer-events: none !important;
    overflow-y: auto !important;
    padding: 0 !important;
    background: #1a1a1a !important;
}

.create-short-step.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: all !important;
}

.create-short-step.prev {
    transform: translateX(-100%) !important;
}

/* Заголовок шага */
.step-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
    background: #1a1a1a !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.step-header h2 {
    margin: 0 !important;
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 600 !important;
}

.create-short-close {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
}

.create-short-close:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Контент шага */
.step-content {
    flex: 1 !important;
    padding: 24px !important;
    overflow-y: auto !important;
}

/* Область загрузки видео */
.video-upload-area {
    width: 100% !important;
    min-height: 400px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.upload-placeholder {
    text-align: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.upload-placeholder i {
    font-size: 64px !important;
    color: rgba(255, 255, 255, 0.3) !important;
    margin-bottom: 16px !important;
}

.upload-placeholder p {
    font-size: 16px !important;
    margin-bottom: 24px !important;
}

.upload-video-btn {
    padding: 12px 32px !important;
    font-size: 16px !important;
}

/* Предпросмотр видео */
.video-preview-area {
    width: 100% !important;
}

.video-preview-wrapper {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto 24px auto !important;
    aspect-ratio: 9 / 16 !important;
    background: #000 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
}

.video-preview-player {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.preview-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.preview-actions .btn {
    flex: 1 !important;
    min-width: 120px !important;
    max-width: 200px !important;
}

/* Форма */
.form-group {
    margin-bottom: 24px !important;
}

.form-group label {
    display: block !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
}

.required {
    color: #ff3040 !important;
}

.hashtags-hint {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 12px !important;
    font-weight: normal !important;
}

.form-group input,
.form-group textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-family: inherit !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.form-group textarea {
    resize: vertical !important;
    min-height: 80px !important;
}

/* Хэштеги */
.hashtags-preview {
    margin-top: 12px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-height: 32px !important;
}

.hashtag-tag {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 12px !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important;
    color: #fff !important;
    border-radius: 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.hashtags-error {
    margin-top: 8px !important;
    color: #ff3040 !important;
    font-size: 13px !important;
    min-height: 18px !important;
}

/* Действия шага */
.step-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: 32px !important;
    justify-content: space-between !important;
}

.step-actions .btn {
    flex: 1 !important;
    min-width: 120px !important;
}

/* Прогресс загрузки */
.upload-progress-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    gap: 24px !important;
}

.upload-progress-icon {
    font-size: 64px !important;
    color: rgba(255, 255, 255, 0.3) !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.upload-progress-bar {
    width: 100% !important;
    max-width: 400px !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

.upload-progress-fill {
    height: 100% !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important;
    width: 0% !important;
    transition: width 0.3s ease !important;
    border-radius: 3px !important;
}

.upload-progress-text {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 16px !important;
    margin: 0 !important;
}

.upload-success {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    gap: 16px !important;
    color: #4caf50 !important;
}

.upload-success i {
    font-size: 64px !important;
    animation: scaleIn 0.5s ease !important;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.upload-success p {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Кнопки */
.btn {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important;
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* === Дополнительные правки: дизлайк и опросы === */
.post .post-actions .btn-dislike.is-downvoted i { color: #e53935; }

.post-poll .poll-option-item { border: 2px solid transparent; border-radius: 10px; padding: 6px 8px; margin: 6px 0; }
.post-poll .poll-option-item.is-voted { border-color: #2ecc71; }
.post-poll .poll-option-item.is-max .poll-progress { background: linear-gradient(90deg, #ffd54f, #ffb300); position: relative; }
.post-poll .poll-option-item.is-max .poll-progress::after { content: '✶'; position: absolute; right: 6px; top: -6px; color: #ffca28; animation: star-blink 1.2s infinite ease-in-out; }
@keyframes star-blink { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.2); opacity: 1; } }

/* === Создание поста - полноэкранная модалка в стиле Shorts === */
.create-post-modal-fullscreen { position: fixed; inset: 0; z-index: 20000; display: none; align-items: center; justify-content: center; }
.create-post-modal-fullscreen[style*="display: none"] { display: none; }
.create-post-modal-fullscreen[style*="display: flex"], .create-post-modal-fullscreen.active { display: flex; }
.create-post-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.create-post-container { position: fixed; inset: 0; width: 100vw; height: 100vh; background: linear-gradient(135deg, #000000 0%, #0a0a0f 50%, #141420 100%) !important; border-radius: 0; box-shadow: none; z-index: 1; display: flex; flex-direction: column; overflow: hidden; }
.create-post-container .step-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.create-post-container .step-header h2 { color: #fff; margin: 0; font-size: 20px; font-weight: 600; }
.create-post-close { background: transparent; border: 0; color: #fff; font-size: 22px; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.create-post-close:hover { background: rgba(255,255,255,0.1); }
.create-post-container .step-content { flex: 1; overflow: auto; padding: 16px 20px 120px 20px; }
.create-post-container .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.create-post-container .form-actions .btn { min-width: 140px; }
.create-post-container .form-actions { position: fixed; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(10, 10, 20, 0.95)) !important; border-top: 2px solid rgba(255, 255, 255, 0.15) !important; padding-top: 12px; padding-bottom: 12px; z-index: 10; padding-left: 20px; padding-right: 20px; }
.create-post-container .type-btn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 10px; padding: 10px 14px; }
.create-post-container .type-btn.active { background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important; border-color: rgba(255, 255, 255, 0.3) !important; }
.create-post-container .btn.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.create-post-container .btn.btn-primary { background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9)) !important; color: #fff !important; border: 2px solid rgba(255, 255, 255, 0.2) !important; }
.create-post-container .file-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.create-post-container .file-preview .preview-item { position: relative; width: 90px; height: 90px; border-radius: 10px; overflow: hidden; }
.create-post-container .file-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Полоска голосования: звёзды-победителя */
.post-poll .poll-option-bar { position: relative; overflow: visible; }
.post-poll .poll-star { position: absolute; width: 10px; height: 10px; color: #ffd54f; pointer-events: none; opacity: 0.9; animation: pollStarFloat 1.8s infinite ease-in-out; }
@keyframes pollStarFloat { 0% { transform: translateY(0) scale(1); opacity: 0.9; } 50% { transform: translateY(-10px) scale(1.2); opacity: 1; } 100% { transform: translateY(0) scale(1); opacity: 0.9; } }

/* Компактная верхняя панель и таймер */
.feed-header { padding-top: 6px !important; padding-bottom: 6px !important; }
.header-countdown { margin-top: 0 !important; }
.header-countdown #releaseCountdown { font-size: 16px !important; }

/* Скрытие скроллбаров при сохранении прокрутки */
html, body, .app-container { -ms-overflow-style: none; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .app-container::-webkit-scrollbar, *::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Комментарии в ленте: разделители, форма ввода фикс. кнопка */
.comments-section .comment { border: none !important; padding: 8px 0 !important; }
.comments-section .comment + .comment { border-top: none !important; }
.comments-section .comment-content { padding-left: 0 !important; margin-left: 0 !important; }
.comments-section .comment-content p { margin: 0 !important; }
.comments-section .comment-row { padding-left: 0 !important; }

/* Users header like feed */
.users-header { padding: 6px 20px !important; border-bottom: 1px solid rgba(255,255,255,0.1); background: transparent; position: sticky; top: 0; z-index: 5; }
.users-header .header-content { display: flex; align-items: center; justify-content: space-between; }

/* Edit profile fullscreen modal */
.edit-profile-modal-fullscreen { position: fixed; inset: 0; z-index: 20000; display: none; align-items: center; justify-content: center; }
.edit-profile-modal-fullscreen.active, .edit-profile-modal-fullscreen[style*="display: flex"], .edit-profile-modal-fullscreen[style*="display:flex"] { display: flex; }
.edit-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.edit-container { position: relative; width: 100vw; height: 100vh; background: #0f0f0f; display: flex; flex-direction: column; }
.edit-container .step-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.edit-container .step-content { flex: 1; overflow: auto; padding: 16px 20px 90px 20px; }
.edit-container .form-actions { position: sticky; bottom: 0; background: #0f0f0f; padding: 12px 0; display: flex; justify-content: space-between; }

/* Profile posts flat style */
.profile-post { border-radius: 0 !important; border: 1px solid rgba(255,255,255,0.08); padding: 12px; margin-bottom: 12px; background: transparent; }

/* Comment vote buttons */
.comment-actions button { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.comment-actions .comment-rating { min-width: 28px; text-align: center; font-weight: 700; }

/* Central rating between up/down */
.post-actions { display: flex; align-items: center; gap: 10px; }
.post-actions .post-rating { min-width: 28px; text-align: center; font-weight: 700; }
.comment-actions .comment-rating { min-width: 28px; text-align: center; font-weight: 700; }
/* Rating colors */
.post-rating, .comment-rating { color: #fff; }
.rating-positive { color: #b6f3b0 !important; }
.rating-negative { color: #ffb3bd !important; }

/* Tighter spacing and square-ish buttons for posts */
.post-actions { gap: 6px; }
.post-actions .btn-like, .post-actions .btn-dislike,
.comment-actions .btn-like, .comment-actions .btn-dislike {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Remove comment rounded boxes and background entirely */
.comments-section .comment { background: transparent !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; }
.comments-section .comment-row { margin: 0 !important; }
.comments-section .comment-actions { margin-top: 10px !important; }

/* Avatar visuals for posts and comments */
.avatar, .comment-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #2a2a2a; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.avatar img, .comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { font-size: 14px; }

/* Profile avatar large */
.profile-avatar, .avatar-preview-large { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; background: #2a2a2a; display: flex; align-items: center; justify-content: center; }
.profile-avatar img, .avatar-preview-large img { width: 100%; height: 100%; object-fit: cover; }

/* Site background theme */
html, body { background: linear-gradient(135deg, #000000 0%, #0a0a0f 50%, #141420 100%) !important; }

/* Poll question text */
.post-poll h4 { color: #fff !important; }

/* Ensure Shorts videos are always crisp */
.shorts-video, .short-video-wrapper, .shorts-video-container {
  filter: none !important;
  -webkit-filter: none !important;
  image-rendering: auto !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Kill all backdrop blurs within Shorts to avoid perceived softness */
.shorts-container *, .shorts-player *, .shorts-video-container, .short-video-wrapper, .shorts-video {
  backdrop-filter: none !important;
}
.video-info { backdrop-filter: none !important; background: rgba(10,10,10,0.48) !important; }

/* 2) Более квадратное поле комментариев под постами */
.comments-section .add-comment input {
  border-radius: 6px !important;
}

/* 3) Кнопка отправки комментария — цвет #f2d4b8 без синего */
.comments-section .add-comment button, .comments-panel .add-comment button {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(10, 10, 20, 1)) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.comments-section .add-comment button:hover { filter: none !important; }

/* 4) Унификация стиля кнопок Назад/Создать в Shorts */
.shorts-floating-controls .create-short-btn {
  border: 3px solid #fff !important; /* жирная белая рамка */
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 1px, rgba(0,0,0,0) 2px) 0 0/12px 12px,
              radial-gradient(circle at 70% 60%, rgba(255,255,255,0.14) 1px, rgba(0,0,0,0) 2px) 0 0/14px 14px,
              rgba(20,20,20,0.75) !important; /* тёмный фон со звёздочками */
  color: #fff !important;
  box-shadow: none !important; /* без тени */
  transition: none !important; /* без анимаций при наведении */
}
.shorts-floating-controls .create-short-btn:hover {
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 1px, rgba(0,0,0,0) 2px) 0 0/12px 12px,
              radial-gradient(circle at 70% 60%, rgba(255,255,255,0.14) 1px, rgba(0,0,0,0) 2px) 0 0/14px 14px,
              rgba(20,20,20,0.75) !important;
}
/* Размер кнопок одинаковый */
.shorts-floating-controls .btn-home,
.shorts-floating-controls .create-short-btn {
  padding: 10px 16px !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
}

/* 1) Кнопка Назад без текста, круглая, с символом '<' */
.shorts-floating-controls .btn-home {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 0 !important; /* скрываем текст */
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  border: 2px solid #fff !important;
  background: rgba(20,20,20,0.7) !important;
  backdrop-filter: blur(8px) !important;
}
.shorts-floating-controls .btn-home::before {
  content: '<';
  font-size: 24px; 
  line-height: 1; 
  color: #fff; 
  font-weight: 800;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
}

/* 2) Выровнять кнопку Создать по уровню с Назад */
.shorts-floating-controls { align-items: center !important; }
.shorts-floating-controls .create-short-btn { height: 48px !important; display: inline-flex !important; align-items: center !important; }

/* 3) Отступы и оформление комментариев в Shorts */
.comments-panel .comment-item .comment-avatar { margin-left: 12px !important; }
.comments-panel .comment-content { border-bottom: 1px solid rgba(255,255,255,0.12) !important; padding-bottom: 8px !important; }
.comments-panel .comment-actions { margin-top: 8px !important; }
.comments-panel .comment-rating { font-weight: 700; }
.comments-panel .comment-rating.rating-positive { color: #b6f3b0 !important; }
.comments-panel .comment-rating.rating-negative { color: #ffb3bd !important; }

/* 4) Кнопка отправки в панели комментариев Shorts */
.comments-send-btn { background: #f2d4b8 !important; border: 1px solid rgba(0,0,0,0.15) !important; color: #000 !important; box-shadow: none !important; }
/* Play/pause overlay must not blur background */
.play-pause-overlay { backdrop-filter: none !important; }

/* HARD OVERRIDE: while on shorts page, disable any blur/filters entirely */
body.body-shorts-view *, .body-shorts-view * {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
}
.shorts-video { transform: translateZ(0) scale(1) !important; will-change: auto !important; }

/* Ink reveal transition for feed switching */
.posts-container.ink-out { opacity: 0.4; filter: grayscale(1) contrast(0.8); transition: opacity 180ms ease, filter 180ms ease; }
.posts-container.ink-in { position: relative; animation: inkIn 420ms ease-out forwards; }
.posts-container.ink-in::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 20% 30%, rgba(0,0,0,0.15), transparent 40%), radial-gradient(circle at 80% 70%, rgba(0,0,0,0.12), transparent 45%), radial-gradient(circle at 40% 80%, rgba(0,0,0,0.1), transparent 50%);
  opacity: 0.9; animation: inkGrain 420ms ease-out forwards;
}
@keyframes inkIn { 0% { filter: grayscale(1) contrast(0.7); opacity: 0.6; } 100% { filter: none; opacity: 1; } }
@keyframes inkGrain { 0% { opacity: 0.9; } 100% { opacity: 0; } }

/* De-duplicate any backdrop blurs around Shorts containers */
.shorts-video-container, .short-video-wrapper { backdrop-filter: none !important; }

/* Tabs look: active without border, inactive with subtle border */
.feed-tabs .btn.btn-secondary, .feed-tabs-inline .btn.btn-secondary {
  border: 1px solid rgba(255,255,255,0.35);
}
.feed-tabs .btn.btn-secondary.active, .feed-tabs-inline .btn.btn-secondary.active {
  border: none;
}

/* Comment actions right-aligned above separator in Shorts */
.comments-panel .comment-header { align-items: flex-start !important; justify-content: space-between !important; }
.comments-panel .comment-actions { justify-content: flex-end !important; margin-top: 0 !important; margin-bottom: 6px !important; }
.comments-panel .comment-content { border-bottom: none !important; }
.comments-panel .comment-item { border-bottom: 1px solid rgba(255,255,255,0.12) !important; padding-bottom: 12px !important; margin-bottom: 12px !important; }
.comments-panel .comment-item:last-child { border-bottom: none !important; margin-bottom: 0 !important; }

/* btn-home hover - no white dots/artifacts */
.shorts-floating-controls .btn-home:hover { 
  background: rgba(20,20,20,0.7) !important; 
  backdrop-filter: blur(8px) !important;
}

/* Slight offset of video-info */
.video-info { margin-left: 12px !important; margin-bottom: 10px !important; }

/* Users header bigger with rounded bottom corners */
.users-header { padding: 18px 20px !important; border-radius: 0 0 16px 16px !important; }
.users-header .header-content h1 { margin-top: 6px !important; }

/* Ad slot styling - космическая тематика (черный) */
#adSlot { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin: 10px auto; 
  max-width: 90vw; 
  width: auto;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(10, 10, 20, 0.9)) !important;
  backdrop-filter: blur(10px) !important;
  padding: 14px 20px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  position: relative;
  overflow: hidden;
}
#adSlot::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: starfield 20s linear infinite;
  pointer-events: none;
}
@keyframes starfield {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}
#adSlot .ad-inner {
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 1;
}
#adSlot .ad-inner.default-ad {
  color: rgba(255, 255, 255, 0.8);
}
#adSlot .ad-inner a {
  color: rgba(200, 200, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}
#adSlot .ad-inner a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}
#adSlot .ad-container img,
#adSlot .ad-container video {
  max-width: 50% !important;
  height: auto !important;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}
#adSlot .ad-nav-btn {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s ease !important;
}
#adSlot .ad-nav-btn:hover {
  background: rgba(20, 20, 30, 0.7) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3) !important;
}