#chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 340px;
    height: 480px;
    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);
}

#chat-header {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    color: #ffffff;
    padding: 16px;
    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: 12px;
    right: 12px;
    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: 16px;
    overflow-y: auto;
    background: #f8fafc;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f8fafc;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.message {
    padding: 12px;
    margin: 8px 0;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 0.95rem;
    word-break: break-word;
}

.user-message {
    background: #3b82f6;
    color: #ffffff;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.bot-message {
    background: #e2e8f0;
    color: #1f2937;
    border-bottom-left-radius: 2px;
}

.bot-message a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.bot-message a:hover {
    color: #2563eb;
}

.typing-indicator {
    padding: 12px;
    margin: 8px 0;
    border-radius: 12px;
    max-width: 80%;
    background: #e2e8f0;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    margin: 0 3px;
    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(-6px); }
}

#chat-input {
    width: 100%;
    padding: 14px;
    border: none;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    outline: none;
    font-size: 0.95rem;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

#chat-input:focus {
    border-top: 1px solid #3b82f6;
}

#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;
}