
#nexus-ai-root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; z-index: 99999; }
.nexus-launcher {
    position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%; border: none;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; z-index: 100000;
}
.nexus-launcher:hover { transform: scale(1.05); }
.nexus-window {
    position: fixed; bottom: 96px; right: 24px; width: 384px; height: 600px; max-height: 80vh; max-width: 90vw;
    background: white; border-radius: 16px; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); border: 1px solid #f3f4f6;
    display: flex; flex-direction: column; overflow: hidden; opacity: 0; pointer-events: none;
    transform: scale(0.95); transform-origin: bottom right; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 99999;
}
.nexus-window.open { opacity: 1; pointer-events: auto; transform: scale(1); }
.nexus-header { padding: 16px; color: white; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nexus-header-icon { width: 32px; height: 32px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nexus-header-icon svg { width: 18px; height: 18px; }
.nexus-title { font-weight: 700; font-size: 14px; }
.nexus-status { font-size: 12px; opacity: 0.8; display: flex; align-items: center; gap: 6px; }
.nexus-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; }
.nexus-area-label { font-size: 11px; opacity: 0.85; margin-top: 2px; background: rgba(255,255,255,0.15); padding: 2px 8px; border-radius: 4px; display: inline-block; }
.nexus-refresh { margin-left: auto; background: transparent; border: none; color: rgba(255,255,255,0.8); cursor: pointer; padding: 6px; border-radius: 4px; transition: all 0.2s; }
.nexus-refresh:hover { background: rgba(255,255,255,0.2); color: white; }

.nexus-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f9fafb; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: #c0c0c0 transparent; }
.nexus-messages::-webkit-scrollbar { width: 6px; }
.nexus-messages::-webkit-scrollbar-track { background: transparent; }
.nexus-messages::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; }
.nexus-messages::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }

.nexus-message { display: flex; align-items: flex-end; max-width: 85%; }
.nexus-message.user { align-self: flex-end; justify-content: flex-end; }
.nexus-message.model { align-self: flex-start; }

.nexus-msg-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 8px; flex-shrink: 0; color: white; font-size: 12px; }
.nexus-msg-icon svg { width: 16px; height: 16px; }

.nexus-msg-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-wrap: break-word; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.nexus-message.user .nexus-msg-bubble { background: #1f2937; color: white; border-bottom-right-radius: 0; }
.nexus-message.model .nexus-msg-bubble { background: white; color: #1f2937; border: 1px solid #e5e7eb; border-bottom-left-radius: 0; }

.nexus-input-area { padding: 16px; background: white; border-top: 1px solid #f3f4f6; flex-shrink: 0; }
.nexus-input-wrapper {
    display: flex; align-items: center; gap: 8px;
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 9999px;
    padding: 4px 4px 4px 16px; transition: all 0.2s;
}
.nexus-input-wrapper:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.1); }
#nexus-input {
    flex: 1; background: transparent; color: #1f2937; border: none;
    outline: none; font-size: 14px; padding: 8px 0; min-width: 0;
}
#nexus-send { transition: opacity 0.2s; }
#nexus-send:hover { opacity: 0.8; }
.nexus-footer-text { text-align: center; margin-top: 8px; font-size: 10px; color: #9ca3af; }

/* Consent Overlay */
.nexus-consent {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: white; z-index: 10; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 32px 24px; text-align: center;
    transition: opacity 0.3s, visibility 0.3s;
}
.nexus-consent-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.nexus-consent-icon {
    width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; background: #f3f4f6; color: #6b7280; margin-bottom: 16px;
}
.nexus-consent-icon svg { width: 28px; height: 28px; }
.nexus-consent-title { font-size: 18px; font-weight: 700; color: #1f2937; margin: 0 0 12px 0; }
.nexus-consent-text { font-size: 13px; line-height: 1.6; color: #4b5563; margin-bottom: 20px; text-align: left; }
.nexus-consent-text p { margin: 0 0 8px 0; }
.nexus-consent-text a { color: #2563eb; text-decoration: underline; }
.nexus-consent-check {
    display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #374151;
    cursor: pointer; text-align: left; margin-bottom: 16px; line-height: 1.4;
}
.nexus-consent-check input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; }
.nexus-consent-btn {
    width: 100%; padding: 12px; border: none; border-radius: 8px; font-size: 14px;
    font-weight: 600; color: white; background: #2563eb; cursor: pointer; transition: opacity 0.2s;
}
.nexus-consent-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.nexus-consent-btn:not(:disabled):hover { opacity: 0.9; }

/* Area Selection Buttons */
.nexus-area-buttons { display: flex; flex-direction: column; gap: 8px; }
.nexus-area-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 12px;
    background: white; color: #1f2937; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.2s; text-align: left; width: 100%;
}
.nexus-area-btn:hover { background: #f0f9ff; border-color: currentColor; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); color: #1f2937; }
.nexus-area-btn-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }

/* Back to area selection */
.nexus-back-btn {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    width: 100%; padding: 8px 12px; border: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
}
.nexus-back-btn:hover { filter: brightness(0.95); }
.nexus-back-btn svg { flex-shrink: 0; }
