@font-face {
  font-family: "Taxna Naskh";
  src: url("/resources/data/fonts/NotoNaskhArabic-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}

:root {
  --ink: #0b1020;
  --ink-2: #141b32;
  --paper: #f7f8fc;
  --white: #ffffff;
  --muted: #66708c;
  --muted-2: #8e97ad;
  --line: rgba(16, 22, 42, 0.1);
  --line-dark: rgba(255, 255, 255, 0.12);
  --blue: #2f6df6;
  --blue-2: #7ea6ff;
  --teal: #16b8a6;
  --amber: #ffbf69;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(16, 22, 42, 0.12);
  --wrap: min(1180px, calc(100vw - 48px));
  --sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --naskh: "Taxna Naskh", "Noto Naskh Arabic", "Segoe UI", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
code, pre { font-family: "SFMono-Regular", "Cascadia Code", Consolas, monospace; }
.ug { font-family: var(--naskh); }
.wrap { width: var(--wrap); margin: 0 auto; }

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: 72px;
  background: rgba(11, 16, 32, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(150%) blur(18px);
  color: #fff;
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #2f6df6, #6d91ff 55%, #16b8a6);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(47, 109, 246, 0.35);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 15px; letter-spacing: 0.16em; }
.brand-copy small { margin-top: 5px; color: rgba(255, 255, 255, 0.55); font-size: 11px; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a { color: rgba(255, 255, 255, 0.7); font-size: 14px; transition: color 0.2s; }
.nav a:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 109, 246, 0.3);
}
.btn-primary:hover { background: #225fe8; box-shadow: 0 16px 34px rgba(47, 109, 246, 0.38); }
.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn-icon { font-size: 17px; line-height: 1; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 156px 0 96px;
  background:
    radial-gradient(900px 560px at 78% 18%, rgba(47, 109, 246, 0.22), transparent 62%),
    radial-gradient(700px 480px at 14% 82%, rgba(22, 184, 166, 0.16), transparent 60%),
    linear-gradient(180deg, #080d1c 0%, #0b1226 52%, #111a33 100%);
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 166, 255, 0.55), transparent);
}
.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -140px;
  top: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 109, 246, 0.18), transparent 66%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 54px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  letter-spacing: 0.11em;
  color: rgba(255, 255, 255, 0.66);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(22, 184, 166, 0.14); }
.hero h1 { margin: 28px 0 22px; font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .ug {
  display: block;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.48;
  color: #fff;
}
.hero h1 .h1-cn {
  display: block;
  margin-top: 10px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.25;
  color: #cdd8f6;
}
.lead { max-width: 590px; margin: 0; color: rgba(236, 241, 255, 0.72); font-size: 16px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 24px; color: rgba(255, 255, 255, 0.55); font-size: 12px; }
.hero-meta > span { position: relative; }
.hero-meta > span + span::before { content: "·"; position: absolute; left: -11px; color: rgba(255, 255, 255, 0.28); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; color: rgba(255, 255, 255, 0.7); }
.status-pill::before { display: none; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #ffbf69; }
.status-pill.ok i { background: var(--teal); box-shadow: 0 0 0 4px rgba(22, 184, 166, 0.15); }
.status-pill.fail i { background: #ff6b86; }
.notice { margin: 18px 0 0; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255, 191, 105, 0.3); background: rgba(255, 191, 105, 0.08); color: #ffd79a; font-size: 13px; }

.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.keyboard-card {
  position: relative;
  z-index: 2;
  width: min(470px, 100%);
  padding: 18px 18px 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, #f8faff, #e9eefb);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.44), inset 0 1px 0 #fff;
  color: #16203b;
  transform: rotate(-2.2deg);
}
.keyboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
}
.keyboard-top { display: flex; gap: 7px; align-items: center; margin-bottom: 12px; font-family: var(--naskh); }
.candidate { padding: 7px 10px; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(16, 22, 42, 0.08); font-size: 14px; }
.candidate.muted { background: #edf1fb; color: #7a86a7; box-shadow: none; }
.tool { margin-left: auto; width: 30px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #e3e9f7; color: #6c7897; font-size: 12px; }
.keyboard { display: flex; flex-direction: column; gap: 5px; }
.krow { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.krow span {
  display: grid;
  place-items: center;
  min-height: 39px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 0 #cbd5ea, inset 0 1px 0 #fff;
  font-family: var(--naskh);
  font-size: 17px;
  color: #1a2440;
}
.krow span.key-accent { background: #dfe9ff; color: #235fe8; }
.krow span.key-wide { font-family: var(--sans); font-size: 11px; font-weight: 700; color: #5f6b8a; background: #dce3f2; box-shadow: 0 2px 0 #bcc8de; }
.krow span.key-blue { background: var(--blue); color: #fff; box-shadow: 0 2px 0 #1b4cc0; }
.krow-bottom { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1.6fr; }
.krow-space { grid-template-columns: 0.7fr 0.7fr 4fr 0.7fr 0.7fr; margin-top: 2px; }
.krow-space span { min-height: 34px; font-family: var(--sans); font-size: 14px; }
.krow span.key-space { font-family: var(--naskh); font-size: 15px; }
.keyboard-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(16, 22, 42, 0.09);
  color: #6b7696;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.keyboard-foot b { color: #1b5ce0; font-size: 13px; }
.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  color: #10162a;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  font-size: 12px;
}
.float-card small { display: block; color: #69748f; font-size: 10.5px; line-height: 1.4; }
.float-card-a { left: -20px; top: 62px; }
.float-card-b { right: -18px; bottom: 74px; }
.mini-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #e3ecff; color: #2f6df6; font-family: var(--naskh); font-size: 18px; font-weight: 700; }

.section { padding: 98px 0; }
.section-soft { background: linear-gradient(180deg, #f2f5fb, #f8f9fd); }
.section-dark { background: #0b1020; color: #fff; }
.section-head { max-width: 740px; }
.section-head.light { color: #fff; }
.kicker { margin-bottom: 14px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 0.2em; }
.section-dark .kicker { color: var(--blue-2); }
.section h2 { margin: 0; font-size: clamp(28px, 3.1vw, 36px); line-height: 1.24; letter-spacing: -0.035em; }
.section-head p, .section-lead { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.section-head.light p { color: rgba(255, 255, 255, 0.62); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.feature-card {
  position: relative;
  min-height: 270px;
  padding: 26px 24px 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(16, 22, 42, 0.04);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; top: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 109, 246, 0.12), transparent 70%); }
.feature-num { color: #b6c1db; font-size: 11px; font-weight: 800; letter-spacing: 0.13em; }
.feature-card h3 { margin: 22px 0 10px; font-size: 18px; letter-spacing: -0.02em; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.chips span { padding: 4px 8px; border-radius: 6px; background: #f0f4fd; color: #5d6b8c; font-size: 10.5px; letter-spacing: 0.02em; }

.download-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 42px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
}
.download-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.apk-icon { display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(145deg, #2f6df6, #16b8a6); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.download-title { font-size: 16px; font-weight: 700; }
.download-sub { margin-top: 4px; color: rgba(255, 255, 255, 0.55); font-size: 12px; }
.download-actions { display: flex; margin-left: auto; flex: 0 0 auto; }
.download-actions .btn { margin-left: 0; }
.hash-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: rgba(255, 255, 255, 0.44); font-size: 10px; letter-spacing: 0.08em; }
.hash-line code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.7); font-size: 11px; }
.copy { padding: 4px 8px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; background: transparent; color: rgba(255, 255, 255, 0.66); font-size: 10px; }
.copy:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.copy.small { border-color: rgba(16, 22, 42, 0.13); color: #5d6b8c; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.resource-card { padding: 22px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.045); }
.resource-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.resource-tag { padding: 3px 7px; border-radius: 5px; background: rgba(47, 109, 246, 0.16); color: #9dbcff; font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; }
.resource-size { color: rgba(255, 255, 255, 0.4); font-size: 11px; }
.resource-card h3 { margin: 18px 0 8px; font-size: 16px; }
.resource-card p { margin: 0; min-height: 42px; color: rgba(255, 255, 255, 0.54); font-size: 12px; line-height: 1.7; }
.resource-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.text-link { color: var(--blue-2); font-size: 12.5px; font-weight: 700; border-bottom: 1px solid rgba(126, 166, 255, 0.35); padding-bottom: 2px; }
.resource-card .text-link { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.resource-hash { display: block; margin-top: 14px; color: rgba(255, 255, 255, 0.3); font-size: 10.5px; }
.resources-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 34px; color: rgba(255, 255, 255, 0.42); font-size: 11px; }
.resources-foot code { color: rgba(255, 255, 255, 0.68); }

.api-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 64px; align-items: start; }
.api-grid > *, .feedback-grid > *, .hero-grid > * { min-width: 0; }
.api-status-card { margin-top: 26px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(16, 22, 42, 0.05); }
.status-row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.status-row:last-of-type { border-bottom: 0; }
.status-row span { color: var(--muted); }
.status-row strong { font-weight: 700; color: #233052; }
.status-row strong.bad { color: #c33c56; }
.status-row strong.good { color: #0d8c7f; }
.api-status-card .text-link { display: inline-block; margin-top: 12px; color: var(--blue); border-color: rgba(47, 109, 246, 0.3); }
.endpoint-list { display: flex; flex-direction: column; gap: 8px; }
.endpoint { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; min-width: 0; transition: border 0.2s, transform 0.2s; }
a.endpoint:hover { border-color: rgba(47, 109, 246, 0.35); transform: translateX(3px); }
.method { flex: 0 0 auto; padding: 2px 6px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; }
.method.get { background: #e6f7f4; color: #0b8b7d; }
.method.post { background: #fff0e1; color: #b86b14; }
.endpoint code { font-size: 12.5px; color: #233052; min-width: 0; overflow-wrap: anywhere; }
.endpoint-desc { margin-left: auto; color: var(--muted-2); font-size: 11px; }
.code-block { margin-top: 6px; border-radius: 12px; overflow: hidden; background: #0d1428; color: #d9e3ff; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 13px; background: #131d38; color: #8693b7; font-size: 10px; letter-spacing: 0.08em; }
.code-head .copy { border-color: rgba(255, 255, 255, 0.15); }
.code-block pre { margin: 0; padding: 16px; overflow: auto; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

.feedback-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.privacy-list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 12.5px; }
.privacy-list li { position: relative; padding-left: 18px; }
.privacy-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.privacy-list b { color: #263252; }
.privacy-list code { color: #2f6df6; }
.feedback-form { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.form-row { display: grid; gap: 14px; margin-bottom: 16px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.feedback-form label { display: block; color: #263252; font-size: 12px; font-weight: 700; }
.feedback-form .req { color: #d34d67; }
.feedback-form input, .feedback-form textarea, .feedback-form select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid #dce2ef;
  border-radius: 9px;
  background: #fbfcff;
  color: #18213b;
  font-size: 13px;
  font-weight: 400;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.feedback-form textarea { resize: vertical; line-height: 1.7; }
.feedback-form input:focus, .feedback-form textarea:focus, .feedback-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.1);
  background: #fff;
}
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.form-foot { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.form-hint { color: var(--muted-2); font-size: 11px; line-height: 1.5; }
.form-foot .btn { margin-left: auto; flex: 0 0 auto; }
.form-result { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 9px; font-size: 12px; line-height: 1.6; }
.form-result.show { display: block; }
.form-result.ok { background: #e9f9f6; color: #0b7f72; border: 1px solid #bcefe6; }
.form-result.err { background: #fff0f3; color: #a72f48; border: 1px solid #ffd1db; }

.site-footer { padding: 40px 0; background: #080d1c; color: rgba(255, 255, 255, 0.5); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.brand-footer .brand-copy small { color: rgba(255, 255, 255, 0.4); }
.footer-inner p { margin: 0; font-size: 11.5px; }
.footer-meta { margin-left: auto; color: rgba(255, 255, 255, 0.3); }

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #10172c;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero-grid, .api-grid, .feedback-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 132px; }
  .hero-visual { min-height: 470px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  :root { --wrap: calc(100vw - 32px); }
  .site-header { height: 64px; }
  html { scroll-padding-top: 64px; }
  .header-inner { gap: 12px; }
  .brand-copy small { display: none; }
  .site-header .btn { min-height: 34px; padding: 0 13px; font-size: 11px; }
  .hero { padding: 110px 0 64px; }
  .hero h1 .ug { font-size: 34px; }
  .hero h1 .h1-cn { font-size: 26px; }
  .lead { font-size: 14px; line-height: 1.8; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-meta { font-size: 10.5px; }
  .hero-visual { min-height: 420px; }
  .keyboard-card { transform: none; padding: 13px; border-radius: 20px; }
  .krow span { min-height: 33px; font-size: 14px; }
  .float-card { display: none; }
  .keyboard-foot { font-size: 9px; }
  .keyboard-foot b { font-size: 11px; }
  .section { padding: 68px 0; }
  .section h2 { font-size: 27px; }
  .feature-grid, .resource-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .download-panel { align-items: flex-start; flex-wrap: wrap; gap: 16px; padding: 20px; }
  .download-actions { margin-left: 0; width: 100%; }
  .download-panel .btn { margin-left: 0; width: 100%; }
  .apk-icon { width: 44px; height: 44px; font-size: 9px; }
  .download-title { font-size: 14px; }
  .hash-line { align-items: flex-start; flex-wrap: wrap; }
  .hash-line code { width: 100%; white-space: normal; word-break: break-all; }
  .api-grid, .feedback-grid { gap: 32px; }
  .form-row.two { grid-template-columns: 1fr; }
  .feedback-form { padding: 20px; }
  .form-foot { flex-wrap: wrap; }
  .form-foot .btn { width: 100%; }
  .footer-inner { display: grid; gap: 12px; }
  .footer-meta { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
