/**
 * AiTouTou 助手嵌入样式
 * 包含四种模板风格：卡片式、气泡式、极简式、对话式
 */

/* 隐藏页面标题 */
.entry-head,
.entry-title {
    display: none !important;
}

/* 隐藏页面标题下方的横线 */
.entry-title::after,
.page-title::after,
.article-title::after,
h1::after,
h2::after,
.title::after,
.section-title::after,
.widget-title::after,
.block-title::after {
    display: none !important;
}

/* 隐藏可能的横线装饰元素 */
.divider,
.separator,
.wp-block-separator,
hr {
    display: none !important;
}

/* ==================== 基础样式 ==================== */
.aitoutou-assistant-embed {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-sizing: border-box;
}

.aitoutou-assistant-embed *,
.aitoutou-assistant-embed *::before,
.aitoutou-assistant-embed *::after {
    box-sizing: inherit;
}

/* 错误提示 */
.aitoutou-assistant-error {
    padding: 12px 16px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
}

/* 通用图标样式 */
.assistant-embed-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* 通用消息样式 */
.assistant-message {
    display: flex;
    margin-bottom: 12px;
    animation: messageFadeIn 0.3s ease;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-message-user {
    justify-content: flex-end;
}

.assistant-message-user .assistant-message-content {
    background: #0073aa;
    color: #fff;
    border-radius: 18px 18px 4px 18px;
}

.assistant-message-assistant {
    justify-content: flex-start;
}

.assistant-message-assistant .assistant-message-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    align-self: flex-start;
}

.assistant-message-assistant .assistant-message-content {
    background: #f5f5f5;
    color: #333;
    border-radius: 4px 18px 18px 18px;
}

.assistant-message-content {
    max-width: 80%;
    padding: 10px 14px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
}

.assistant-message-content p {
    margin: 0 0 8px;
}

.assistant-message-content p:last-child {
    margin-bottom: 0;
}

.assistant-message-content pre {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
}

.assistant-message-content code {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 13px;
}

.assistant-message-content pre code {
    background: none;
    padding: 0;
}

.assistant-message-content :not(pre) > code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 加载动画 */
.assistant-message-loading {
    justify-content: flex-start;
}

.assistant-loading-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 4px 18px 18px 18px;
}

.assistant-loading-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: loadingDot 1.4s infinite ease-in-out both;
}

