/* =========================================================
   ФВЛ — ФОТО · ВИДЕО · ЛЮДИ
   ЕДИНЫЙ STYLE.CSS
   ========================================================= */


/* =========================================================
   1. ПЕРЕМЕННЫЕ
   ========================================================= */

   :root {
    --bg: #000000;
    --bg-card: #0a0a0a;
    --bg-hover: #141414;
    --bg-input: #1a1a1a;
    --bg-elevated: #1f1f1f;

    --text: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-dim: #666666;
    --text-dark: #444444;

    --border: #1f1f1f;
    --border-light: #2a2a2a;
    --border-hover: #333333;

    --accent: #ffffff;
    --accent-hover: #e0e0e0;

    --danger: #ff4444;
    --success: #00ffc8;
    --warning: #ffaa00;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}


/* =========================================================
   2. ОБЩИЕ НАСТРОЙКИ
   ========================================================= */

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

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    padding-bottom: 120px;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font-family: inherit;
}


/* =========================================================
   3. ШАПКА СТРАНИЦЫ
   ========================================================= */

.page-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0;

    width: 100%;
    max-width: 600px;

    margin: 0 auto;
    padding: 16px 16px 8px;

    box-sizing: border-box;
}

.page-header-spacer {
    width: 44px;
    height: 44px;
}

.logo-fvl {
    font-family: var(--font-main);
    font-weight: 900;
    font-size: 1.6em;
    letter-spacing: 2px;
    text-decoration: none;

    color: transparent;
    -webkit-text-stroke: 2px #ffffff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 255, 255, 0.1);

    transition: text-shadow 0.3s ease;
}

.logo-fvl:hover {
    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.7),
        0 0 30px rgba(255, 255, 255, 0.5),
        0 0 45px rgba(255, 255, 255, 0.3);
}

.page-header .logo-fvl {
    text-align: center;
    justify-self: center;
}

.page-header-icon {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;

    color: #ffffff;
    background: transparent;

    border: 1px solid #ffffff;
    border-radius: 50%;

    text-decoration: none;
    box-sizing: border-box;
    overflow: hidden;

    transition: all 0.25s ease;
}

.page-header-icon svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    flex-shrink: 0;
    display: block;
}

.page-header-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 18px rgba(255, 255, 255, 0.35),
        0 0 30px rgba(255, 255, 255, 0.15);
}


/* =========================================================
   4. ОСНОВНОЙ КОНТЕНТ
   ========================================================= */

.site-main {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}


/* =========================================================
   5. ЗАГОЛОВКИ
   ========================================================= */

h1, h2, h3 {
    color: var(--text);
    margin-bottom: 20px;
}


/* =========================================================
   6. КАРТОЧКА ПОСТА
   ========================================================= */

   .post-card {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 20px;
    padding: 20px;

    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;

    /* Скролл-снап */
    scroll-snap-align: start;
    scroll-snap-stop: always;

    /* Высота поста = высота скролл-контейнера */
    min-height: calc(100vh - 130px);

    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.post-card:hover {
    border-color: var(--border-hover);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.avatar-small {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
}

.post-header a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.post-header a:hover {
    text-decoration: underline;
}

.post-image {
    display: block;
    width: 100%;
    border-radius: 12px;
}

.post-card .post-image {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-height: 100%;
    margin: 12px 0;
    object-fit: contain;
    border-radius: 14px;
    background: #000;
}

.post-card video.post-image {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-height: 100%;
    display: block;
    margin: 12px 0;
    object-fit: contain;
    background: #000;
    border-radius: 14px;
}

.post-caption {
    margin: 12px 0;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow-wrap: break-word;
}

/* Обрезка — только когда класс есть */
.post-caption--clamped {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-caption--expanded {
    -webkit-line-clamp: unset;
    display: block;
}

/* Кнопка «Развернуть» */
.post-caption-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    margin: 0 0 10px;
    padding: 4px 0;

    color: var(--text-muted);
    background: transparent;
    border: none;

    font-family: inherit;
    font-size: 0.85em;
    font-weight: 500;

    cursor: pointer;
    text-decoration: none;

    transition: color 0.2s ease;
}

.post-caption-more:hover {
    color: var(--text);
}

.post-caption-more svg {
    width: 14px;
    height: 14px;
}


/* =========================================================
   7. ФОРМЫ
   ========================================================= */

input,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

button[type="submit"] {
    padding: 12px 30px;
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 30px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}


/* =========================================================
   8. ПРОФИЛЬ
   ========================================================= */

.profile-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 120px;
    box-sizing: border-box;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0 30px;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 4px #000000, 0 0 0 6px #333333;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    margin: 0 0 4px;
    padding: 0;
    border: none;
    color: var(--text);
    font-size: 1.4em;
    font-weight: 700;
    line-height: 1.2;
}

.profile-username {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.95em;
}

.profile-bio {
    margin: 0 0 8px;
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
    max-width: 500px;
}

.profile-website {
    margin: 0 0 16px;
    font-size: 0.9em;
}

.profile-website a {
    color: var(--text);
    text-decoration: none;
    opacity: 0.8;
}

.profile-website a:hover {
    opacity: 1;
    text-decoration: underline;
}


/* =========================================================
   9. СТАТИСТИКА ПРОФИЛЯ
   ========================================================= */

.profile-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin: 20px 0;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: opacity 0.2s ease;
}

