/* Создание поста - модальное окно */
.create-post-modal {
    background: rgba(255, 255, 255, 0.474) !important;
    border-radius: 30px !important;
}

.modal {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(25px);
}

/* Переключатель типа поста */
.post-type-selector {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.type-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.813);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.type-btn.active {
    background: linear-gradient(135deg, #6e28c94e 0%, #085d8892 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(107, 196, 104, 0.396);
}

.type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* Поля опроса */
.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
}

.poll-option {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.poll-option input {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-shadow: none;
    padding-right: 44px; /* место под крестик справа */
}

.poll-option input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.poll-option .btn-remove {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.poll-option .btn-remove:hover { background: rgba(255, 59, 48, 0.25); }

/* Предпросмотр файлов */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .btn-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 8px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff3b30;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-item .btn-remove:hover {
    transform: scale(1.1);
}

/* Отображение опросов */
.post-poll {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.post-poll h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option-item {
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(10, 10, 20, 0.8)) !important;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.poll-option-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.poll-option-text {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.poll-option-bar {
    position: relative;
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.poll-progress {
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.9));
    border-radius: 12px;
    transition: width 0.5s ease;
}

.poll-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.poll-info {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    text-align: center;
}

/* Галерея изображений в постах */
.post-images-gallery {
    display: grid;
    gap: 8px;
    margin: 15px 0;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.post-image-small {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-image-small:hover {
    transform: scale(1.05);
    z-index: 10;
}

.post-image-small img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кастомная форма */
.create-post-form {
    padding: 20px;
}

#postContent, .poll-option input, #pollQuestion {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #333;
}

#postContent:focus, .poll-option input:focus, #pollQuestion:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.file-upload-section {
    margin: 20px 0;
}

/* Форма выровнена */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* =================================================================== */
/*  НОВЫЕ, ЧИСТЫЕ СТИЛИ ДЛЯ SHORTS (переписано с нуля)              */
/* =================================================================== */

/* --- 1. Глобальные изменения для страницы Shorts --- */

/* Прячем нижнюю панель навигации на странице Shorts ЖЕЛЕЗНО */
body.body-shorts-view .bottom-tabs {
    display: none !important;
}

/* При пустом состоянии - показываем градиентный фон (убираем черный) */
.shorts-container.is-empty {
    background: transparent;
}

/* Убираем темную плашку у "пустого" состояния ЖЕЛЕЗНО */
.shorts-container .empty-state {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}
.shorts-container .empty-state h3,
.shorts-container .empty-state p {
    color: rgba(211, 181, 181, 0.445);
}


/* --- 2. Шапка удалена, используются плавающие кнопки --- */

/* Перемещаем кнопку "Создать" в правый верхний угол и поднимаем */
.create-short-btn {
    position: fixed;
    top: 10px; /* Поднял немного выше */
    right: 20px; 
    z-index: 1001; 
}

/* Опускаем иконку плюса */
.create-short-btn .fa-plus {
    position: relative;
    top: 0px; /* Опустил еще ниже */
}


/* --- 3. Плеер --- */
.shorts-player {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.shorts-video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* --- 4. Оверлей с UI --- */
.shorts-ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Позволяет кликам "проходить" сквозь оверлей к видео */
}
.shorts-ui-overlay > * {
    pointer-events: auto; /* Возвращаем кликабельность для дочерних элементов */
}

/* --- 5. Стили для видео и анимаций --- */
.short-video-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.shorts-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.short-video-wrapper.next { transform: translateY(100%); }
.short-video-wrapper.prev { transform: translateY(-100%); }
.short-video-wrapper.enter { transform: translateY(0); }
.short-video-wrapper.exit-up { transform: translateY(-100%); }
.short-video-wrapper.exit-down { transform: translateY(100%); }

.shake-animation {
    animation: shake 0.3s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-5px); }
    75% { transform: translateY(5px); }
}

/* --- 6. Информация о видео --- */
.video-info {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 800px;
    color: white;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
.video-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.author-name { font-weight: 600; }
.video-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}
.video-description {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* --- 7. Боковые кнопки --- */
.side-controls {
    position: absolute;
    bottom: 80px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.side-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.side-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}
.side-btn span {
    font-size: 12px;
    font-weight: 600;
    margin-top: 3px;
}

/* --- 8. Стили состояний (пусто, скелетон, ошибка) --- */
/* (Стили для .short-skeleton, .empty-state, .error-state уже были хороши, их можно оставить почти без изменений) */

/* --- 9. Модальное окно создания Short --- */
/* (Стили для .create-short-modal и его содержимого также были хороши и их можно оставить) */