#search-assistant-wrapper {
    position: fixed;
    top: 25%; /* بالاتر از وسط صفحه */
    right: 20px;
    transform: translateY(-50%);
    z-index: 10000;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

#search-assistant-btn {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

#search-assistant-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

.assistant-label {
    color: #333;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#search-assistant-wrapper:hover .assistant-label {
    color: #667eea;
}

#chat-window {
    display: none;
    position: fixed;
    top: 25%;
    right: 120px;
    transform: translateY(-50%);
    width: 360px;
    height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.22);
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

#chat-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}

#close-chat:hover {
    background: rgba(255,0,0,0.3);
}

#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9fb;
    font-size: 15.5px;
    line-height: 1.6;
}

#chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background: white;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 15px;
}

#chat-input-area button {
    margin-left: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
}

.result-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    margin: 12px 0;
    padding: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.result-card:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.result-card img {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    margin-left: 12px;
    border: 1px solid #eee;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.result-card a {
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    font-size: 17px;
}