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

:root {
	--bg: #f8fafc;
	--surface: #fff;
	--border: #e2e8f0;
	--text: #1e293b;
	--text-dim: #64748b;
	--primary: #6366f1;
	--primary-dark: #4f46e5;
	--primary-soft: #eef2ff;
	--gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
	--sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
	--radius: 14px;
}

* { 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(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 22px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo .dot { color: var(--primary); }
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav a { color: var(--text-dim); font-size: 14px; font-weight: 500; }
.header-nav a:hover { color: var(--text); text-decoration: none; }

/* Lang dropdown */
.lang-drop { position: relative; }
.lang-drop-btn { background: var(--primary-soft); color: var(--primary); border: none; padding: 5px 14px; border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 500; }
.lang-drop-btn:after { content: ' ▾'; }
.lang-drop-list { display: none; position: absolute; right: 0; top: 100%; margin-top: 6px; background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); min-width: 120px; overflow: hidden; z-index: 100; border: 1px solid var(--border); }
.lang-drop-list a { display: block; padding: 9px 16px; color: var(--text); font-size: 13px; text-decoration: none; }
.lang-drop-list a:hover { background: var(--primary-soft); }
.lang-drop-list a.active { color: var(--primary); font-weight: 600; }
.lang-drop:hover .lang-drop-list { display: block; }

/* Hero */
.hero {
	background: var(--gradient);
	padding: 64px 0 44px;
	text-align: center;
	color: #fff;
	border-radius: 0 0 32px 32px;
}
.hero h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 700; margin-bottom: 12px; letter-spacing: -0.5px; }
.hero .highlight { background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: 6px; }
.hero-desc { font-size: 16px; opacity: 0.9; max-width: 480px; margin: 0 auto 36px; line-height: 1.6; }

/* Search */
.search-box {
	max-width: 600px; margin: 0 auto; display: flex;
	background: #fff; border-radius: 50px; overflow: hidden;
	box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.search-box input {
	flex: 1; min-width: 0; padding: 16px 22px; border: none;
	font-family: var(--sans); font-size: 15px; color: var(--text); outline: none;
}
.search-box input::placeholder { color: #a0aec0; }
.search-box button {
	padding: 16px 30px; background: var(--primary); color: #fff; border: none;
	font-family: var(--sans); font-size: 15px; font-weight: 600;
	cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.search-box button:hover { background: var(--primary-dark); }
.search-box button:disabled { opacity: 0.5; cursor: not-allowed; }

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

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

/* Features */
.features { padding: 56px 0; }
.features h2 { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 36px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feat-card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius); padding: 24px; transition: transform 0.15s, box-shadow 0.15s;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(99,102,241,0.08); }
.feat-card .icon { font-size: 28px; margin-bottom: 12px; }
.feat-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feat-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }

/* Steps */
.steps { padding: 48px 0; border-top: 1px solid var(--border); }
.steps h2 { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 36px; }
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 700px; margin: 0 auto; }
.step-card { text-align: center; padding: 20px 16px; }
.step-num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 14px; background: var(--gradient);
	color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 14px;
}
.step-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }

/* FAQ */
.faq { padding: 48px 0; border-top: 1px solid var(--border); }
.faq h2 { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 36px; }
.faq-list { max-width: 660px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.faq-item p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid var(--border); text-align: center; }
.footer-links a { color: var(--text-dim); font-size: 13px; margin: 0 10px; font-weight: 500; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { font-size: 12px; color: #94a3b8; margin-top: 8px; }

/* Download Result */
.dl-result { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 20px; }
.dl-cover { flex: 0 0 280px; max-width: 100%; }
.dl-cover img { width: 100%; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.dl-cover .title { font-weight: 600; margin-top: 10px; word-break: break-word; }
.dl-cover .meta { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.dl-downloads { flex: 1; min-width: 260px; }
.dl-downloads h4 {
	font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
	color: var(--text-dim); margin-bottom: 12px; font-weight: 600;
}
.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; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); font-weight: 600; }
.dl-btn {
	display: inline-block; padding: 8px 22px; background: var(--primary);
	color: #fff; border-radius: 8px; font-size: 13px; font-weight: 600;
	text-decoration: none; transition: background 0.15s;
}
.dl-btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }

/* Search Results */
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 16px; }
.search-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.search-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.search-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.search-item .info { padding: 10px 12px; }
.search-item .info span { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.search-item .info button {
	margin-top: 8px; width: 100%; padding: 8px; background: var(--primary); color: #fff;
	border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.search-item .info button:hover { background: var(--primary-dark); }

/* Responsive */
@media (max-width: 640px) {
	.hero { padding: 40px 0 30px; border-radius: 0 0 20px 20px; }
	.search-box { flex-direction: column; border-radius: var(--radius); }
	.search-box button { border-radius: 0; }
	.dl-cover { flex: 0 0 100%; }
	.features-grid { grid-template-columns: 1fr; }
	.steps-row { grid-template-columns: 1fr; }
	.header-nav a:not(.lang-drop-btn) { display: none; }
}
