body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0f0f0f;
    color: #e1e5e9;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.header {
    background-color: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: #e1e5e9;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.typing-indicator {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    font-style: italic;
    color: #666;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #666;
    animation: bounce 1.4s infinite ease-in-out;
    margin: 0 2px;
}

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

@keyframes bounce {
    0%, 80%, 100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.input-container {
    background-color: #1a1a1a;
    padding: 20px;
    border-top: 1px solid #333;
}

.mood-toggle {
    text-align: center;
    margin-bottom: 10px;
    color: #e1e5e9;
}

.mood-toggle label {
    cursor: pointer;
}

.mood-toggle input[type="checkbox"] {
    margin-right: 8px;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #555;
    border-radius: 12px;
    background-color: #333;
    color: #e1e5e9;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    box-sizing: border-box;
    resize: none;
    min-height: 20px;
    max-height: 150px;
    font-family: inherit;
}

#message-input::placeholder {
    color: #999;
}

#message-input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.3);
}

#send-button {
    padding: 12px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

#send-button:hover {
    background-color: #0052a3;
}

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

.message {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.message.user .message-content {
    background-color: #0066cc;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background-color: #3a3a3a;
    color: #e1e5e9;
    border-bottom-left-radius: 4px;
}

@media (max-width: 768px) {
    .chat-messages {
        padding: 10px;
    }
    .input-container {
        padding: 10px;
    }
    .message-content {
        max-width: 85%;
        font-size: 14px;
    }
    .header {
        padding: 10px;
    }
    h1 {
        font-size: 20px;
    }
}
