@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
	--primary-color: #667eea;
	--primary-dark: #5a67d8;
	--secondary-color: #4facfe;
	--accent-color: #f093fb;
	--text-primary: #2d3748;
	--text-secondary: #4a5568;
	--text-light: #718096;
	--bg-primary: #ffffff;
	--bg-secondary: #f7fafc;
	--bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	--border-color: rgba(0, 0, 0, 0.1);
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
	--border-radius: 8px;
	--container-max-width: 1200px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family:
		"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.6;
	color: var(--text-primary);
	background: var(--bg-gradient);
	min-height: 100vh;
}

/* 等宽字体设置 */
code,
pre,
kbd {
	font-family:
		"JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", "Source Code Pro", "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
	font-feature-settings:
		"liga" 1,
		"calt" 1;
	-webkit-font-feature-settings:
		"liga" 1,
		"calt" 1;
	-moz-font-feature-settings:
		"liga" 1,
		"calt" 1;
}

code {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	color: #334155;
	padding: 0.2rem 0.4rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	border: 1px solid rgba(148, 163, 184, 0.2);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
}

code:hover {
	background: linear-gradient(135deg, #f1f5f9 0%, #dbeafe 100%);
	border-color: rgba(59, 130, 246, 0.3);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

/* 代码块样式 */
pre {
	background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
	color: #e2e8f0;
	padding: 1.5rem;
	border-radius: 0.75rem;
	overflow-x: auto;
	border: 1px solid rgba(148, 163, 184, 0.2);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	position: relative;
	margin: 1.5rem 0;
}

pre::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
	border-radius: 0.75rem 0.75rem 0 0;
}

pre code {
	background: transparent;
	color: inherit;
	padding: 0;
	border: none;
	box-shadow: none;
	font-size: 0.875rem;
	line-height: 1.6;
}

pre code:hover {
	background: transparent;
	border: none;
	box-shadow: none;
	transform: none;
}

/* 键盘按键样式 */
kbd {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	color: #475569;
	padding: 0.25rem 0.5rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	border: 1px solid #cbd5e1;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
	display: inline-block;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.antialiased {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 2rem;
}

/* Header */
.header {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	z-index: 100;
	transition: all 0.3s ease;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 0;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
}

.logo-img {
	width: 32px;
	height: 32px;
}

.logo h1 {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--primary-color);
}

.nav {
	display: flex;
	gap: 2rem;
}

.nav a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: var(--text-secondary);
	font-weight: 500;
	transition: color 0.2s ease;
	cursor: pointer;
}

