.chat-container {
    position: fixed;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background: rgba(255,105,180);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0);
    opacity: 0;
    z-index: 1000;
}

.chat-container.active {
    transform: scale(1);
    opacity: 1;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #ff69b4;
    color: #ffffff;
    font-size: 18px;
    border-radius: 10px 10px 0 0;
}

.chat-messages {
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    flex-grow: 1;
    padding: 10px;
    background: #ffffff;
    color: #121212;
    z-index: 1200;
}

.chat-pinned-message {
    padding: 10px;
    background: #ffefd5;
    color: #121212;
    font-size: 16px;
    font-style: italic;
    text-align: center;
    border-bottom: 1px solid #ff69b4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-input-container {
    height: 30px;
    margin: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 5px;
    background: #ff69b4;
}

.chat-input {
    height: 30px;
    width: 98%;
    margin: 5px;
    margin-left: 5px;
    padding: 5px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
}

.chat-name-container {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 5px;
    background: #ff69b4;
    border-radius: 0 0 10px 10px;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
}

.chat-name-input {
    height: 30px;
    width: 60%;
    margin: 5px;
    margin-left: 5px;
    padding: 5px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
}

.chat-send-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 16px;
    background: #ffffff;
    color: #ff69b4;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-smiley-btn {
    height: 30px;
    width: 40px;
    background: #ffffff;
    color: #ff69b4;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.smiley-window {
    position: absolute;
    bottom: 50px;
    left: 0;
    max-height: 200px;
    max-width: 200px;
    background: rgba(200, 200, 200, 0.9);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 5px;
    display: none;
    flex-wrap: wrap;
    justify-content: space-around;
    z-index: 1100;
    overflow-y: auto;
}

.smiley-window.compact {
    max-height: 100px;
    max-width: 100px;
}

.smiley-window.active {
    display: flex;
}

.smiley-window img {
    width: 30px;
    height: 30px;
    margin: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.smiley-window img:hover {
    transform: scale(1.2);
}

.smiley-more-btn {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 14px;
    color: #ff69b4;
    cursor: pointer;
    text-decoration: underline;
}

.chat-smiley {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 0 2px;
}

.message-user,
.message-other {
    margin: 5px 0;
    font-size: 16px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.author-name {
    font-weight: bold;
    color: #121212;
}

.message-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    color: #121212;
    font-weight: normal;
}

.message-time {
    font-size: 12px;
    color: #888888;
    margin-left: auto;
}

.chat-pinned-message {
    background-color: #FF9900; /* Желтая полоса */
    padding: 7px;
    position: relative;
}

.chat-pinned-message.collapsed {
    height: 15px; /* Уменьшить высоту при сворачивании */
    overflow: hidden;
}

.collapse-chat {
    position: absolute;
    right: 10px;
    bottom: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}