
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c41e3a;
    --primary-dark: #a01830;
    --secondary-color: #1a5fb4;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.znwd{
    margin-left: 20px;
    font-weight: normal;
}
/* 内容布局 */
.content-wrapper {
    display: flex;
    gap: 20px;
}

/* 左侧聊天区占70% */
.chat-section {
    flex: 7;
    min-width: 0;
}

/* 右侧边栏占30% */
.sidebar-section {
    flex: 3;
    min-width: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #166FC6;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #166FC6;
}

.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-block;
}

.quick-links li {
    float: left;
}

.quick-links a {
    display: block;
    padding: 12px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    width: 100px;
}

.quick-links a:hover {
    color: #166FC6;
}

/* 常见问题列表 */
.faq-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-links li {
    margin-bottom: 10px;
}

.faq-links li:last-child {
    margin-bottom: 0;
}

.faq-links a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    background: var(--bg-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.faq-links a::before {
    content: '›';
    position: absolute;
    left: 8px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: bold;
}

.faq-links a:hover {
    background: #166FC6;
    color: var(--white);
    transform: translateX(5px);
}

.faq-links a:hover::before {
    color: var(--white);
}

/* 多个sidebar卡片间距 */
.sidebar-card + .sidebar-card {
    margin-top: 20px;
}


/* 主要内容区 */
.main {
    padding: 30px 0;
}

/* 区块标题 */
.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.title-icon {
    font-size: 24px;
}

/* 智能问答对话框 */

.chat-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-messages {
    height: 444px;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    margin-right: 12px;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    margin-left: 12px;
}

.message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.7;
}

.bot-message .message-content {
    background: #F5F5F9;
    border: 1px solid var(--border-color);
    width: 70%;
}

.user-message .message-content {
    background: var(--secondary-color);
    color: var(--white);
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.chat-input-area {
    position: relative;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: var(--white);
}

.chat-input {
    width: 100%;
    min-height: 80px;
    max-height: 150px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 80px 12px 18px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.chat-input:focus {
    border-color: #166FC6;
}

.send-btn {
    position: absolute;
    right: 25px;
    bottom: 25px;
    background: #166FC6;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #1259a8;
}

.quick-questions {
    padding: 12px 15px;
    background: #fafafa;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    border-color: #166FC6;
    color: #166FC6;
}

/* 打字动画 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #166FC6;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.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% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        font-size: 13px;
        padding: 6px 12px;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar-section {
        order: -1;
    }

    .sidebar-card {
        position: static;
    }

    .chat-messages {
        height: 300px;
    }

    .message-content {
        max-width: 85%;
    }

    .quick-questions {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* 政务服务  */
.new-list li {
    border-bottom: 1px solid #EDEDED;
    padding-bottom: 15px;
    padding-top: 20px;
    position: relative;
}
.bot-message .message-content ul li{
    position: relative;
    border-bottom: 1px solid #E1E1E3;
    padding: 5px 0;
}
.new-title {
    font-size: 14px;
    letter-spacing: 0.32px;
    font-weight: 700;
    line-height: 26px;
}
.new-list li {
    border-bottom: 1px solid #EDEDED;
    padding-bottom: 15px;
    padding-top: 20px;
    position: relative;
}
.new-other {
    letter-spacing: 0.32px;
    line-height: 30px;
    font-size: 14px;
    color: #666666;
}
.service_deal{
						display: block;
						position: absolute;
						right: 0;
						bottom: 4px;
						border-top: none;
						background: #eaeef6;
						border: 1px solid #a9b9d9;
						color: #015293;
						font-size: 0.875em;
						border-radius: 3px;
						padding: 5px 10px;
						-webkit-transition: background-color 400ms;
						transition: background-color 400ms;
					}
.service_deal:hover{
						background:#015293;
						color:#fff;
						border: 1px solid #015293;
					}


/* 滚动条美化 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
