a {
    text-decoration: none;
}

.chat-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 150px);
}

.lists-section {
    flex: 0 0 350px;
    overflow-y: auto;
    background: #333333;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px;
}

.welcome-section {
    flex: 1;
    background: #333333;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    display: flex;
    color: white;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: black;
}

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

.chat-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #333333;
    
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.chat-item:hover {
    background: #6FDBC9;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background: #333;
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
}

.checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.checkbox-list label {
    display: block;
    padding: 5px;
    color: white;
}
.btn-small {
    padding: 5px 10px;
    background: #6FDBC9;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-small:hover {
    background: #61c2b2;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
#messageText {
    flex: 1;
}
.media-buttons {
    display: flex;
    gap: 5px;
}
.btn-media {
    background: #333333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-media:hover {
    background: #4d4d4d;
}
.btn-media.recording {
    background: #ff4444;
    color: white;
}
#videoPreviewContainer {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #000;
    border-radius: 10px;
    padding: 10px;
    z-index: 1000;
}
#videoPreview {
    max-width: 300px;
    max-height: 200px;
}

.video-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #333;
    
    
}
.audio-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 8px 15px;
    max-width: 250px;
}
.audio-play-btn {
    background: #667eea;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.audio-wave {
    flex: 1;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}
.audio-wave-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.1s linear;
}
.audio-time {
    font-size: 12px;
    color: #666;
    min-width: 40px;
}

@media screen and (max-width: 768px) {
    .chat-layout {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }

    .lists-section {
        flex: 1 1 auto;
        width: 100%;
        max-height: none;
        overflow-y: visible;
        padding: 10px;
    }

    .welcome-section {
        display: none; /* Скрываем приветствие на мобильных */
    }
    .photo_ls {
        max-height: 100px;
        cursor: pointer;
    }
    .video_ls {
        max-height: 100px;
        cursor: pointer;
    }
    .image-modal, .video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    }
    .image-modal img, .video-modal video {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
    }
    .image-modal .close-image, .video-modal .close-video {
        position: absolute;
        top: 20px;
        right: 30px;
        font-size: 40px;
        color: #333333;
        cursor: pointer;
        z-index: 10001;
    }
    
    /* Если нужно показать приветствие, когда нет чатов — можно добавить через JS */
}

.photo_ls {
    max-width: 300px; 
    border-radius: 8px; 
    cursor: pointer;
}

.video_ls {
    max-width: 300px;
    max-height: 300px; 
    border-radius: 8px; 
    cursor: pointer;
}