:root {
	--primary-color: #2c3e50;
	--bg-color: #000000;
	--text-color: #333;
	--border-color: #ddd;
	--user-bg: #e3f2fd;
	--ai-bg: #f5f5f5;
	--user-avatar: url('../../avatar/0.png');
	--ai-avatar: url('../img/Mecircle.png');
	--error-color: #ff4444;
}

[data-theme="dark"], .ai-page {
	--primary-color: #000000;
	--bg-color: #000000;
	--text-color: #ecf0f1;
	--border-color: #ffffff;
	--user-bg: #1b7d90;
	--ai-bg: #525252;
	--error-color: #ff6666;
	background-color: #000 !important;
	color: #ecf0f1 !important;
}

.ai-page {
	background-color: #000 !important;
	color: #ecf0f1 !important;
}

.ai-page * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.ai-page body {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	transition: all 0.3s ease;
}

.ai-page .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.ai-page .chat-container {
	margin: 80px 0 160px;
	height: calc(100vh - 240px);
	overflow-y: auto;
	position: relative;
}

.ai-page #chatContainer:empty::before {
	content: "在这里开始与Odocs AI对话...";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #999;
	font-size: 1.2em;
	pointer-events: none;
	white-space: nowrap;
}

.ai-page .message {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
	padding: 15px;
	border-radius: 10px;
	align-items: center;
	min-height: 60px;
}

.ai-page .user-message {
	background-color: var(--user-bg);
	flex-direction: row-reverse;
}

.ai-page .ai-message {
	background-color: var(--ai-bg);
}

.ai-page .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

.ai-page .user-message .avatar {
	background-image: var(--user-avatar);
}

.ai-page .ai-message .avatar {
	background-image: var(--ai-avatar);
}

.ai-page .input-area {
	position: fixed;
	bottom: 60px;
	width: 100%;
	background-color: var(--bg-color);
	padding: 20px;
	border-top: none !important;
	border-bottom: none !important;
}

.ai-page .input-group {
	display: flex;
	gap: 10px;
	max-width: 700px;
	width: 100%;
	margin: 0 auto;
	position: relative;
	border: none !important;
}

.ai-page input,
.ai-page .schinput {
	flex: 1 1 0%;
	min-width: 0;
	max-width: 100%;
	width: 100%;
	background-color: #181818 !important;
	color: #fff !important;
	border-left: 1.5px solid #333 !important;
	border-right: 1.5px solid #333 !important;
	border-top: none !important;
	border-bottom: none !important;
	border-radius: 24px !important;
	padding: 12px 18px !important;
	box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10) inset;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-size: 16px;
}

.ai-page input:focus,
.ai-page .schinput:focus {
	border-color: #1b7d90 !important;
	box-shadow: 0 0 0 2px #1b7d9033;
}
.ai-page input::placeholder,
.ai-page .schinput::placeholder {
	color: #888 !important;
	opacity: 1;
}

/* 导航栏背景色 #202020，内容不透明 */
.ai-page .header.fixed,
.ai-page .header {
	background: #202020 !important;
	box-shadow: 0 2px 8px 0 rgba(0,0,0,0.15);
	border-bottom: 1px solid #222;
	color: #fff !important;
}
.ai-page .header.fixed a,
.ai-page .header a,
.ai-page .menu ul li a,
.ai-page .navbar-item a {
	color: #fff !important;
}
.ai-page .menu ul li,
.ai-page .navbar-item {
	color: #fff !important;
}

.ai-page button,
.ai-page .btn {
	background-color: #222 !important;
	color: #ecf0f1 !important;
	border: 1px solid #444 !important;
}

.ai-page button {
	padding: 12px 25px;
	border: none;
	border-radius: 25px;
	background-color: var(--primary-color);
	color: white;
	cursor: pointer;
	transition: opacity 0.3s;
}

.ai-page button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ai-page .footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100vw;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0;
	background-color: var(--primary-color);
	color: white;
	height: 60px;
	box-sizing: border-box;
	z-index: 100;
	line-height: 1.2;
	border-top: none !important;
}

.ai-page .footer a {
	text-decoration: none;
	color: white;
	margin: 0;
	font-size: 13px;
	display: block;
	line-height: 1.2;
}

.ai-page .footer p {
	margin: 0;
	font-size: 12px;
	line-height: 1.2;
}

.ai-page .typing-indicator {
	display: flex;
	align-items: center;
	padding: 10px;
}

.ai-page .dot {
	width: 6px;
	height: 6px;
	margin: 0 2px;
	background-color: currentColor;
	border-radius: 50%;
	animation: dot-animation 1.4s infinite;
}

.ai-page .dot:nth-child(2) {
	animation-delay: 0.2s;
}

.ai-page .dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes dot-animation {
	0%, 40%, 100% { opacity: 0.3; }
	20% { opacity: 1; }
}

.ai-page .typewriter {
	border-right: 2px solid var(--text-color);
	white-space: pre-wrap;
	overflow: hidden;
	margin: 0 auto;
	letter-spacing: 1px;
	animation: typing 0.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
	from { width: 0 }
	to { width: 100% }
}

@keyframes blink-caret {
	from, to { border-color: transparent }
	50% { border-color: var(--text-color); }
}

.ai-page .message-content {
	flex: 1;
	display: flex;
	align-items: center;
	min-height: 40px;
	line-height: 1.5;
}

.ai-page .error-message {
	position: absolute;
	bottom: calc(100% + 5px);
	left: 0;
	color: var(--error-color);
	font-size: 0.9em;
	animation: fadeOut 2s forwards;
	opacity: 0;
}

@keyframes fadeOut {
	0% { opacity: 1; }
	90% { opacity: 1; }
	100% { opacity: 0; }
}

.ai-page .menuico {
	display: flex;
	align-items: center;
	margin-right: 18px;
	min-width: 110px;
	justify-content: flex-end;
}
.ai-page .menuico-link {
	margin-top: 10px;
	display: inline-block;
	padding: 0 18px;
	height: 40px;
	line-height: 40px;
	border-radius: 20px;
	background: #222;
	color: #cccccc !important;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 2px;
	transition: background 0.2s, color 0.2s;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	min-width: 90px;
}

.ai-page .menuico-link:hover {
	background: #1b7d90;
	color: #fff !important;
}
.ai-page .menuico-link span {
	display: block;
	width: 22px;
	height: 3px;
	background: #937a7a;
	margin: 3px 0;
	border-radius: 2px;
	transition: background 0.2s;
}

@media (max-width: 900px) {
	.ai-page .input-group {
		max-width: 98vw;
	}
}
@media (max-width: 600px) {
	.ai-page .input-group {
		max-width: 100vw;
		padding: 0 6px;
	}
	.ai-page input,
	.ai-page .schinput {
		font-size: 15px;
		padding: 10px 10px !important;
	}
}