/* AI摘要前端显示样式 - 参考Core AI Power样式 */

.ai-summary-container {
    position: relative;
    padding: 10px;
    margin: 0;
    background: unset;
    box-shadow: inset 0 0 6px rgba(200, 200, 200, 0.6);
    border-radius: 12px;
}

/* 机器人头像
.ai-summary-bot-section {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    z-index: 10;
}

.ai-summary-main-bot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f7f7f9;
    box-shadow: inset 0 -1px 6px 2px rgba(126, 134, 153, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ai-summary-main-bot svg {
    width: 65px;
    height: 54px;
    position: relative;
    top: 5px;
}


.ai-summary-main-bot .bot-eye-left {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    z-index: 20;
    left: 50%;
    top: 50%;
    transform: translate(-15px, -6px);
    pointer-events: none;
}

.ai-summary-main-bot .bot-eye-right {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    z-index: 20;
    left: 50%;
    top: 50%;
    transform: translate(9px, -6px); 
    pointer-events: none;
}
*/

.ai-summary-header {
    display: flex;
    flex-direction: column;
}

.ai-summary-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
}

.ai-summary-title-section {
    flex: 1;
}

.ai-summary-title {
    font-weight: bold;
    font-size: 15px;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.ai-summary-subtitle {
    font-size: 13px;
    margin: 0;
    padding: 0;
    opacity: 0.8;
    line-height: 0;
}

.ai-summary-brand {
    display: flex;
    align-items: center;
}

.ai-summary-brand a {
    text-decoration: none;
    color: #272c38 !important;
    font-size: 12px;
}

/* 内容区域 */
.ai-summary-content {
    background: unset;
    box-shadow: inset 0 0 5px rgba(200, 200, 200, 0.5);
    border-radius: 8px;
    padding: 0;
    margin: 0;
}

.ai-summary-text {
    color: unset;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-weight: 400;
}

/* 打字机动画效果 */
.ai-summary-text.typing::after {
    content: '|';
    color: #4299e1;
    animation: blink-cursor 1s infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 底部操作区域 */
.ai-summary-footer {
    margin: 0;
    padding: 0;
    opacity: 0.8;
    font-size: 13px;
    position: absolute;
    right: 5px;
    bottom: 1px;
    white-space: nowrap;
}

.ai-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 关键词区域 */
.ai-summary-keywords-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-summary-keywords-title {
    color: #64748b !important;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

.ai-summary-keywords-container {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 关键词标签样式 */
.ai-summary-keyword-tag {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: default;
}

.ai-summary-keyword-tag:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* 保留旧的按钮样式作为备用 */
.ai-summary-btn {
    background: #272C38;
    display: inline-block;
    border-radius: 15px;
    padding: 2px 10px;
    font-size: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-summary-btn:hover {
    color: #fff !important;
    background: #1a202c;
}

.ai-summary-settings {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-summary-settings-btn {
    background: transparent;
    color: #a0aec0;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.ai-summary-settings-btn:hover {
    background: #edf2f7;
    color: #718096;
    text-decoration: none;
    transform: rotate(90deg);
}

.ai-summary-link {
    color: #7e8699;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.ai-summary-link:hover {
    color: #718096;
}

/* 加载状态 */
.ai-summary-loading {
    padding: 32px 20px;
    text-align: center;
    color: #718096;
}

.ai-summary-loading .loading-dots {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 10px;
    margin-bottom: 12px;
}

.ai-summary-loading .loading-dots div {
    position: absolute;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4299e1;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.ai-summary-loading .loading-dots div:nth-child(1) {
    left: 8px;
    animation-delay: -0.32s;
}

.ai-summary-loading .loading-dots div:nth-child(2) {
    left: 20px;
    animation-delay: -0.16s;
}

.ai-summary-loading .loading-dots div:nth-child(3) {
    left: 32px;
    animation-delay: 0;
}

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

/* 错误状态 */
.ai-summary-error {
    background: #fed7d7;
    color: #9b2c2c;
    padding: 16px;
    text-align: center;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    margin: 16px 0;
}

.ai-summary-error-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.ai-summary-error-text {
    font-size: 13px;
    margin: 0;
    font-weight: 500;
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .ai-summary-container {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .ai-summary-content {
        background: #2d3748;
    }
    
    .ai-summary-title {
        color: #f7fafc;
    }
    
    .ai-summary-subtitle {
        color: #a0aec0;
    }
    
    .ai-summary-text {
        color: #e2e8f0;
    }
    
    .ai-summary-brand a {
        color: #a0aec0;
    }
    
    .ai-summary-btn {
        background: #f7fafc;
        color: #1a202c;
    }
    
    .ai-summary-btn:hover {
        background: #e2e8f0;
        color: #1a202c !important;
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    
    .ai-summary-text.typing::after {
        animation: none;
        opacity: 1;
    }
    
    .ai-summary-settings-btn:hover {
        transform: none;
    }
    
    .ai-summary-loading .loading-dots div {
        animation: none;
        opacity: 0.6;
    }
}

/* 打印样式 */
@media print {
    .ai-summary-container {
        background: white !important;
        color: black !important;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ai-summary-content {
        background: white !important;
    }
    
    .ai-summary-title,
    .ai-summary-text {
        color: black !important;
    }
    
    .ai-summary-footer,
    .ai-summary-bot-section {
        display: none;
    }
}

/* 覆盖文章内容段落样式 */
.entry-content p {
    margin-bottom: 10px !important;
}

