:root {
    --bg-dark: #1e1e2e;
    --bg-sidebar: #181824;
    --bg-main: #2a2a3a;
    --accent: #7aa86a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --border-color: #3a3a4a;
    --card-bg: #2d2d3d;
    --hover-bg: rgba(255, 255, 255, 0.05);
    --transition-speed: 0.2s;
    --message-sent: #7aa86a;
    --message-received: #2d2d3d;
}

body.light-theme {
    --bg-dark: #f5f7fa;
    --bg-sidebar: #ffffff;
    --bg-main: #f0f2f5;
    --accent: #4caf50;
    --text-primary: #1e1e2e;
    --text-secondary: #5a5a6e;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --hover-bg: rgba(0, 0, 0, 0.03);
    --message-sent: #e3f2fd;
    --message-received: #ffffff;
}

body.green-theme {
    --bg-dark: #1a2e1a;
    --bg-sidebar: #142114;
    --bg-main: #223622;
    --accent: #8bc34a;
    --text-primary: #f0f0f0;
    --text-secondary: #c0c0c0;
    --border-color: #3a5a3a;
    --card-bg: #2a4a2a;
    --message-sent: #4caf50;
    --message-received: #2a4a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    transition: background-color var(--transition-speed);
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    transition: left 0.3s;
}

.logo-area {
    display: flex;
    align-items: center;
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 28px;
    color: var(--accent);
    margin-right: 10px;
}

.logo-area h2 {
    font-size: 20px;
    font-weight: 600;
}

.main-nav {
    flex: 1;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: left;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
}

.nav-item:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--accent);
    color: white;
}

.user-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* Основной контент */
.main-content {
    flex: 1;
    background-color: var(--bg-main);
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Мессенджер */
.messenger-container {
    display: flex;
    height: calc(100vh - 60px);
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chat-sidebar {
    width: 320px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    font-size: 20px;
    margin: 0;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.icon-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.icon-btn.active {
    color: var(--accent);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-item {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    display: flex;
    align-items: center;
    position: relative;
}

.chat-item:hover {
    background-color: var(--hover-bg);
}

.chat-item.active {
    background-color: var(--accent);
    color: white;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.last-message {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.voice-record-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: 0.2s;
    color: var(--text-secondary);
}

.voice-record-btn:hover {
    background-color: var(--hover-bg);
    color: var(--accent);
}

.voice-record-btn.recording {
    color: #ff4444;
    animation: pulse-recording 0.8s infinite;
}

@keyframes pulse-recording {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.favorite-indicator {
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
}

.favorite-indicator.active {
    color: gold;
}

.online-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4caf50;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.user-profile-mini {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 500;
}

.profile-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-status.online {
    color: #4caf50;
}

/* Область чата */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}

.chat-placeholder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.active-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message.sent {
    align-self: flex-end;
    background-color: var(--message-sent);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background-color: var(--message-received);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message img, .message video {
    max-width: 200px;
    border-radius: 12px;
    margin-top: 5px;
    cursor: pointer;
}

.message .video-message {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    object-fit: cover;
}

.message-time {
    font-size: 11px;
    text-align: right;
    margin-top: 5px;
    opacity: 0.7;
}

.message-actions {
    position: absolute;
    right: 8px;
    top: -32px;
    display: none;
    gap: 6px;
    background-color: var(--card-bg);
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
    z-index: 5;
}

.message:hover .message-actions {
    display: flex;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-size: 15px;
}

.attach-btn, .video-message-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
}

.send-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
}

/* Настройки */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.settings-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

.settings-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.settings-panel {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border-color);
}

.setting-group {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-group h3 {
    margin-bottom: 15px;
    color: var(--accent);
}

.theme-selector {
    display: flex;
    gap: 15px;
}

.theme-btn {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.theme-btn.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

.action-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    align-self: flex-start;
}

.action-btn i {
    margin-right: 8px;
}

.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent);
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.custom-file-upload i {
    margin-right: 8px;
}

input[type="file"] {
    display: none;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.video-message-content {
    width: 400px;
}

#video-preview {
    width: 100%;
    height: 300px;
    background-color: #000;
    border-radius: 12px;
    margin-bottom: 15px;
    object-fit: cover;
}

.video-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.call-modal-content, .active-call-content {
    width: 400px;
    text-align: center;
}

.call-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.call-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.call-btn.accept {
    background-color: #4caf50;
    color: white;
}

.call-btn.decline {
    background-color: #f44336;
    color: white;
}

.call-timer {
    font-size: 24px;
    margin: 20px 0;
}

.call-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.call-control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.call-control-btn.end {
    background-color: #f44336;
    color: white;
}

/* Cookie-баннер */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    z-index: 3000;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner a {
    color: var(--accent); 
    text-decoration: underline;  
    cursor: pointer;  
    transition: opacity 0.2s ease;
}

.cookie-banner a:hover {
    opacity: 0.8;            
    text-decoration: none;    
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.cookie-content i {
    color: var(--accent);
}

.cookie-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    cursor: pointer;
}

/* Аутентификация */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
}

.auth-tab.active {
    background-color: var(--accent);
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form.hidden {
    display: none;
}

.auth-input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.auth-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

body.no-animations * {
    transition: none !important;
    animation: none !important;
}

/* Адаптивность */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    margin-right: 15px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1500;
        width: 280px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    .sidebar.open {
        left: 0;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100%;
        padding: 60px 15px 15px 15px;
    }
    .app-container {
        flex-direction: column;
    }
    .messenger-container {
        flex-direction: column;
        height: calc(100vh - 100px);
    }
    .chat-sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .chat-area {
        flex: 1;
    }
    .modal-content {
        width: 90% !important;
    }
}

@media (max-width: 480px) {
    .chat-header h2 {
        font-size: 16px;
    }
    .message {
        max-width: 85%;
    }
    .chat-input-area input {
        font-size: 14px;
    }
    .nav-item {
        font-size: 14px;
        padding: 10px;
    }
}

/* Дополнительные стили для модалок и textarea */
textarea.auth-input {
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
}

/* Улучшение отображения на мобильных */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }
    .setting-group img {
        width: 80px !important;
        height: 80px !important;
    }
}

