/* Hacker AI Chat Widget Styles */

#hacker-ai-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Courier New', monospace;
}

/* Button */
.ai-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #000;
    border: 2px solid #00ff41;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transition: all 0.3s;
    position: relative;
    /* For Bubble Anchor */
}

/* Holographic Speech Bubble */
.ai-attractor-bubble {
    position: fixed;
    bottom: 85px;
    /* Above button */
    right: 20px;
    background: rgba(0, 20, 0, 0.9);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    pointer-events: none;
    /* Don't block clicks */
    animation: fadeInSlide 0.5s ease-out;
    z-index: 9998;
    max-width: 200px;
}

.ai-attractor-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 25px;
    width: 10px;
    height: 10px;
    background: #00ff41;
    transform: rotate(45deg);
    border-bottom: 1px solid #00ff41;
    border-right: 1px solid #00ff41;
    background: #000;
    /* Match bg to hide line */
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.8);
}

.ai-btn.hidden {
    display: none;
}

/* Chat Window - standard widget */
#ai-chat-window {
    width: 380px;
    height: 550px;
    background: #0a0a0a;
    /* Softer dark background */
    border: 1px solid #333;
    /* Subtle border */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    /* Cleaner font */
}

/* Full Page Mode Override - RESET CONTAINER */
#hacker-ai-widget.full-page-mode {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Full Page Mode Override - CHAT WINDOW */
.full-page-mode #ai-chat-window {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    margin: 0 auto;
    border: 1px solid #333;
    box-shadow: 0 0 100px rgba(0, 255, 65, 0.05);
}

/* Chat Widget Container */
#hacker-ai-widget {
    font-family: 'Consolas', 'Courier New', monospace;
    z-index: 9999;
}

#ai-chat-window.hidden {
    display: none;
}

/* Header */
.ai-header {
    background: #111;
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-status {
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff41;
    border-radius: 50%;
    box-shadow: 0 0 5px #00ff41;
}

#ai-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Messages Container */
.ai-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #0a0a0a;
    scroll-behavior: smooth;
}

/* Bubbles */
.msg {
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.msg-user {
    background: #2563eb !important;
    /* Professional Blue */
    color: #fff !important;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.msg-bot {
    background: #1f1f1f !important;
    /* Dark Grey */
    color: #e0e0e0 !important;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #333;
    border-left: none !important;
    /* Remove the green border */
}

.msg-system {
    font-size: 11px;
    color: #666;
    text-align: center;
    background: transparent;
    border: none;
    padding: 5px;
    margin: 10px 0;
}

.msg-error {
    color: #ff0055;
    background: rgba(255, 0, 85, 0.1);
}

/* Input Area */
.ai-input-area {
    padding: 15px;
    background: #111;
    border-top: 1px solid #222;
    gap: 10px;
}

#ai-user-input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    font-family: inherit;
}

#ai-user-input:focus {
    border-color: #2563eb;
    box-shadow: none;
}

#ai-send-btn {
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 0 20px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}

.ai-footer {
    text-align: center;
    font-size: 10px;
    color: #555;
    padding-bottom: 5px;
    user-select: none;
    /* Prevent text selection */
    cursor: pointer;
    /* Show click hand */
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #00ff41;
}

input:checked+.slider:before {
    transform: translateX(16px);
}

/* Custom Scrollbar */
.ai-messages::-webkit-scrollbar {
    width: 8px;
}

.ai-messages::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: #1f1f1f;
    border: 1px solid #00ff41;
    border-radius: 4px;
}

.ai-messages::-webkit-scrollbar-thumb:hover {
    background: #00ff41;
}

/* Enhanced Input Area */
.ai-input-area {
    padding: 15px;
    background: #050505;
    border-top: 1px solid #00ff41;
    box-shadow: 0 -5px 15px rgba(0, 255, 65, 0.05);
    display: flex;
    gap: 15px;
    align-items: center;
}

#ai-user-input {
    flex: 1;
    /* Grow to fill space */
    background: #000;
    border: 1px solid #333;
    color: #00ff41;
    padding: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

#ai-user-input:focus {
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

#ai-send-btn {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s;
}

#ai-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.4);
}

/* Bot Message Typer Effect (simulated via border pulse for now) */
.msg-bot {
    border-left: 3px solid #00ff41 !important;
}