#chatbot-container {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 550px;
    height: 450px; /* Set fixed height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Group content at the top */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-left: auto;
    overflow: hidden;
}

#chat-history {
    flex: 0 1 auto; /* Take only needed space */
    max-height: 320px; /* Leave space for options */
    overflow-y: auto;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-orange) transparent;
}

#chat-history::-webkit-scrollbar {
    width: 4px;
}

#chat-history::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 10px;
}

.chat-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-bubble {
    background-color: #1a3d3a;
    color: #fffef3;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-bubble {
    background-color: #ffa163;
    color: #0b1a1f;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(250, 161, 99, 0.2);
}

#chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    animation: fadeIn 0.4s ease-out 0.2s both;
}

.chat-option {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fffef3;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.chat-option:hover {
    background-color: #ffa163;
    color: #0b1a1f;
    border-color: #ffa163;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 161, 99, 0.3);
}

.chat-option:active {
    transform: translateY(0);
}

.typing-bubble {
    background-color: #1a3d3a;
    padding: 15px 20px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    display: none;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 768px) {
    #chatbot-container {
        padding: 16px;
        min-height: 400px;
        margin: 0 auto;
    }

    #chat-history {
        height: 280px;
    }

    .chat-bubble {
        font-size: 14px;
        max-width: 90%;
    }

    .chat-option {
        padding: 8px 16px;
        font-size: 13px;
    }
}