/* ========== СОЦИАЛЬНАЯ СЕТЬ PARADOX ========== */
.social-container {
    display: flex;
    height: calc(100vh - 60px);
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.social-sidebar {
    width: 320px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-sidebar);
}

.social-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-header h2 {
    font-size: 20px;
    margin: 0;
}

.social-search {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.search-btn {
    background-color: var(--accent);
    border: none;
    border-radius: 20px;
    padding: 0 15px;
    cursor: pointer;
    color: white;
}

.social-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.social-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
}

.social-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.channel-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color var(--transition-speed);
}

.channel-item:hover {
    background-color: var(--hover-bg);
}

.channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.channel-id {
    font-size: 12px;
    color: var(--text-secondary);
}

.channel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.channel-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}

.channel-placeholder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Страница канала */
.channel-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.channel-banner {
    background: linear-gradient(135deg, var(--accent), var(--bg-dark));
    padding: 30px;
    position: relative;
}

.channel-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.channel-page-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

.channel-page-info {
    flex: 1;
}

.channel-page-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.channel-page-id {
    font-size: 14px;
    opacity: 0.8;
}

.channel-page-desc {
    margin-top: 10px;
    font-size: 14px;
}

.channel-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.subscribe-btn, .unsubscribe-btn, .create-post-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.subscribe-btn {
    background-color: var(--accent);
    color: white;
}

.unsubscribe-btn {
    background-color: #f44336;
    color: white;
}

.create-post-btn {
    background-color: var(--accent);
    color: white;
}

