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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #0d1117;
	color: #e6edf3;
	min-height: 100vh;
}

a { color: #ff8533; text-decoration: none; }
a:hover { color: #ff6b00; }

/* Header */
header {
	background: #161b22;
	border-bottom: 1px solid #30363d;
	padding: 20px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.header-icon {
	font-size: 28px;
}

header h1 {
	font-size: 20px;
	font-weight: 700;
	color: #fff;
}

.subtitle {
	font-size: 13px;
	color: #8b949e;
	margin-top: 2px;
}

.header-meta {
	display: flex;
	align-items: center;
	gap: 10px;
}

.badge {
	font-size: 12px;
	padding: 3px 10px;
	border-radius: 12px;
	font-weight: 600;
}

.badge-version {
	background: #1f2937;
	color: #8b949e;
	border: 1px solid #30363d;
}

.badge-count {
	background: rgba(255, 107, 0, 0.15);
	color: #ff8533;
	border: 1px solid rgba(255, 107, 0, 0.3);
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3fb950;
	box-shadow: 0 0 6px rgba(63, 185, 80, 0.5);
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* Main */
main {
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 24px 64px;
}

section { margin-bottom: 40px; }

h2 {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 6px;
}

.section-desc {
	font-size: 14px;
	color: #8b949e;
	margin-bottom: 20px;
}

/* Connect Section */
.connect-section {
	background: #161b22;
	border: 1px solid #30363d;
	border-radius: 10px;
	padding: 24px;
}

.connect-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
	background: #0d1117;
	border-radius: 8px;
	padding: 3px;
	width: fit-content;
}

.tab {
	background: transparent;
	border: none;
	color: #8b949e;
	padding: 7px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.15s;
}

.tab:hover { color: #e6edf3; }

.tab.active {
	background: #30363d;
	color: #fff;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.code-block {
	background: #0d1117;
	border: 1px solid #30363d;
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.15s;
}

.code-block.copyable { cursor: pointer; }
.code-block.copyable:hover { border-color: #ff6b00; }

.code-block.copied {
	border-color: #3fb950 !important;
}

.code-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 14px;
	background: #161b22;
	border-bottom: 1px solid #30363d;
	font-size: 12px;
	color: #8b949e;
}

.copy-hint {
	font-size: 11px;
	color: #484f58;
	transition: color 0.15s;
}

.code-block.copyable:hover .copy-hint { color: #ff8533; }

.code-block.copied .copy-hint {
	color: #3fb950;
}

pre {
	padding: 14px;
	overflow-x: auto;
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	font-size: 13px;
	line-height: 1.5;
}

code { font-family: inherit; }

/* Catalog Grid */
.catalog-grid {
	display: grid;
	gap: 16px;
}

.loading {
	color: #8b949e;
	font-style: italic;
	text-align: center;
	padding: 40px;
}

.category-group {
	margin-bottom: 8px;
}

.category-header {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #8b949e;
	margin-bottom: 10px;
	padding-left: 2px;
}

.category-tools {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 10px;
}

.tool-card {
	background: #161b22;
	border: 1px solid #30363d;
	border-radius: 8px;
	padding: 16px;
	transition: border-color 0.15s;
	cursor: pointer;
}

.tool-card:hover { border-color: #484f58; }
.tool-card.expanded { border-color: #ff6b00; }

.tool-name {
	font-family: 'SF Mono', 'Fira Code', monospace;
	font-size: 14px;
	font-weight: 600;
	color: #ff8533;
	margin-bottom: 6px;
}

.tool-desc {
	font-size: 13px;
	color: #8b949e;
	line-height: 1.4;
}

.tool-meta {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.tool-meta .badge {
	font-size: 11px;
	padding: 2px 8px;
	background: #1f2937;
	color: #8b949e;
	border: 1px solid #30363d;
}

.tool-schema {
	display: none;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #30363d;
}

.tool-card.expanded .tool-schema { display: block; }

.tool-schema pre {
	background: #0d1117;
	border: 1px solid #21262d;
	border-radius: 6px;
	padding: 12px;
	font-size: 12px;
	color: #8b949e;
	max-height: 300px;
	overflow-y: auto;
}

.tool-schema pre::-webkit-scrollbar { width: 6px; }
.tool-schema pre::-webkit-scrollbar-track { background: transparent; }
.tool-schema pre::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }

.param-list {
	margin-bottom: 10px;
}

.param-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
}

.param-name {
	font-family: 'SF Mono', 'Fira Code', monospace;
	color: #ff8533;
	font-size: 12px;
}

.param-type {
	font-size: 11px;
	color: #484f58;
}

.param-required {
	font-size: 10px;
	color: #f85149;
	font-weight: 600;
}

.param-desc {
	color: #8b949e;
	font-size: 12px;
}

/* Demo Cards */
.demo-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 14px;
}

.demo-card {
	display: block;
	background: #161b22;
	border: 1px solid #30363d;
	border-radius: 10px;
	padding: 24px;
	transition: border-color 0.2s, transform 0.2s;
}

.demo-card:hover {
	border-color: #ff6b00;
	transform: translateY(-2px);
}

.demo-icon {
	font-size: 28px;
	margin-bottom: 12px;
}

.demo-card h3 {
	font-size: 16px;
	color: #fff;
	margin-bottom: 8px;
}

.demo-card p {
	font-size: 13px;
	color: #8b949e;
	line-height: 1.5;
	margin-bottom: 14px;
}

.demo-link {
	font-size: 13px;
	font-weight: 600;
	color: #ff8533;
}

/* Footer */
footer {
	text-align: center;
	padding: 24px;
	font-size: 12px;
	color: #484f58;
	border-top: 1px solid #21262d;
}

footer a { color: #8b949e; }

/* Responsive */
@media (max-width: 640px) {
	header { flex-direction: column; gap: 12px; align-items: flex-start; }
	.category-tools { grid-template-columns: 1fr; }
	.demo-cards { grid-template-columns: 1fr; }
}
