@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap');

:root {
	--bg: #111113;
	--surface: #1a1a1f;
	--surface-2: #222228;
	--border: #2e2e35;
	--text: #e8e8ed;
	--text-dim: #8a8a95;
	--accent: #ff6b2b;
	--accent-glow: rgba(255, 107, 43, 0.15);
	--success: #2dcc6f;
	--mono: 'JetBrains Mono', monospace;
	--sans: 'DM Sans', sans-serif;
}

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

body {
	font-family: var(--sans);
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
	padding: 20px 0;
	border-bottom: 1px solid var(--border);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.logo {
	font-family: var(--mono);
	font-size: 20px;
	font-weight: 700;
	color: var(--text);
	text-decoration: none;
	letter-spacing: -0.5px;
}
.logo .dot { color: var(--accent); }
.header-nav a {
	color: var(--text-dim);
	font-size: 14px;
	margin-left: 24px;
}
.header-nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
	padding: 80px 0 40px;
	text-align: center;
}
.hero h1 {
	font-family: var(--mono);
	font-size: clamp(28px, 5vw, 44px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -1.5px;
	margin-bottom: 16px;
}
.hero h1 .highlight { color: var(--accent); }
.hero-desc {
	color: var(--text-dim);
	font-size: 17px;
	max-width: 520px;
	margin: 0 auto 40px;
	line-height: 1.6;
}

/* Search Box */
.search-box {
	max-width: 640px;
	margin: 0 auto;
	display: flex;
	border: 2px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	background: var(--surface);
	transition: border-color 0.2s;
}
.search-box:focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-box input {
	flex: 1;
	min-width: 0;
	padding: 16px 20px;
	background: transparent;
	border: none;
	color: var(--text);
	font-size: 15px;
	font-family: var(--sans);
	outline: none;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box button {
	padding: 16px 32px;
	background: var(--accent);
	color: #fff;
	border: none;
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}
.search-box button:hover { background: #e85a1f; }
.search-box button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status */
.status { max-width: 640px; margin: 12px auto 0; font-size: 14px; color: var(--text-dim); }
.status.error { color: #ff5555; }

/* Result Section */
.result-section { padding: 20px 0; }

/* HTMX indicator */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: block; }
.loading-indicator {
	text-align: center;
	padding: 40px 0;
}
.loading-indicator .spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-indicator p { color: var(--text-dim); font-size: 14px; }

/* Features */
.features { padding: 60px 0; border-top: 1px solid var(--border); }
.features h2 {
	font-family: var(--mono);
	font-size: 24px;
	text-align: center;
	margin-bottom: 40px;
	letter-spacing: -0.5px;
}
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 16px;
}
.feat-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 24px;
	transition: border-color 0.2s;
}
.feat-card:hover { border-color: var(--accent); }
.feat-card .icon {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--accent-glow);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	margin-bottom: 14px;
}
.feat-card h3 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 8px;
}
.feat-card p {
	font-size: 14px;
	color: var(--text-dim);
	line-height: 1.5;
}

/* Steps */
.steps { padding: 60px 0; border-top: 1px solid var(--border); }
.steps h2 {
	font-family: var(--mono);
	font-size: 24px;
	text-align: center;
	margin-bottom: 40px;
	letter-spacing: -0.5px;
}
.steps-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 24px;
	max-width: 700px;
	margin: 0 auto;
}
.step-card {
	text-align: center;
	padding: 24px 16px;
}
.step-num {
	font-family: var(--mono);
	font-size: 32px;
	font-weight: 700;
	color: var(--accent);
	display: block;
	margin-bottom: 12px;
}
.step-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }

/* FAQ */
.faq { padding: 60px 0; border-top: 1px solid var(--border); }
.faq h2 {
	font-family: var(--mono);
	font-size: 24px;
	text-align: center;
	margin-bottom: 40px;
	letter-spacing: -0.5px;
}
.faq-list { max-width: 680px; margin: 0 auto; }
.faq-item {
	border-bottom: 1px solid var(--border);
	padding: 20px 0;
}
.faq-item h4 {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--text);
}
.faq-item p {
	font-size: 14px;
	color: var(--text-dim);
	line-height: 1.6;
}

/* Footer */
.footer {
	padding: 32px 0;
	border-top: 1px solid var(--border);
	text-align: center;
}
.footer-links { margin-bottom: 12px; }
.footer-links a {
	color: var(--text-dim);
	font-size: 13px;
	margin: 0 12px;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
	font-size: 12px;
	color: var(--text-dim);
	font-family: var(--mono);
}

/* Download Result */
.dl-result { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 20px; }
.dl-cover { flex: 0 0 300px; max-width: 100%; }
.dl-cover img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.dl-cover .title { font-weight: 700; margin-top: 10px; word-break: break-word; }
.dl-cover .meta { color: var(--text-dim); font-size: 13px; font-family: var(--mono); margin-top: 4px; }
.dl-downloads { flex: 1; min-width: 260px; }
.dl-downloads h4 {
	font-family: var(--mono);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--text-dim);
	margin-bottom: 12px;
}
.dl-table { width: 100%; border-collapse: collapse; }
.dl-table th, .dl-table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	font-size: 14px;
}
.dl-table th {
	font-size: 12px;
	font-family: var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--text-dim);
	font-weight: 400;
}
.dl-btn {
	display: inline-block;
	padding: 8px 20px;
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.2s;
}
.dl-btn:hover { background: #e85a1f; text-decoration: none; color: #fff; }

/* Responsive */
@media (max-width: 640px) {
	.hero { padding: 50px 0 30px; }
	.search-box { flex-direction: column; }
	.search-box button { padding: 14px; }
	.dl-cover { flex: 0 0 100%; }
	.features-grid { grid-template-columns: 1fr; }
	.steps-row { grid-template-columns: 1fr; }
	.header-nav { display: none; }
}
