
.chat-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f0f2f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f0f2f5;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

.chat-message.reply {
    justify-content: flex-start;
    padding-left: 20px;
    border-left: 2px solid #0088cc;
}

.chat-message .message-content {
    background: white;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 80%;
    position: relative;
}

.chat-message .message-content::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: white;
    right: -8px;
}

.chat-message .message-content::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: #f0f2f5;
    right: -8px;
}

.chat-message .message-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.chat-message .message-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-message .author-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c2c2c;
}

.chat-message .message-time {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
}

.chat-message .message-text p {
    margin: 0;
    font-size: 15px;
    color: #2c2c2c;
    line-height: 1.5;
}


.chat-form {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #ddd;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
}

.chat-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
}

.chat-form button {
    background: #0088cc;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-form button:hover {
    background: #0073b7;
}


@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        max-width: 100%;
    }

    .chat-message .message-content {
        max-width: 90%;
    }

    .chat-form {
        padding: 10px 12px;
    }

    .chat-form input[type="text"] {
        padding: 10px 14px;
        border-radius: 18px;
    }

    .chat-form button {
        padding: 10px 16px;
        border-radius: 18px;
    }
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}