.nav-icon {
	font-size: 1.1em;
	opacity: 0.8;
	transition:
		transform 0.2s ease,
		opacity 0.2s ease;
	vertical-align: middle;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

/* 导航图标颜色 */
.nav a:nth-child(1) .nav-icon {
	color: #ffd700; /* 金色 - Features */
}

.nav a:nth-child(2) .nav-icon {
	color: #4facfe; /* 蓝色 - Keymap */
}

.nav a:nth-child(3) .nav-icon {
	color: #00d4aa; /* 绿色 - Download */
}

.nav a:nth-child(4) .nav-icon {
	color: #333; /* 深灰色 - GitHub */
}

.nav a:hover {
	color: var(--primary-color);
}

.nav a:hover .nav-icon {
	transform: scale(1.1);
	opacity: 1;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: var(--border-radius);
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border: none;
	font-family: inherit;
	font-size: 1rem;
}

.btn-primary {
	background: linear-gradient(
		135deg,
		var(--primary-color) 0%,
		var(--secondary-color) 100%
	);
	color: white;
	box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-secondary {
	background: white;
	color: var(--primary-color);
	border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
	background: var(--primary-color);
	color: white;
}

/* Hero Section */
.hero {
	padding: 4rem 0;
}

.hero-content {
	text-align: center;
	max-width: 800px;
	margin: 0 auto;
}

.hero h2 {
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	background: linear-gradient(
		135deg,
		var(--primary-color),
		var(--secondary-color)
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero p {
	font-size: 1.25rem;
	color: var(--text-secondary);
	margin-bottom: 2rem;
}

.hero-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

.hero-visual {
	display: flex;
	justify-content: center;
	margin-bottom: 3rem;
	cursor: default;
}

.keyboard-preview {
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	padding: 2rem;
	border-radius: 1rem;
	box-shadow: var(--shadow-lg);
	text-align: center;
}

.key-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.key {
	padding: 0.75rem 1rem;
	background: var(--bg-secondary);
	border: 2px solid var(--border-color);
	border-radius: 0.5rem;
	font-weight: 500;
	min-width: 80px;
}

.key.capslock {
	background: #f7fafc;
	border-color: #cbd5e1;
	color: #4a5568;
}

.key-arrow {
	font-size: 1.5rem;
	color: var(--primary-color);
}

.preview-text {
	font-size: 1.25rem;
	font-weight: 500;
	font-family: sans-serif;
	background: linear-gradient(90deg, #ff3c8e, #6366f1, #00d4ff, #ff3c8e);
	background-size: 200% auto;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	/* animation: gradient-animation 3s infinite alternate; */
}

/* @keyframes gradient-animation {
	0% {
		background-position: 0% 50%;
	}
	100% {
		background-position: 100% 50%;
	}
} */

/* Features Section */
.features {
	padding: 4rem 0;
}

.features h3 {
	text-align: center;
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 3rem;
	color: var(--text-primary);
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.feature {
	background: white;
	padding: 2rem;
	border-radius: 1rem;
	box-shadow: var(--shadow-sm);
	text-align: center;
	transition: all 0.3s ease;
}

.feature:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-md);
}

.feature-icon {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.feature h4 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.feature p {
	color: var(--text-secondary);
}

/* Keymap Section */
.keymap-section {
	padding: 4rem 0;
	background: rgba(255, 255, 255, 0.5);
}

.keymap-section h3 {
	text-align: center;
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.keymap-section > .container > p {
	text-align: center;
	font-size: 1.125rem;
	color: var(--text-secondary);
	margin-bottom: 2rem;
}

.keymap-container {
	display: flex;
	justify-content: center;
	margin-bottom: 2rem;
}

/* Download Section */
.download {
	padding: 4rem 0;
	background: rgba(255, 255, 255, 0.5);
}

.download h3 {
	text-align: center;
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 3rem;
	color: var(--text-primary);
}

.download-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 2rem;
}

.download-option {
	background: white;
	padding: 2rem;
	border-radius: 1rem;
	box-shadow: var(--shadow-sm);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.download-option .btn {
	align-self: flex-start;
	margin-top: auto;
}

.download-option:hover {
	box-shadow: var(--shadow-md);
}

.download-option h4 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.download-option p {
	color: var(--text-secondary);
	margin-bottom: 1.5rem;
}

.download-option ol {
	margin-bottom: 2rem;
	padding-left: 1.5rem;
	flex: 1;
}

.download-option li {
	margin-bottom: 0.5rem;
	color: var(--text-secondary);
}

.download-option a:not(.btn) {
	color: var(--primary-color);
	text-decoration: none;
}

.download-option a:not(.btn):hover {
	text-decoration: underline;
}

/* Footer */
.footer {
	background: var(--text-primary);
	color: white;
	padding: 2rem 0;
	text-align: center;
}

.footer .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-links {
	display: flex;
	gap: 2rem;
}

.footer-links a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color 0.2s ease;
}

.footer-links a:hover {
	color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 0 1rem;
	}

	.header-content {
		flex-direction: column;
		gap: 1rem;
	}

	.nav {
		gap: 1rem;
	}

	.hero h2 {
		font-size: 2rem;
	}

	.hero p {
		font-size: 1rem;
	}

	.hero-actions {
		flex-direction: column;
		align-items: center;
	}

	.features h3,
	.keymap-section h3,
	.download h3 {
		font-size: 2rem;
	}

	.features-grid {
		grid-template-columns: 1fr;
	}

	.download-grid {
		grid-template-columns: 1fr;
	}

	.footer .container {
		flex-direction: column;
		text-align: center;
	}

	.key-row {
		flex-direction: column;
		gap: 0.5rem;
	}

	.key-arrow {
		transform: rotate(90deg);
	}
}

/* Alpine.js transitions */
[x-cloak] {
	display: none !important;
}

/* Zen Key Animation Effects */
.zen-key-container {
	position: relative;
	overflow: visible;
}

/* Hero Zen Key特殊效果 */
.key.zen {
	position: relative;
	padding: 2px;
	background: linear-gradient(90deg, #ff3c8e, #6366f1, #00d4ff, #ff3c8e);
	border-radius: 0.5em;
	transition: all 0.4s ease;
	color: white;
	font-weight: 500;
	background-size: 300% 100%;
	animation: zen-border-flow 3s ease infinite;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.key.zen::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	background: linear-gradient(90deg, #ff3c8e, #6366f1, #00d4ff, #ff3c8e);
	border-radius: 0.5em;
	z-index: -10;
	filter: blur(0);
	transition: filter 0.4s ease;
	background-size: 300% 100%;
	animation: zen-border-flow 3s ease infinite;
}

.key.zen span {
	background-color: #1a1a1a;
	padding: 0.75rem 1rem;
	border-radius: calc(0.5em - 3px);
	width: 100%;
	height: 100%;
	display: block;
	transition: 300ms;
	position: relative;
	z-index: 1;
}

.key.zen:hover {
	transform: scale(1.1);
}

.key.zen:hover::before {
	filter: blur(1.2em);
}

.key.zen:hover span {
	background: transparent;
}

@keyframes zen-border-flow {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

@keyframes zen-shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}
