/* ===========================
   智能计算器 - 专用样式
   =========================== */

/* 欢迎区域 */
.smart-welcome {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted, #9CA3AF);
}
.smart-welcome-icon {
    font-size: 2.5rem;
    color: var(--primary, #2563EB);
    margin-bottom: 12px;
    opacity: 0.6;
}
.smart-welcome p {
    font-size: var(--text-sm, 14px);
    margin-bottom: 16px;
}

/* 示例提示 */
.smart-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}
.smart-example-chip {
    padding: 10px 14px;
    background: var(--bg-main, #F9FAFB);
    border: 1px solid var(--border, #E5E7EB);
    border-radius: var(--radius-lg, 12px);
    font-size: var(--text-xs, 12px);
    color: var(--text-secondary, #6B7280);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
}
.smart-example-chip:hover {
    border-color: var(--primary, #2563EB);
    color: var(--primary, #2563EB);
    background: rgba(37,99,235,0.04);
}

/* 对话区域 */
.smart-chat-area {
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
    padding: var(--spacing-md, 16px);
    background: var(--bg-main, #F9FAFB);
    border: 1px solid var(--border, #E5E7EB);
    border-radius: var(--radius-lg, 12px);
    margin-bottom: var(--spacing-md, 16px);
}

/* 消息气泡 */
.smart-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: smartFadeIn 0.3s ease;
}
@keyframes smartFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.smart-msg-user {
    justify-content: flex-end;
}

.smart-msg-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    color: #fff;
    font-size: 16px;
}

.smart-msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-lg, 12px);
    font-size: var(--text-sm, 14px);
    line-height: 1.7;
    word-break: break-word;
}

.smart-bubble-user {
    background: var(--primary, #2563EB);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.smart-bubble-ai {
    background: var(--bg-card, #FFFFFF);
    color: var(--text-primary, #111827);
    border: 1px solid var(--border, #E5E7EB);
    border-bottom-left-radius: 4px;
}

.smart-msg-content {
    white-space: pre-wrap;
}

.smart-msg-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border, #E5E7EB);
}

.smart-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--text-muted, #9CA3AF);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.smart-copy-btn:hover {
    border-color: var(--primary, #2563EB);
    color: var(--primary, #2563EB);
}

/* 系统消息 */
.smart-msg-system {
    text-align: center;
    padding: 8px 16px;
    font-size: var(--text-xs, 12px);
    color: var(--text-muted, #9CA3AF);
    background: rgba(245,158,11,0.06);
    border-radius: var(--radius-md, 8px);
}
.smart-msg-error {
    color: #DC2626;
    background: rgba(220,38,38,0.06);
}

/* 验证进度条 */
.smart-verify-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: var(--spacing-md, 16px);
    background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(124,58,237,0.04));
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-lg, 12px);
}

.smart-verify-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-md, 8px);
    font-size: var(--text-xs, 12px);
    font-weight: 600;
    color: var(--text-muted, #9CA3AF);
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border, #E5E7EB);
    transition: all 0.3s;
    white-space: nowrap;
}

.smart-verify-icon {
    font-size: 14px;
}

.smart-verify-loading {
    border-color: var(--primary, #2563EB);
    color: var(--primary, #2563EB);
    animation: smartPulse 1.5s infinite;
}
.smart-verify-loading .smart-verify-icon {
    animation: smartSpin 1s linear infinite;
}

.smart-verify-done {
    border-color: rgba(22,163,74,0.3);
    color: var(--success, #16A34A);
    background: rgba(22,163,74,0.06);
}

.smart-verify-error {
    border-color: rgba(220,38,38,0.3);
    color: #DC2626;
    background: rgba(220,38,38,0.06);
}

@keyframes smartPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes smartSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.smart-verify-arrow {
    color: var(--text-muted, #9CA3AF);
    font-size: 16px;
}

/* 输入区域 */
.smart-input-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smart-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: var(--radius-lg, 12px);
    font-size: var(--text-sm, 14px);
    line-height: 1.6;
    resize: vertical;
    min-height: 60px;
    max-height: 200px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--bg-card, #FFFFFF);
    color: var(--text-primary, #111827);
}
.smart-input:focus {
    outline: none;
    border-color: var(--primary, #2563EB);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.smart-input::placeholder {
    color: var(--text-muted, #9CA3AF);
}

.smart-input-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.smart-send-btn {
    min-width: 120px;
}

/* 响应式 */
@media (max-width: 768px) {
    .smart-chat-area {
        max-height: 450px;
    }
    .smart-msg-bubble {
        max-width: 92%;
    }
    .smart-verify-bar {
        flex-direction: column;
        gap: 6px;
    }
    .smart-verify-arrow {
        transform: rotate(90deg);
    }
    .smart-verify-step {
        width: 100%;
        justify-content: center;
    }
}
