.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 100px;
}

.chat-header {
    background: linear-gradient(135deg, #4c669f 0%, #3b5998 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.chat-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.chat-header p {
    opacity: 0.9;
    font-size: 14px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.operator {
    align-items: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 20px;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #4c669f 0%, #3b5998 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.operator .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    margin-left: 10px;
    margin-right: 10px;
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

.chat-input:focus {
    border-color: #4c669f;
}

.send-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4c669f 0%, #3b5998 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

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

.status-badge {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .message-bubble {
        max-width: 85%;
    }
}

/* Разделитель дат */
.date-separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.date-separator span {
    background: #e9ecef;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #6c757d;
    display: inline-block;
}

/* Имя оператора над сообщением */
.operator-name {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
    margin-left: 12px;
}

.message.operator .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Стикер для прокрутки (чтобы разделитель ехал с сообщениями) */
.date-separator.sticky {
    position: sticky;
    top: 0;
    z-index: 10;
}