/* =====================================================
   Local Stego Image —— 前端样式
   ===================================================== */

.stego-app {
	--stego-accent: #4f46e5;
	--stego-accent-soft: #eef2ff;
	--stego-border: #e5e7eb;
	--stego-bg: #ffffff;
	--stego-muted: #6b7280;
	--stego-danger: #dc2626;
	--stego-success: #059669;

	max-width: 640px;
	margin: 1.5em auto;
	padding: 20px;
	background: var(--stego-bg);
	border: 1px solid var(--stego-border);
	border-radius: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	color: #111827;
	box-sizing: border-box;
	line-height: 1.5;
}

.stego-app *,
.stego-app *::before,
.stego-app *::after {
	box-sizing: border-box;
}

/* ---------- 顶部 Tab ---------- */
.stego-tabs {
	display: flex;
	gap: 4px;
	padding: 4px;
	background: #f3f4f6;
	border-radius: 8px;
	margin-bottom: 16px;
}

.stego-tab {
	flex: 1;
	padding: 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	color: var(--stego-muted);
	transition: all 0.15s;
}

.stego-tab.active {
	background: #fff;
	color: #111827;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stego-panel.hidden {
	display: none;
}

/* ---------- 拖拽区 ---------- */
.stego-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 32px 16px;
	border: 2px dashed var(--stego-border);
	border-radius: 10px;
	cursor: pointer;
	text-align: center;
	transition: all 0.15s;
	background: #fafafa;
}

.stego-drop:hover,
.stego-drop.dragging {
	border-color: var(--stego-accent);
	background: var(--stego-accent-soft);
}

.stego-drop-title {
	font-size: 14px;
	font-weight: 500;
}

.stego-drop-hint {
	color: var(--stego-muted);
	font-size: 12px;
}

/* ---------- 预览 ---------- */
.stego-preview {
	margin-top: 12px;
	border-radius: 8px;
	overflow: hidden;
	max-height: 260px;
	display: flex;
	justify-content: center;
	background: #f9fafb;
}

.stego-preview img {
	max-width: 100%;
	max-height: 260px;
	object-fit: contain;
	display: block;
}

/* ---------- 容量提示 ---------- */
.stego-capacity {
	font-size: 12px;
	color: var(--stego-muted);
	margin: 8px 0 4px;
}

.stego-capacity.over {
	color: var(--stego-danger);
}

/* ---------- 模式切换 ---------- */
.stego-segmented {
	display: flex;
	gap: 4px;
	padding: 4px;
	background: #f3f4f6;
	border-radius: 8px;
	margin-bottom: 12px;
}

.seg {
	flex: 1;
	padding: 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
	color: var(--stego-muted);
}

.seg.active {
	background: #fff;
	color: #111827;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.stego-mode-text.hidden,
.stego-mode-file.hidden {
	display: none;
}

/* ---------- 文件选择 ---------- */
.stego-file-label {
	display: inline-block;
	margin-bottom: 8px;
}

.stego-file-btn {
	display: inline-block;
	padding: 8px 14px;
	border: 1px dashed #cbd5e1;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
	background: #f8fafc;
	color: #374151;
	transition: all 0.15s;
}

.stego-file-btn:hover {
	border-color: var(--stego-accent);
	color: var(--stego-accent);
}

.stego-file-info {
	font-size: 12px;
	color: var(--stego-muted);
	margin-bottom: 8px;
	word-break: break-all;
}

/* ---------- 文本域 ---------- */
.stego-app textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid var(--stego-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	margin-bottom: 10px;
	color: #111827;
}

.stego-app textarea:focus,
.stego-field input:focus {
	outline: none;
	border-color: var(--stego-accent);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* ---------- 密码字段 ---------- */
.stego-field {
	margin: 10px 0;
}

.stego-field label {
	display: block;
	font-size: 12px;
	color: var(--stego-muted);
	margin-bottom: 4px;
}

.stego-field input[type="password"] {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid var(--stego-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	color: #111827;
}

.stego-field input[type="password"]:disabled {
	background: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
}

/* ---------- 按钮 ---------- */
.stego-btn {
	display: inline-block;
	padding: 10px 18px;
	background: var(--stego-accent);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.15s;
	line-height: 1.4;
}

.stego-btn:hover {
	opacity: 0.92;
}

.stego-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.stego-btn.stego-download {
	margin-top: 8px;
}

/* ---------- 结果区 ---------- */
.stego-result {
	margin-top: 14px;
	font-size: 14px;
}

.stego-error {
	color: var(--stego-danger);
}

.stego-success {
	color: var(--stego-success);
	margin-bottom: 8px;
	font-weight: 500;
}

.stego-warn {
	margin-top: 8px;
	padding: 8px 10px;
	background: #fffbeb;
	border-left: 3px solid #f59e0b;
	font-size: 12px;
	color: #92400e;
	border-radius: 4px;
	line-height: 1.5;
}

.stego-output {
	margin: 0 0 10px;
	padding: 12px;
	background: #f9fafb;
	border: 1px solid var(--stego-border);
	border-radius: 8px;
	white-space: pre-wrap;
	word-break: break-all;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 13px;
	max-height: 300px;
	overflow: auto;
	color: #111827;
}

/* ---------- 移动端 ---------- */
@media (max-width: 480px) {
	.stego-app {
		padding: 14px;
		border-radius: 8px;
	}
	.stego-drop {
		padding: 24px 12px;
	}
}
.stego-capacity.over {
	color: #b45309;
	background: #fffbeb;
	border-left: 3px solid #f59e0b;
	padding: 6px 10px;
	border-radius: 4px;
	line-height: 1.5;
}