/* Стили для аватарок в хедере */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background-color: var(--bg-tertiary);
    transition: transform 0.2s ease;
}
.user-avatar:hover {
    transform: scale(1.05);
}
.default-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}
/* Уведомления в хедере */
.header-notifications {
    position: relative;
    margin-left: 15px;
}
.header-notifications-link {
    color: var(--text-secondary);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.header-notifications-link:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
    transform: scale(1.05);
}
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--bg-secondary);
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}
/* Современный нижний навбар */
.bottom-navbar {
position: fixed;
    bottom: 0;
    left: 29%;
    right: 29%;
    background: #ffffffd6;
    /* border-top: 1px solid var(--border-color); */
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 5px;
    border-radius: 60px;
}
.navbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    padding: 6px 8px;
    border-radius: 14px;
    min-width: 60px;
}
.navbar-item:hover, .navbar-item.active {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
}
.navbar-item i {
font-size: 22px !important;
    line-height: 1;
    color: #6b71d7;
}
.navbar-item span {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}
.profile-menu-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    cursor: pointer;
}
.profile-menu-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.45);
}
.profile-dropdown {
    position: fixed;
    bottom: 0px;
    right: 15%;
    background: #f5f5f5;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    min-width: 220px;
    padding: 10px 0;
    display: none;
    animation: slideUp 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001;
    border: 1px solid var(--border-color);
    transform-origin: bottom right;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.profile-dropdown.show {
    display: block;
}
.dropdown-item {
    width: 100%;
    padding: 14px 20px;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    border-radius: 12px;
    margin: 0 6px 6px;
}
.dropdown-item:last-child {
    margin-bottom: 0;
}
.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}
.dropdown-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 16px;
}
/* Чаты в навбаре */
.chat-nav-item {
    position: relative;
}
.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--bg-secondary);
}
/* FAB - Floating Action Button */
.fab-create {
position: fixed;
    bottom: 42px;
    left: 51%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 1002;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}
.fab-create:hover {
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.65);
}
.fab-create:active {
    transform: translateX(-50%) scale(0.95);
}
@keyframes floating {
    0% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-8px); }
    100% { transform: translateX(-50%) translateY(0px); }
}
/* Применяем плавающий эффект постоянно */
.fab-create {
    animation: floating 3s ease-in-out infinite;
}
/* Сторис модал */
.story-create-modal {
    max-width: 500px;
    width: 90%;
}
.story-upload-area {
    text-align: center;
    padding: 40px 20px;
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}
.story-upload-area:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}
.story-upload-area i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.story-upload-area p {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}
.story-upload-area .text-muted {
    font-size: 14px;
    color: var(--text-secondary);
}
.story-preview-container {
    display: none;
    margin-bottom: 20px;
}
.story-preview-container.show {
    display: block;
}
.story-preview-media {
    width: 100%;
    max-height: 400px;
    border-radius: 12px;
    object-fit: contain;
    background: var(--bg-tertiary);
}
/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
    border-left: 4px solid var(--primary);
}
.notification.show {
    transform: translateX(0);
}
.notification.success {
    border-left-color: var(--success);
}
.notification.error {
    border-left-color: var(--error);
}
.notification.warning {
    border-left-color: var(--warning);
}
/* Модал создания поста */
.create-post-modal .modal-content {
    max-width: 600px;
    width: 90%;
}
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
    margin-bottom: 20px;
}
.upload-area:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}
.upload-area i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.upload-area p {
    margin: 5px 0;
    color: var(--text-primary);
}
.upload-area .text-muted {
    font-size: 14px;
    color: var(--text-secondary);
}
.media-preview {
    max-width: 100%;
    max-height: 400px;
    display: none;
    margin: 20px auto;
    border-radius: 8px;
    object-fit: contain;
    background-color: var(--bg-tertiary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.media-preview.show {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Адаптивность */
@media (max-width: 768px) {
    .fab-create {
        bottom: 40px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    .navbar-item span {
        display: none;
    }
    .navbar-item i {
        font-size: 20px !important;
        color: #6b71d7;
    }
    .bottom-navbar {
        padding: 8px 15px;
        gap: 2px;
        position: fixed;
        bottom: 0;
        left: 10%;
        right: 10%;
        background: #ffffffa6;
        /* border-top: 1px solid var(--border-color); */
        padding: 10px 20px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 5px;
        border-radius: 40px;
    }
    .profile-menu-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    /* Уведомления в мобильной версии */
    .header-notifications {
        margin-left: 10px;
    }
    .header-notifications-link {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    .notification-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: -3px;
        right: -3px;
    }
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    .nav-links {
        display: none;
    }
    .user-menu {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
}