.assistant-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.assistant-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 错误消息 */
.assistant-message-error .assistant-message-content {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

/* ==================== 思考过程样式 ==================== */
.assistant-thinking {
    margin-bottom: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.thinking-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #e9ecef;
    font-size: 13px;
    color: #495057;
}

.thinking-icon {
    margin-right: 6px;
    font-size: 14px;
}

.thinking-title {
    font-weight: 500;
}

.thinking-content {
    padding: 12px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* ==================== 卡片式模板 ==================== */
.aitoutou-assistant-card {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eee;
}

.aitoutou-assistant-card .assistant-embed-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
}

.aitoutou-assistant-card .assistant-embed-icon {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.aitoutou-assistant-card .assistant-embed-title {
    margin-left: 12px;
    font-size: 16px;
    font-weight: 600;
}

.aitoutou-assistant-card .assistant-embed-messages {
    height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: #fafafa;
}

.aitoutou-assistant-card .assistant-embed-input-area {
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #eee;
    gap: 8px;
}

.aitoutou-assistant-card .assistant-embed-textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s;
}

.aitoutou-assistant-card .assistant-embed-textarea:focus {
    border-color: #5DADE2;
}

.aitoutou-assistant-card .assistant-embed-send {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.aitoutou-assistant-card .assistant-embed-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.aitoutou-assistant-card .assistant-embed-send:active {
    transform: scale(0.95);
}

/* ==================== 气泡式模板 ==================== */
.aitoutou-assistant-bubble {
    position: fixed;
    z-index: 9999;
}

.aitoutou-assistant-bubble.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.aitoutou-assistant-bubble.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.aitoutou-assistant-bubble.position-bottom-right .assistant-bubble-panel {
    right: 0;
    bottom: 80px;
}

.aitoutou-assistant-bubble.position-bottom-left .assistant-bubble-panel {
    left: 0;
    bottom: 80px;
}

.aitoutou-assistant-bubble .assistant-bubble-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    box-shadow: 0 4px 20px rgba(93, 173, 226, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.aitoutou-assistant-bubble .assistant-bubble-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(93, 173, 226, 0.5);
}

.aitoutou-assistant-bubble .assistant-bubble-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.aitoutou-assistant-bubble .assistant-bubble-panel {
    position: absolute;
    width: 360px;
    height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: none;
    flex-direction: column;
    border: 1px solid #eee;
}

.aitoutou-assistant-bubble.is-open .assistant-bubble-panel {
    display: flex;
    animation: bubblePanelIn 0.3s ease;
}

@keyframes bubblePanelIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.aitoutou-assistant-bubble .assistant-embed-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    flex-shrink: 0;
}

.aitoutou-assistant-bubble .assistant-embed-icon {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.aitoutou-assistant-bubble .assistant-embed-title {
    margin-left: 10px;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.aitoutou-assistant-bubble .assistant-bubble-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}

.aitoutou-assistant-bubble .assistant-bubble-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.aitoutou-assistant-bubble .assistant-embed-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fafafa;
}

.aitoutou-assistant-bubble .assistant-embed-input-area {
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #eee;
    gap: 8px;
    flex-shrink: 0;
}

.aitoutou-assistant-bubble .assistant-embed-textarea {
    flex: 1;
    min-height: 40px;
    max-height: 100px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s;
}

.aitoutou-assistant-bubble .assistant-embed-textarea:focus {
    border-color: #5DADE2;
}

.aitoutou-assistant-bubble .assistant-embed-send {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.aitoutou-assistant-bubble .assistant-embed-send:hover {
    transform: scale(1.05);
}

/* ==================== 极简式模板 ==================== */
.aitoutou-assistant-minimal {
    width: 100%;
    max-width: 100%;
}

.aitoutou-assistant-minimal .assistant-minimal-input-area {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.aitoutou-assistant-minimal .assistant-minimal-input-area:focus-within {
    border-color: #5DADE2;
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.15);
}

.aitoutou-assistant-minimal .assistant-minimal-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.aitoutou-assistant-minimal .assistant-minimal-input::placeholder {
    color: #999;
}

.aitoutou-assistant-minimal .assistant-minimal-send {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.aitoutou-assistant-minimal .assistant-minimal-send:hover {
    transform: scale(1.05);
}

.aitoutou-assistant-minimal .assistant-minimal-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.aitoutou-assistant-minimal .assistant-minimal-response {
    margin-top: 16px;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    padding: 16px;
}

.aitoutou-assistant-minimal .assistant-minimal-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aitoutou-assistant-minimal .assistant-minimal-response .assistant-message {
    margin-bottom: 0;
}

.aitoutou-assistant-minimal .assistant-minimal-response .assistant-message-content {
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.aitoutou-assistant-minimal .assistant-minimal-response .assistant-message-user .assistant-message-content {
    background: #0073aa;
    color: #fff;
}

.aitoutou-assistant-minimal .assistant-minimal-response .assistant-message-assistant .assistant-message-content {
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
}

.aitoutou-assistant-minimal .assistant-minimal-response::-webkit-scrollbar {
    width: 6px;
}

.aitoutou-assistant-minimal .assistant-minimal-response::-webkit-scrollbar-track {
    background: transparent;
}

.aitoutou-assistant-minimal .assistant-minimal-response::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.aitoutou-assistant-minimal .assistant-minimal-response::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ==================== 对话式模板 ==================== */
.aitoutou-assistant-chat {
    width: 100%;
    max-width: 100%;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.aitoutou-assistant-chat .assistant-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    flex-shrink: 0;
}

.aitoutou-assistant-chat .assistant-chat-info {
    display: flex;
    align-items: center;
}

.aitoutou-assistant-chat .assistant-embed-icon {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.aitoutou-assistant-chat .assistant-chat-title {
    margin-left: 12px;
    font-size: 16px;
    font-weight: 600;
}

.aitoutou-assistant-chat .assistant-chat-clear {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.aitoutou-assistant-chat .assistant-chat-clear:hover {
    background: rgba(255, 255, 255, 0.3);
}

.aitoutou-assistant-chat .assistant-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.aitoutou-assistant-chat .assistant-chat-input-area {
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #eee;
    gap: 12px;
    flex-shrink: 0;
}

.aitoutou-assistant-chat .assistant-embed-textarea {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s;
}

.aitoutou-assistant-chat .assistant-embed-textarea:focus {
    border-color: #5DADE2;
}

.aitoutou-assistant-chat .assistant-embed-send {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.aitoutou-assistant-chat .assistant-embed-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.4);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 480px) {
    .aitoutou-assistant-card {
        max-width: 100%;
    }

    .aitoutou-assistant-bubble .assistant-bubble-panel {
        width: calc(100vw - 40px);
        height: 60vh;
        max-height: 500px;
    }

    .aitoutou-assistant-chat {
        max-width: 100%;
        height: 400px;
    }

    .aitoutou-assistant-minimal {
        max-width: 100%;
    }
}

/* ==================== 滚动条样式 ==================== */
.aitoutou-assistant-embed ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.aitoutou-assistant-embed ::-webkit-scrollbar-track {
    background: transparent;
}

.aitoutou-assistant-embed ::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.aitoutou-assistant-embed ::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ==================== 极简新风格模板 ==================== */
.aitoutou-assistant-clean {
    width: 98%;
    max-width: 98%;
    /* 取消高度限制，让内容决定高度 */
    min-height: auto;
    height: auto;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.clean-container {
    background: linear-gradient(180deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(93, 173, 226, 0.15);
    border: 1px solid #e1f0fa;
    overflow: visible;
    transition: box-shadow 0.3s ease;
    /* 取消高度限制 */
    height: auto;
    min-height: auto;
}

.clean-container:hover {
    box-shadow: 0 8px 32px rgba(93, 173, 226, 0.25);
}

/* 头部区域 */
.clean-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #e8f4fc 0%, #d6ebf8 100%);
    border-bottom: 1px solid #c5e3f5;
}

.clean-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #fff;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.clean-header-icon:hover {
    transform: scale(1.05);
}

.clean-header-info {
    margin-left: 16px;
    flex: 1;
}

.clean-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.clean-header-subtitle {
    font-size: 13px;
    color: #5DADE2;
    margin-top: 2px;
    font-weight: 500;
}

/* 输入区域 */
.clean-input-section {
    padding: 20px 24px;
    background: linear-gradient(180deg, #f0f8ff 0%, #e8f4fc 100%);
}

.clean-input-wrapper {
    display: flex;
    align-items: flex-end;
    background: #ffffff;
    border: 1px solid #b8dcf3;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(93, 173, 226, 0.1);
}

.clean-input-wrapper:focus-within {
    background: #fff;
    border-color: #5DADE2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.2);
}

.clean-textarea {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    resize: none;
    outline: none;
}

.clean-textarea::placeholder {
    color: #aaa;
}

.clean-send-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 4px;
}

.clean-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.4);
}

.clean-send-btn:active {
    transform: scale(0.95);
}

.clean-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 参考案例区域 */
.clean-examples-section {
    padding: 0 24px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
    position: relative;
}

.clean-examples-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.clean-examples-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c5aa0;
}

.clean-examples-count {
    font-size: 12px;
    color: #5DADE2;
    background: #e8f4fc;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #c5e3f5;
}

/* 滚筒式轮播容器 */
.clean-examples-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
}

/* 左右渐变遮罩 - 中间到两边渐变半透明 */
.clean-examples-carousel::before,
.clean-examples-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.clean-examples-carousel::before {
    left: 0;
    background: linear-gradient(to right, #f5fbff 0%, rgba(245,251,255,0.8) 30%, rgba(245,251,255,0) 100%);
}

.clean-examples-carousel::after {
    right: 0;
    background: linear-gradient(to left, #f5fbff 0%, rgba(245,251,255,0.8) 30%, rgba(245,251,255,0) 100%);
}

/* 滚动轨道 */
.clean-examples-track {
    display: flex;
    gap: 12px;
    animation: carouselScroll 20s linear infinite;
    width: fit-content;
}

/* 悬停时暂停动画 */
.clean-examples-carousel:hover .clean-examples-track {
    animation-play-state: paused;
}

/* 滚筒式滚动动画 */
@keyframes carouselScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 复制一份内容实现无缝滚动 */
.clean-examples-track.duplicated {
    animation: none;
}

.clean-example-item {
    flex-shrink: 0;
    width: 200px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border: 1px solid #c5e3f5;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clean-example-item:hover {
    background: linear-gradient(135deg, #ffffff 0%, #e1f0fa 100%);
    border-color: #5DADE2;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(93, 173, 226, 0.2);
}

.clean-example-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.clean-example-item:hover .clean-example-icon {
    transform: scale(1.1);
}

.clean-example-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 6px;
}

.clean-example-text {
    font-size: 12px;
    color: #5a7a9a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 保留旧的滚动样式作为回退 */
.clean-examples-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.clean-examples-scroll::-webkit-scrollbar {
    height: 6px;
}

.clean-examples-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.clean-examples-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.clean-examples-scroll::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 消息展示区域 */
.clean-messages {
    display: none;
    /* 取消高度限制，让内容全部展示 */
    max-height: none;
    overflow-y: visible;
    padding: 20px 24px;
    background: linear-gradient(180deg, #f0f8ff 0%, #e8f4fc 100%);
    border-top: 1px solid #c5e3f5;
}

.clean-messages.has-messages {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clean-messages .assistant-message {
    margin-bottom: 16px;
}

.clean-messages .assistant-message:last-child {
    margin-bottom: 0;
}

.clean-messages .assistant-message-content {
    background: #ffffff;
    border: 1px solid #d0e8f7;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(93, 173, 226, 0.08);
}

.clean-messages .assistant-message-user .assistant-message-content {
    background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
    color: #fff;
    border: none;
}

.clean-messages .assistant-message-assistant .assistant-message-content {
    background: #fff;
    color: #333;
}

/* 加载动画 */
.clean-messages .assistant-loading-dots {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .aitoutou-assistant-clean {
        max-width: 100%;
    }
    
    .clean-container {
        border-radius: 12px;
    }
    
    .clean-header {
        padding: 16px 20px;
    }
    
    .clean-header-icon {
        width: 40px;
        height: 40px;
    }
    
    .clean-header-title {
        font-size: 16px;
    }
    
    .clean-input-section,
    .clean-examples-section {
        padding: 16px 20px;
    }
    
    .clean-example-item {
        width: 160px;
        padding: 12px;
    }
    
    .clean-messages {
        padding: 16px 20px;
        max-height: none;
    }
}

@media (max-width: 480px) {
    .clean-header {
        padding: 14px 16px;
    }
    
    .clean-input-section,
    .clean-examples-section {
        padding: 14px 16px;
    }
    
    .clean-example-item {
        width: 140px;
    }
    
    .clean-example-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .clean-example-title {
        font-size: 13px;
    }
    
    .clean-example-text {
        font-size: 11px;
    }
}

/* 固定位置样式 */
.aitoutou-assistant-clean.position-bottom-right,
.aitoutou-assistant-clean.position-bottom-left {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
    max-width: 400px;
}

.aitoutou-assistant-clean.position-bottom-right {
    right: 20px;
}

.aitoutou-assistant-clean.position-bottom-left {
    left: 20px;
}

.aitoutou-assistant-clean.position-bottom-right .clean-examples-section,
.aitoutou-assistant-clean.position-bottom-left .clean-examples-section {
    display: none;
}

/* ==================== 位置类 ==================== */
.aitoutou-assistant-card.position-bottom-right,
.aitoutou-assistant-card.position-bottom-left {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

.aitoutou-assistant-card.position-bottom-right {
    right: 20px;
}

.aitoutou-assistant-card.position-bottom-left {
    left: 20px;
}

.aitoutou-assistant-minimal.position-bottom-right,
.aitoutou-assistant-minimal.position-bottom-left {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

.aitoutou-assistant-minimal.position-bottom-right {
    right: 20px;
}

.aitoutou-assistant-minimal.position-bottom-left {
    left: 20px;
}

.aitoutou-assistant-chat.position-bottom-right,
.aitoutou-assistant-chat.position-bottom-left {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

.aitoutou-assistant-chat.position-bottom-right {
    right: 20px;
}

.aitoutou-assistant-chat.position-bottom-left {
    left: 20px;
}
