.intent-editor {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.editor-message {
	padding: var(--spacing-sm) var(--spacing-md);
	font-size: 12px;
	text-align: center;
}

.editor-message.success {
	background: rgba(82, 196, 26, 0.2);
	color: var(--success-color);
}

.editor-message.error {
	background: rgba(245, 34, 45, 0.2);
	color: var(--error-color);
}

.editor-content {
	flex: 1;
	display: flex;
	overflow: hidden;
}

.editor-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: var(--spacing-md);
	gap: var(--spacing-md);
	overflow: hidden;
}

.editor-title-row {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
}

.editor-title {
	font-size: 18px;
	font-weight: 500;
	padding: var(--spacing-sm);
	background: transparent;
	border: 1px solid transparent;
	color: var(--text-primary);
	flex: 1;
}

.editor-title:focus {
	border-color: var(--border-focus);
	background: var(--bg-darker);
}

.editor-title-actions {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
	margin-left: auto;
}

.complete-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	color: white;
	background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
}

.complete-btn:hover {
	background: linear-gradient(135deg, #73d13d 0%, #52c41a 100%);
	box-shadow: 0 2px 8px rgba(82, 196, 26, 0.4);
}

.complete-btn svg {
	opacity: 0.9;
}

.complete-btn.loading {
	background: linear-gradient(135deg, #666 0%, #555 100%);
	cursor: wait;
}

.complete-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.loading-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.view-mode-toggle {
	display: flex;
	background: var(--bg-darker);
	border: 1px solid var(--border-color);
	border-radius: 4px;
	padding: 2px;
}

.toggle-btn {
	padding: 4px 12px;
	font-size: 12px;
	color: var(--text-secondary);
	background: transparent;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.15s;
}

.toggle-btn:hover {
	color: var(--text-primary);
	background: rgba(255, 255, 255, 0.05);
}

.toggle-btn.active {
	color: var(--text-primary);
	background: rgba(255, 255, 255, 0.1);
	font-weight: 500;
}

.editor-body {
	flex: 1;
	display: flex;
	overflow: hidden;
	gap: var(--spacing-sm);
}

.editor-body.mode-edit .editor-textarea,
.editor-body.mode-preview .editor-markdown {
	width: 100%;
}

.editor-body.mode-split .editor-textarea,
.editor-body.mode-split .editor-markdown {
	width: 50%;
}

.editor-divider {
	width: 1px;
	background: var(--border-color);
	margin: 0 4px;
}

.editor-textarea {
	flex: 1;
	resize: none;
	padding: var(--spacing-md);
	font-size: 14px;
	line-height: 1.6;
	font-family: 'Consolas', 'Monaco', monospace;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: var(--bg-darker);
	color: var(--text-primary);
}

.editor-markdown {
	flex: 1;
	overflow: auto;
	padding: var(--spacing-md);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: var(--bg-darker);
	font-size: 14px;
	line-height: 1.6;
}

.editor-markdown h1,
.editor-markdown h2,
.editor-markdown h3,
.editor-markdown h4,
.editor-markdown h5,
.editor-markdown h6 {
	margin: 0.6em 0 0.4em;
}

.editor-markdown p {
	margin: 0.5em 0;
}

.editor-markdown ul,
.editor-markdown ol {
	padding-left: 2em;
	margin: 0.5em 0;
}

.editor-markdown li {
	margin-bottom: 0.2em;
}

.editor-markdown blockquote {
	border-left: 4px solid var(--border-color);
	padding-left: 1em;
	margin: 0.5em 0;
	color: var(--text-secondary);
}

.editor-markdown img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 0.5em 0;
}

.editor-markdown table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.5em 0;
}

.editor-markdown th,
.editor-markdown td {
	border: 1px solid var(--border-color);
	padding: 6px 8px;
}

.editor-markdown pre {
	background: rgba(0, 0, 0, 0.2);
	padding: var(--spacing-sm);
	border-radius: 4px;
	overflow-x: auto;
	margin: 0.5em 0;
	border: 1px solid var(--border-color);
}

