:root {
    --active-color: #3b82f6;
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-color: #eef2f6;
    --border-hover: #e2e8f0;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --hover-bg: #f0f4f8;
    --gradient-start: #3b82f6;
    --gradient-end: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --border-hover: #475569;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --hover-bg: #334155;
    --gradient-start: #3b82f6;
    --gradient-end: #2563eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.main-content {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

/* Левая боковая панель */
.left-sidebar {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compact-menu {
    background-color: var(--bg-secondary);
    border-radius: 30px;
    padding: 16px 6px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.menu-item i {
    font-size: 20px;
}

.menu-item .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Основной контент */
.feed-container {
    flex: 1;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.feed-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.feed-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
}

.feed-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.feed-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-title i {
    color: var(--active-color);
}

/* Посты */
.post {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--border-hover);
}

.post-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

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

.post-author {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-time {
    font-size: 13px;
    color: var(--text-tertiary);
}

.post-content {
    padding: 0 20px 20px;
    line-height: 1.6;
    font-size: 15px;
    color: var(--text-secondary);
    word-break: break-word;
}

.post-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 10px;
    background: transparent;
}

.post-action:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.post-action.liked {
    color: var(--danger);
}

.post-action.liked:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Создание поста */
.create-post {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.post-input {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.post-input-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.post-input textarea {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    resize: none;
    font-size: 15px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: inherit;
}

.post-input textarea:focus {
    outline: none;
    border-color: var(--active-color);
    background-color: var(--bg-secondary);
}

.post-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn-small {
    padding: 8px 15px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn-small:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
    border-color: var(--active-color);
}

.publish-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.publish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Правая боковая панель */
.right-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.growth-panel {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.growth-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.growth-title i {
    color: var(--success);
}

.growth-text {
    color: var(--text-tertiary);
    margin-bottom: 16px;
    line-height: 1.5;
    font-size: 14px;
}

.growth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.growth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.trending-list {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.trending-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 8px;
}

.trending-item:hover {
    background-color: var(--hover-bg);
}

.trending-number {
    background-color: var(--bg-tertiary);
    color: var(--active-color);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

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

.trending-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.trending-stats {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 28px;
    line-height: 1;
    transition: all 0.3s;
}

.close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--active-color);
    background-color: var(--bg-secondary);
}

/* Настройки */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-title i {
    color: var(--active-color);
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.settings-option:hover {
    background-color: var(--hover-bg);
    border-color: var(--active-color);
}

.option-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--active-color);
}

.option-text {
    flex: 1;
}

.option-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.option-description {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Переключатель */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--active-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Кнопка выхода */
.logout-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.logout-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

/* Сообщения */
.messages-container {
    display: flex;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    height: 85vh;
    width: 100%;
}

.conversations-sidebar {
    width: 320px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.messages-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.messages-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.conversation-item:hover {
    background-color: var(--hover-bg);
}

.conversation-item.active {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--active-color);
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.conversation-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.conversation-preview {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-back-btn button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--active-color);
    cursor: pointer;
    transition: all 0.3s;
}

.chat-back-btn button:hover {
    background-color: var(--active-color);
    color: white;
}

.chat-user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

.chat-user-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.messages-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--bg-primary);
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.chat-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 15px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    resize: none;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--active-color);
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.05);
}

/* Поиск */
.search-container {
    flex: 1;
    max-width: 700px;
    width: 100%;
}

