#chatbot-container {
    position: fixed;
    bottom: 130px;
    right: 20px;
    width: 340px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    z-index: 10000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

#chatbot-container.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    #chatbot-container {
        bottom: 60px;
        width: 90%;
        max-height: 60vh;
    }
}

#chat-header {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    color: #ffffff;
    padding: 12px;
    border-radius: 16px 16px 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#chat-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

#chat-close:hover {
    color: #e0e0e0;
}

#chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f1f5f9;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

@media (max-width: 768px) {
    #chat-messages {
        padding: 10px;
    }
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.message {
    padding: 12px;
    margin: 18px 0;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 0.95rem;
    word-break: break-word;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .message {
        padding: 10px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    }
}

.user-message {
    background: rgba(135, 206, 235, 0.4);
    color: #1f2937;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.user-message + .bot-message {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .user-message {
        background: rgba(135, 206, 235, 0.6);
    }
}

.bot-message {
    background: rgba(144, 238, 144, 0.4);
    color: #1f2937;
    border-bottom-left-radius: 2px;
}

@media (max-width: 768px) {
    .bot-message {
        background: rgba(144, 238, 144, 0.6);
    }
}

.bot-message a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.bot-message a:hover {
    color: #2563eb;
}

.typing-indicator {
    padding: 10px;
    margin: 18px 0;
    border-radius: 10px;
    max-width: 80%;
    background: #e6e6e6;
    color: #333;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .typing-indicator {
        padding: 8px;
    }
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    margin: 0 2px;
    animation: typing 0.8s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#chat-input {
    width: 100%;
    padding: 6px;
    border: none;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    outline: none;
    font-size: 0.85rem;
    height: 24px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

#chat-input:focus {
    border-top: 1px solid #3b82f6;
}

@media (max-width: 768px) {
    #chat-input {
        padding: 8px;
        height: 35px;
    }
}

#chat-toggle {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background 0.2s ease;
}

#chat-toggle:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    transform: scale(1.05);
}

#chat-toggle::before {
    content: '💬 ';
    margin-right: 6px;
}