.profile-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: var(--border);
}

.profile-stat:first-child {
    padding-left: 0;
}

a.profile-stat:hover {
    opacity: 0.7;
}

.profile-stat-value {
    color: var(--text);
    font-size: 1.3em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.profile-stat-label {
    color: var(--text-muted);
    font-size: 0.8em;
    white-space: nowrap;
}


.profile-actions .profile-btn {
    width: 100%;
}

.profile-follow-form {
    display: inline;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.profile-btn-primary {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.profile-btn-primary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.profile-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.profile-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}


/* =========================================================
   11. ТАБЫ ПРОФИЛЯ
   ========================================================= */

.profile-tabs {
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-bottom: 1px solid var(--border);
}

.profile-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-tab svg {
    width: 24px;
    height: 24px;
}

.profile-tab:hover {
    color: var(--text-secondary);
}

.profile-tab.active {
    color: var(--text);
    border-bottom-color: var(--text);
}


/* =========================================================
   12. СЕТКА ПОСТОВ В ПРОФИЛЕ
   ========================================================= */

.profile-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    margin-top: 3px;
    width: 100%;
    box-sizing: border-box;
}

.profile-post-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-hover);
    text-decoration: none;
    border-radius: 0;
}

.profile-post-media {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-post-item:hover .profile-post-media {
    transform: scale(1.05);
}

.profile-post-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
    opacity: 0.95;
    z-index: 2;
}

.profile-post-badge svg {
    width: 100%;
    height: 100%;
}

.profile-post-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 8px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: var(--text);
    font-size: 0.7em;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}

.profile-post-item:hover .profile-post-caption {
    opacity: 1;
}

.profile-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-dim);
}

.profile-empty-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.profile-empty-text {
    margin: 0;
    font-size: 0.95em;
}


/* =========================================================
   13. ТАБЫ ЛЕНТЫ
   ========================================================= */

.feed-tabs-wrap {
    position: sticky;
    top: 0;
    z-index: 100;

    /* Полупрозрачный чёрный + blur — эффект «матового стекла» */
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    /* Отступы внутри полосы */
    padding: 10px 12px;

    /* Компенсируем padding родителя (.site-main) */
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: 16px;

    /* Тонкая мягкая граница снизу */
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.feed-tabs {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    width: 100%;
    max-width: 100%;

    margin: 0 auto;
    padding: 4px;

    background: #111111;
    border: 1px solid var(--border-light);
    border-radius: 18px;

    box-sizing: border-box;
    overflow: hidden;
}

.feed-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 10px 8px;

    color: var(--text-dim);
    background: transparent;
    border: none;
    border-radius: 14px;

    font-family: inherit;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: -0.2px;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;
    transition: all 0.2s ease;
}

.feed-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-input);
}

.feed-tab.active {
    color: #0a0a0a;
    background: var(--accent);
}

.feed-tab-icon {
    font-size: 0.95em;
    flex-shrink: 0;
}


/* =========================================================
   14. ЛЕНТА ПОСТОВ
   ========================================================= */

   .feed-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;

    /* Скролл-контейнер */
    height: calc(100vh - 90px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* Отступ, чтобы нижняя навигация не перекрывала последний пост */
    padding-bottom: 90px;
    box-sizing: border-box;
}

.feed-posts::-webkit-scrollbar {
    display: none;
}

/* КНОПКА ПОДПИСКИ В ЛЕНТЕ */
.feed-follow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    padding: 6px 14px !important;

    background: transparent !important;
    color: #ffffff !important;

    border: 1px solid #ffffff !important;
    border-radius: 18px !important;

    font-family: inherit !important;
    font-size: 0.75em !important;
    font-weight: 600 !important;

    cursor: pointer !important;
    white-space: nowrap !important;

    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;

    transition: all 0.2s ease !important;
}

.feed-follow-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.2),
        0 0 24px rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
}

.feed-follow-btn.following {
    background: transparent !important;
    color: #888888 !important;
    border-color: #333333 !important;
    box-shadow: none !important;
}

.feed-follow-btn.following:hover {
    background: rgba(255, 68, 68, 0.08) !important;
    color: #ff4444 !important;
    border-color: #ff4444 !important;
}

/* РЕАКЦИИ В ЛЕНТЕ */
.post-reactions-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    margin-top: 8px;
}

.feed-reaction {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.feed-reaction svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}

.feed-reaction:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feed-reaction.liked {
    color: #ff4444;
}

.feed-reaction.liked svg {
    fill: #ff4444;
    stroke: #ff4444;
}

.feed-reaction span {
    font-size: 0.85em;
    font-weight: 600;
}

.feed-save {
    margin-left: auto;
}

/* ПУСТО */
.feed-empty {
    padding: 60px 20px;
    text-align: center;
    color: #666666;
}