/* Посты */
.posts-feed {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.post-card {
    background-color: var(--bg-main);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.post-header > div {
    display: flex;
    gap: 8px;
}

.post-author {
    font-weight: 600;
    color: var(--accent);
}

.post-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.post-text {
    margin-bottom: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-media {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-action-btn:hover {
    color: var(--accent);
}

.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.like-btn .liked {
    color: #f44336;
}

.comment {
    padding: 10px;
    background-color: var(--bg-dark);
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--accent);
}

.comment-text {
    font-size: 14px;
    margin-top: 5px;
}

.add-comment {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-comment input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.add-comment-btn {
    background-color: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;

}

/* Опросы и викторины */
.poll-option {
    padding: 10px;
    margin: 8px 0;
    background-color: var(--bg-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.poll-option:hover {
    background-color: var(--hover-bg);
}

.poll-option.selected {
    background-color: var(--accent);
    color: white;
}

.poll-results-bar {
    height: 30px;
    background-color: var(--accent);
    border-radius: 15px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    font-size: 12px;
}

.quiz-option {
    padding: 10px;
    margin: 8px 0;
    background-color: var(--bg-dark);
    border-radius: 8px;
    cursor: pointer;
}

.quiz-feedback {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
}

.quiz-correct {
    background-color: #4caf50;
    color: white;
}

.quiz-incorrect {
    background-color: #f44336;
    color: white;
}

.message-media {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    margin-top: 5px;
    cursor: pointer;
}

.audio-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-dark);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}

.audio-message i {
    font-size: 16px;
    color: var(--accent);
}

.audio-message:hover {
    background: var(--hover-bg);
}

/* Модалки */
.channel-modal-content, .post-modal-content, .poll-modal-content {
    width: 500px;
    max-width: 90vw;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.avatar-preview {
    margin-top: 10px;
}

.avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.action-btn.secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.hidden {
    display: none;
}

/* Адаптив для социальной сети */
@media (max-width: 768px) {
    .social-container {
        flex-direction: column;
        height: auto;
    }
    
    .social-sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .channel-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .post-card {
        padding: 15px;
    }
}

/* ========== СТИЛИЗОВАННЫЕ УВЕДОМЛЕНИЯ ========== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background-color: var(--card-bg);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.notification.error {
    border-left-color: #f44336;
}

.notification.success {
    border-left-color: #4caf50;
}

.notification.warning {
    border-left-color: #ff9800;
}

.notification i {
    font-size: 20px;
}

.notification.error i {
    color: #f44336;
}

.notification.success i {
    color: #4caf50;
}

.notification.warning i {
    color: #ff9800;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 14px;
    color: var(--text-secondary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.edit-post-btn,
.delete-post-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
    color: var(--text-secondary);
}

.delete-post-btn:hover {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.edit-post-btn:hover {
    background-color: var(--hover-bg);
    color: var(--accent);
}

/* Кнопка настройки канала */
.edit-channel-btn {
    background-color: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.edit-channel-btn:hover {
    background-color: var(--accent);
}

.delete-channel-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.delete-channel-btn:hover {
    background-color: #d32f2f;
}

.delete-for-me-btn,
.delete-for-all-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.delete-for-me-btn:hover {
    background-color: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.delete-for-all-btn:hover {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Исправление для длинных сообщений */
.message {
    max-width: 80%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.message-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Исправление для области чата на мобильных */
.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.active-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input-area {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background-color: var(--bg-main);
}

.chat-input-area input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .chat-messages {
        padding: 15px;
    }
    .message {
        max-width: 90%;
    }
    .chat-input-area {
        padding: 10px 15px;
    }
}

/* Обрезка длинных сообщений в списке чатов */
.last-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .last-message {
        max-width: 150px;
    }
}

/* Кастомный скроллбар (webkit) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a8a4a;
}

/* Для Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-dark);
}

/* Убираем лишние горизонтальные прокрутки */
body, .app-container, .main-content, .view, .messenger-container, .chat-sidebar, .chat-area,
.chat-list, .channels-list {
    overflow-x: hidden;
}

/* Обеспечиваем сжатие текста в чат-листе */
.chat-info {
    min-width: 0;
    overflow: hidden;
}

/* ========== IMPULSE – ВИДЕОКОНФЕРЕНЦИИ (бывший JERK) ========== */

/* Основной контейнер */
.impulse-container {
    display: flex;
    height: calc(100vh - 60px);
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Боковая панель со списком конференций */
.impulse-sidebar {
    width: 320px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-sidebar);
}

.impulse-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.impulse-header h2 {
    font-size: 20px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.impulse-conference-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Основная область (комната конференции или заглушка) */
.impulse-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

.impulse-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}

.impulse-placeholder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ===== КОМНАТА КОНФЕРЕНЦИИ ===== */
.conference-room {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0f0f1a;
}

.conf-room-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Обёртка сетки видео */
.video-grid-wrapper {
    flex: 1;
    overflow: auto;
    background: #0a0a0f;
    padding: 10px;
}

/* Сетка видео (динамическая) */
.video-grid {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 12px;
    transition: all 0.2s;
}

/* Видео-плитка */
.video-tile {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
}

/* Видео внутри плитки */
.video-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Имя участника на видео */
.video-tile .participant-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
    z-index: 2;
}

/* ===== ЧАТ ===== */
.conference-chat {
    width: 320px;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.conference-chat.hidden {
    display: none;
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 16px;
    margin: 0;
}

.chat-messages-impulse {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Сообщения в чате */
.chat-messages-impulse .message {
    max-width: 90%;
}

.chat-messages-impulse .message.sent {
    align-self: flex-end;
}

.chat-messages-impulse .message.received {
    align-self: flex-start;
}

/* Поле ввода чата */
.chat-input-area-impulse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
}

.chat-input-area-impulse input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 14px;
}

.attach-btn-impulse {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-dark);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-secondary);
}
.attach-btn-impulse:hover {
    background: var(--accent);
    color: white;
}
.attach-btn-impulse i {
    font-size: 18px;
}

#send-chat-btn-impulse {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}
#send-chat-btn-impulse:hover {
    opacity: 0.9;
}

/* ===== ПАНЕЛЬ УПРАВЛЕНИЯ ===== */
.conference-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
}

.control-btn {
    background: var(--bg-dark);
    border: none;
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.control-btn:hover {
    transform: scale(1.05);
}
.control-btn.active {
    background: var(--accent);
    color: white;
}
.control-btn.danger {
    background: #f44336;
    color: white;
}
.control-btn.danger:hover {
    background: #d32f2f;
}

/* ===== АДАПТИВНАЯ ВЁРСТКА ===== */
@media (max-width: 768px) {
    .impulse-container {
        flex-direction: column;
    }
    .impulse-sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    .video-tile {
        aspect-ratio: 16 / 9;
    }
    .conference-chat {
        width: 100%;
        height: 300px;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .attach-btn-impulse,
    #send-chat-btn-impulse {
        width: 32px;
        height: 32px;
    }
    .attach-btn-impulse i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .impulse-header h2 {
        font-size: 16px;
    }
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .conference-controls {
        gap: 12px;
        padding: 10px;
    }
    .chat-messages-impulse .message {
        max-width: 95%;
    }
}