/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* Global Styles */
body {
    margin: 0;
    padding: 0;
    background-color: #0D0D0D;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Page Container for Centered Content */
#page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

/* Chat Container */
#chat-container {
    display: flex;
    flex-direction: column;
    max-width: 800px; /* Limit the width of the chat */
    width: 100%;
    height: 90vh;
    border-radius: 10px;
    background-color: #1A1A1A;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Chat Header */
#chat-header {
    padding: 20px;
    background-color: #252525;
    text-align: center;
    border-bottom: 1px solid #333;
}

#chat-header h1 {
    margin: 0;
    font-weight: 600;
    color: #FFFFFF;
    font-size: 24px;
}

/* Chat History */
#chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #0D0D0D;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 15px 20px;
    border-radius: 25px;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
}

.message.user .message-content {
    background-color: #00000078;
    color: #FFFFFF;
    border-bottom-right-radius: 0;
}

.message.bot .message-content {
    background-color: #262626;
    color: #E0E0E0;
    border-bottom-left-radius: 0;
}

/* Chat Input */
#chat-input {
    display: flex;
    padding: 15px 20px;
    background-color: #252525;
    border-top: 1px solid #333;
}

#user-input {
    flex: 1;
    padding: 12px 16px;
    background-color: #262626;
    border: none;
    border-radius: 30px;
    color: #FFFFFF;
    font-size: 16px;
    outline: none;
}

#user-input::placeholder {
    color: #9E9E9E;
}

/* Perfectly Circular Send Button */
#send-button {
    margin-left: 15px;
    height: 50px;
    width: 50px;
    background-color: #1A1A1A;
    border: none;
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 18px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-button:hover {
    background-color: #000000;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.typing-indicator .dot {
    height: 8px;
    width: 8px;
    background-color: #E0E0E0;
    border-radius: 50%;
    margin-right: 5px;
    animation: blink 1s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animations */
@keyframes blink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #424242;
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background-color: #1A1A1A;
}

/* Responsive Design */
@media (max-width: 768px) {
    #chat-header h1 {
        font-size: 20px;
    }

    .message-content {
        max-width: 85%;
    }

    #send-button {
        padding: 12px;
        font-size: 16px;
    }
}