.feed-empty-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.feed-empty p {
    margin: 0 0 8px;
}

.feed-empty-hint a {
    color: #ffffff;
    text-decoration: none;
}

.feed-empty-hint a:hover {
    text-decoration: underline;
}


/* =========================================================
   15. СООБЩЕНИЯ / УВЕДОМЛЕНИЯ
   ========================================================= */

.messages-page {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px 16px 120px;
    box-sizing: border-box;
}

.messages-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 26px;
}

.messages-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    color: #888888;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 22px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.messages-tab:hover {
    color: #cccccc;
    background: rgba(255, 255, 255, 0.03);
}

.messages-tab.active {
    color: #ffffff;
    background: transparent;
    border: 1px solid #ffffff;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.25),
        0 0 24px rgba(255, 255, 255, 0.1),
        inset 0 0 12px rgba(255, 255, 255, 0.04);
}

.messages-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 11px;
    font-size: 0.7em;
    font-weight: 700;
}

.messages-tab.active .messages-tab-badge {
    background: #0a0a0a;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.chats-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.chat-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    background: transparent;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 74px;
    right: 10px;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-item:hover::after {
    background: transparent;
}

.chat-item-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    border: 2px solid #333333;
    object-fit: cover;
}

.chat-item-favorites .chat-item-avatar {
    border-color: #ffffff;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
}

.chat-item-name {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-time {
    flex-shrink: 0;
    color: #666666;
    font-size: 0.75em;
}

.chat-item-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-item-text {
    flex: 1;
    min-width: 0;
    color: #888888;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-unread {
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 700;
}


/* =========================================================
   16. СПИСОК УВЕДОМЛЕНИЙ
   ========================================================= */

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notification-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notification-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 78px;
    right: 10px;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.notification-item:hover::after {
    background: transparent;
}

.notification-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
}

.notification-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-sizing: border-box;
    background: #0a0a0a;
}

.notification-icon svg {
    width: 26px;
    height: 26px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notification-name {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-action {
    color: #888888;
    font-size: 0.85em;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.notification-time {
    color: #666666;
    font-size: 0.75em;
    white-space: nowrap;
}

.notification-dot {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 50%;
    font-size: 0.7em;
    font-weight: 700;
}

.notification-dot::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #0a0a0a;
    border-radius: 50%;
}

.notification-dot-with-number::before {
    content: none;
}

.notification-dot-with-number {
    font-size: 0.7em;
    font-weight: 700;
    color: #0a0a0a;
}

.notifications-empty {
    padding: 70px 20px;
    color: #666666;
    text-align: center;
}

.notifications-empty-icon {
    margin-bottom: 15px;
    font-size: 3em;
}


/* =========================================================
   17. НИЖНЯЯ НАВИГАЦИЯ
   ========================================================= */

nav.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 15px;
    width: 560px;
    max-width: calc(100vw - 30px);
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 0;
    margin: 0;
    padding: 6px 10px;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.97);
    border: 1px solid var(--border-light);
    border-radius: 22px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55);
    z-index: 99999;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

