/* ---- 插件整体容器和背景 (模仿 Accio) ---- */
#mfp-ai-search-wrapper.mfp-ai-modern-design {
    box-shadow: none; 
    padding: 60px 20px; 
    text-align: center;
    max-width: 900px;
    margin: 40px auto;
    /* Accio 的背景渐变 */
    background: linear-gradient(180deg, #e6fffa, #fff);
    border-radius: 12px;
}

/* ---- 顶部标题/Logo 样式 (Accio Logo & Slogan) ---- */
.mfp-ai-header {
    margin-bottom: 40px;
}
.mfp-ai-logo {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 5px;
    letter-spacing: -1px;
    color: #1a1a1a; 
}


.mfp-ai-slogan {
    font-size: 24px;
    color: #333;
    font-weight: 500;
    margin: 0;
}


/* ---- 主输入框容器样式 (还原 Accio 流线型) ---- */
.mfp-ai-input-container {
    display: flex;
    align-items: flex-start; /* 保持图标对齐到顶部 */
    max-width: 700px;
    height: 150px;
    margin: 0 auto 30px;
    padding: 15px 20px;
    background-color: white;
    border-radius: 20px; /* 流线型圆角 */
    border: 1px solid transparent;
    /* 增加一个细微的绿色高光 */
    background-image: linear-gradient(white, white), radial-gradient(circle at top left, #a0ffe0, #00d4ff);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* ---- 附件图标样式 (Accio 样式) ---- */
.mfp-ai-attachment-icon {
    display: inline-flex;
    margin-right: 15px;
    cursor: pointer;
    color: #999;
    padding-top: 5px; 
}
.mfp-ai-attachment-icon svg {
    width: 20px;
    height: 20px;
    transform: rotate(45deg); 
}

/* ---- 输入框样式 (Textarea 兼容) ---- */
#mfp-ai-question {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 5px 0; 
    color: #333;
    min-height: 24px; /* 适应单行 */
    height: auto !important; 
    line-height: 1.5;
    overflow-y: hidden; 
    resize: none; 
    background: transparent; /* 确保背景色透明，继承父级容器的渐变 */
    box-sizing: border-box;
}
#mfp-ai-question::placeholder {
    color: #aaa;
    font-style: italic;
}

/* ---- 提交按钮 (圆角箭头) 样式 ---- */
#mfp-ai-submit {
    background-color: #ccc; 
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%; 
    transition: all 0.2s;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    box-shadow: none;
    margin-top: 5px; 
}
/* 激活时的绿色渐变 */
#mfp-ai-submit:not(:disabled) {
    background: linear-gradient(45deg, #a0ffe0, #00d4ff);
    box-shadow: 0 4px 10px rgba(0, 212, 255, 0.3);
}
#mfp-ai-submit:disabled {
    cursor: not-allowed;
    opacity: 1; 
}


/* ---- 下方功能按钮样式 ---- */
.mfp-ai-action-buttons-wrapper {
    max-width: 800px;
    margin: 0 auto;
}
.mfp-ai-action-buttons {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 10px; 
    margin: 10px auto; 
    padding: 0 5%;
}

.mfp-ai-action-btn {
    display: inline-flex; 
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap; 
}
.mfp-ai-action-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

/* ---- 加载状态和动画 (英文 Thinking...) ---- */
#mfp-ai-status {
    display: inline-block !important; 
    margin-top: 25px !important;
    background: none !important;
    border: 1px solid #00d4ff !important;
    color: #00d4ff !important;
    padding: 8px 25px !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3); 
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.03); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ---- 回答区域 (提升可读性 - 博客样式) ---- */
#mfp-ai-answer {
    margin: 30px auto;
    padding: 20px;
    background-color: white; 
    border: 1px solid #eee;
    border-radius: 12px;
    min-height: 50px;
    line-height: 1.6;
    max-width: 700px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    color: #333;
}
/* 强化排版 */
#mfp-ai-answer h1, #mfp-ai-answer h2, #mfp-ai-answer h3 {
    font-weight: 600; 
    color: #1a1a1a;
    margin-top: 1.5em;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
}
#mfp-ai-answer strong {
    color: #0073aa; 
}
#mfp-ai-answer ul, #mfp-ai-answer ol {
    margin-left: 20px;
    padding-left: 0;
    list-style-position: inside; 
}
#mfp-ai-answer li {
    margin-bottom: 5px;
}

/* WhatsApp 链接和错误提示 */
.mfp-ai-whatsapp-link {
    display: block;
    margin-top: 20px;
    padding: 10px;
    background-color: #25D366; 
    color: white !important;
    font-weight: bold;
    text-align: center;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background-color 0.2s;
}
.mfp-ai-error {
    color: #a94442;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    font-weight: bold;
}

/* 自适应性优化 */
@media (max-width: 768px) {
    .mfp-ai-input-container {
        padding: 10px 15px;
    }
    .mfp-ai-action-buttons {
        gap: 8px;
    }
    .mfp-ai-action-buttons {
        justify-content: space-around;
        gap: 5px 5px;
    }
}