/* JSON Formatter - FileInfo.cn custom styles */
.tool-workspace {
	max-width: 1100px;
	margin: 0 auto;
	padding: 70px 15px 40px;
	text-align: left;
}

.tool-workspace h1 {
	font-size: 28px;
	text-align: center;
	margin: 0 0 8px;
	border: none;
}

.tool-workspace .tool-desc {
	text-align: center;
	color: #757575;
	font-size: 15px;
	margin-bottom: 20px;
}

.tool-breadcrumb {
	font-size: 14px;
	margin-bottom: 20px;
	color: #757575;
}

.tool-breadcrumb a {
	color: #1e88e5;
}

.tool-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-bottom: 12px;
	align-items: center;
}

.tool-toolbar label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: #424242;
	white-space: nowrap;
}

.tool-toolbar input[type="number"],
.tool-toolbar input[type="text"],
.tool-toolbar select {
	padding: 6px 10px;
	border: 2px solid #1976d2;
	border-radius: 4px;
	font-size: 14px;
	min-height: 36px;
	box-sizing: border-box;
	background: #fff;
	color: #424242;
}

.tool-toolbar input[type="number"] {
	min-width: 110px;
	width: 110px;
}

.tool-toolbar input[type="text"] {
	min-width: 140px;
}

.tool-toolbar select {
	min-width: 100px;
	padding-right: 28px;
}

.tool-toolbar input[type="range"] {
	width: 120px;
	vertical-align: middle;
}

.tool-toolbar .btn {
	display: inline-block;
	min-height: 36px;
	line-height: 36px;
	padding: 0 16px;
	font-size: 15px;
	color: #fff;
	background: #1e88e5;
	background-image: linear-gradient(#2196f3, #1e88e5);
	border: 2px solid #1976d2;
	border-radius: 4px;
	cursor: pointer;
	text-align: center;
	transition: background .2s, border-color .2s;
}

.tool-toolbar .btn:hover {
	background: #1976d2;
	background-image: linear-gradient(#1e88e5, #1976d2);
	border-color: #1565c0;
}

.tool-toolbar .btn-secondary {
	background: #fafafa;
	color: #424242;
	background-image: linear-gradient(#fafafa, #f5f5f5);
	border-color: #bdbdbd;
}

.tool-toolbar .btn-secondary:hover {
	background: #eee;
	color: #1565c0;
	border-color: #1976d2;
}

.tool-status {
	min-height: 24px;
	padding: 8px 12px;
	margin-bottom: 10px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
}

.tool-status.ok {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.tool-status.error {
	background: #ffebee;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

.tool-status.info {
	background: #e3f2fd;
	color: #1565c0;
	border: 1px solid #90caf9;
}

.tool-status:empty {
	display: none;
}

.editor-wrap {
	border: 2px solid #1976d2;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	margin-bottom: 20px;
}

.editor-wrap .CodeMirror {
	height: 480px;
	font-size: 14px;
	line-height: 1.5;
	font-family: Consolas, Monaco, "Courier New", monospace;
}

.tool-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	color: #757575;
	margin-bottom: 16px;
}

.tool-meta span {
	background: #f5f5f5;
	padding: 4px 10px;
	border-radius: 3px;
}

.tool-footer-nav {
	text-align: center;
	margin-top: 24px;
}

.tool-footer-nav a {
	display: inline-block;
	padding: 10px 24px;
	background: #1e88e5;
	color: #fff;
	border-radius: 4px;
	font-size: 16px;
}

.tool-footer-nav a:hover {
	background: #1565c0;
	color: #fff;
}

@media (max-width: 768px) {
	.tool-workspace h1 {
		font-size: 22px;
	}

	.editor-wrap .CodeMirror {
		height: 360px;
		font-size: 13px;
	}

	.tool-toolbar .btn {
		padding: 0 12px;
		font-size: 14px;
	}
}

/* 工具页底部说明板块（tool-guide / regex-guide 共用样式） */
.tool-guide,
.regex-guide {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 2px solid #e0e0e0;
}

.tool-guide > h2,
.regex-guide > h2 {
	font-size: 20px;
	color: #1565c0;
	margin: 0 0 20px;
	padding-bottom: 8px;
	border-bottom: 3px solid #2196f3;
}

.tool-guide-desc {
	font-size: 14px;
	color: #757575;
	line-height: 1.6;
	margin: -8px 0 16px;
}

.tool-guide-grid,
.regex-guide-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.tool-guide-card,
.regex-guide-card {
	background: #fafafa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px 18px;
}

.tool-guide-card h3,
.regex-guide-card h3 {
	font-size: 15px;
	color: #1976d2;
	margin: 0 0 12px;
	font-weight: 600;
}

.tool-ref-table,
.regex-ref-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 1.5;
}

.tool-ref-table th,
.tool-ref-table td,
.regex-ref-table th,
.regex-ref-table td {
	padding: 7px 10px;
	text-align: left;
	border-bottom: 1px solid #eeeeee;
	vertical-align: top;
}

.tool-ref-table th,
.regex-ref-table th {
	color: #757575;
	font-weight: 600;
	font-size: 12px;
	background: #f5f5f5;
}

.tool-ref-table tr:last-child td,
.regex-ref-table tr:last-child td {
	border-bottom: none;
}

.tool-ref-table code,
.regex-ref-table code {
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 12px;
	color: #c62828;
	background: #fff;
	padding: 1px 6px;
	border-radius: 3px;
	border: 1px solid #ffcdd2;
	white-space: nowrap;
}

.tool-ref-table td:last-child,
.regex-ref-table td:last-child {
	color: #616161;
}

.tool-flags,
.regex-flags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.tool-flag,
.regex-flag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #e3f2fd;
	border: 1px solid #90caf9;
	border-radius: 16px;
	padding: 4px 12px;
	font-size: 13px;
	color: #424242;
}

.tool-flag code,
.regex-flag code {
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 12px;
	color: #1565c0;
	font-weight: 600;
	background: transparent;
	border: none;
	padding: 0;
}

.regex-examples {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 12px;
}

.regex-example-item {
	display: block;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 12px 14px;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, background .2s;
	font-family: inherit;
}

.regex-example-item:hover {
	border-color: #1976d2;
	background: #e3f2fd;
	box-shadow: 0 2px 8px rgba(25, 118, 210, .12);
}

.regex-example-item .name {
	font-size: 14px;
	font-weight: 600;
	color: #424242;
	margin-bottom: 6px;
}

.regex-example-item code {
	display: block;
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 12px;
	color: #1565c0;
	background: #f5f5f5;
	padding: 8px 10px;
	border-radius: 4px;
	word-break: break-all;
	line-height: 1.5;
}

.tool-guide-tip,
.regex-guide-tip {
	margin-top: 16px;
	padding: 12px 16px;
	background: #fffde7;
	border: 1px solid #fff176;
	border-radius: 6px;
	font-size: 13px;
	color: #616161;
	line-height: 1.6;
}

@media (max-width: 600px) {
	.tool-guide-grid,
	.regex-guide-grid,
	.regex-examples {
		grid-template-columns: 1fr;
	}
}