nav.bottom-nav .bottom-nav-item {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5b5b5;
    border-radius: 17px;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

nav.bottom-nav .bottom-nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

nav.bottom-nav .bottom-nav-icon {
    width: 30px;
    height: 30px;
    display: block;
    color: currentColor;
}

nav.bottom-nav .bottom-nav-create {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background: #111111;
    border: 2px solid #ffffff;
    border-radius: 17px;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

nav.bottom-nav .bottom-nav-create span {
    display: block;
    font-size: 2em;
    font-weight: 300;
    line-height: 1;
}

nav.bottom-nav .bottom-nav-create:hover {
    color: #0a0a0a;
    background: var(--accent);
    transform: scale(1.06);
}

.bottom-nav-item--messages {
    position: relative;
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 10px;
    font-size: 0.65em;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #0a0a0a;
    z-index: 1;
}


/* =========================================================
   18. ЧАТ
   ========================================================= */

.chat-page {
    width: 100%;
    height: calc(100dvh - 90px);
    display: flex;
    flex-direction: column;
    padding-bottom: 95px;
}

.chat-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    margin-bottom: 10px;
}

.chat-back {
    flex: 0 0 auto;
    color: var(--text);
    text-decoration: none;
    font-size: 1.8em;
    line-height: 1;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
}

.chat-user-info {
    min-width: 0;
}

.chat-user-name {
    color: var(--text);
    font-weight: bold;
    font-size: 1.05em;
}

.chat-user-username {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-top: 2px;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.chat-message-row {
    display: flex;
    width: 100%;
    margin: 0 0 10px 0;
}

.chat-message-row:last-child {
    margin-bottom: 0;
}

.chat-message-own {
    justify-content: flex-end;
}

.chat-message-other {
    justify-content: flex-start;
}

.chat-message {
    display: block;
    width: auto;
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-message-other-bubble {
    width: fit-content;
    max-width: 70%;
    background: var(--bg-elevated);
    color: var(--text);
}

.chat-message-own-bubble {
    width: fit-content;
    max-width: 70%;
    background: var(--accent);
    color: #0a0a0a;
}

.chat-message-text {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-message-meta {
    display: block;
    margin-top: 5px;
    font-size: 0.7em;
    line-height: 1.2;
    opacity: 0.6;
}

.chat-message-image {
    display: block;
    width: auto;
    max-width: 260px;
    height: auto;
    margin: 0 0 6px 0;
    border-radius: 10px;
}

.chat-form {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.chat-input {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 12px 15px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 1em;
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-attach {
    flex: 0 0 auto;
    cursor: pointer;
    color: var(--text);
    font-size: 1.6em;
}

.chat-send {
    flex: 0 0 52px;
    width: 52px;
    height: 42px;
    border: none;
    border-radius: 22px;
    background: #f5f5f5;
    color: #0a0a0a;
    font-size: 1.2em;
    cursor: pointer;
}

.chat-send:hover {
    transform: scale(1.03);
}


/* =========================================================
   19. РЕАКЦИИ ПОСТА (лента)
   ========================================================= */

.post-media-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
}

.post-media-wrapper .post-image {
    display: block;
    width: auto;
    max-width: 650px;
    max-height: 750px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 14px;
}

.post-reactions {
    position: absolute;
    top: 0;
    right: -70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

.post-reaction-button {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--text);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.post-reaction-button:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1);
}

.post-reaction-icon {
    display: block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: inherit;
    stroke: currentColor;
}

.post-like-button .like-count,
.post-comment-button .comment-count,
.post-direct-button .direct-count {
    position: absolute;
    top: -2px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.post-like-button .like-count {
    background: var(--danger);
    color: #ffffff;
}

.post-comment-button .comment-count {
    background: var(--success);
    color: #0a0a0a;
}

.post-direct-button .direct-count {
    background: var(--text-dim);
    color: #ffffff;
}

.post-more-button {
    border: 1px solid #ffffff;
}

.post-more-button:hover {
    background: #ffffff;
    color: #0a0a0a;
}


/* =========================================================
   20. КОММЕНТАРИИ
   ========================================================= */

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.comment-username {
    color: var(--text);
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
}

.comment-username:hover {
    text-decoration: underline;
}

.comment-date {
    color: var(--text-dark);
    font-size: 0.75em;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.comment-form input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 10px 15px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 0.95em;
}

.comment-form button {
    flex-shrink: 0;
    padding: 10px 25px;
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}


/* =========================================================
   21. СОЗДАНИЕ ПОСТА
   ========================================================= */

.create-post-page {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 25px 16px 120px;
}

.create-post-header {
    margin-bottom: 30px;
    text-align: center;
}

.create-post-header h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.8em;
}

.upload-box {
    width: 100%;
    padding: 35px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border-hover);
    border-radius: 16px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-box:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.upload-label {
    display: block;
    cursor: pointer;
}

.upload-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 15px;
    color: var(--text);
}

.upload-title {
    color: var(--text);
    font-size: 1.1em;
    font-weight: 700;
}

.upload-description {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.9em;
}

#media {
    display: none;
}

.caption-box {
    margin-top: 20px;
}

.caption-box label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 0.9em;
    font-weight: 600;
}

.caption-box textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    resize: vertical;
    font-size: 15px;
}

.publish-button {
    width: 100%;
    margin-top: 20px;
    padding: 13px 20px;
    background: var(--accent);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.publish-button:hover {
    background: var(--accent-hover);
}


/* =========================================================
   22. USERS (список людей)
   ========================================================= */

.users-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 16px 120px;
    box-sizing: border-box;
}

.page-header-back {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.page-header-back svg {
    width: 24px;
    height: 24px;
}

.page-header-back:hover {
    background: rgba(255, 255, 255, 0.08);
}

.users-search-form {
    margin-bottom: 16px;
    background: none;
    border: none;
    padding: 0;
}

.users-search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    transition: border-color 0.2s ease;
}

.users-search-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

.users-search-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #888888;
}

.users-search-input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95em;
    outline: none;
}

.users-search-input::placeholder {
    color: #666666;
}

.users-search-settings {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #888888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.users-search-settings svg {
    width: 20px;
    height: 20px;
}

.users-search-settings:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.users-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 26px;
}

.users-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    color: #888888;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 22px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.users-tab:hover {
    color: #cccccc;
    background: rgba(255, 255, 255, 0.03);
}

.users-tab.active {
    color: #ffffff;
    background: transparent;
    border: 1px solid #ffffff;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.25),
        0 0 24px rgba(255, 255, 255, 0.1);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.user-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.user-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 72px;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.user-item-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.user-item-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 50%;
    border: 2px solid #333333;
    object-fit: cover;
}

.user-item-info {
    flex: 1;
    min-width: 0;
}

.user-item-name {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.user-item-username {
    color: #888888;
    font-size: 0.8em;
    margin-bottom: 2px;
}

.user-item-followers {
    color: #666666;
    font-size: 0.75em;
}

.user-item-follow-form {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.user-item-follow-form .user-item-follow-btn,
.user-item-follow-btn {
    padding: 8px 20px !important;
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 20px !important;
    font-size: 0.8em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.2s ease;
}

.user-item-follow-form .user-item-follow-btn:hover,
.user-item-follow-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.2),
        0 0 24px rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
}

