/* Attractive chatbot styles */
:root {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0f172a;
    background: #e5efff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 28%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 30%),
                linear-gradient(180deg, #f8fbff 0%, #dce9ff 100%);
}

.chatbot {
    width: min(460px, 100%);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(59, 130, 246, 0.16);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.chatbot::before {
    content: '';
    display: block;
    height: 180px;
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
}

.chatbot h2 {
    margin: -120px 0 18px;
    font-size: 2rem;
    text-align: center;
    color: white;
    text-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    position: relative;
    z-index: 1;
}

.chat-window {
    min-height: 380px;
    max-height: 62vh;
    overflow-y: auto;
    padding: 22px;
    background: rgba(246, 252, 255, 0.95);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.chat-window::-webkit-scrollbar {
    width: 9px;
}

.chat-window::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.35);
    border-radius: 999px;
}

.message {
    display: inline-flex;
    max-width: 84%;
    padding: 14px 18px;
    border-radius: 24px;
    line-height: 1.65;
    font-size: 0.97rem;
    margin: 12px 0;
    word-break: break-word;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.message.user {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
    border-bottom-left-radius: 24px;
}

.message.bot {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #111827;
    margin-right: auto;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 24px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 20px;
    background: rgba(248, 250, 255, 0.95);
    border-top: 1px solid rgba(59, 130, 246, 0.08);
}

#userInput {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: white;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#userInput::placeholder {
    color: #94a3b8;
}

#userInput:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}

#sendBtn {
    min-width: 110px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

#sendBtn:hover {
    transform: translateY(-2px);
    opacity: 0.98;
}

#sendBtn:active {
    transform: translateY(0);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

@media (max-width: 520px) {
    .chat-window {
        padding: 18px;
    }

    .chatbot {
        border-radius: 28px;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    #sendBtn {
        width: 100%;
        min-width: 0;
    }
}
