:root {
    --bg-color: #f9f9f9;
    --box-bg-color: #ffffff;
    --user-message-bg-color: #007bff;
    --ai-message-bg-color: #e5e7eb;
    --user-message-text-color: #ffffff;
    --ai-message-text-color: #333333;
    --button-hover-color: #0056b3;
    --input-border-color: #ced4da;
}

body {
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #4a4a4a;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    background-color: var(--box-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: auto;
}


.copy-btn {
    display: inline-block;
    padding: 5px 10px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 0.8em;
    background-color: #007bff; /* Updated to match user-message background color */
    color: white;
    border: none;
    border-radius: 3px;
    transition: background-color 0.3s, transform 0.2s;
    position: absolute; /* Adjust if necessary */
    top: 5px;
    right: 5px;
    user-select: none; /* Prevent the button text from being selectable */
}

.copy-btn:hover, .copy-btn:active {
    background-color: #0056b3; /* A darker shade for hover state */
    transform: scale(1.05); /* Slightly enlarge the button on hover/active */
}

.copy-btn:focus {
    outline: none; /* Remove the focus outline to keep the design clean */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5); /* Optional: add a focus style that matches your design */
}


pre code {
    padding: 12px;
	position: relative;
	color: #dcdcdc; /* Light grey color for better contrast */
    background: #333; /* Darker background for the code block */
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Source Code Pro', monospace; /* Use a monospaced font for better code readability */
}


.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-dot {
    width: 8px;
    height: 8px;
    margin: 0 5px;
    background-color: var(--user-message-bg-color);
    border-radius: 50%;
    animation: wave 1.2s infinite linear both;
}

.loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.1s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes wave {
    0%, 60%, 100% {
        transform: initial;
    }
    30% {
        transform: translateY(-15px);
    }
}


#output-field {
    background-color: var(--ai-message-bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}


.input-group {
    flex-wrap: nowrap;
    align-items: stretch;
}

.input-group-text {
    background: transparent;
    border: 1px solid var(--input-border-color);
    border-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.input-group-text svg {
    fill: var(--user-message-bg-color);
}

#prompt-input {
    flex-grow: 1;
    border: 1px solid var(--input-border-color);
    border-radius: 20px 0 0 20px;
    padding: 10px 20px;
}

#image-input {
    display: none;
}

#send-btn {
    background-color: var(--user-message-bg-color);
    color: var(--user-message-text-color);
    border: 1px solid var(--user-message-bg-color);
    border-radius: 0 20px 20px 0;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#send-btn:hover {
    background-color: var(--button-hover-color);
}

#output-container {
    overflow-y: auto;
    max-height: 65vh;
    margin-bottom: 20px;
}

.chat-message {
    padding: 12px 20px;
    margin: 8px 0;
    border-radius: 25px;
    max-width: 75%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-message {
    background-color: var(--user-message-bg-color);
    color: var(--user-message-text-color);
    align-self: flex-end;
    text-align: right;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background-color: var(--ai-message-bg-color);
    color: var(--ai-message-text-color);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}


/* Responsive adjustments as needed */
@media (max-width: 768px) {
    .chat-container {
        width: 90%;
        margin: 20px;
    }

    .input-group {
        flex-wrap: wrap;
    }

    #send-btn {
        border-radius: 20px;
        margin-top: 10px;
        width: 100%;
    }

    #prompt-input {
        border-radius: 20px;
        margin-bottom: 10px;
    }

    .input-group-text {
        border-radius: 20px;
    }

}

