/* LURV Linux cmd —— 插件样式 */
:root {
	--lc-bg: #f4f6f8;
	--lc-card: #ffffff;
	--lc-border: #e4e8ee;
	--lc-text: #1f2937;
	--lc-muted: #6b7280;
	--lc-accent: #0e9f6e;
	--lc-accent-soft: #e6f6ef;
	--lc-topbar: #16202e;
	--lc-topbar-text: #e8eef5;
	--lc-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
	--lc-sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

.lc-body {
	background: var(--lc-bg);
	color: var(--lc-text);
	font-family: var(--lc-sans);
	font-size: 14px;
	line-height: 1.6;
	min-height: 100vh;
}

/* ---- 顶栏 ---- */
.lc-topbar {
	background: var(--lc-topbar);
	color: var(--lc-topbar-text);
	padding: 14px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.lc-brand { display: flex; align-items: center; gap: 12px; }
.lc-logo { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.lc-brand-text { line-height: 1.25; }
.lc-title { margin: 0; font-size: 17px; font-weight: 600; color: #fff; }
.lc-sub { margin: 2px 0 0; font-size: 12px; color: #9fb0c4; }
.lc-topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lc-notification-link,
.lc-edit-link,
.lc-delete-link,
.lc-user-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #cbd5e1;
	text-decoration: none;
	cursor: pointer;
}
.lc-notification-link:hover,
.lc-edit-link:hover,
.lc-user-toggle:hover,
.lc-user-menu.is-open .lc-user-toggle { color: #fff; background: rgba(255,255,255,.12); }
.lc-delete-form { display: flex; margin: 0; }
.lc-delete-link:hover { color: #fecaca; background: rgba(239,68,68,.18); }
.lc-user-menu { position: relative; }
.lc-user-avatar,
.lc-user-avatar img {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	overflow: hidden;
}
.lc-user-avatar img { object-fit: cover; }
.lc-user-popover {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	width: 196px;
	padding: 8px;
	border: 1px solid rgba(255,255,255,.13);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(0,0,0,.22);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
	z-index: 20;
}
.lc-user-menu.is-open .lc-user-popover { opacity: 1; visibility: visible; transform: translateY(0); }
.lc-user-popover-head { display: flex; align-items: center; gap: 10px; padding: 7px 8px 11px; border-bottom: 1px solid var(--lc-border); }
.lc-user-avatar-lg,
.lc-user-avatar-lg img { width: 32px; height: 32px; font-size: 14px; }
.lc-user-popover-name { min-width: 0; overflow: hidden; color: var(--lc-text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lc-user-popover a { display: block; padding: 8px; border-radius: 6px; color: var(--lc-text); font-size: 13px; text-decoration: none; }
.lc-user-popover a:hover { background: var(--lc-accent-soft); color: var(--lc-accent); }

/* ---- 搜索栏 ---- */
.lc-searchbar {
	background: var(--lc-card);
	border-bottom: 1px solid var(--lc-border);
	padding: 12px 22px;
	position: sticky;
	top: 62px;
	z-index: 9;
}
.lc-search-inner {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--lc-bg);
	border: 1px solid var(--lc-border);
	border-radius: 10px;
	padding: 0 12px;
	transition: border-color .15s, box-shadow .15s;
}
.lc-search-tools { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.lc-add-command {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 10px;
	background: var(--lc-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 7px 18px rgba(14,159,110,.2);
}
.lc-add-command:hover { filter: brightness(1.06); transform: translateY(-1px); }
.lc-search-inner:focus-within {
	border-color: var(--lc-accent);
	box-shadow: 0 0 0 3px var(--lc-accent-soft);
}
.lc-search-icon { color: var(--lc-muted); flex: none; }
.lc-search-input {
	flex: 1;
	border: 0;
	background: transparent;
	outline: none;
	padding: 11px 0;
	font-size: 14px;
	color: var(--lc-text);
	font-family: var(--lc-sans);
}

/* ---- 字母导航 ---- */
.lc-letters {
	max-width: 960px;
	margin: 14px auto 0;
	padding: 0 22px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.lc-letter-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border-radius: 6px;
	color: var(--lc-muted);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	background: var(--lc-card);
	border: 1px solid var(--lc-border);
}
.lc-letter-link:hover { color: var(--lc-accent); border-color: var(--lc-accent); }

/* ---- 主内容 ---- */
.lc-main { max-width: 960px; margin: 0 auto; padding: 8px 22px 48px; }
.lc-empty { text-align: center; color: var(--lc-muted); padding: 40px 0; }

.lc-group { margin-top: 22px; }
.lc-letter {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--lc-accent);
	text-transform: uppercase;
	padding-left: 4px;
}
.lc-items {
	background: var(--lc-card);
	border: 1px solid var(--lc-border);
	border-radius: 10px;
	overflow: hidden;
}
.lc-item {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 9px 16px;
	text-decoration: none;
	color: var(--lc-text);
	border-bottom: 1px solid var(--lc-border);
}
.lc-item:last-child { border-bottom: 0; }
.lc-item:hover { background: var(--lc-accent-soft); }
.lc-name {
	font-family: var(--lc-mono);
	font-weight: 600;
	color: var(--lc-accent);
	white-space: nowrap;
	flex: none;
	min-width: 150px;
}
.lc-custom-badge {
	display: inline-flex;
	margin-left: 7px;
	padding: 1px 6px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-family: var(--lc-sans);
	font-size: 9px;
	font-style: normal;
	font-weight: 600;
	line-height: 1.4;
	vertical-align: 2px;
	opacity: .75;
}
.lc-desc { color: var(--lc-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 详情页 ---- */
.lc-view-topbar { position: sticky; top: 0; }
.lc-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #cbd5e1;
	text-decoration: none;
	font-size: 13px;
}
.lc-back:hover { color: #fff; }
.lc-view-cmd {
	font-family: var(--lc-mono);
	font-size: 15px;
	font-weight: 600;
	color: #22d3a5;
	background: rgba(34,211,165,.12);
	padding: 4px 12px;
	border-radius: 8px;
}
.lc-view-main { max-width: 880px; padding-top: 24px; }

/* ---- markdown 正文 ---- */
.markdown-body { color: var(--lc-text); }
.markdown-body h1 { font-size: 26px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--lc-border); }
.markdown-body h2 { font-size: 20px; margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--lc-border); }
.markdown-body h3 { font-size: 17px; margin: 24px 0 10px; }
.markdown-body h4 { font-size: 15px; margin: 20px 0 8px; }
.markdown-body p { margin: 0 0 12px; }
.markdown-body a { color: var(--lc-accent); }
.markdown-body ul, .markdown-body ol { margin: 0 0 12px; padding-left: 24px; }
.markdown-body li { margin: 3px 0; }
.markdown-body blockquote {
	margin: 12px 0;
	padding: 8px 16px;
	border-left: 4px solid var(--lc-accent);
	background: var(--lc-accent-soft);
	color: var(--lc-muted);
	border-radius: 0 6px 6px 0;
}
.markdown-body code {
	font-family: var(--lc-mono);
	font-size: 13px;
	background: #eef1f5;
	border: 1px solid var(--lc-border);
	border-radius: 4px;
	padding: 1px 5px;
}
.markdown-body pre {
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 8px;
	padding: 14px 16px;
	overflow-x: auto;
	margin: 0 0 14px;
}
.markdown-body pre code {
	background: transparent;
	border: 0;
	padding: 0;
	color: inherit;
	font-size: 13px;
	line-height: 1.55;
}
.markdown-body table { border-collapse: collapse; margin: 0 0 14px; width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid var(--lc-border); padding: 6px 12px; text-align: left; }
.markdown-body th { background: var(--lc-bg); font-weight: 600; }
.markdown-body img { max-width: 100%; }
.markdown-body hr { border: 0; border-top: 1px solid var(--lc-border); margin: 20px 0; }
.markdown-body strong { font-weight: 700; }
.lc-custom-kicker {
	display: inline-flex;
	align-items: center;
	margin-bottom: 10px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--lc-accent-soft);
	color: var(--lc-accent);
	font-family: var(--lc-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* ---- 命令录入编辑器 ---- */
.lc-editor-body { background-image: radial-gradient(circle at 18% 0, rgba(14,159,110,.08), transparent 28rem); }
.lc-editor-title { display: flex; align-items: center; gap: 9px; color: #fff; }
.lc-terminal-dot { width: 9px; height: 9px; border-radius: 50%; background: #22d3a5; box-shadow: 0 0 0 5px rgba(34,211,165,.12); }
.lc-editor-status { color: #8fa1b8; font-family: var(--lc-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.lc-editor-status.is-pulsing { animation: lc-status-pulse .45s ease; }
@keyframes lc-status-pulse { 50% { color: #22d3a5; } }

.lc-editor-shell {
	width: min(1440px, calc(100% - 40px));
	margin: 0 auto;
	padding: 28px 0 56px;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
	gap: 24px;
	align-items: start;
}
.lc-command-form { display: grid; gap: 16px; min-width: 0; }
.lc-editor-panel {
	background: var(--lc-card);
	border: 1px solid var(--lc-border);
	border-radius: 14px;
	padding: 22px;
	box-shadow: 0 10px 30px rgba(31,41,55,.04);
}
.lc-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.lc-panel-heading > div { display: flex; align-items: center; gap: 10px; }
.lc-panel-heading h2 { margin: 0; font-size: 16px; }
.lc-panel-heading p { margin: 1px 0 0; color: var(--lc-muted); font-size: 12px; text-align: right; }
.lc-step { color: var(--lc-accent); font-family: var(--lc-mono); font-size: 11px; font-weight: 700; }
.lc-form-grid { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); gap: 14px; }
.lc-field { display: grid; gap: 7px; margin-bottom: 15px; }
.lc-field > span { font-size: 12px; font-weight: 700; color: var(--lc-text); }
.lc-field em { margin-left: 3px; color: #ef4444; font-style: normal; }
.lc-field small { color: var(--lc-muted); font-size: 11px; }
.lc-input,
.lc-textarea {
	width: 100%;
	border: 1px solid var(--lc-border);
	border-radius: 9px;
	background: var(--lc-bg);
	color: var(--lc-text);
	font-family: var(--lc-sans);
	font-size: 13px;
	outline: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.lc-input { height: 42px; padding: 0 12px; }
.lc-textarea { min-height: 96px; padding: 11px 12px; line-height: 1.55; resize: vertical; }
.lc-input:focus,
.lc-textarea:focus { border-color: var(--lc-accent); background: var(--lc-card); box-shadow: 0 0 0 3px var(--lc-accent-soft); }
.lc-input[readonly] { color: var(--lc-muted); cursor: not-allowed; }
.lc-mono-input,
.lc-code-input { font-family: var(--lc-mono); }
.lc-form-error { margin: -4px 0 16px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 9px; background: #fef2f2; color: #b91c1c; font-size: 12px; }
.lc-panel-heading-action { align-items: center; }
.lc-ghost-button {
	border: 1px solid var(--lc-border);
	border-radius: 8px;
	background: transparent;
	color: var(--lc-accent);
	padding: 7px 10px;
	font: 600 12px var(--lc-sans);
	cursor: pointer;
}
.lc-ghost-button:hover { border-color: var(--lc-accent); background: var(--lc-accent-soft); }
.lc-repeat-list { display: grid; gap: 10px; }
.lc-repeat-row { position: relative; }
.lc-option-row { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(220px, 1.45fr) 30px; gap: 9px; }
.lc-example-row { display: grid; gap: 9px; padding: 14px; border: 1px dashed var(--lc-border); border-radius: 10px; background: var(--lc-bg); }
.lc-repeat-row-head { display: flex; align-items: center; justify-content: space-between; color: var(--lc-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.lc-remove-row { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: #94a3b8; font-size: 20px; line-height: 1; cursor: pointer; }
.lc-remove-row:hover { background: #fee2e2; color: #dc2626; }
.lc-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.lc-secondary-button,
.lc-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 18px; border-radius: 9px; font: 600 13px var(--lc-sans); text-decoration: none; cursor: pointer; }
.lc-secondary-button { border: 1px solid var(--lc-border); background: var(--lc-card); color: var(--lc-muted); }
.lc-primary-button { border: 1px solid var(--lc-accent); background: var(--lc-accent); color: #fff; box-shadow: 0 8px 20px rgba(14,159,110,.2); }
.lc-primary-button:hover { filter: brightness(1.06); }

.lc-preview-panel {
	position: sticky;
	top: 90px;
	min-width: 0;
	max-height: calc(100vh - 116px);
	overflow: hidden;
	border: 1px solid #243047;
	border-radius: 15px;
	background: var(--lc-card);
	box-shadow: 0 22px 60px rgba(15,23,42,.16);
}
.lc-preview-toolbar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #111827; color: #8fa1b8; }
.lc-preview-toolbar span { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; }
.lc-preview-toolbar span:nth-child(2) { background: #fbbf24; }
.lc-preview-toolbar span:nth-child(3) { background: #34d399; }
.lc-preview-toolbar strong { margin-left: auto; font: 600 10px var(--lc-mono); letter-spacing: .08em; text-transform: uppercase; }
.lc-preview-content { max-height: calc(100vh - 158px); overflow: auto; padding: 26px; }
.lc-preview-content h1 { font-family: var(--lc-mono); color: var(--lc-accent); }
.lc-preview-content:empty::after { content: 'Preview'; color: var(--lc-muted); }

/* ---- 关于页 ---- */
.lc-about { padding-top: 40px; }
.lc-about-card {
	max-width: 560px;
	margin: 0 auto;
	background: var(--lc-card);
	border: 1px solid var(--lc-border);
	border-radius: 14px;
	padding: 36px;
	text-align: center;
}
.lc-about-logo { width: 72px; height: 72px; border-radius: 16px; }
.lc-about-title { margin: 14px 0 6px; font-size: 22px; }
.lc-about-desc { color: var(--lc-muted); margin: 0 0 18px; }
.lc-about-meta { color: var(--lc-muted); font-size: 13px; margin: 4px 0; }
.lc-about-license { color: #b45309; font-size: 12px; margin: 14px 0 22px; }
.lc-about-card .lc-back {
	color: var(--lc-accent);
	border: 1px solid var(--lc-accent);
	padding: 7px 16px;
	border-radius: 8px;
	display: inline-flex;
}
.lc-about-card .lc-back:hover { background: var(--lc-accent-soft); }

/* ---- 响应式 ---- */
@media (max-width: 640px) {
	.lc-topbar { padding: 10px 14px; }
	.lc-topbar-actions { gap: 2px; }
	.lc-name { min-width: 96px; }
	.lc-item { flex-direction: column; gap: 2px; }
	.lc-desc { white-space: normal; }
	.lc-search-tools { align-items: stretch; }
	.lc-add-command { width: 42px; padding: 0; }
	.lc-add-command span { display: none; }
	.lc-editor-title { margin-left: auto; }
	.lc-editor-status { display: none; }
	.lc-editor-shell { width: calc(100% - 24px); padding-top: 14px; grid-template-columns: 1fr; }
	.lc-editor-panel { padding: 17px; }
	.lc-form-grid,
	.lc-option-row { grid-template-columns: 1fr; }
	.lc-option-row .lc-remove-row { position: absolute; top: 6px; right: 6px; }
	.lc-panel-heading { display: block; }
	.lc-panel-heading p { margin-top: 5px; text-align: left; }
	.lc-panel-heading-action { display: flex; }
	.lc-preview-panel { position: relative; top: auto; max-height: none; }
	.lc-preview-content { max-height: none; }
}

/* ---- 深色模式 ---- */
@media (prefers-color-scheme: dark) {
	:root {
		--lc-bg: #101623;
		--lc-card: #1a2233;
		--lc-border: #2a3447;
		--lc-text: #e6ecf5;
		--lc-muted: #93a1b8;
		--lc-accent: #22d3a5;
		--lc-accent-soft: rgba(34,211,165,.1);
		--lc-topbar: #0b101c;
	}
	.markdown-body code { background: #232c40; border-color: #2a3447; }
	.markdown-body pre { background: #0a0f1c; }
	.markdown-body th { background: #141c2c; }
	.lc-search-inner { background: #141c2c; }
	.lc-form-error { border-color: rgba(248,113,113,.35); background: rgba(127,29,29,.25); color: #fca5a5; }
	.lc-example-row { background: rgba(15,23,42,.32); }
	.lc-secondary-button { background: var(--lc-card); }
}