.user-item-follow-form .user-item-follow-btn.following,
.user-item-follow-btn.following {
    background: transparent !important;
    color: #888888 !important;
    border-color: #333333 !important;
    box-shadow: none !important;
}

.user-item-follow-form .user-item-follow-btn.following:hover,
.user-item-follow-btn.following:hover {
    background: rgba(255, 68, 68, 0.08) !important;
    color: #ff4444 !important;
    border-color: #ff4444 !important;
    box-shadow: none !important;
}

.users-empty {
    padding: 70px 20px;
    text-align: center;
    color: #666666;
}

.users-empty-icon {
    font-size: 3em;
    margin-bottom: 15px;
}


/* =========================================================
   23. СТРАНИЦА ОТКРЫТОГО ПОСТА
   ========================================================= */

.post-detail {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 16px 120px;
    box-sizing: border-box;
}

.post-detail-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 14px;
}

.post-detail-author-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.post-detail-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
}

.post-detail-author-info {
    flex: 1;
    min-width: 0;
}

.post-detail-author-name {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 2px;
}

.post-detail-author-meta {
    color: #888888;
    font-size: 0.8em;
}

.post-detail-menu-wrapper {
    position: relative;
}

.post-detail-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.post-detail-menu-btn svg {
    width: 20px;
    height: 20px;
}

.post-detail-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-detail-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 6px 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.post-detail-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 0.95em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

.post-detail-menu-item:hover {
    background: rgba(0, 255, 200, 0.08);
}

.post-detail-menu-item--danger {
    color: #ff4444;
}

.post-detail-menu-item--danger:hover {
    background: rgba(255, 68, 68, 0.1);
}

.post-detail-menu-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 4px 0;
}

.post-detail-media {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 70vh; 
    object-fit: contain;
    background: transparent;
    border-radius: 12px;
    margin: 8px 0;
}

.post-detail-media[controls],
video.post-detail-media {
    width: 100%;
    object-fit: contain;
    background: #000000;
    border-radius: 12px;
}

.post-detail-reactions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
}

.post-detail-reaction {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.post-detail-reaction svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

.post-detail-reaction:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-detail-reaction.liked {
    color: #ff4444;
}

.post-detail-reaction.liked svg {
    fill: #ff4444;
    stroke: #ff4444;
}

.post-detail-reaction-count {
    font-size: 0.9em;
    font-weight: 600;
}

.post-detail-save {
    margin-left: auto;
}

.post-detail-save.saved svg {
    fill: #ffffff;
}

.post-detail-caption {
    padding: 6px 0 14px;
}

.post-detail-caption-text {
    color: #e0e0e0;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.post-detail-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-detail-hashtag {
    color: #4a9eff;
    font-size: 0.9em;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.post-detail-hashtag:hover {
    opacity: 0.7;
}

.post-detail-comments {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-detail-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.post-detail-comments-title {
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 600;
}

.post-detail-comments-sort {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888888;
    font-size: 0.8em;
    cursor: pointer;
}

.post-detail-comments-sort svg {
    width: 14px;
    height: 14px;
}

.post-detail-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
}

.post-detail-comment-input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 8px 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.9em;
    outline: none;
}

.post-detail-comment-input::placeholder {
    color: #666666;
}

.post-detail-comment-emoji,
.post-detail-comment-send {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #888888;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.post-detail-comment-emoji svg,
.post-detail-comment-send svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

.post-detail-comment-emoji:hover,
.post-detail-comment-send:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.post-detail-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-detail-comment {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
}

.post-detail-comment-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    border: 2px solid #333333;
    object-fit: cover;
}

.post-detail-comment-body {
    flex: 1;
    min-width: 0;
}

.post-detail-comment-name {
    color: #ffffff;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 3px;
}

.post-detail-comment-text {
    color: #cccccc;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.post-detail-comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-detail-comment-time {
    color: #666666;
    font-size: 0.75em;
}

.post-detail-comment-reply {
    background: none;
    border: none;
    color: #888888;
    font-size: 0.75em;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.post-detail-comment-reply:hover {
    color: #ffffff;
}

.post-detail-comment-like {
    flex-shrink: 0;
    color: #666666;
}

.post-detail-comment-like svg {
    width: 16px;
    height: 16px;
}

.post-detail-comments-empty {
    text-align: center;
    color: #666666;
    font-size: 0.9em;
    padding: 30px 0;
}

.post-detail-not-found {
    text-align: center;
    color: #888888;
    padding: 50px 0;
}
.post-detail-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    margin-bottom: 8px;

    color: var(--text);
    background: transparent;
    border: none;
    border-radius: 50%;

    cursor: pointer;
    text-decoration: none;

    transition: background 0.2s ease;
}

.post-detail-back:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-detail-back svg {
    width: 24px;
    height: 24px;
}

/* =========================================================
   24. РЕДАКТИРОВАНИЕ ПРОФИЛЯ
   ========================================================= */

.edit-profile-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 8px 16px 120px;
    box-sizing: border-box;
}

