body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0;
}

.card {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #fff;
}

.typing-indicator {
    padding: 10px 15px;
    font-style: italic;
    color: #666;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    min-height: 20px;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.my-message {
    margin-left: auto;
}

.my-message .message-content {
    background-color: #007bff;
    color: white;
    border-radius: 15px 15px 0 15px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.other-message .message-content {
    background-color: #e9e9e9;
    border-radius: 15px 15px 15px 0;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timestamp {
    display: block;
    font-size: 0.8em;
    opacity: 0.7;
    margin-top: 5px;
}

.emoji-btn {
    cursor: pointer;
    font-size: 1.5em;
    margin-right: 10px;
}

.emoji-container {
    position: relative;
    display: inline-block;
}

.emoji-picker {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.image-container {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.thumbnail {
    max-width: 200px;
    max-height: 200px;
    cursor: pointer;
    object-fit: contain;
    border-radius: 10px;
}

.download-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-decoration: none;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    .card {
        height: 100vh;
        border-radius: 0;
    }

    .chat-messages {
        height: calc(100vh - 200px);
    }

    .message {
        max-width: 90%;
    }

    .emoji-btn {
        margin-right: 0;
    }

    .emoji-container {
        width: 100%;
        text-align: center;
    }

    .emoji-picker {
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 769px) {
    .emoji-container {
        width: auto;
    }

    .emoji-picker {
        width: 300px;
        left: 50%;
        transform: translateX(-50%);
    }
}