* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;

    margin: 0;
    padding: 0;

    background: #1a1a1a;

    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 100vh;

    color: #e0e0e0;
}


.chat-container {
    width: 100%;
    max-width: 500px;

    height: 90vh;

    background: #2a2a2a;

    border-radius: 15px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5);

    overflow: hidden;

    display: flex;
    flex-direction: column;
}



.chat-header {
    background: #3a3a3a;

    color: white;

    padding: 18px;

    text-align: center;

    border-bottom: 1px solid #4a4a4a;
}

.chat-header h1 {
    margin: 0;

    font-size: 2rem;
}

.chat-header p {
    margin: 5px 0 0;

    font-size: 1rem;

    color: #aaa;
}


.chat-messages {
    flex: 1;

    padding: 20px;

    overflow-y: auto;

    display: flex;
    flex-direction: column;
}


.message {
    display: flex;

    align-items: flex-start;

    margin-bottom: 18px;

    animation: messageAppear 0.2s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.message-content {
    padding: 12px 15px;

    border-radius: 12px;

    max-width: 75%;

    line-height: 1.5;

    white-space: pre-wrap;

    word-wrap: break-word;
}


.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: #4a90e2;

    color: white;

    margin-right: 10px;

    border-bottom-right-radius: 3px;
}


.bot-message .message-content {
    background: #3a3a3a;

    color: #e0e0e0;

    margin-left: 10px;

    border-bottom-left-radius: 3px;
}


.profile-image {
    width: 35px;
    height: 35px;

    border-radius: 50%;

    object-fit: cover;

    flex-shrink: 0;
}


.chat-input-container {
    display: flex;

    padding: 15px;

    background: #2a2a2a;

    border-top: 1px solid #444;

    gap: 10px;
}


#user-input {
    flex: 1;

    padding: 12px 15px;

    border: 1px solid #4a4a4a;

    border-radius: 8px;

    font-size: 1rem;

    background: #3a3a3a;

    color: #e0e0e0;

    outline: none;

    transition: border 0.2s ease;
}

#user-input:focus {
    border-color: #4a90e2;
}

#user-input::placeholder {
    color: #999;
}



#send-button {
    padding: 12px 20px;

    background: #4a90e2;

    color: white;

    border: none;

    border-radius: 8px;

    cursor: pointer;

    font-size: 1rem;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

#send-button:hover {
    background: #3a7bc8;
}

#send-button:active {
    transform: scale(0.97);
}

#send-button:disabled {
    background: #2a5a8a;

    cursor: not-allowed;

    opacity: 0.7;
}


::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;

    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}


@media (max-width: 480px) {

    body {
        min-height: 100vh;
    }

    .chat-container {
        height: 100vh;

        max-width: 100%;

        border-radius: 0;
    }

    .chat-messages {
        padding: 15px;
    }

    .message-content {
        max-width: 80%;
    }

    .chat-input-container {
        padding: 10px;
    }

    #send-button {
        padding: 10px 15px;
    }
}