body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    margin: 0;
    padding: 0;
}

header {
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.chat-container {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.chat-container h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.chat-window {
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 12px;
    height: 104px;
    padding: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

.chat-window-expanded {
    height: 400px;
    overflow-y: auto;
}

.chat-window-hidden {
    opacity: 0;
    pointer-events: none;
}

.chat-window-visible {
    opacity: 1;
    pointer-events: auto;
}

.chat-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    max-width: 80%;
}

.user-message {
    background-color: #00aaff;
    color: #fff;
    align-self: flex-end;
    margin-left: auto;
    border: 1px solid #00aaff;
}

.bot-message {
    background-color: #444;
    color: #fff;
    align-self: flex-start;
    border: 1px solid #444;
}

.typing-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #444;
    color: #fff;
    align-self: flex-start;
    border: 1px solid #444;
    padding: 1rem;
    border-radius: 12px;
}

.typing-dots-container {
    display: flex;
    align-items: center;
    padding-top: 8px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.1s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
}

.chat-input {
    display: flex;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 0.5rem;
    position: relative;
}

#user-input {
    color: #fff;
    flex-grow: 1;
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    background-color: transparent;
    caret-color: #fff;
}

#user-input::placeholder {
    color: #888;
}

#user-input:focus {
    outline: none;
}

#send-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

#send-button svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* General utility class for hiding elements */
.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

/* After the transition, set display to none to remove it from layout flow */
.hidden.hide-completely {
    display: none;
}