.edit-profile-header {
    margin-bottom: 20px;
}

.edit-profile-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    border: none;
    padding: 0;
}

.edit-profile-subtitle {
    color: #888888;
    font-size: 0.85em;
    margin: 0;
}

.edit-profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.edit-profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.edit-profile-avatar {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 4px #000000, 0 0 0 6px #333333;
}

.edit-profile-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-profile-avatar-badge svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.edit-profile-avatar-badge:hover {
    background: #1a1a1a;
    transform: scale(1.05);
}

.edit-profile-avatar-info {
    flex: 1;
    min-width: 0;
}

.edit-profile-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.edit-profile-avatar-btn svg {
    width: 18px;
    height: 18px;
}

.edit-profile-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.edit-profile-avatar-hint {
    color: #888888;
    font-size: 0.75em;
    line-height: 1.4;
}

.edit-profile-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.edit-profile-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid #333333;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.edit-profile-field:hover {
    border-color: #666666;
}

.edit-profile-field--focused {
    border-color: #ffffff;
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.15),
        inset 0 0 15px rgba(255, 255, 255, 0.03);
    transform: scale(1.01);
}

.edit-profile-field--readonly {
    cursor: default;
    opacity: 0.55;
    border-color: #2a2a2a !important;
}

.edit-profile-field--readonly:hover {
    border-color: #2a2a2a !important;
    background: transparent;
}

.edit-profile-field--readonly .edit-profile-field-icon {
    color: #666666;
}

.edit-profile-field--readonly .edit-profile-field-value {
    color: #888888;
}

.edit-profile-field--readonly .edit-profile-field-arrow {
    color: #666666;
}

.edit-profile-field--password {
    cursor: pointer;
}

.edit-profile-field-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-profile-field-icon svg {
    width: 100%;
    height: 100%;
}

.edit-profile-field-content {
    flex: 1;
    min-width: 0;
    position: relative;
}

.edit-profile-field-label {
    color: #888888;
    font-size: 0.75em;
    margin-bottom: 3px;
}

.edit-profile-field-value {
    color: #ffffff;
    font-size: 0.9em;
    line-height: 1.4;
    word-wrap: break-word;
}

.edit-profile-field-value--dots {
    letter-spacing: 3px;
    font-size: 1em;
}

.edit-profile-field-input {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.9em;
    line-height: 1.4;
    outline: none;
    font-family: inherit;
    resize: none;
}

.edit-profile-field--focused .edit-profile-field-value {
    display: none;
}

.edit-profile-field--focused .edit-profile-field-input {
    display: block;
}

.edit-profile-field-textarea {
    min-height: 60px;
}

.edit-profile-field-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #888888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.edit-profile-field--focused .edit-profile-field-arrow {
    opacity: 0;
    transform: translateX(10px);
}

.edit-profile-field-arrow svg {
    width: 100%;
    height: 100%;
}

.edit-profile-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.edit-profile-logout svg {
    width: 20px;
    height: 20px;
}

.edit-profile-logout:hover {
    background: rgba(255, 68, 68, 0.08);
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.15);
}

.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.password-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.password-modal-content {
    position: relative;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.password-modal-title {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 20px;
    text-align: center;
}

.password-modal-form input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333333;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.9em;
    box-sizing: border-box;
}

.password-modal-form input:focus {
    outline: none;
    border-color: #ffffff;
}

.password-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.password-modal-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-modal-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.password-modal-btn--primary {
    background: #ffffff;
    color: #0a0a0a;
}

.password-modal-btn--primary:hover {
    background: #e0e0e0;
}


/* =========================================================
   25. СТРАНИЦЫ ВХОДА И РЕГИСТРАЦИИ
   ========================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 28px;
    background: transparent;
    border: 1px solid #333333;
    border-radius: 24px;
    text-align: center;
    box-sizing: border-box;
}

.auth-title {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 24px;
    padding: 0;
    border: none;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    text-align: left;
}

.auth-label {
    color: #888888;
    font-size: 0.85em;
    margin-top: 8px;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    margin: 0;
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: 12px;
    font-size: 0.95em;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.auth-input::placeholder {
    color: #555555;
}

.auth-button {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: #ffffff;
    color: #0a0a0a;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-button:hover {
    background: #e0e0e0;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.auth-footer {
    color: #888888;
    font-size: 0.85em;
    margin: 16px 0 0;
}

.auth-footer a {
    color: #ffffff;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* =========================================================
   26. СТАРТОВАЯ СТРАНИЦА (WELCOME)
   ========================================================= */

.welcome-page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    min-height: calc(100vh - 200px);
    justify-content: center;
}

.welcome-logo {
    font-family: var(--font-main);
    font-weight: 900;
    font-size: 4em;
    letter-spacing: 6px;
    text-decoration: none;
    color: transparent;
    -webkit-text-stroke: 3px #ffffff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    transition: text-shadow 0.3s ease;
}

