﻿* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

body {
	background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
	color: #333;
	line-height: 1.6;
	min-height: 100vh;
}
.fa-robot {
	display: none!important;
}
.main-content {
	overflow: hidden;
	max-height: 867px;
	max-width: 1300px;
	margin: 30px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 15px;
}

.chat-container {
	max-height: 867px;
	background: white;
	border-radius: 6px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.chat-header {
	background: linear-gradient(135deg, #5479F1 0%, #3498db 100%);
	color: white;
	padding: 20px;
	display: flex;
	align-items: center;
}

.assistant-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 15px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
	background: url(../images/qarobot.jpg) no-repeat top center;
	background-size: 60px 60px;
}

.assistant-avatar i {
	font-size: 28px;
	color: var(--primary);
}

.assistant-info h2 {
	font-size: 20px;
	margin-bottom: 5px;
}

.assistant-info p {
	opacity: 0.9;
	font-size: 14px;
}

.chat-messages {
	height: 625px;
	padding: 20px;
	overflow-y: auto;
	background: #fafcff;
}

.message {
	margin-bottom: 25px;
	display: flex;
	align-items: flex-start;
}

.user-message {
	flex-direction: row-reverse;
}

.message-avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin: 0 12px;
}

.assistant-avatar-small {
	color: white;
	background: url(../images/qarobot.jpg) center center;
	background-size: 50px 50px;
	border: 1px solid #e1e8f0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-avatar-small {
	background: var(--user-avatar);
	color: white;
}

.message-content {
	max-width: calc(100% - 80px);
}

.message-bubble {
	padding: 14px 18px;
	border-radius: 18px;
	position: relative;
	line-height: 1.5;
	font-size: 15px;
}

.assistant-bubble {
	background: white;
	border: 1px solid #e1e8f0;
	border-radius: 4px 18px 18px 18px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.assistant-bubble li{
	line-height: 30px;
}
.assistant-bubble li a img{
	width: 20px;
}
.assistant-bubble em{
	font-size: 12px;
	font-style: normal;
	color: #999;
}

.message-bubble h4 {
	margin-bottom: 10px;
	font-size: 18px;
}

.message-bubble h4 img {
	width: 20px;
	margin-right: 10px;
	vertical-align: text-top;
}

.user-bubble {
	background: #5479f1;
	color: white;
	border-radius: 18px 18px 4px 18px;
}

.user-avatar-small {
	display: none;
}

.message-time {
	font-size: 12px;
	color: #95a5a6;
	margin-top: 5px;
	text-align: right;
}

.chat-input {
	padding: 20px;
	background: white;
	border-top: 1px solid #edf2f7;
	display: flex;
	align-items: center;
}

.chat-input textarea {
	flex: 1;
	padding: 12px 15px;
	border: 1px solid #e1e8f0;
	border-radius: 8px;
	resize: none;
	height: 50px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.chat-input textarea:focus {
	outline: none;
	border-color: var(--secondary);
	box-shadow: 0 0 0 2px rgba(45, 138, 199, 0.2);
}

.chat-input button {
	background: #5479f1;
	color: white;
	border: none;
	border-radius: 8px;
	padding: 0 25px;
	margin-left: 10px;
	cursor: pointer;
	font-weight: 500;
	height: 50px;
	transition: background 0.3s;
}

.chat-input button:hover {
	background: #2478ab;
}

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.card {
	background: white;
	border-radius: 6px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.card-header {
	background: linear-gradient(135deg, #5479F1 0%, #3498db 100%);
	color: white;
	padding: 8px 20px;
	font-size: 18px;
	font-weight: 500;
}

.card-body {
	padding: 10px;
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
}

.service-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 15px 10px;
	border-radius: 8px;
	background: #f8fafd;
	transition: transform 0.3s, background 0.3s;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}

.service-item:hover {
	transform: translateY(-3px);
	background: #edf5fc;
}

.service-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
}

.service-icon img {
	width: 40px;
}

.service-name {
	font-size: 13px;
	font-weight: 500;
}

.common-questions {
	list-style: none;
}

.common-questions img {
	width: 20px;
	margin-right: 10px;
	margin-left: 6px;
}

.common-questions li {
	padding: 12px 0;
	border-bottom: 1px solid #edf2f7;
	cursor: pointer;
	transition: color 0.3s;
	display: flex;
	align-items: center;
}

.common-questions li:last-child {
	border-bottom: none;
}

.common-questions li:hover {
	color: var(--secondary);
}

.common-questions li i {
	margin-right: 10px;
	color: var(--secondary);
}

.common-questions li:first-child i {
	display: none;
}

    /* 修改或添加以下CSS样式 */
.history-container {
	min-height: 90px;
	max-height: 90px;
	overflow-y: auto;
}

.history-items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-right: 10px;
}

.history-tag {
	background: #eaf4fd;
	color: var(--secondary);
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.3s;
	flex: 1 1 auto;
	min-width: 80px;
	text-align: center;
}

.history-tag:hover {
	background: #d5e9fc;
}

    /* 自定义滚动条样式 */
.history-container::-webkit-scrollbar {
	width: 6px;
}

.history-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.history-container::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 10px;
}