.editor-markdown pre code {
	background: transparent;
	padding: 0;
	border-radius: 0;
	color: inherit;
}

.editor-markdown code {
	background: rgba(255, 255, 255, 0.08);
	padding: 2px 4px;
	border-radius: 4px;
}

/* AI 检查结果面板 */
.check-result-panel {
	width: 320px;
	background: var(--bg-sidebar);
	border-left: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
}

.check-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--spacing-sm) var(--spacing-md);
	border-bottom: 1px solid var(--border-color);
}

.check-title {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-primary);
}

.check-header .close-btn {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: var(--text-muted);
	border-radius: 4px;
}

.check-header .close-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-primary);
}

.check-body {
	flex: 1;
	overflow-y: auto;
	padding: var(--spacing-md);
}

.check-status {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	padding: var(--spacing-md);
	border-radius: 8px;
	margin-bottom: var(--spacing-md);
}

.check-status.passed {
	background: rgba(82, 196, 26, 0.2);
}

.check-status.failed {
	background: rgba(245, 34, 45, 0.2);
}

.status-icon {
	font-size: 20px;
}

.check-status.passed .status-icon {
	color: var(--success-color);
}

.check-status.failed .status-icon {
	color: var(--error-color);
}

.status-text {
	flex: 1;
	font-weight: 500;
}

.status-score {
	font-size: 12px;
	color: var(--text-muted);
}

.check-section {
	margin-bottom: var(--spacing-md);
}

.section-title {
	font-size: 12px;
	font-weight: 500;
	color: var(--text-secondary);
	margin-bottom: var(--spacing-sm);
}

.issue-list,
.suggestion-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xs);
}

.issue-list li,
.suggestion-list li {
	font-size: 12px;
	color: var(--text-secondary);
	padding: var(--spacing-xs) var(--spacing-sm);
	background: var(--bg-darker);
	border-radius: 4px;
	line-height: 1.4;
}

.issue-list li::before {
	content: '• ';
	color: var(--error-color);
}

.suggestion-list li::before {
content: ' ';
}

/* 源码定位高亮 - 点击预览中的文字，定位到编辑器中对应位置 */
.editor-markdown [data-source-line] {
cursor: pointer;
position: relative;
transition: background-color 0.15s;
}

.editor-markdown [data-source-line]:hover {
background-color: rgba(24, 144, 255, 0.15);
box-shadow: inset 4px 0 0 0 var(--primary-color);
}

.editor-markdown [data-source-line]::after {
content: "点击定位";
position: absolute;
right: 4px;
top: 2px;
font-size: 10px;
color: var(--primary-color);
opacity: 0;
padding: 2px 6px;
background: rgba(24, 144, 255, 0.1);
border-radius: 3px;
pointer-events: none;
transition: opacity 0.2s;
}

.editor-markdown [data-source-line]:hover::after {
opacity: 1;
}

/* 可点击的预览区域样式 */
.clickable-preview {
cursor: pointer;
}

.clickable-preview h1,
.clickable-preview h2,
.clickable-preview h3,
.clickable-preview h4,
.clickable-preview h5,
.clickable-preview h6,
.clickable-preview p,
.clickable-preview li,
.clickable-preview blockquote,
.clickable-preview pre,
.clickable-preview td,
.clickable-preview th {
cursor: pointer;
transition: background-color 0.15s;
border-radius: 3px;
}

.clickable-preview h1:hover,
.clickable-preview h2:hover,
.clickable-preview h3:hover,
.clickable-preview h4:hover,
.clickable-preview h5:hover,
.clickable-preview h6:hover,
.clickable-preview p:hover,
.clickable-preview li:hover,
.clickable-preview blockquote:hover,
.clickable-preview pre:hover,
.clickable-preview td:hover,
.clickable-preview th:hover {
background-color: rgba(24, 144, 255, 0.15);
box-shadow: inset 4px 0 0 0 var(--primary-color);
}
