﻿/* CSS Document */
/*
编写者：享健丽科技
时间：2025年6月23日
*/

.chatContent {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 82vh;
}

/* 左侧导航 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px;
    overflow-y: auto;
    display:flex;
    flex-direction:column;
}

.nav-item {
    padding: 15px;
    margin: 5px 0;
    background: #34495e;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

/*
.nav-item:hover {
    background: #3e5771;
}
*/

.active {
    background: #3e5771;
}

/* 右侧主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f6fa;
}

/* 对话容器 */
.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 消息样式 */
.message {
    margin: 10px 0;
    padding: 15px;
    border-radius: 10px;
    max-width: 70%;     
}

.user-message {
    background: #3498db;
    color: white;
    margin-left: auto;
    display:block;
}

.ai-message {
    background: #ecf0f1;
    margin-right: auto;
    text-align:left;
    white-space:pre-wrap;
    display:block;
    word-wrap:break-word;
}
.ai-message-loading {
    background: #ecf0f1;
    margin-right: auto;
    text-align:left;
}
pre code{
    display: block;
    padding: 12px;
    background:#181D28;
    border-radius: 4px;
    overflow-x: auto;
    white-space:pre-wrap;
    word-wrap:break-word;
    color:#eee;
}
/*hr{
    border-color:#aaa;
}*/

/* 针对markdown 解析后css样式的重新调整 */
/* 基础内容间距压缩 */
.ai-message article > * {
    margin: 0;  /* 统一设置比默认更小的垂直间距 */
    line-height: 1.0;  /* 适当紧凑的行高 */
    padding:0;
}

/* 标题间距专项调整 */
.ai-message h1, h2, h3, h4, h5, h6 {
    margin: 0;    /* 压缩标题默认间距 */
    line-height: 1.0;   /* 更紧凑的标题行高 */
    padding:0;
}

/* 标题后紧跟内容的间距优化 */
.ai-message  h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + * {
    margin-top: 0.2em !important;  /* 标题下方元素的上间距 */
}

/* 段落间距微调 */
.ai-message p {
    margin: 0;    /* 比默认1em更紧凑 */
    padding:0;
}

/* 列表项紧凑处理 */
.ai-message ul, ol {
    margin: 0;
    padding:0;
    padding-left: 1.2em;

}

.ai-message li {
    margin: 0;
    padding:0;
}

/* 代码块间距调整 */
.ai-message pre {
    margin: 0.5em 0;
    padding: 0.8em;
}

/* 分割线优化 */
.ai-message hr {
    margin: 1em 0;      /* 原默认margin较大 */
}
/* end 针对markdown 解析后css样式的重新调整 */


/* 输入区域 */
.input-container {
    padding: 20px;
    background: white;
    display: flex;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

#user-input {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

button {
    padding: 10px 20px;
    background: #3498db;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #2980b9;
}

/* 语音识别按钮 */
#voice-btn {
    background: #27ae60;
}

	
	
 /* 添加CSS打字动画*/	
.typing::after {
	content: '|';
	animation: blink 1s infinite;
	color: #666;
}

@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

	/* 加载动画 */
.loading-indicator {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
    margin: 10px 0;
}

.loading-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
    animation: loading 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
    left: 0;
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    left: 30px;
    animation-delay: -0.16s;
}

.loading-dot:nth-child(3) {
    left: 60px;
}

@keyframes loading {
    0%, 80%, 100% { 
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 消息加载状态 */
.message.loading {
    background: #f8f9fa;
    min-height: 50px;
    color: transparent;
    position: relative;
}

/* 禁用输入状态 */
.input-disabled {
    opacity: 0.7;
    pointer-events: none;


}

/* copyright */
.nav-about{
    position:relative;
    font-size:12px;
    color:#ccc;
    margin-top:auto;
}
.nav-about ul{
    list-style-type:none;
    padding:0;
    
}
.nav-about li{
    list-style:none;
}
.nav-about li a{
    font-size:12px;
    color:#ccc;
}
.nav-about li a:active, a:visited, a:hover{
    color:#ccc;
}

.think{
    font-size:14px;
    color:#aaa;
    border-left:2px solid #ddd;
    padding-left:15px;
}

#vip{
    color:#FFC90E;
}