.search-header {
    margin-bottom: 24px;
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 16px;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--active-color);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.user-card {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-card:hover {
    transform: translateY(-2px);
    border-color: var(--active-color);
    box-shadow: var(--card-shadow);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

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

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-bio {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Уведомления */
.notifications-container {
    flex: 1;
    max-width: 700px;
    width: 100%;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.notifications-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mark-all-read {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-item {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.notification-item:hover {
    transform: translateY(-2px);
    border-color: var(--active-color);
}

.notification-item.unread {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--active-color);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--active-color);
    font-size: 18px;
}

.notification-content {
    flex: 1;
}

.notification-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Профиль */
.profile-container {
    flex: 1;
    max-width: 700px;
    width: 100%;
}

.profile-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 24px;
    color: white;
    position: relative;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 4px solid white;
    overflow: hidden;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-bio {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    gap: 30px;
}

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

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

.profile-stat-label {
    font-size: 12px;
    opacity: 0.8;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.profile-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
}

.profile-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.post-card {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

.post-card-content {
    padding: 12px;
}

.post-card-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Мобильное меню */
.mobile-bottom-menu {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background-color: var(--bg-secondary);
    border-radius: 24px;
    z-index: 1000;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.mobile-menu-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    padding: 8px 0;
    position: relative;
    border-radius: 12px;
}

.mobile-menu-item:hover {
    color: var(--active-color);
    background-color: var(--hover-bg);
}

.mobile-menu-item.active {
    color: var(--active-color);
    background-color: var(--bg-tertiary);
}

.mobile-menu-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-menu-item span {
    font-size: 11px;
    font-weight: 500;
}

.mobile-badge {
    position: absolute;
    top: 4px;
    right: 20%;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}

/* Toast уведомления */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 360px;
    z-index: 2000;
    border-left: 4px solid var(--active-color);
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

.notification-toast.hiding {
    animation: slideOutRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-toast-content {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--active-color);
}

.notification-toast-body {
    flex: 1;
}

.notification-toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-toast-message {
    font-size: 12px;
    color: var(--text-tertiary);
}

.notification-toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
}

.notification-toast-timer {
    height: 3px;
    background: linear-gradient(90deg, var(--active-color), #60a5fa);
    width: 100%;
    animation: progressShrink 6s linear forwards;
}

@keyframes progressShrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* Скелетон загрузки */
.skeleton-post {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.skeleton-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--border-hover) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--border-hover) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }

.skeleton-media {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--border-hover) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    margin-top: 15px;
}

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

/* Рамки аватаров */
.avatar-frame {
    display: inline-block;
    border-radius: 50%;
    position: relative;
    overflow: visible;
}

.avatar-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

.frame-beginner {
    background: linear-gradient(145deg, #9ca3af, #4b5563);
    padding: 2px;
}

.frame-active {
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    padding: 2px;
}

.frame-popular {
    background: linear-gradient(145deg, #fbbf24, #d97706);
    padding: 2px;
}

.frame-vip {
    background: linear-gradient(145deg, #a78bfa, #7c3aed);
    padding: 3px;
}

.frame-legend {
    background: conic-gradient(from var(--angle), #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ff6b6b);
    padding: 3px;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% { --angle: 360deg; }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Roblox рамки */
.frame-roblox-noob {
    background: linear-gradient(145deg, #ffd700, #ffa500);
    padding: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.frame-roblox-admin {
    background: linear-gradient(145deg, #ff6b6b, #ff4757);
    padding: 2px;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.frame-roblox-builder {
    background: linear-gradient(145deg, #4ecdc4, #45b7d1);
    padding: 2px;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.frame-roblox-vip {
    background: linear-gradient(145deg, #a55eea, #8e44ad);
    padding: 2px;
    box-shadow: 0 0 10px rgba(165, 94, 234, 0.3);
}

.frame-adopt-me {
    background: linear-gradient(145deg, #f9ca24, #f0932b);
    padding: 2px;
    box-shadow: 0 0 10px rgba(249, 202, 36, 0.3);
}

.frame-brookhaven {
    background: linear-gradient(145deg, #7ed6df, #22a6b3);
    padding: 2px;
    box-shadow: 0 0 10px rgba(126, 214, 223, 0.3);
}

.frame-tower-hell {
    background: linear-gradient(145deg, #ff7979, #eb4d4b);
    padding: 2px;
    box-shadow: 0 0 10px rgba(255, 121, 121, 0.3);
}

.frame-jailbreak {
    background: linear-gradient(145deg, #f6e58d, #f9ca24);
    padding: 2px;
    box-shadow: 0 0 10px rgba(246, 229, 141, 0.3);
}

.frame-blox-fruits {
    background: linear-gradient(145deg, #ffb8b8, #ff7979);
    padding: 2px;
    box-shadow: 0 0 10px rgba(255, 184, 184, 0.3);
}

.frame-pet-sim {
    background: linear-gradient(145deg, #c7ecee, #7ed6df);
    padding: 2px;
    box-shadow: 0 0 10px rgba(199, 236, 238, 0.3);
}

.frame-roblox-classic {
    background: linear-gradient(145deg, #b8e994, #78e08f);
    padding: 2px;
    box-shadow: 0 0 10px rgba(184, 233, 148, 0.3);
}

/* Магазин рамок */
.frames-shop-modal .modal-container {
    max-width: 480px;
}

.balance-info {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f59e0b;
}

.balance-item i {
    font-size: 18px;
}

.balance-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.balance-label {
    color: var(--text-tertiary);
    font-size: 14px;
}

.frames-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.frames-list::-webkit-scrollbar {
    width: 6px;
}

.frames-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.frames-list::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

.frame-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.frame-item:hover {
    background: var(--bg-secondary);
    border-color: var(--active-color);
    transform: translateX(4px);
}

.frame-item.selected {
    background: var(--bg-tertiary);
    border-color: var(--active-color);
}

.frame-avatar-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.frame-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

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

.frame-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.frame-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frame-action {
    flex-shrink: 0;
}

.frame-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.frame-btn.buy {
    background: #f59e0b;
    color: white;
}

.frame-btn.buy:hover {
    background: #d97706;
}

.frame-btn.select {
    background: var(--active-color);
    color: white;
}

.frame-btn.select:hover {
    background: #2563eb;
}

.frame-btn.selected {
    background: var(--success);
    color: white;
    cursor: default;
}

.frames-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.category-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.category-btn.active {
    background: var(--active-color);
    color: white;
}

/* Verified badge */
.verified-badge {
    color: var(--active-color);
    font-size: 14px;
    margin-left: 5px;
    vertical-align: middle;
}

.verified-badge-small {
    color: var(--active-color);
    font-size: 12px;
    margin-left: 3px;
    vertical-align: middle;
}

.verified-badge-large {
    color: var(--active-color);
    width: 20px;
    height: 20px;
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--border-color);
}

.empty-state-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.empty-state-text {
    font-size: 14px;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--active-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--active-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--active-color);
}

/* Адаптивность */
@media (max-width: 768px) {
    .left-sidebar {
        display: none;
    }
    
    .right-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background-color: var(--bg-primary);
        z-index: 99;
        overflow-y: auto;
        display: none;
        padding: 60px 20px 20px;
    }
    
    .right-sidebar.active {
        display: block;
    }
    
    .mobile-bottom-menu {
        display: flex;
        justify-content: space-around;
    }
    
    .messages-container {
        flex-direction: column;
        height: calc(100vh - 100px);
    }
    
    .conversations-sidebar {
        width: 100%;
        height: 40%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .chat-area {
        height: 60%;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        padding: 24px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }
    
    .profile-name {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
        gap: 10px;
    }
    
    .feed-title {
        font-size: 20px;
    }
    
    .post-header {
        padding: 12px;
    }
    
    .post-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .post-content {
        padding: 0 12px 12px;
        font-size: 13px;
    }
    
    .post-actions {
        padding: 10px 12px;
    }
    
    .post-action {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .create-post {
        padding: 12px;
    }
    
    .post-input-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .publish-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Скрытие элементов */
.hidden {
    display: none !important;
}
/* ========== МОДАЛЬНЫЕ ОКНА (динамические) ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-container {
    background-color: var(--bg-secondary);
    border-radius: 24px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: var(--hover-bg);
    color: var(--danger);
}

/* ========== РЕДАКТИРОВАНИЕ ПРОФИЛЯ ========== */
.profile-edit-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background-color: var(--bg-tertiary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.profile-edit-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--active-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

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

.profile-edit-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-edit-nickname {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.upload-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-avatar-btn:hover {
    background-color: var(--hover-bg);
    border-color: var(--active-color);
    color: var(--active-color);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--active-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ========== СПИСКИ ПОЛЬЗОВАТЕЛЕЙ (подписчики/подписки) ========== */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.user-list-item:hover {
    transform: translateX(4px);
    border-color: var(--active-color);
    box-shadow: var(--card-shadow);
}

.user-list-item .user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

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

.user-name-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.user-fullname {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.user-nickname {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.user-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.user-follow-button {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: var(--active-color);
    color: white;
    white-space: nowrap;
}

.user-follow-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.user-follow-button.following {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.user-follow-button.following:hover {
    background: #fee2e2;
    color: var(--danger);
}

.user-follow-button.disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: default;
    opacity: 0.7;
}

/* ========== КАРТОЧКИ ПОСТОВ В ПРОФИЛЕ ========== */
.post-card-media {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--bg-tertiary);
}

.post-card-media-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--hover-bg));
    color: var(--active-color);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.post-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

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

.post-card-author-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.post-card-nickname {
    font-size: 11px;
    color: var(--text-tertiary);
}

.post-card-footer {
    display: flex;
    gap: 12px;
    padding: 8px 12px 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 11px;
}

.post-card-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== МОДАЛЬНОЕ ОКНО ПРОФИЛЯ ДРУГОГО ПОЛЬЗОВАТЕЛЯ ========== */
.user-profile-modal .modal-container {
    max-width: 480px;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.user-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.user-profile-info {
    flex: 1;
    min-width: 200px;
}

.user-profile-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.user-profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.user-profile-nickname {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.user-profile-bio {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.user-profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.user-profile-stat {
    text-align: center;
    flex: 1;
}

.user-profile-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-profile-stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

.user-profile-actions {
    display: flex;
    gap: 12px;
}

.user-profile-action {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
}

.user-profile-action.primary {
    background: var(--active-color);
    color: white;
}

.user-profile-action.primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.user-profile-action.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.user-profile-action.secondary:hover {
    background: var(--hover-bg);
}

/* ========== ПРОСМОТР ПОСТА В МОДАЛКЕ ========== */
.post-view-modal .modal-container {
    max-width: 600px;
}

.post-view-content {
    padding: 0;
}

.post-view-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.post-view-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-view-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.post-view-author-info {
    flex: 1;
}

.post-view-author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.post-view-time {
    font-size: 13px;
    color: var(--text-tertiary);
}

.post-view-text {
    padding: 24px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.post-view-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
}

.post-view-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 30px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.post-view-action:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.post-view-action.liked {
    background: #fef2f2;
    color: var(--danger);
}

.post-view-action.liked svg {
    fill: var(--danger);
}

/* ========== ИНДИКАТОРЫ ЗАГРУЗКИ ========== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--active-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.search-loading .loading-spinner {
    margin-bottom: 12px;
}

/* ========== КОММЕНТАРИИ ========== */
.comment-item {
    margin-bottom: 12px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.comment-item:hover {
    box-shadow: var(--card-shadow);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--active-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.comment-input:focus {
    outline: none;
    border-color: var(--active-color);
    background-color: var(--bg-secondary);
}

.add-comment-btn {
    padding: 10px 20px;
    background: var(--active-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-comment-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.add-comment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comments-list {
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

/* ========== МЕДИА-КОНТЕЙНЕРЫ ========== */
.post-media {
    margin-top: 15px;
    width: 100%;
}

.media-item {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.media-item:hover {
    transform: translateY(-2px);
}

.media-item img,
.media-item video {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
}

.media-preview-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.media-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
    transition: transform 0.3s;
    flex-shrink: 0;
}

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

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-media-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.3s;
}

.remove-media-btn:hover {
    background-color: rgba(220, 38, 38, 0.9);
}

.hashtag-preview {
    background-color: var(--bg-tertiary);
    color: var(--active-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.hashtag-preview:hover {
    background-color: var(--hover-bg);
}

.remove-hashtag-btn {
    background: none;
    border: none;
    color: var(--active-color);
    cursor: pointer;
    padding: 0;
    font-size: 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.remove-hashtag-btn:hover {
    opacity: 1;
}

/* ========== КНОПКИ УПРАВЛЕНИЯ ЧАТОМ ========== */
.input-controls {
    display: flex;
    gap: 10px;
    margin-right: 10px;
}

.input-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.input-btn:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.chat-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.chat-control-btn:hover {
    background-color: var(--active-color);
    color: white;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ АДАПТИВНЫЕ ПРАВКИ ========== */
@media (max-width: 768px) {
    .profile-edit-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .user-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-profile-name-wrapper {
        justify-content: center;
    }
    
    .user-profile-stats {
        justify-content: center;
    }
    
    .user-profile-actions {
        flex-direction: column;
    }
    
    .user-list-item {
        flex-wrap: wrap;
    }
    
    .user-follow-button {
        width: 100%;
        margin-top: 8px;
        text-align: center;
    }
    
    .post-card-media {
        height: 200px;
    }
}
/* ========== КНОПКИ И ЭЛЕМЕНТЫ, КОТОРЫХ НЕ ХВАТАЛО ========== */

/* Вкладки поиска */
.search-tabs {
    display: flex;
    gap: 8px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.search-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
}

.search-tab:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.search-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

/* Кнопки в шапке сообщений (обновить, поиск) */
.messages-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.refresh-conversations,
.search-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
}

.refresh-conversations:hover,
.search-toggle-btn:hover {
    background-color: var(--active-color);
    color: white;
    transform: rotate(15deg);
}

/* Кнопка редактирования профиля */
.profile-edit-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.profile-edit-button:hover {
    background: var(--active-color);
    color: white;
    transform: scale(1.1);
}

/* Кнопка закрытия мобильной боковой панели */
.mobile-sidebar-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 101;
    font-size: 18px;
}

.mobile-sidebar-toggle:hover {
    background-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* Плавающая кнопка нового сообщения */
.new-message-btn-floating {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    z-index: 100;
}

.new-message-btn-floating:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .profile-edit-button {
        width: 36px;
        height: 36px;
    }
    
    .new-message-btn-floating {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .profile-edit-button {
        width: 32px;
        height: 32px;
    }
    
    .new-message-btn-floating {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .mobile-sidebar-toggle {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Поддержка тёмной темы */
body.dark-mode .refresh-conversations,
body.dark-mode .search-toggle-btn,
body.dark-mode .profile-edit-button,
body.dark-mode .mobile-sidebar-toggle {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-tertiary);
}

body.dark-mode .refresh-conversations:hover,
body.dark-mode .search-toggle-btn:hover,
body.dark-mode .profile-edit-button:hover,
body.dark-mode .mobile-sidebar-toggle:hover {
    background-color: var(--active-color);
    color: white;
}

body.dark-mode .mobile-sidebar-toggle:hover {
    background-color: var(--danger);
}

body.dark-mode .new-message-btn-floating {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}
/* ========== ВКЛАДКИ УВЕДОМЛЕНИЙ ========== */
.notifications-tabs {
    display: flex;
    gap: 8px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.notifications-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
}

.notifications-tab:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.notifications-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}
/* ========== ВКЛАДКИ ПРОФИЛЯ, ПОИСКА, УВЕДОМЛЕНИЙ, ЛАЙКОВ ========== */
.profile-tabs,
.search-tabs,
.likes-tabs,
.notifications-tabs {
    display: flex;
    gap: 8px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.profile-tab,
.search-tab,
.likes-tab,
.notifications-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-tab:hover,
.search-tab:hover,
.likes-tab:hover,
.notifications-tab:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.profile-tab.active,
.search-tab.active,
.likes-tab.active,
.notifications-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

/* ========== КНОПКИ В СООБЩЕНИЯХ ========== */
.messages-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.refresh-conversations,
.search-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
}

.refresh-conversations:hover,
.search-toggle-btn:hover {
    background-color: var(--active-color);
    color: white;
    transform: rotate(15deg);
}

/* ========== КНОПКА РЕДАКТИРОВАНИЯ ПРОФИЛЯ ========== */
.profile-edit-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.profile-edit-button:hover {
    background: var(--active-color);
    color: white;
    transform: scale(1.1);
}

/* ========== ПЛАВАЮЩАЯ КНОПКА НОВОГО СООБЩЕНИЯ ========== */
.new-message-btn-floating {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    z-index: 100;
}

.new-message-btn-floating:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* ========== КНОПКА ЗАКРЫТИЯ МОБИЛЬНОЙ БОКОВОЙ ПАНЕЛИ ========== */
.mobile-sidebar-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 101;
    font-size: 18px;
}

.mobile-sidebar-toggle:hover {
    background-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* ========== ПОИСКОВОЕ ПОЛЕ В СООБЩЕНИЯХ ========== */
.search-input {
    position: absolute;
    top: 25px;
    right: 32px;
    width: 0;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    transition: width 0.3s ease, padding 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.search-input.active {
    width: 200px;
    padding: 0 15px;
    opacity: 1;
    pointer-events: all;
}

.search-input:focus {
    outline: none;
    border-color: var(--active-color);
    background-color: var(--bg-secondary);
}

/* ========== КАРТОЧКИ ПОСТОВ В ПРОФИЛЕ ========== */
.post-card-media {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--bg-tertiary);
}

.post-card-media-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--hover-bg));
    color: var(--active-color);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.post-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

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

.post-card-author-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.post-card-nickname {
    font-size: 11px;
    color: var(--text-tertiary);
}

.post-card-footer {
    display: flex;
    gap: 12px;
    padding: 8px 12px 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 11px;
}

.post-card-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== СПИСКИ ПОЛЬЗОВАТЕЛЕЙ (подписчики/подписки) ========== */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.user-list-item:hover {
    transform: translateX(4px);
    border-color: var(--active-color);
    box-shadow: var(--card-shadow);
}

.user-list-item .user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

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

.user-name-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.user-fullname {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.user-nickname {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.user-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.user-follow-button {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: var(--active-color);
    color: white;
    white-space: nowrap;
}

.user-follow-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.user-follow-button.following {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.user-follow-button.following:hover {
    background: #fee2e2;
    color: var(--danger);
}

.user-follow-button.disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: default;
    opacity: 0.7;
}

/* ========== ПРОСМОТР ПОСТА В МОДАЛКЕ ========== */
.post-view-modal .modal-container {
    max-width: 600px;
}

.post-view-content {
    padding: 0;
}

.post-view-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.post-view-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-view-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.post-view-author-info {
    flex: 1;
}

.post-view-author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.post-view-time {
    font-size: 13px;
    color: var(--text-tertiary);
}

.post-view-text {
    padding: 24px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.post-view-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
}

.post-view-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 30px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.post-view-action:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.post-view-action.liked {
    background: #fef2f2;
    color: var(--danger);
}

.post-view-action.liked svg {
    fill: var(--danger);
}

/* ========== МОДАЛЬНОЕ ОКНО ПРОФИЛЯ ДРУГОГО ПОЛЬЗОВАТЕЛЯ ========== */
.user-profile-modal .modal-container {
    max-width: 480px;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.user-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.user-profile-info {
    flex: 1;
    min-width: 200px;
}

.user-profile-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.user-profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.user-profile-nickname {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.user-profile-bio {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.user-profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.user-profile-stat {
    text-align: center;
    flex: 1;
}

.user-profile-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-profile-stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

.user-profile-actions {
    display: flex;
    gap: 12px;
}

.user-profile-action {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
}

.user-profile-action.primary {
    background: var(--active-color);
    color: white;
}

.user-profile-action.primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.user-profile-action.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.user-profile-action.secondary:hover {
    background: var(--hover-bg);
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ========== */
@media (max-width: 768px) {
    .profile-tabs,
    .search-tabs,
    .likes-tabs,
    .notifications-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .profile-tab,
    .search-tab,
    .likes-tab,
    .notifications-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .user-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-profile-name-wrapper {
        justify-content: center;
    }
    
    .user-profile-stats {
        justify-content: center;
    }
    
    .user-profile-actions {
        flex-direction: column;
    }
    
    .user-list-item {
        flex-wrap: wrap;
    }
    
    .user-follow-button {
        width: 100%;
        margin-top: 8px;
        text-align: center;
    }
    
    .profile-edit-button {
        width: 36px;
        height: 36px;
    }
    
    .new-message-btn-floating {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
    
    .mobile-sidebar-toggle {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .profile-edit-button {
        width: 32px;
        height: 32px;
    }
    
    .new-message-btn-floating {
        width: 42px;
        height: 42px;
        font-size: 16px;
        bottom: 80px;
    }
    
    .mobile-sidebar-toggle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
}

/* ========== ТЁМНАЯ ТЕМА ДЛЯ ДОБАВЛЕННЫХ ЭЛЕМЕНТОВ ========== */
body.dark-mode .profile-tabs,
body.dark-mode .search-tabs,
body.dark-mode .likes-tabs,
body.dark-mode .notifications-tabs {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .profile-tab,
body.dark-mode .search-tab,
body.dark-mode .likes-tab,
body.dark-mode .notifications-tab {
    color: var(--text-tertiary);
}

body.dark-mode .profile-tab.active,
body.dark-mode .search-tab.active,
body.dark-mode .likes-tab.active,
body.dark-mode .notifications-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

body.dark-mode .refresh-conversations,
body.dark-mode .search-toggle-btn,
body.dark-mode .profile-edit-button,
body.dark-mode .mobile-sidebar-toggle {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-tertiary);
}

body.dark-mode .refresh-conversations:hover,
body.dark-mode .search-toggle-btn:hover,
body.dark-mode .profile-edit-button:hover {
    background-color: var(--active-color);
    color: white;
}

body.dark-mode .mobile-sidebar-toggle:hover {
    background-color: var(--danger);
}

body.dark-mode .new-message-btn-floating {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

body.dark-mode .user-list-item {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .user-fullname {
    color: var(--text-primary);
}

body.dark-mode .user-follow-button {
    background: var(--active-color);
}

body.dark-mode .user-follow-button.following {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}
/* ========== ПОЛЕ ПОИСКА В СООБЩЕНИЯХ (плавающее) ========== */
.messages-actions .search-input {
    position: absolute !important;
    top: 25px !important;
    right: 32px !important;
    width: 0 !important;
    height: 36px !important;
    padding: 0 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    background-color: var(--bg-tertiary) !important;
    transition: width 0.3s ease, padding 0.3s ease !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 5 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.messages-actions .search-input.active {
    width: 200px !important;
    padding: 0 15px !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

.messages-actions .search-input:focus {
    border-color: var(--active-color) !important;
    background-color: var(--bg-secondary) !important;
    outline: none !important;
}

.messages-actions .search-input::placeholder {
    font-size: 14px !important;
}

/* ========== ПОЛЕ ПОИСКА НА СТРАНИЦЕ ПОИСКА (обычное) ========== */
.search-page .search-box .search-input {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    padding: 14px 20px 14px 48px !important;
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 30px !important;
    font-size: 16px !important;
    color: var(--text-primary) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
    transition: all 0.3s !important;
}

.search-page .search-box .search-input:focus {
    border-color: var(--active-color) !important;
    background-color: var(--bg-secondary) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1) !important;
}

.search-page .search-box .search-input::placeholder {
    font-size: 15px !important;
    color: var(--text-tertiary) !important;
}

.search-page .search-box {
    position: relative !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    display: block !important;
}

.search-page .search-icon {
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-tertiary) !important;
    font-size: 18px !important;
    pointer-events: none !important;
    z-index: 2 !important;
}
/* ========== ПРОФИЛЬ (spa-profile) ========== */
.profile-page {
    max-width: 935px;
    margin: 0 auto;
    width: 100%;
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin-bottom: 80px;
}

.profile-cover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.profile-cover-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-content {
    position: relative;
    padding: 0 20px;
}

.profile-header-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.profile-avatar-section {
    position: relative;
    margin-top: -100px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 600;
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.profile-online-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    background-color: #10b981;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.profile-edit-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--active-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    z-index: 10;
}

.profile-edit-button:hover {
    transform: scale(1.1);
    background-color: #2563eb;
}

.profile-info-section {
    flex: 1;
    min-width: 280px;
}

.profile-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.profile-nickname {
    font-size: 16px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.profile-bio {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: background-color 0.3s;
}

.profile-stat-item:hover {
    background-color: var(--hover-bg);
}

.profile-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Вкладки профиля (уже есть, но добавим поддержку) */
.profile-tabs {
    display: flex;
    gap: 8px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.profile-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-tab:hover {
    background-color: var(--hover-bg);
    color: var(--active-color);
}

.profile-tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

/* Содержимое вкладок */
.profile-tab-content {
    display: none;
}

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

/* Адаптивность для профиля */
@media (max-width: 768px) {
    .profile-cover {
        height: 150px;
        margin-bottom: 60px;
    }
    
    .profile-header-section {
        gap: 20px;
    }
    
    .profile-avatar-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .profile-avatar {
        font-size: 42px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .profile-stats {
        gap: 16px;
    }
    
    .profile-stat-value {
        font-size: 18px;
    }
    
    .profile-stat-label {
        font-size: 11px;
    }
    
    .profile-edit-button {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .profile-header-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-name-wrapper {
        justify-content: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-tabs {
        justify-content: center;
    }
    
    .profile-tab span {
        display: none;
    }
    
    .profile-tab {
        padding: 8px;
    }
    
    .profile-avatar-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .profile-avatar {
        font-size: 36px;
    }
    
    .profile-edit-button {
        width: 32px;
        height: 32px;
    }
}

/* Темная тема для профиля */
body.dark-mode .profile-cover {
    background: linear-gradient(135deg, #2563eb, #6b21a5);
}

body.dark-mode .profile-avatar {
    border-color: var(--bg-secondary);
}

body.dark-mode .profile-online-indicator {
    border-color: var(--bg-secondary);
}

body.dark-mode .profile-stat-item:hover {
    background-color: var(--hover-bg);
}
/* ========== ПРАВАЯ ПАНЕЛЬ НА МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    .right-sidebar {
        display: none !important;
    }
    
    .right-sidebar.active {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background-color: var(--bg-primary);
        z-index: 99;
        overflow-y: auto;
        padding: 60px 20px 20px;
        box-sizing: border-box;
    }
}
/* Скрываем полосы прокрутки, но оставляем прокрутку */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
/* ========== СТРАНИЦА СООБЩЕНИЙ НА ВЕСЬ ЭКРАН ========== */
@media (max-width: 768px) {
    /* Убираем отступы у всей страницы сообщений */
    body:has(.messages-container) .main-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Контейнер сообщений на весь экран */
    .messages-container {
        width: 100% !important;
        height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 100 !important;
    }

    /* Список диалогов на всю высоту */
    .conversations-sidebar {
        height: 100% !important;
        border-radius: 0 !important;
    }

    /* Область чата на весь экран */
    .chat-area.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: var(--bg-primary) !important;
        z-index: 2000 !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Шапка чата */
    .chat-area.active .chat-header {
        padding: 12px 16px !important;
        padding-top: max(12px, env(safe-area-inset-top)) !important;
        flex-shrink: 0 !important;
    }

    /* Область сообщений */
    .chat-area.active .messages-area {
        flex: 1 !important;
        padding: 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Поле ввода внизу */
    .chat-area.active .chat-input-area {
        padding: 12px 16px !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
        flex-shrink: 0 !important;
        margin-top: auto !important;
    }

    /* Убираем все скругления и рамки */
    .messages-container,
    .conversations-sidebar,
    .chat-area.active,
    .chat-area.active .chat-header,
    .chat-area.active .messages-area,
    .chat-area.active .chat-input-area {
        border-radius: 0 !important;
    }

    /* Скрываем список диалогов при открытом чате */
    .chat-area.active ~ .conversations-sidebar,
    body:has(.chat-area.active) .conversations-sidebar {
        display: none !important;
    }
}
/* ========== ФИНАЛЬНЫЕ СТИЛИ ДЛЯ ЧАТА ========== */

/* Сообщения */
.message {
    display: flex !important;
    flex-direction: column !important;
    margin: 0 0 8px 0 !important;
    max-width: 80% !important;
    width: auto !important;
    min-width: 60px !important;
    clear: both !important;
}

.message.sent {
    margin-left: auto !important;
    margin-right: 0 !important;
    align-items: flex-end !important;
}

.message.received {
    margin-right: auto !important;
    margin-left: 0 !important;
    align-items: flex-start !important;
}

.message-bubble {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 40px !important;
    padding: 8px 12px !important;
    border-radius: 18px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    color: white !important;
    border-bottom-right-radius: 4px !important;
}

.message.received .message-bubble {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-bottom-left-radius: 4px !important;
    border: 1px solid var(--border-color) !important;
}

.message-text {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    font-size: 15px !important;
}

.message-time {
    font-size: 10px !important;
    color: var(--text-tertiary) !important;
    margin-top: 4px !important;
    padding: 0 4px !important;
}

.message.sent .message-time {
    text-align: right !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.message.received .message-time {
    text-align: left !important;
}

/* Группировка сообщений */
.message.sent + .message.sent {
    margin-top: 2px !important;
}

.message.received + .message.received {
    margin-top: 2px !important;
}

.message.sent + .message.sent .message-bubble {
    border-bottom-right-radius: 4px !important;
}

.message.sent:last-of-type .message-bubble {
    border-bottom-right-radius: 18px !important;
}

.message.received + .message.received .message-bubble {
    border-bottom-left-radius: 4px !important;
}

.message.received:last-of-type .message-bubble {
    border-bottom-left-radius: 18px !important;
}

/* Дата-разделитель */
.message-date {
    text-align: center !important;
    margin: 16px 0 !important;
    width: 100% !important;
    clear: both !important;
}

.message-date span {
    background: var(--bg-tertiary) !important;
    padding: 4px 12px !important;
    border-radius: 30px !important;
    font-size: 12px !important;
    color: var(--text-tertiary) !important;
    display: inline-block !important;
}

/* Панель ввода (Telegram-стиль) */
@media (max-width: 768px) {
    .chat-area.active .chat-input-area {
        background-color: var(--bg-secondary) !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 8px 12px !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
        position: sticky !important;
        bottom: 0 !important;
        width: 100% !important;
        z-index: 100 !important;
    }

    .chat-area.active .chat-input-container {
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        width: 100% !important;
        position: relative !important;
    }

    .chat-area.active .chat-input {
        flex: 1 !important;
        width: 100% !important;
        min-height: 44px !important;
        max-height: 100px !important;
        padding: 12px 52px 12px 16px !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
        background-color: var(--bg-tertiary) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 24px !important;
        resize: none !important;
        overflow-y: auto !important;
        font-family: inherit !important;
    }

    .chat-area.active .chat-input:focus {
        outline: none !important;
        border-color: var(--active-color) !important;
    }

    .chat-area.active .send-btn {
        position: absolute !important;
        right: 8px !important;
        bottom: 8px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
        color: white !important;
        border: none !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s !important;
        z-index: 2 !important;
    }

    .chat-area.active .send-btn:active {
        transform: scale(0.92) !important;
    }

    .chat-area.active .input-controls {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .chat-area.active .chat-input-container {
        display: flex !important;
        gap: 12px !important;
        align-items: center !important;
    }
    
    .chat-area.active .chat-input {
        flex: 1 !important;
        padding: 12px 16px !important;
        border-radius: 24px !important;
    }
    
    .chat-area.active .send-btn {
        position: static !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }
    
    .chat-area.active .input-controls {
        display: flex !important;
        gap: 8px !important;
    }
}
/* ========== КНОПКА "НАЧАТЬ ЧАТ" ========== */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--active-color);
    color: var(--active-color);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Для модальных окон */
.modal .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}
/* ========== ЛЕВАЯ ПАНЕЛЬ СООБЩЕНИЙ ========== */
.conversations-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.conversations-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    flex-shrink: 0;
}

.new-message-btn-sidebar {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.new-message-btn-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Пустое состояние в списке диалогов */
.empty-conversations {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    height: 100%;
    min-height: 300px;
}

.empty-conversations-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-conversations-icon i {
    font-size: 28px;
    color: var(--active-color);
}

.empty-conversations-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-conversations-text {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Скрываем плавающую кнопку (она больше не нужна) */
.new-message-btn-floating {
    display: none !important;
}

/* Информационная панель справа (когда нет выбранного диалога) */
.messages-area .empty-chat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    background-color: var(--bg-primary);
}

.empty-chat-icon {
    width: 96px;
    height: 96px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-chat-icon i {
    font-size: 48px;
    color: var(--active-color);
}

.empty-chat-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-chat-subtitle {
    font-size: 16px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    max-width: 280px;
}

.empty-chat-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.empty-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .new-message-btn-sidebar {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .empty-conversations-icon {
        width: 48px;
        height: 48px;
    }
    
    .empty-conversations-icon i {
        font-size: 22px;
    }
    
    .empty-conversations-title {
        font-size: 16px;
    }
    
    .empty-conversations-text {
        font-size: 13px;
    }
    
    .empty-chat-title {
        font-size: 20px;
    }
    
    .empty-chat-subtitle {
        font-size: 14px;
    }
    
    .empty-chat-icon {
        width: 72px;
        height: 72px;
    }
    
    .empty-chat-icon i {
        font-size: 36px;
    }
}
/* ========== ГЛОБАЛЬНЫЙ ЛОАДЕР (адаптивный) ========== */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

#global-loader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color) !important;
    border-top-color: var(--active-color) !important;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#global-loader p {
    color: var(--text-primary) !important;
    font-size: 18px;
    font-weight: 500;
}

/* Анимация спиннера */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Скрываем лоадер после загрузки */
.content-visible #global-loader {
    opacity: 0;
    pointer-events: none;
}
/* ========== НАСТРОЙКИ ПРОФИЛЯ ========== */
.profile-cover {
    position: relative;
    margin-bottom: 100px !important; /* Увеличиваем отступ снизу */
}

.profile-cover-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 1;
}

/* Контейнер для аватарки и кнопки редактирования */
.profile-avatar-section {
    position: relative;
    z-index: 2;
}

/* Кнопка смены фона профиля */
.change-cover-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.change-cover-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* Контейнер для кастомного фона */
.profile-cover-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.profile-cover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.2) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .profile-cover {
        margin-bottom: 80px !important;
    }
    
    .change-cover-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        bottom: 15px;
        right: 15px;
    }
}
/* ========== МОДАЛЬНОЕ ОКНО ИНФОРМАЦИИ О ДИАЛОГЕ ========== */
.dialog-info-modal .modal-container {
    max-width: 400px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.dialog-info-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.dialog-info-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.dialog-info-name {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.dialog-info-username {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 5px;
}

.dialog-info-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-top: 5px;
}

.dialog-info-status i {
    font-size: 8px;
    margin-right: 5px;
}

.dialog-info-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dialog-info-close:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(90deg);
}

.dialog-info-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

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

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 5px;
}

.dialog-info-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialog-info-btn {
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dialog-info-btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.dialog-info-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.dialog-info-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.dialog-info-btn-secondary:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.dialog-info-btn-danger {
    background: var(--danger);
    color: white;
}

.dialog-info-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ========== МЕНЮ СООБЩЕНИЙ (выпадающее) ========== */
.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    padding: 8px 0;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-item i {
    width: 20px;
    color: var(--text-tertiary);
}

.dropdown-item.text-danger i {
    color: var(--danger);
}

.dropdown-menu hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* ========== МЕНЮ ПРИКРЕПЛЕНИЙ ========== */
.attachment-menu {
    position: absolute;
    bottom: 70px;
    left: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px;
    min-width: 180px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

.attachment-option {
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: left;
}

.attachment-option:hover {
    background: var(--hover-bg);
}

.attachment-option i {
    width: 20px;
    color: var(--text-tertiary);
}

/* ========== ИНДИКАТОР НАБОРА ТЕКСТА ========== */
.typing-indicator-container {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--active-color);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* ========== СООБЩЕНИЯ С МЕДИА ========== */
.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-image:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.voice-message-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 24px;
    min-width: 200px;
}

.voice-message-player.sent {
    background: rgba(59, 130, 246, 0.2);
}

.voice-message-player.received {
    background: var(--bg-tertiary);
}

.play-voice-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--active-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.play-voice-btn:hover {
    transform: scale(1.05);
}

.voice-waveform {
    flex: 1;
    height: 32px;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

.waveform-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--active-color);
    border-radius: 16px;
    transition: width 0.1s linear;
}

.voice-message-duration {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== ИНДИКАТОР ПРОЧТЕНИЯ ========== */
.read-indicator {
    margin-left: 4px;
    font-size: 10px;
}

.read-indicator i {
    color: var(--active-color);
}

.read-indicator i.fa-check {
    opacity: 0.6;
}

.read-indicator i.fa-check-double {
    opacity: 1;
}

/* ========== АДАПТАЦИЯ ДЛЯ ТЁМНОЙ ТЕМЫ ========== */
body.dark-mode .dialog-info-stats {
    background: var(--bg-tertiary);
    border-bottom-color: var(--border-color);
}

body.dark-mode .dropdown-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .attachment-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .voice-message-player {
    background: var(--bg-tertiary);
}

body.dark-mode .voice-message-player.sent {
    background: rgba(59, 130, 246, 0.3);
}
/* ========== МЕНЮ СООБЩЕНИЯ (ПРИ ДОЛГОМ НАЖАТИИ) ========== */
.message-actions-menu {
    position: fixed;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 220px;
    z-index: 1001;
    animation: messageMenuFadeIn 0.2s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

@keyframes messageMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.message-action-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.message-action-item:hover {
    background: var(--hover-bg);
}

.message-action-item i {
    width: 20px;
    font-size: 16px;
    color: var(--text-tertiary);
}

.message-action-item.danger {
    color: var(--danger);
}

.message-action-item.danger i {
    color: var(--danger);
}

.message-action-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.message-action-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ========== МЕНЮ ДИАЛОГА (ШАПКА ЧАТА) ========== */
.chat-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
    border: 1px solid var(--border-color);
    animation: chatMenuFadeIn 0.2s ease;
}

@keyframes chatMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-menu-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.chat-menu-item:hover {
    background: var(--hover-bg);
}

.chat-menu-item i {
    width: 20px;
    font-size: 16px;
    color: var(--text-tertiary);
}

.chat-menu-item.danger {
    color: var(--danger);
}

.chat-menu-item.danger i {
    color: var(--danger);
}

.chat-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ========== МЕНЮ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ========== */
@media (max-width: 768px) {
    .message-actions-menu,
    .chat-menu {
        min-width: 180px;
        border-radius: 14px;
    }
    
    .message-action-item,
    .chat-menu-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .message-action-item i,
    .chat-menu-item i {
        font-size: 14px;
    }
}

/* ========== ТЁМНАЯ ТЕМА ДЛЯ МЕНЮ ========== */
body.dark-mode .message-actions-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .message-action-item {
    color: var(--text-primary);
}

body.dark-mode .message-action-item:hover {
    background: var(--hover-bg);
}

body.dark-mode .message-action-item i {
    color: var(--text-tertiary);
}

body.dark-mode .message-action-item.danger {
    color: var(--danger);
}

body.dark-mode .message-action-item.danger i {
    color: var(--danger);
}

body.dark-mode .message-action-divider {
    background: var(--border-color);
}

body.dark-mode .chat-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .chat-menu-item {
    color: var(--text-primary);
}

body.dark-mode .chat-menu-item:hover {
    background: var(--hover-bg);
}

body.dark-mode .chat-menu-item i {
    color: var(--text-tertiary);
}

body.dark-mode .chat-menu-item.danger {
    color: var(--danger);
}

body.dark-mode .chat-menu-item.danger i {
    color: var(--danger);
}