/* Main Container */
.deepseek-chat-container {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background: white;
    display: flex;
    flex-direction: column;
    height: 650px;
}

/* Header */
.chat-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    overflow: hidden;
}

.lang-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn.active {
    background: rgba(255,255,255,0.3);
    font-weight: 500;
}

/* Chat History */
#chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
}

/* Messages */
.message {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
    line-height: 1.7;
}

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

.message.user {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.ai {
    background: white;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message.loading {
    color: #666;
    font-style: italic;
}

.message.error {
    color: #d32f2f;
}

/* Hindi specific styling */
.message.hindi {
    font-family: 'Noto Sans Devanagari', 'Segoe UI', sans-serif;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* Input Area */
.input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: flex-end;
}

#user-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 24px;
    resize: none;
    min-height: 60px;
    font-size: 16px;
    line-height: 1.6;
    transition: all 0.3s;
}

#user-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76,175,80,0.2);
}

#send-btn {
    width: 48px;
    height: 48px;
    margin-left: 12px;
    background: #4CAF50;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#send-btn:hover {
    background: #3d8b40;
    transform: scale(1.05);
}

#send-btn:disabled {
    opacity: 0.7;
    transform: none;
}

#send-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.chat-footer {
    padding: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

/* Response Formatting */
.message.ai h1 {
    font-size: 1.4em;
    color: #2E7D32;
    margin: 0.8em 0 0.5em;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.message.ai h2 {
    font-size: 1.2em;
    color: #333;
    margin: 0.7em 0 0.4em;
}

.message.ai h3 {
    font-size: 1.1em;
    color: #555;
    margin: 0.6em 0 0.3em;
}

.message.ai ul,
.message.ai ol {
    padding-left: 24px;
    margin: 12px 0;
}

.message.ai li {
    margin-bottom: 8px;
}

.message.ai strong {
    color: #2E7D32;
    font-weight: 600;
}

.message.ai em {
    color: #555;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 600px) {
    .deepseek-chat-container {
        height: 80vh;
        border-radius: 0;
    }
    
    .message {
        max-width: 90%;
        padding: 12px 16px;
    }
    
    #user-input {
        min-height: 50px;
    }
    
    #send-btn {
        width: 44px;
        height: 44px;
    }
}