#ai-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 50px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: all 0.2s ease;
}

#ai-floating-btn:hover {
    transform: scale(1.1);
}

#ai-chat-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    backdrop-filter: blur(10px);
    background: rgba(17,24,39,0.95);
    color: white;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 100000;
}

#ai-chat-panel.open {
    right: 0;
}

#ai-chat-header {
    padding: 7.5px 30px;
    background: #1f2937;
    font-weight: bold;
    display: flex;
    justify-content: flex-end;
	font-size: 16px;
    letter-spacing: 0.5px;
}

#ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-size: 14px;
	white-space: pre-wrap;
}

#ai-chat-input {
    padding: 10px;
    background: #1f2937;
}

#ai-chat-input textarea {
    width: 96%;
    height: 60px;
    resize: none;
    background: #111827;
    color: white;
    border: 1px solid #374151;
    padding: 8px;
}

#ai-chat-input button {
    margin-top: 5px;
    width: 100%;
    padding: 8px;
    background: #2575fc;
    border: none;
    color: white;
    cursor: pointer;
}
#ai-close{font-size:150%;font-weight:bold;}
#ai-close:hover{cursor:pointer;scale:1.2;}
#ai-loading {
    padding: 10px;
}

.ai-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background: #60a5fa;
    border-radius: 50%;
    animation: ai-bounce 1.4s infinite ease-in-out both;
}

.ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
.ai-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    margin-bottom: 10px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
	word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ai-bubble.user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.ai-bubble.ai {
    background: #374151;
    color: white;
}
.ai-code {
    background: #111;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
}


.ai_modal_overlay{
	position:fixed;
	inset:0;
	background:rgba(0,0,0,0.6);
	display:none;
	align-items:center;
	justify-content:center;
	z-index:99999;
}

.ai_modal{
	background:#fff;
	width:90%;
	max-width:1100px;
	max-height:85vh;
	border-radius:10px;
	box-shadow:0 20px 60px rgba(0,0,0,0.4);
	display:flex;
	flex-direction:column;
	overflow:hidden;
	animation:aiModalIn .2s ease;
}

@keyframes aiModalIn{
	from{transform:translateY(20px);opacity:0}
	to{transform:translateY(0);opacity:1}
}

.ai_modal_header{
	padding:15px 20px;
	border-bottom:1px solid #eee;
	display:flex;
	justify-content:space-between;
	align-items:center;
	background:#f8f8f8;
}

.ai_modal_header h2{
	margin:0;
	font-size:18px;
}

.ai_modal_close{
	cursor:pointer;
	font-size:20px;
	border:none;
	background:none;
}

.ai_modal_body{
	padding:20px;
	overflow:auto;
}

.ai_modal_footer{
	padding:15px 20px;
	border-top:1px solid #eee;
	text-align:right;
	background:#fafafa;
}

.ai_btn{
	background:#111;
	color:#fff;
	border:none;
	padding:8px 14px;
	border-radius:6px;
	cursor:pointer;
	font-size:13px;
}
.ai_btn:hover{
	opacity:.85;
}