.history-container::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

.quick-actions {
	padding: 10px 20px 10px 20px;
	background: white;
	border-bottom: 1px solid #edf2f7;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.quick-actions a{
	background: #f0f7ff;
    border: 1px solid #d5e9fc;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 13px;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s;
}
.quick-actions a:hover {
	background: #d5e9fc;
	transform: translateY(-2px);
}

.quick-action-btn {
	background: #f0f7ff;
	border: 1px solid #d5e9fc;
	border-radius: 20px;
	padding: 6px 15px;
	font-size: 13px;
	color: var(--secondary);
	cursor: pointer;
	transition: all 0.3s;
}

.quick-action-btn:hover {
	background: #d5e9fc;
	transform: translateY(-2px);
}


    /* 添加到<style>标签内 */
.history-footer {
	padding: 10px;
	text-align: center;
	border-top: 1px solid #edf2f7;
}

.clear-history-btn {
	background: transparent;
	border: 1px solid #e74c3c;
	color: #e74c3c;
	padding: 6px 15px;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s ease;
	outline: none;
}

.clear-history-btn:hover {
	background: #e74c3c;
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.clear-history-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.clear-history-btn:focus {
	outline: none;
}

@media (max-width: 1300px) {

.main-content{
	max-height: 3000px;
    max-width: 1200px;}

.main-content {
		grid-template-columns: 1fr;
	}

	.nav-links {
		flex-wrap: wrap;
	}

	.top-links {
		display: none;
	}
}

@media (max-width: 1200px) {

.main-content{
	max-height: 3000px;
    max-width: 1200px;}

.main-content {
		grid-template-columns: 1fr;
	}

	.nav-links {
		flex-wrap: wrap;
	}

	.top-links {
		display: none;
	}
}
@media (max-width: 900px) {

.main-content{
    max-height: 3000px;}

	.services-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.nav-links {
		flex-wrap: wrap;
	}

	.top-links {
		display: none;
	}
}


@media (max-width: 600px) {

.main-content {
    max-height: 3000px;}

	.services-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-container {
		flex-direction: column;
		gap: 30px;
	}

	.message-avatar {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}

	.message-bubble {
		font-size: 14px;
		padding: 12px 16px;
	}
}



    /* 添加到<style>标签内 */
.feedback-buttons {
	display: flex;
	gap: 10px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #eee;
}

.feedback-btn {
	flex: 1;
	padding: 6px 12px;
	border: 1px solid #d5e9fc;
	border-radius: 4px;
	background: white;
	color: var(--secondary);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s;
}

.feedback-btn:hover {
	background: #f0f7ff;
	transform: translateY(-1px);
}

.feedback-btn.resolved:hover {
	background: #27ae60;
	color: white;
	border-color: #27ae60;
}

.feedback-btn.unresolved:hover {
	background: #e74c3c;
	color: white;
	border-color: #e74c3c;
}

.feedback-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.feedback-btn.selected.resolved {
	background: #27ae60;
	color: white;
	border-color: #27ae60;
}

.feedback-btn.selected.unresolved {
	background: #e74c3c;
	color: white;
	border-color: #e74c3c;
}

    /* 统一滚动条样式 */
.chat-messages::-webkit-scrollbar,
    .history-container::-webkit-scrollbar {
	width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
    .history-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb,
    .history-container::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
    .history-container::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

    /* 为Firefox浏览器添加滚动条样式 */
.chat-messages,
    .history-container {
	scrollbar-width: thin;
	scrollbar-color: #c1c1c1 #f1f1f1;
}



    /* 添加到<style>标签内 */
.common-questions-container {
	max-height: 283px;
	overflow-y: auto;
	transition: max-height 0.3s ease;
}

.common-questions-container.expanded {
	max-height: 780px;
        /* 与聊天框高度一致 */
}

.common-questions li {
	padding: 12px 0;
	border-bottom: 1px solid #edf2f7;
	cursor: pointer;
	transition: color 0.3s;
	display: flex;
	align-items: center;
}

.common-questions li:last-child {
	border-bottom: none;
}

.common-questions li:hover {
	color: var(--secondary);
}

.common-questions li i {
	margin-right: 10px;
	color: var(--secondary);
}

.common-questions li:first-child i {
	display: none;
}

.expand-toggle {
	padding: 10px;
	text-align: center;
	border-top: 1px solid #edf2f7;
	cursor: pointer;
	color: var(--secondary);
	font-size: 13px;
	transition: background-color 0.3s;
}

.expand-toggle:hover {
	background-color: #f8f9fa;
}

.expand-toggle i {
	margin-left: 5px;
	transition: transform 0.3s;
}

.expand-toggle.expanded i {
	transform: rotate(180deg);
}


.sidebar-card-hidden {
	display: none;
}


    /* 修改或添加以下CSS代码来美化常见问题模块的滚动条 */
.common-questions-container::-webkit-scrollbar {
	width: 6px;
}

.common-questions-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.common-questions-container::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 10px;
}

.common-questions-container::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

/* 为Firefox浏览器添加滚动条样式 */
.common-questions-container {
	scrollbar-width: thin;
	scrollbar-color: #c1c1c1 #f1f1f1;
}