@font-face {
    font-family: 'Tainagari';
    src: url('tainagari.ttf') format('truetype');
}

body {
    background: linear-gradient(rgba(255, 243, 217, 0.3), rgba(255, 243, 217, 0.8)), 
                url('assests/bgimg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.ai-chat-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0;
    background: rgba(255, 243, 217, 0.95);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
    font-family: 'Tainagari', sans-serif;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(230, 213, 184, 0.3);
    position: relative;
}









.chat-header {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.chat-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    font-weight: 700;
    letter-spacing: -1px;
}

.chat-header p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    font-weight: 300;
}

.language-toggle {
    margin: 25px 0;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.lang-btn {
    padding: 15px 30px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn.active {
    background: rgba(255,255,255,0.95);
    color: #4a90e2;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255,255,255,0.3);
}

.lang-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.chat-messages {
    height: 550px;
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(to bottom, rgba(255, 243, 217, 0.8), rgba(255, 255, 255, 0.9));
    position: relative;
}



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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    margin: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    background-clip: content-box;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    animation: slideIn 0.3s ease-out;
}

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

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

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

.message-content {
    max-width: 75%;
    padding: 18px 22px;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ai-message .message-content {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    color: #2c3e50;
    border: 2px solid rgba(102, 126, 234, 0.3);
    margin-right: 70px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    position: relative;
}

.ai-message .message-content::before {
    content: '🤖';
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    border: 3px solid white;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 70px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.user-message .message-content::after {
    content: '👤';
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    background: linear-gradient(135deg, #28a745, #20a83a);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
    border: 3px solid white;
}

.chat-input-container {
    background: linear-gradient(135deg, rgba(255, 243, 217, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 30px;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
}

.chat-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a90e2, transparent);
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: 30px;
    resize: none;
    font-family: 'Tainagari', sans-serif;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.1);
}

#messageInput:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

#messageInput::placeholder {
    color: rgba(74, 144, 226, 0.6);
}

#sendButton {
    padding: 18px 30px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

#sendButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#sendButton:hover::before {
    left: 100%;
}

#sendButton:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.4);
}

#sendButton:active {
    transform: translateY(-1px) scale(0.98);
}

#sendButton:disabled {
    background: linear-gradient(135deg, #ccc, #999);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.voice-input, .image-input {
    flex: 1;
    text-align: center;
}

#voiceButton, #imageButton {
    padding: 15px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

#voiceButton {
    background: linear-gradient(135deg, #28a745 0%, #20a83a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

#imageButton {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

#voiceButton::before, #imageButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#voiceButton:hover::before, #imageButton:hover::before {
    left: 100%;
}

#voiceButton:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

#imageButton:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.image-analysis-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e74c3c;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.1);
}

.analysis-container h3 {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.image-preview {
    text-align: center;
    margin: 20px 0;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border: 3px solid #e74c3c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.analysis-progress {
    text-align: center;
    padding: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar::before {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    width: 0;
    animation: progress 3s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.analysis-results {
    margin-top: 20px;
}

.analysis-result {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,255,0.95) 100%);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(231, 76, 60, 0.2);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
}

.analysis-result::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 20px 0 0 20px;
}

.disease-info {
    background: rgba(231, 76, 60, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.disease-info h5 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.symptoms, .treatment, .recommendations {
    margin: 15px 0;
}

.symptoms h5, .treatment h5, .recommendations h5 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.symptoms ul, .recommendations ul {
    padding-left: 20px;
}

.symptoms li, .recommendations li {
    margin: 5px 0;
    color: #555;
}

.disclaimer {
    background: rgba(231, 76, 60, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.find-vet-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 16px;
}

.find-vet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.find-vet-btn:hover::before {
    left: 100%;
}

.find-vet-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.4);
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.quick-questions {
    background: linear-gradient(135deg, rgba(255, 243, 217, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 25px;
    padding: 30px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.1);
}

.quick-questions h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-buttons button {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(74, 144, 226, 0.3);
    color: #4a90e2;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.quick-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.1), transparent);
    transition: left 0.5s;
}

.quick-buttons button:hover::before {
    left: 100%;
}

.quick-buttons button:hover {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    border-color: transparent;
}

.typing-indicator {
    display: none;
    padding: 15px;
    font-style: italic;
    color: #666;
    text-align: center;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 10px;
    margin: 10px 0;
}

.ai-status {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: #4a90e2;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 99999 !important;
    display: none;
}

/* Fixed chatbot widget for entire website */
.floating-chat-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
}

.floating-chat-box {
    position: fixed !important;
    bottom: 100px !important;
    right: 20px !important;
    z-index: 99998 !important;
}

body .floating-chat-widget,
html .floating-chat-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
}

/* Additional Professional Enhancements */
.message {
    position: relative;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(102, 126, 234, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 20px;
}

.message:hover::before {
    opacity: 1;
}

.typing-indicator {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.typing-indicator::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Floating particles animation */
.chat-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: float-particles 20s linear infinite;
    opacity: 0.6;
}

@keyframes float-particles {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

/* Enhanced button hover effects */
.quick-buttons button:active {
    transform: translateY(-1px) scale(0.98);
}

#sendButton:active, #voiceButton:active, #imageButton:active {
    transform: translateY(-1px) scale(0.98);
}

/* Glassmorphism effect for containers */
.image-analysis-section {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.disease-info {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.1);
    backdrop-filter: blur(10px);
}

.disclaimer {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    backdrop-filter: blur(10px);
}

/* Loading animation enhancement */
@keyframes progress {
    0% { 
        width: 0%; 
        background-position: -200px 0;
    }
    50% { 
        width: 70%; 
        background-position: -100px 0;
    }
    100% { 
        width: 100%; 
        background-position: 0 0;
    }
}

.progress-bar::before {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
    background-size: 200px 100%;
}

/* Enhanced error message */
.error-message {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@media (max-width: 768px) {
    body {
        padding: 10px 0;
    }
    
    .ai-chat-container {
        margin: 10px;
        border-radius: 20px;
    }
    
    .chat-header {
        padding: 25px 20px;
    }
    
    .chat-header h1 {
        font-size: 2.2rem;
    }
    
    .chat-messages {
        height: 450px;
        padding: 20px 15px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 15px 18px;
    }
    
    .ai-message .message-content {
        margin-right: 50px;
    }
    
    .user-message .message-content {
        margin-left: 50px;
    }
    
    .ai-message .message-content::before,
    .user-message .message-content::after {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .ai-message .message-content::before {
        left: -40px;
    }
    
    .user-message .message-content::after {
        right: -40px;
    }
    
    .quick-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-buttons button {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .input-options {
        flex-direction: column;
        gap: 12px;
    }
    
    #voiceButton, #imageButton {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    #messageInput {
        padding: 15px 20px;
        font-size: 15px;
    }
    
    #sendButton {
        padding: 15px 25px;
        font-size: 15px;
    }
    
    .image-analysis-section {
        padding: 20px 15px;
        margin: 15px 0;
        border-radius: 15px;
    }
    
    .analysis-container h3 {
        font-size: 1.4rem;
    }
    
    .image-preview img {
        max-width: 280px;
    }
    
    .language-toggle {
        flex-direction: row;
        gap: 10px;
    }
    
    .lang-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}
/* Hide Tidio widget */
#tidio-chat,
#tidio-chat-iframe,
.tidio-chat,
[id*="tidio"],
[class*="tidio"] {
    display: none !important;
    visibility: hidden !important;
}