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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}


.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f0fa 100%);
    opacity: 1;
    overflow: hidden;
    box-shadow: none;
}


.container::before,
.container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.container::before {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 15%;
}

.container::after {
    width: 180px;
    height: 180px;
    bottom: 15%;
    right: 10%;
}


.container > span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.container > span:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 10%;
}

.container > span:nth-child(2) {
    width: 50px;
    height: 50px;
    top: 30%;
    right: 20%;
}

.container > span:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 30%;
    left: 25%;
}

.version-info {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #f5f5f7;
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}




.login-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 900px;
    opacity: 1;
    transform: scale(1);
    position: relative;
    z-index: 10;
}


.video-container, .image-container {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    border-radius: 20px 0 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.video-container img, .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}


.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}


.login-box {
    background: white;
    border-radius: 0 20px 20px 0;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
    opacity: 1;
    transform: scale(1);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
}



.login-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    opacity: 1;
    transform: translateY(0);
}




.logo h1 {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 1;
    transform: translateY(0);
}

.logo h2 {
    font-size: 24px;
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 30px;
    opacity: 1;
    transform: translateY(0);
}


.form-group {
    margin-bottom: 15px;
    text-align: left;
    opacity: 1;
    transform: translateY(0);
}


.btn-primary, .register-link, .error-message {
    opacity: 1;
    transform: translateY(0);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #6e6e73;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f5f5f7;
}

.form-group input:focus {
    outline: none;
    border-color: #b3d4fc;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(179, 212, 252, 0.3);
    background: white;
}


.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: #e8f4fd;
    color: #333;
    border: 1px solid #b3d4fc;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.btn-primary:hover {
    background-color: #d4e8fd;
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    padding: 10px 20px;
    background-color: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e8e8ed;
    border-color: #c7c7cc;
}


.register-link {
    margin-top: 20px;
    color: #6e6e73;
    font-size: 14px;
}

.register-link a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    text-shadow: none;
}

.register-link a:hover {
    text-decoration: underline;
}


.error-message {
    margin-top: 20px;
    color: #ff3b30;
    font-size: 14px;
    min-height: 20px;
}


.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}




.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #d2d2d7;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.app-title {
    font-size: 20px;
    font-weight: 600;
    width: 120px;
    height: auto;
    object-fit: contain;
}

.settings-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.settings-btn:hover {
    background-color: #f5f5f7;
}


.user-profile {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f5f5f7;
    border-radius: 15px;
    margin-bottom: 30px;
}

.avatar-container {
    margin-right: 10px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    padding: 0;
    background: none;
    box-shadow: none;
}

.user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-info .bio {
    font-size: 12px;
    color: #6e6e73;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.channels {
    flex: 1;
    overflow-y: auto;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.channel-item:hover {
    background-color: #f0f0f0;
    box-shadow: none;
}

.channel-item.active {
    background-color: #e8f4fd;
    color: #333;
    box-shadow: none;
}

.channel-icon {
    font-size: 18px;
    margin-right: 12px;
}

.channel-name {
    font-size: 14px;
}




.logout-btn {
    margin-top: 20px;
    padding: 12px;
    background-color: #ff3b30;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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


.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f7;
}


.chat-header {
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #d2d2d7;
    display: flex;
    align-items: center;
}

.current-channel {
    display: flex;
    align-items: center;
}

.current-channel .channel-icon {
    font-size: 24px;
    margin-right: 12px;
}

.current-channel h2 {
    font-size: 20px;
    font-weight: 600;
}


.messages-container {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}


.loading-messages {
    display: inline-block;
    animation: pulse 1.5s infinite;
}


.chat-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.3s ease forwards;
}


.sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.channel-item {
    position: relative;
    overflow: visible;
}

.channel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(179, 212, 252, 0.1), transparent);
    transition: left 0.5s ease;
}

.channel-item:hover::after {
    left: 100%;
}


#messageInput:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 128, 0.3);
}




.profile-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-modal.show {
    opacity: 1;
    display: block;
}

.profile-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-modal.show .profile-content {
    transform: scale(1);
}


.message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 80%;
    margin-bottom: 5px;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(10px);
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.message.received {
    align-self: flex-start;
}


.message.sent {
    margin-left: auto;
    flex-direction: row-reverse;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    align-self: flex-end;
}


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


.avatar:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(179, 212, 252, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


#sendBtn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#sendBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(179, 212, 252, 0.4);
}

#sendBtn:active {
    transform: scale(0.98);
}

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

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.message .avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}

.avatar {
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 0 1 85%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    text-overflow: clip;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.message.sent .message-header {
    justify-content: flex-end;
}

.message.received .message-header {
    justify-content: flex-start;
}

.message-username {
    font-weight: 600;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #6e6e73;
}

.message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 40ch;
    word-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}


.message.received .message-text {
    background-color: #d1d1d6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    align-items: center;
}


.recall-btn {
    transition: all 0.2s ease;
}

.recall-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.message:hover .message-text {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.message.sent .message-text {
    background-color: #c7e0fb;
    color: #333;
    max-width: 40ch;
    word-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}



.avatar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.channel-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.channel-item:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}

.settings-btn, .upload-btn, .emoji-btn, .voice-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-btn:hover, .upload-btn:hover, .emoji-btn:hover, .voice-btn:hover:not(:disabled) {
    transform: scale(1.2);
    background-color: rgba(179, 212, 252, 0.2) !important;
}

