:root {
    --primary-font: 'Playfair Display', serif;
    --secondary-font: 'Roboto', sans-serif;
    --background-color: #f4f1eb;
    --text-color: #312c24;
    --accent-color: #8d6e63;
    --card-bg-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --user-msg-bg: #8d6e63;
    --bot-msg-bg: #e5e5ea;
}

body {
    font-family: var(--secondary-font);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 1rem;
}

#chat-container {
    width: 100%;
    max-width: 500px;
    height: 90vh;
    max-height: 700px;
    background-color: var(--card-bg-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-header {
    padding: 1.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

#chat-header h1 {
    font-family: var(--primary-font);
    font-size: 1.75rem;
    margin: 0;
    color: var(--accent-color);
}

#chat-header p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

#chat-history {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    padding: 0.75rem 1.25rem;
    border-radius: 22px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 0.95rem;
}

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

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

#chat-input-container {
    display: flex;
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    gap: 0.75rem;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #f9f9f9;
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(141, 110, 99, 0.2);
}

#chat-send-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#chat-send-button:hover {
    background-color: #a1887f; /* Lighter shade */
}

#chat-send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#loading-indicator {
    text-align: center;
    padding: 0.5rem;
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

/* Custom Scrollbar */
#chat-history::-webkit-scrollbar {
    width: 6px;
}

#chat-history::-webkit-scrollbar-track {
    background: transparent;
}

#chat-history::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 600px) {
    body {
        padding: 0; /* Remove body padding on small screens */
    }

    #chat-container {
        width: 100%;
        height: 100%;
        max-height: none; /* Allow it to fill the full screen height */
        border-radius: 0; /* Remove border-radius for a full-screen experience */
        box-shadow: none; /* Remove shadow on mobile */
    }

    #chat-header {
        padding: 1rem 1.5rem;
    }

    #chat-header h1 {
        font-size: 1.5rem;
    }

    #chat-history {
        padding: 1rem;
    }

    #chat-input-container {
        padding: 1rem;
    }

    .chat-message {
        font-size: 0.9rem;
    }
}
