#chanakya-chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Segoe UI', Arial, sans-serif;
}
#chanakya-chatbot-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ff9800, #f44336, #2196f3);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
#chanakya-chatbot-icon:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
#chanakya-chatbot-icon img {
    width: 36px;
    height: 36px;
}
#chanakya-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.3s;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
#chanakya-chatbot-header {
    background: linear-gradient(90deg, #2196f3, #ff9800);
    color: #fff;
    padding: 16px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
}

/* New header structure with robot icon and online status */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.robot-icon {
    font-size: 1.4em;
    animation: robotPulse 2s infinite;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.robot-icon:hover {
    transform: scale(1.2) rotate(5deg);
    animation-play-state: paused;
}

@keyframes robotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.assistant-name {
    font-weight: bold;
    font-size: 1.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: statusBlink 2s infinite;
    flex-shrink: 0;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status-text {
    color: #e8f5e8;
    font-size: 0.9em;
    font-weight: 500;
}

#chanakya-chatbot-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f7f7fa;
}
#chanakya-chatbot-messages {
    min-height: 120px;
}

/* Enhanced message styling with better emoji support */
.user-msg {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
    padding: 10px 16px;
    border-radius: 20px 20px 6px 20px;
    margin: 8px 0 8px auto;
    max-width: 80%;
    text-align: right;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.bot-msg {
    background: #fff;
    color: #333;
    padding: 12px 16px;
    border-radius: 20px 20px 20px 6px;
    margin: 8px auto 8px 0;
    max-width: 85%;
    border: 1px solid #e0e0e0;
    text-align: left;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 0.3s ease-out;
}

/* Enhanced emoji styling */
.user-msg, .bot-msg {
    font-family: 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    font-size: 14px;
}

/* Animation for messages */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced welcome message */
.welcome-msg {
    padding: 18px;
    max-width: 95%;
    background: linear-gradient(135deg, #f8f9ff, #fff);
    border: 1px solid #e3f2fd;
    animation: welcomeSlideIn 0.4s ease-out;
    border-radius: 16px 16px 16px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-text {
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.welcome-suggestions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.suggestions-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.welcome-suggestion-btn {
    background: linear-gradient(90deg, #ff9800, #2196f3);
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: 8px 14px;
    margin: 4px 6px 4px 0;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-block;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.welcome-suggestion-btn:hover {
    background: linear-gradient(90deg, #2196f3, #ff9800);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Enhanced typing indicator */
#chanakya-chatbot-typing {
    font-style: italic;
    color: #888;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 13px;
    max-width: 60px;
    animation: typingPulse 1.5s infinite;
}

@keyframes typingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced input area */
#chanakya-chatbot-input-area {
    display: flex;
    padding: 12px;
    background: #fafafa;
    border-top: 1px solid #eee;
    gap: 8px;
}

#chanakya-chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
}

#chanakya-chatbot-input:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

#chanakya-chatbot-send {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    min-width: 60px;
}

#chanakya-chatbot-send:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#chanakya-chatbot-send:active {
    transform: translateY(0);
}

/* --- Advanced Features Styles --- */
.feedback-btn {
    background: #f7f7fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 1em;  /* Reduced from 1.3em */
    margin: 0 5px;   /* Reduced from 6px */
    padding: 3px 8px; /* Reduced from 6px 12px */
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

#chanakya-chatbot-feedback {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    margin-right: 8px;
    padding: 0;
}

.feedback-btn:hover {
    background: #e0e0e0;
    box-shadow: 0 2px 8px rgba(33,150,243,0.15);
}
/* Add more styles for context-aware UI, multilingual support, and mobile enhancements as needed */

/* Responsive design */
@media (max-width: 480px) {
    #chanakya-chatbot-widget {
        bottom: 16px;
        right: 16px;
    }
    
    #chanakya-chatbot-window {
        width: 300px;
        max-height: 400px;
    }
    
    .user-msg, .bot-msg {
        max-width: 90%;
        font-size: 13px;
    }
    
    .welcome-msg {
        max-width: 95%;
    }
    
    .assistant-name {
        font-size: 1em;
    }
}

/* Better scrollbar */
#chanakya-chatbot-body::-webkit-scrollbar {
    width: 4px;
}

#chanakya-chatbot-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#chanakya-chatbot-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#chanakya-chatbot-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 