.send-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.send-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(179, 212, 252, 0.4);
}

.send-btn:active {
    transform: translateY(0) scale(0.98);
}

.message-image {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.message.sent .avatar-container {
    margin-left: 10px;
    margin-right: 0;
}


.message-input-container {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #d2d2d7;
    display: flex;
    align-items: center;
    gap: 15px;
}

.input-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-btn {
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.upload-btn:hover {
    background-color: #f5f5f7;
}

.upload-progress {
    font-size: 12px;
    color: #666;
    min-width: 60px;
    text-shadow: none;
}


.emoji-btn {
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.emoji-btn:hover {
    background-color: #f5f5f7;
}

.voice-btn {
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: none;
    background: none;
    outline: none;
    box-shadow: none;
    margin-right: 5px;
}

.voice-btn:hover:not(:disabled) {
    background-color: #f5f5f7;
    transform: scale(1.2);
}

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

.voice-btn.recording {
    background-color: rgba(255, 0, 0, 0.1);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}


.emoji-picker {
    position: absolute;
    bottom: 80px;
    left: 40px;
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
    width: 320px;
    max-height: 250px;
    overflow-y: auto;
}

.emoji-picker.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.emoji-grid span {
    font-size: 24px;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.emoji-grid span:hover {
    background-color: #f5f5f7;
    transform: scale(1.2);
}


.emoji-picker::-webkit-scrollbar {
    display: none;
}

.emoji-picker {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#messageInput {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #d2d2d7;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f5f5f7;
    resize: none;
    min-height: 44px;
    max-height: 150px;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    
    scrollbar-width: none;
    -ms-overflow-style: none;
}


#messageInput::-webkit-scrollbar {
    display: none;
}

#messageInput:focus {
    background-color: white;
    border-color: #b3d4fc;
    box-shadow: 0 0 0 3px rgba(179, 212, 252, 0.3);
    background: white;
}

.send-btn {
    padding: 12px 24px;
    background-color: #e8f4fd;
    color: #333;
    border: 1px solid #b3d4fc;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.send-btn:hover {
    background-color: #d4e8fd;
    transform: translateY(-1px);
    box-shadow: none;
}


.settings-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.settings-panel.open {
    right: 0;
}

.settings-header {
    padding: 20px 30px;
    border-bottom: 1px solid #d2d2d7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}



.close-btn:hover {
    background-color: #f5f5f7;
}


.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.profile-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-header {
    padding: 20px 30px;
    border-bottom: 1px solid #d2d2d7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.profile-info {
    padding: 30px;
    text-align: center;
}

.profile-info .avatar-container {
    margin-bottom: 20px;
}

.profile-info .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f5f5f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.profile-info p {
    color: #6e6e73;
    margin-bottom: 15px;
    line-height: 1.6;
}

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

.settings-content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #6e6e73;
}


.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-preview .avatar {
    width: 100px;
    height: 100px;
}


.settings-content .form-group {
    margin-bottom: 20px;
}

.settings-content .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
    background-color: #f5f5f7;
}

.settings-content .form-group textarea:focus {
    outline: none;
    border-color: #b3d4fc;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(179, 212, 252, 0.3);
    background: white;
}

.settings-content .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 14px;
    background-color: #f5f5f7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-content .form-group select:focus {
    outline: none;
    border-color: #b3d4fc;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(179, 212, 252, 0.3);
    background: white;
}


.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}


@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #d2d2d7;
    }
    
    .channels {
        display: none;
    }
    
    .messages-container {
        padding: 20px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
}


.message-recalled {
    font-style: italic;
    color: #6e6e73;
    text-align: center;
    padding: 10px;
    font-size: 13px;
}


.message-voice.bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 40ch;
    word-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}


.message.received .message-voice.bubble {
    background-color: #d1d1d6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.message.sent .message-voice.bubble {
    background-color: #b3d4fc;
    box-shadow: 0 2px 8px rgba(179, 212, 252, 0.4);
}




.custom-audio-player {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.play-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.play-btn.playing .play-icon {
    display: none;
}

.play-btn:not(.playing) .pause-icon {
    display: none;
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.time-separator {
    margin: 0 3px;
    color: rgba(0, 0, 0, 0.4);
}


.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-left: 4px solid;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}



.notification.success {
    border-left-color: #4caf50;
    background-color: #f1f8e9;
}

.notification.error {
    border-left-color: #f44336;
    background-color: #ffebee;
}

.notification.info {
    border-left-color: #2196f3;
    background-color: #e3f2fd;
}

.notification.warning {
    border-left-color: #ff9800;
    background-color: #fff3e0;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

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

input:checked + .toggle-slider {
    background-color: #b3d4fc;
    box-shadow: 0 0 5px rgba(179, 212, 252, 0.5);
}

input:checked + .toggle-slider {
    background-color: #b3d4fc;
}

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


.channel-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 0;
    cursor: pointer;
}

.channel-toggle-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.channel-notification-item {
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.channel-notification-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 5px rgba(179, 212, 252, 0.5);
}

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


.channel-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    width: 100%;
}

.channel-toggle-name {
    font-size: 14px;
    color: #2d3748;
}


.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.channel-notification-settings {
    margin-top: 10px;
}

.notification .message {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #333;
}




.chat-actions {
    display: flex;
    gap: 10px;
}



.online-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4caf50;
    margin-left: auto;
    animation: pulse 2s infinite;
}


.user-badge {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-left: 5px;
    object-fit: contain;
}


