/* Chatbot Container - Base Styles */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* Chatbot Launcher Button */
#chatbot-launcher {
    width: 60px;
    height: 60px;
    background: var(--neon-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(57, 255, 20, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

#chatbot-launcher:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 30px rgba(57, 255, 20, 0.6);
}

#chatbot-launcher img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Chatbot Window */
#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: 380px;
    height: 550px;
    max-height: 550px;
    background: rgba(10, 10, 10, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--neon-green);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
}

#chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
#chatbot-header {
    padding: 12px 16px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(57, 255, 20, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--neon-green);
}

.chatbot-header-title {
    font-size: 1rem;
    margin: 0;
    color: var(--neon-green);
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.7rem;
    color: #aaa;
    display: block;
}

/* Close Button - Green Theme */
#chatbot-close {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--neon-green);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 10px;
}

#chatbot-close:hover {
    background: var(--neon-green);
    color: #000;
    border-color: var(--neon-green);
    transform: rotate(90deg);
}

/* Messages Container */
#chatbot-messages {
    flex: 1;
    padding: 20px;
    /* Increased padding */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Increased gap */
    background: rgba(5, 5, 5, 0.9);
}

/* ... (Scrollbar styles remain same) ... */
#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--neon-green);
    border-radius: 10px;
}

/* Message Bubbles */
.chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    /* Better padding */
    border-radius: 16px;
    font-size: 0.95rem;
    /* Slightly larger text */
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chatbot-message.bot {
    align-self: flex-start;
    background: rgba(30, 30, 30, 0.9);
    color: #eee;
    border: 1px solid rgba(57, 255, 20, 0.15);
    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    align-self: flex-end;
    background: var(--neon-green);
    color: #000;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}

/* Input Area */
#chatbot-input {
    padding: 15px;
    /* More padding */
    border-top: 1px solid rgba(57, 255, 20, 0.3);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: rgba(20, 20, 20, 0.98);
}

#chatbot-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(57, 255, 20, 0.3);
    padding: 12px 15px;
    color: white;
    border-radius: 25px;
    outline: none;
    font-size: 0.95rem;
}

#chatbot-input input:focus {
    border-color: var(--neon-green);
    background: rgba(255, 255, 255, 0.1);
}

#chatbot-send {
    background: var(--neon-green);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--neon-glow);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ============================================ */
@media screen and (max-width: 768px) {
    #chatbot-container {
        bottom: 0;
        right: 0;
        left: 0;
        z-index: 10000;
    }

    /* Launcher on Mobile */
    #chatbot-launcher {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        z-index: 10001;
        /* Above everything */
    }

    /* Chat Window on Mobile - Floating Card Style */
    #chatbot-window {
        position: fixed;
        bottom: 20px;
        /* Float from bottom */
        left: 50%;
        /* Center horizontally */
        transform: translateX(-50%);
        /* Center alignment */
        width: 92% !important;
        /* Card width, leaving margins */
        max-width: 380px !important;
        height: 65vh !important;
        /* Reasonable height, not full screen */
        max-height: 600px !important;
        border-radius: 20px !important;
        /* Rounded corners on all sides */
        border: 1px solid var(--neon-green);
        /* Visible border */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
        margin-bottom: 0;
        display: none;
        /* Hidden by default */
        flex-direction: column;
        z-index: 10002;
    }

    #chatbot-window.active {
        display: flex;
        /* Flex when active */
    }

    #chatbot-header {
        padding: 15px 18px;
        background: rgba(15, 15, 15, 0.95);
        border-radius: 20px 20px 0 0;
        /* Match top corners */
    }

    #chatbot-close {
        width: 38px;
        height: 38px;
        background: rgba(57, 255, 20, 0.1);
        border: 1px solid var(--neon-green);
        color: var(--neon-green);
        font-size: 1.6rem;
    }

    #chatbot-messages {
        padding: 18px;
        padding-bottom: 80px;
        /* Space for input */
        background: rgba(10, 10, 10, 0.95);
    }

    #chatbot-input {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 15px;
        background: rgba(15, 15, 15, 0.98);
        border-top: 1px solid rgba(57, 255, 20, 0.2);
        border-radius: 0 0 20px 20px;
        /* Match bottom corners */
    }
}

/* Small Phones */
@media screen and (max-width: 380px) {
    #chatbot-window {
        height: 70vh !important;
        width: 95% !important;
    }

    .chatbot-header-title {
        font-size: 0.9rem;
    }
}