:root {
  --blue: #0077ff;
  --blue-dark: #0066dd;
  --blue-soft: #e8f3ff;
  --text: #111111;
  --muted: #6b7280;
  --line: #eceef2;
  --bg: #ffffff;
  --soft: #f3f5f7;
  --radius: 16px;
  --header-h: 64px;
  --shadow: 0 8px 30px rgba(17, 24, 39, 0.08);
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 auto;
  font-size: 15px;
  color: #3d3d3d;
}
.nav a:hover,
.nav a.is-active { color: var(--text); font-weight: 600; }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: var(--soft); }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7dd3fc, #0077ff);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111;
  margin: 4px auto;
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  transition: 0.15s ease;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost {
  background: var(--soft);
  color: var(--text);
}
.btn-ghost:hover { background: #e5e7eb; }
.btn-telegram {
  background: #229ed9;
  color: #fff;
}
.btn-telegram:hover { background: #1b8fc4; }
.btn-lg { padding: 16px 28px; font-size: 17px; }

/* Home hero */
.hero {
  padding: 56px 0 28px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -1.2px;
  font-weight: 800;
}
.hero p.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.badge-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.qr-card {
  width: 240px;
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-left: auto;
  background: #fff;
  box-shadow: var(--shadow);
}
.qr-card #qrcode,
.qr-card #qrcode img,
.qr-card #qrcode canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Install block */
.install {
  position: relative;
  background: var(--soft);
  border-radius: 28px;
  padding: 28px 32px;
  margin: 12px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
  overflow: hidden;
}
.phone-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  background: #0b0b0f;
  border-radius: 32px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.phone-screen {
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #0077ff;
  display: flex;
  flex-direction: column;
}
.phone-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.phone-brand img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.phone-top {
  color: #fff;
  padding: 16px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.phone-sheet {
  flex: 1;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 10px 0;
}
.phone-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}
.phone-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.phone-row b { display: block; font-size: 13px; }
.phone-row span { font-size: 11px; color: var(--muted); }
.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.92);
  color: #111;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 2;
}

.steps { display: grid; gap: 8px; align-content: start; padding-top: 8px; }
.step {
  background: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  color: inherit;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
a.step:hover {
  box-shadow: 0 6px 18px rgba(0, 119, 255, 0.12);
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.step.is-done .step-num {
  background: var(--blue);
  color: #fff;
}

.cube {
  position: absolute;
  background: linear-gradient(145deg, rgba(0, 119, 255, 0.55), rgba(125, 211, 252, 0.2));
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.cube-1 { width: 90px; height: 90px; left: 8%; bottom: -20px; transform: rotate(28deg); }
.cube-2 { width: 64px; height: 64px; left: 28%; top: 18px; transform: rotate(-18deg); opacity: 0.7; }
.cube-3 { width: 110px; height: 110px; right: -20px; bottom: 40px; transform: rotate(22deg); opacity: 0.55; }

/* Catalog */
.page {
  padding: 28px 0 72px;
}
.page h1 {
  margin: 0 0 18px;
  font-size: 34px;
  letter-spacing: -0.8px;
}
.pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  border: 0;
  background: var(--soft);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.pill.is-active {
  background: var(--blue);
  color: #fff;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 16px;
}
.section-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.4px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.more { color: var(--muted); font-weight: 600; white-space: nowrap; }
.more:hover { color: var(--blue); }

.scroller {
  position: relative;
}
.scroller-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.scroller-row::-webkit-scrollbar { display: none; }
.scroll-btn {
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 2;
}
.scroll-btn.prev { right: auto; left: -8px; }

.promo {
  min-width: 280px;
  height: 180px;
  border-radius: 20px;
  padding: 22px;
  color: #fff;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.promo h3 { margin: 0; font-size: 26px; line-height: 1.15; }
.promo p { margin: 8px 0 0; opacity: 0.9; font-size: 14px; }
.promo-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-left: auto;
}

.app-card {
  min-width: 280px;
  scroll-snap-align: start;
}
.app-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
}
.app-meta b { display: block; font-size: 15px; }
.app-meta span { color: var(--muted); font-size: 13px; }
.stars { color: #f5a623; font-size: 13px; font-weight: 700; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.shot {
  height: 118px;
  border-radius: 10px;
  background: linear-gradient(#eef2f7, #dbe3ee);
  position: relative;
  overflow: hidden;
}
.shot.has-photo::before,
.shot.has-photo::after { display: none; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.app-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.os-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 3px 8px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.45);
  z-index: 90;
  place-items: center;
  padding: 16px;
}
.modal-overlay.is-open { display: grid; }
.modal-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.modal-card h3 { margin: 0 0 8px; }
.modal-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.modal-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  margin-bottom: 12px;
}
.modal-error { color: #e11d48; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.shot::before,
.shot::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  border-radius: 4px;
  background: rgba(255,255,255,0.7);
}
.shot::before { top: 12%; height: 18%; }
.shot::after { top: 38%; height: 46%; }

.grid-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.grid-apps .app-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.simple {
  max-width: 760px;
}
.simple h1 { margin-bottom: 12px; }
.simple p { color: #374151; line-height: 1.6; }
.card-list { display: grid; gap: 12px; margin-top: 24px; }
.news-card, .dev-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  background: #fff;
}
.news-card small { color: var(--muted); }

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Search */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.35);
  z-index: 80;
  padding: 80px 16px 16px;
}
.search-overlay.is-open { display: block; }
.search-box {
  width: min(640px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  padding: 16px 18px;
  font-size: 16px;
}
.search-results { max-height: 320px; overflow: auto; }
.search-hit {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
}
.search-hit:hover { background: var(--soft); }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
    gap: 14px;
  }
  .burger { display: block; }
  .header-inner { gap: 12px; }
  .hero, .install { grid-template-columns: 1fr; }
  .qr-card { margin: 0; }
  .btn-header { display: none; }
  .page h1 { font-size: 26px; }
  .scroll-btn { display: none; }
}
