:root {
    --primary-color: #0F172A;
    /* Slate 900 */
    --secondary-color: #1E293B;
    /* Slate 800 */
    --accent-color: #38BDF8;
    /* Sky 400 */
    --text-primary: #F8FAFC;
    /* Slate 50 */
    --text-muted: #94A3B8;
    /* Slate 400 */
    --bg-color: #020617;
    /* Slate 950 */
    --font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-family: var(--font-family);
    background-color: #e2e8f0;
    /* Page background for demo */
}

/* Floating Action Button (FAB) */
.chatbot-fab {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background: linear-gradient(135deg, var(--accent-color), #0284C7) !important;
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    z-index: 9999;
}

.chatbot-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.6);
}

.chatbot-fab svg {
    width: 32px !important;
    height: 32px !important;
    color: #FFFFFF !important;
    min-width: 32px !important;
}

.chatbot-fab svg path,
.chatbot-fab svg circle {
    stroke: currentColor;
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background-color: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}

.chatbot-container.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chatbot-header {
    background-color: var(--primary-color);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #0284C7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3);
}

.chatbot-avatar svg {
    color: #FFFFFF !important;
}

.chatbot-avatar svg path,
.chatbot-avatar svg circle {
    stroke: currentColor;
}

.chatbot-header-info h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

.chatbot-header-info p {
    margin: 3px 0 0 0;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 500;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.chatbot-close:hover {
    color: var(--text-primary);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.03) 0%, transparent 70%),
        radial-gradient(circle at 50% 100%, rgba(2, 132, 199, 0.03) 0%, transparent 70%);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

/* Message Bubbles */
.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
    word-wrap: break-word;
}

.message.bot {
    align-self: flex-start;
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message.user {
    align-self: flex-end;
    background-color: var(--accent-color);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

/* Options/Buttons in Chat */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
    align-self: flex-start;
    width: 100%;
}

.option-btn {
    background-color: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-color);
    padding: 12px 16px;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(56, 189, 248, 0.2);
}

.option-btn::after {
    content: "→";
    font-size: 15px;
    transition: transform 0.2s ease;
}

.option-btn:hover::after {
    transform: translateX(4px);
}

/* Input Area (if text input needed) */
.chatbot-input-area {
    padding: 15px 20px;
    background-color: var(--primary-color);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chatbot-input-area input {
    flex: 1;
    background-color: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 20px;
    font-family: var(--font-family);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chatbot-input-area input:focus {
    border-color: var(--accent-color);
}

.chatbot-input-area button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.chatbot-input-area button svg {
    color: #FFFFFF !important;
}

.chatbot-input-area button:hover {
    background-color: #0284C7;
    transform: scale(1.05);
}

/* Email/Contact Modal styling */
.email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.email-modal.active {
    opacity: 1;
    pointer-events: all;
}

.email-modal-content {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.email-modal.active .email-modal-content {
    transform: translateY(0);
}

.email-modal-content h3 {
    color: #FFFFFF;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-primary);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact-form input,
#contact-form textarea {
    background-color: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 15px;
    outline: none;
    resize: none;
    transition: border-color 0.2s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--accent-color);
}

#contact-form button {
    background: linear-gradient(135deg, var(--accent-color), #0284C7);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 5px;
}

#contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 14px 18px;
    background-color: var(--secondary-color);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    animation: fadeIn 0.3s ease;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        max-width: 100vw;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chatbot-fab {
        bottom: 20px;
        right: 20px;
    }
}