:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #3b82f6;
    --accent-bright: #60a5fa;
    --accent-dark: #1e3a8a;
    --cyan-color: #22d3ee;
    --cyan-dark: #155e75;
    --text-primary: #93c5fd;
    --text-secondary: #60a5fa;
    --bg-light: #000000;
    --border-color: #3b82f6;
    --shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    --shadow-lg: 0 0 40px rgba(59, 130, 246, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background: #000;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 0;
    background: #000;
    border: 3px solid var(--accent-color);
    color: var(--accent-color);
    cursor: pointer;
    box-shadow: var(--shadow-lg), 3px 3px 0 var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 9998;
    position: relative;
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chatbot-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg), 5px 5px 0 var(--accent-dark);
}

.chatbot-toggle:hover::before {
    opacity: 0.1;
}

.chatbot-toggle:hover svg {
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.chatbot-toggle.hidden {
    display: none;
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 48px);
    background: #000;
    border-radius: 0;
    border: 3px solid var(--accent-color);
    box-shadow: var(--shadow-lg), 5px 5px 0 var(--accent-dark);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbot-container.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
}

/* Header */
.chatbot-header {
    padding: 16px;
    background: #000;
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.chatbot-header::before {
    content: '╔═══════════════════════════════════╗';
    position: absolute;
    top: 8px;
    left: 16px;
    right: 16px;
    font-size: 10px;
    color: var(--accent-color);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
}

.chatbot-header-content {
    margin-top: 20px;
}

.chatbot-header-content h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--accent-bright);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.chatbot-header-content h3::before {
    content: '>>> ';
    color: var(--accent-color);
}

.chatbot-subtitle {
    font-size: 11px;
    opacity: 0.7;
    color: var(--accent-color);
    text-transform: uppercase;
}

.chatbot-subtitle::before {
    content: '[';
}

.chatbot-subtitle::after {
    content: ']';
}

.chatbot-close {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 32px;
    height: 32px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 2px 2px 0 var(--accent-dark);
}

.chatbot-close:hover {
    background: var(--accent-color);
    color: #000;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--accent-dark);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #000;
    border-top: 1px solid var(--accent-dark);
    border-bottom: 1px solid var(--accent-dark);
}

.message {
    margin-bottom: 20px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 0;
    font-size: 13px;
    line-height: 1.6;
    position: relative;
    font-family: 'Courier New', Courier, monospace;
}

.message.bot {
    justify-content: flex-start;
}

.message.bot .message-content {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    box-shadow: 3px 3px 0 var(--accent-dark);
}

.message.bot .message-content::before {
    content: '[BOT]';
    position: absolute;
    top: -10px;
    left: 8px;
    background: #000;
    color: var(--accent-color);
    font-size: 10px;
    padding: 0 6px;
    letter-spacing: 1px;
}

.message.user {
    justify-content: flex-end;
}

.message.user .message-content {
    background: rgba(34, 211, 238, 0.1);
    color: var(--cyan-color);
    border: 2px solid var(--cyan-color);
    box-shadow: 3px 3px 0 var(--cyan-dark);
}

.message.user .message-content::before {
    content: '[YOU]';
    position: absolute;
    top: -10px;
    right: 8px;
    background: #000;
    color: var(--cyan-color);
    font-size: 10px;
    padding: 0 6px;
    letter-spacing: 1px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--accent-color);
    box-shadow: 3px 3px 0 var(--accent-dark);
    width: fit-content;
    position: relative;
}

.typing-indicator::before {
    content: '[BOT]';
    position: absolute;
    top: -10px;
    left: 8px;
    background: #000;
    color: var(--accent-color);
    font-size: 10px;
    padding: 0 6px;
    letter-spacing: 1px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: var(--accent-color);
    margin: 0 3px;
    animation: typing 1.4s infinite;
    box-shadow: 0 0 5px var(--accent-color);
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
        box-shadow: 0 0 5px var(--accent-color);
    }
    30% {
        transform: translateY(-6px) scale(1.2);
        opacity: 1;
        box-shadow: 0 0 10px var(--accent-color);
    }
}

/* Quick Replies */
.quick-replies {
    padding: 12px 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-replies.hidden {
    display: none;
}

.quick-reply-btn {
    padding: 8px 16px;
    background: #000;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0 var(--accent-dark);
}

.quick-reply-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--accent-dark);
}

.quick-reply-btn.selected {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

.quick-reply-btn.done-btn {
    background: #000;
    color: #10b981;
    border-color: #10b981;
    box-shadow: 2px 2px 0 #064e3b;
}

.quick-reply-btn.done-btn:hover {
    background: #10b981;
    color: #000;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #064e3b;
}

/* Input Area */
.chatbot-input-area {
    border-top: 3px solid var(--accent-color);
    background: #000;
    padding: 16px;
}

.chatbot-input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--accent-color);
    border-radius: 0;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    resize: none;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    background: #000;
    color: var(--text-primary);
    box-shadow: 2px 2px 0 var(--accent-dark);
}

.chatbot-input::placeholder {
    color: var(--accent-color);
    opacity: 0.5;
}

.chatbot-input:focus {
    border-color: var(--accent-bright);
    box-shadow: 3px 3px 0 var(--accent-dark), 0 0 10px rgba(59, 130, 246, 0.5);
}

.chatbot-send {
    min-width: 44px;
    height: 44px;
    border-radius: 0;
    background: #000;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 var(--accent-dark);
    position: relative;
}

.chatbot-send:hover {
    background: var(--accent-color);
    color: #000;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--accent-dark);
}

.chatbot-send:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .chatbot-header {
        border-radius: 0;
    }

    .chatbot-input-area {
        border-radius: 0;
    }

    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar,
.chatbot-input::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track,
.chatbot-input::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid var(--accent-dark);
}

.chatbot-messages::-webkit-scrollbar-thumb,
.chatbot-input::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 0;
    border: 1px solid var(--accent-bright);
}

.chatbot-messages::-webkit-scrollbar-thumb:hover,
.chatbot-input::-webkit-scrollbar-thumb:hover {
    background: var(--accent-bright);
    box-shadow: 0 0 8px var(--accent-color);
}