.welcome-logo:hover {
    text-shadow:
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(255, 255, 255, 0.5),
        0 0 90px rgba(255, 255, 255, 0.3);
}

.welcome-subtitle {
    color: #ffffff;
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 4px;
    margin-bottom: 24px;
    opacity: 0.7;
}

.welcome-slogan {
    color: #ffffff;
    font-size: 1em;
    margin-bottom: 50px;
    text-align: center;
}

.welcome-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.welcome-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.welcome-btn--primary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.welcome-btn--primary:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 30px rgba(255, 255, 255, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.welcome-btn--secondary {
    background: transparent;
    color: #888888;
    border: 1px solid #333333;
}

.welcome-btn--secondary:hover {
    color: #ffffff;
    border-color: #666666;
    background: rgba(255, 255, 255, 0.03);
}

.welcome-users {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.welcome-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
}

.welcome-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #000000;
    background: #1a1a1a;
    overflow: hidden;
    margin-left: -16px;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.welcome-avatar:hover {
    transform: translateY(-4px);
    z-index: 10;
}

.welcome-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-avatar--plus {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 300;
    border: 1px solid #666666;
    cursor: pointer;
}

.welcome-avatar--plus:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.welcome-users-count {
    color: #ffffff;
    font-size: 0.95em;
    text-align: center;
}

.welcome-users-count strong {
    font-weight: 700;
}

.welcome-legal {
    width: 100%;
    max-width: 400px;
}

.welcome-legal-text {
    color: #666666;
    font-size: 0.75em;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

.welcome-legal-text a {
    color: #888888;
    text-decoration: none;
    border-bottom: 1px dashed #555555;
    transition: all 0.2s ease;
}

.welcome-legal-text a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}


/* =========================================================
   27. ЮРИДИЧЕСКИЕ СТРАНИЦЫ
   ========================================================= */

.legal-page {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 24px 120px;
    box-sizing: border-box;
}

.legal-title {
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 700;
    margin: 0 0 8px;
    padding: 0;
    border: none;
}

.legal-updated {
    color: #666666;
    font-size: 0.8em;
    margin: 0 0 30px;
}

.legal-heading {
    color: #ffffff;
    font-size: 1.15em;
    font-weight: 600;
    margin: 24px 0 12px;
    padding: 0;
    border: none;
}

.legal-text {
    color: #cccccc;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0 0 12px;
}

.legal-text strong {
    color: #ffffff;
    font-weight: 600;
}

.legal-text a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px dashed #555555;
}

.legal-text a:hover {
    border-bottom-color: #ffffff;
}

.legal-list {
    color: #cccccc;
    font-size: 0.9em;
    line-height: 1.7;
    margin: 0 0 12px;
    padding-left: 24px;
}

.legal-list li {
    margin-bottom: 6px;
}

.legal-footer-text {
    color: #888888;
    font-size: 0.85em;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #1f1f1f;
}

.auth-legal {
    color: #555555;
    font-size: 0.7em;
    line-height: 1.4;
    text-align: center;
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid #1f1f1f;
}

.auth-legal a {
    color: #888888;
    text-decoration: none;
    border-bottom: 1px dashed #555555;
}

.auth-legal a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}


/* =========================================================
   28. ПАГИНАЦИЯ
   ========================================================= */

.feed-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 30px 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #1a1a1a;
    color: #00ffc8;
    border: 1px solid #00ffc8;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.95em;
}

.pagination-btn:hover {
    background: #00ffc8;
    color: #000;
    transform: translateY(-2px);
}

.pagination-info {
    color: #888;
    font-size: 0.9em;
    min-width: 80px;
    text-align: center;
}

.comments-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #1f1f1f;
}

.users-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #1f1f1f;
}


/* =========================================================
   29. МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================================================= */

