.charity-chatbot-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.chatbot-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.chatbot-header h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.chatbot-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f7f9fc;
    direction: rtl;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.message {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message.assistant {
    flex-direction: row;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
}

.message.user .message-avatar {
    background: #667eea;
    color: white;
}

.message.assistant .message-avatar {
    background: #48bb78;
    color: white;
}

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

.message.user .message-content {
    background: #667eea;
    color: white;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    direction: rtl;
}

#user-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    resize: none;
    font-family: inherit;
    direction: rtl;
    transition: border-color 0.3s;
    max-height: 150px;
}

#user-input:focus {
    outline: none;
    border-color: #667eea;
}

.send-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: scale(1);
}

.action-button {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.3s;
    font-weight: 600;
}

.action-button:hover {
    background: #38a169;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .charity-chatbot-container {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .chat-messages {
        height: calc(100vh - 300px);
        min-height: 400px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chatbot-header h1 {
        font-size: 20px;
    }
    
    .chatbot-header p {
        font-size: 14px;
    }
}

/* Error message styling */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

/* Loading state */
.send-btn.loading {
    pointer-events: none;
}

.send-btn.loading svg {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}