/* 西城家园智能体 - 居民端v7样式文件 */

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 打字动画 */
.typing-indicator span {
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { 
    animation-delay: 0.2s; 
}

.typing-indicator span:nth-child(3) { 
    animation-delay: 0.4s; 
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* 消息进入动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-animate {
    animation: slideIn 0.3s ease-out;
}

/* 滚动条样式 */
.main-content::-webkit-scrollbar {
    width: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

/* 卡片滑动容器样式 */
.agents-scroll-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 消息气泡样式 */
.message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 20px;
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e7ff;
}

.message-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 56px);
}

.message-bubble {
    background: white;
    border-radius: 16px;
    border-top-left-radius: 4px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-bubble.user {
    background: linear-gradient(135deg, #8b7dd8 0%, #a89cd9 100%);
    color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.message-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.message-time {
    font-size: 11px;
    color: #9ca3af;
}

.message-body {
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

/* 快捷回复按钮 */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-reply-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* 卡片展示样式 */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.info-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.info-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 4px;
}

.info-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* 加载状态 */
.loading-dots {
    display: flex;
    gap: 4px;
    padding: 12px 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: #8b7dd8;
    border-radius: 50%;
    animation: loadingBounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* 通知横幅 */
.notification-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 20px 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    color: #b45309;
    font-size: 16px;
}

.notification-text {
    flex: 1;
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #b45309;
    cursor: pointer;
    padding: 4px;
}

/* 功能卡片网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px;
    margin-top: 16px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.feature-icon.purple {
    background: linear-gradient(135deg, #8b7dd8 0%, #a89cd9 100%);
}

.feature-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.feature-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.feature-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

/* 响应式适配 */
@media (max-width: 380px) {
    .agent-card {
        min-width: 100px;
        padding: 14px 12px;
    }
    
    .agent-avatar {
        width: 56px;
        height: 56px;
    }
    
    .agent-name {
        font-size: 13px;
    }
    
    .agent-role {
        font-size: 10px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 可以在这里添加深色模式样式 */
}