@media (max-width: 700px) {

    .page-header {
        padding: 12px 12px 6px;
    }

    .logo-fvl {
        font-size: 1.4em;
        -webkit-text-stroke: 1.8px #ffffff;
    }

    .page-header-icon {
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
    }

    .page-header-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .profile-header {
        gap: 16px;
        padding: 12px 0 20px;
    }

    .profile-avatar {
        width: 90px;
        height: 90px;
        box-shadow: 0 0 0 3px #000000, 0 0 0 5px #333333;
    }

    .profile-name {
        font-size: 1.2em;
    }

    .profile-stat {
        padding: 0 14px;
    }

    .profile-stat-value {
        font-size: 1.1em;
    }

    .profile-stat-label {
        font-size: 0.75em;
    }

    .profile-btn {
        padding: 8px 18px;
        font-size: 0.85em;
    }

    .feed-tabs-wrap {
        padding: 8px;
        margin-left: -8px;
        margin-right: -8px;
        margin-bottom: 12px;

        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .feed-tabs {
        gap: 2px;
        padding: 3px;
        border-radius: 14px;
    }

    .feed-tab {
        padding: 9px 4px;
        font-size: 0.72em;
        gap: 3px;
        letter-spacing: -0.3px;
    }

    .feed-tab-icon {
        font-size: 0.9em;
    }

    .feed-follow-btn {
        padding: 5px 10px !important;
        font-size: 0.7em !important;
    }

    .post-media-wrapper {
        max-width: calc(100% - 55px);
    }

    .post-reactions {
        right: -52px;
        gap: 12px;
    }

    .post-reaction-button {
        width: 38px;
        height: 38px;
    }

    .post-reaction-icon {
        width: 18px;
        height: 18px;
    }

    nav.bottom-nav {
        bottom: 10px;
        width: calc(100vw - 20px);
        height: 64px;
        padding: 5px 6px;
        border-radius: 20px;
    }

    nav.bottom-nav .bottom-nav-item {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
    }

    nav.bottom-nav .bottom-nav-icon {
        width: 27px;
        height: 27px;
    }

    nav.bottom-nav .bottom-nav-create {
        width: 54px;
        height: 54px;
        flex: 0 0 54px;
    }

    nav.bottom-nav .bottom-nav-create span {
        font-size: 1.8em;
    }

    .notification-item {
        min-height: 62px;
        padding: 10px 12px;
    }

    .notification-avatar {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .chat-page {
        height: calc(100dvh - 75px);
        padding-bottom: 80px;
    }

    .chat-messages {
        padding: 12px;
    }

    .chat-message {
        max-width: 80%;
    }

    .chat-message-image {
        max-width: 220px;
    }

    .chat-form {
        padding: 8px;
    }

    .chat-input {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .users-page {
        padding: 10px 12px 120px;
    }

    .user-item-avatar {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .user-item-name {
        font-size: 0.9em;
    }

    .user-item-follow-btn {
        padding: 6px 14px !important;
        font-size: 0.75em !important;
    }

    .post-detail {
        padding: 8px 12px 120px;
    }

    .post-detail-avatar {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .post-detail-media {
        border-radius: 10px;
    }

    .post-detail-reactions {
        gap: 16px;
        padding: 12px 0;
    }

    .post-detail-reaction svg {
        width: 22px;
        height: 22px;
    }

    .post-detail-comment-avatar {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 1.3em;
    }

    .welcome-page {
        padding: 40px 20px 30px;
    }

    .welcome-logo {
        font-size: 3em;
        -webkit-text-stroke: 2.5px #ffffff;
    }

    .welcome-subtitle {
        font-size: 0.75em;
        letter-spacing: 3px;
    }

    .welcome-slogan {
        font-size: 0.9em;
        margin-bottom: 35px;
    }

    .welcome-btn {
        padding: 14px 20px;
        font-size: 0.95em;
    }

    .welcome-avatar {
        width: 38px;
        height: 38px;
        margin-left: -14px;
    }

    .welcome-avatar--plus {
        font-size: 1em;
    }

    .welcome-users-count {
        font-size: 0.85em;
    }
}


/* =========================================================
   30. ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   ========================================================= */

@media (max-width: 380px) {

    nav.bottom-nav {
        bottom: 6px;
        width: calc(100vw - 12px);
    }

    nav.bottom-nav .bottom-nav-item {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }

    nav.bottom-nav .bottom-nav-create {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .profile-info {
        width: 100%;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-actions {
        justify-content: center;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.3em;
    }

    .chat-message {
        max-width: 85%;
    }

    .feed-tab {
        font-size: 0.68em;
        padding: 8px 3px;
    }
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
    max-width: 100%;      /* ← было 400px */
    flex-wrap: wrap;      /* ← на узких — в столбик */
}

.profile-actions .profile-btn {
    flex: 1 1 auto;       /* ← кнопки могут сжиматься */
    min-width: 0;         /* ← критично для flex-сжатия */
    padding: 10px 14px;   /* ← уменьшаем внутренние отступы */
    font-size: 0.85em;    /* ← чуть меньше шрифт */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

   ОЧЕНЬ УЗКИЕ ЭКРАНЫ (iPhone 12 mini, SE)
   ========================================================= */

@media (max-width: 400px) {
    .profile-actions {
        flex-direction: column;
    }

    .profile-actions > * {
        width: 100%;
    }

    .profile-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95em;
    }

    .feed-posts {
        padding-bottom: 180px;
    }

    .post-card {
        min-height: calc(100vh - 270px);
        min-height: calc(100dvh - 270px);
        min-height: calc(100svh - 270px);
    }
}


/* =========================================================
   МОБИЛЬНАЯ ЛЕНТА — запас под нижнюю навигацию
   (дополняет @media 700px — правит .feed-posts и .post-card)
   ========================================================= */

@media (max-width: 700px) {
    .feed-posts {
        height: calc(100vh - 70px);
        height: calc(100dvh - 70px);
        height: calc(100svh - 70px);
        padding-bottom: 160px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .post-card {
        min-height: calc(100vh - 250px);
        min-height: calc(100dvh - 250px);
        min-height: calc(100svh - 250px);
        padding: 12px;
        margin-bottom: 16px;
    }

    .post-card .post-image,
    .post-card video.post-image {
        margin: 8px 0;
    }
}
