/* KREVETKA mini app — тема «Космос для ребят»: ночное небо, Земля, космонавт, мультяшные звёзды,
   оранжевые «объёмные» кнопки и много весёлой анимации. Цвета — в :root. */
:root {
  --bg: #140b2b;
  --card: #1f1539;
  --card-2: #2a1d4b;
  --deep: #110a22;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #fff8f0;
  --soft: #e4dbf5;
  --mist: #a69bc4;
  --orange: #ff7a1a;
  --orange-2: #ffa13d;
  --orange-dark: #b9480a;
  --yellow: #ffd84a;
  --cyan: #7fd8ff;
  --pink: #ff8ad1;
  --mint: #7ff0b8;
  --key: #ffc08a;
  --r-card: 20px;
  --r-ctrl: 14px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Rubik", "Onest", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --btn-orange: linear-gradient(180deg, #ffa548 0%, #ff8124 45%, #f26a0c 100%);
  --btn-orange-sh: inset 0 2px 0 rgba(255, 255, 255, .45), 0 4px 0 var(--orange-dark), 0 10px 22px -8px rgba(255, 122, 26, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  padding-top: var(--safe-t);
  background: transparent;   /* фон рисуют html и .sky — иначе body закрыл бы звёзды */
  color: var(--text);
  font: 400 15px/1.45 var(--font);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 1em; height: 1em; fill: currentColor; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
::selection { background: rgba(255, 122, 26, .4); }

/* ---------- фон: звёздное небо ---------- */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.nebula {
  position: absolute; inset: -10%;
  background:
    radial-gradient(70% 45% at 85% 0%, rgba(120, 70, 220, .38), transparent 70%),
    radial-gradient(55% 35% at 0% 40%, rgba(60, 110, 230, .32), transparent 70%),
    radial-gradient(50% 30% at 100% 62%, rgba(255, 110, 200, .2), transparent 70%),
    radial-gradient(60% 30% at 20% 80%, rgba(80, 200, 255, .16), transparent 70%),
    radial-gradient(70% 40% at 60% 100%, rgba(200, 70, 160, .26), transparent 70%);
  animation: nebula 40s ease-in-out infinite alternate;
}
@keyframes nebula { to { transform: translate3d(3%, -2%, 0) scale(1.06); } }
#skyfx { position: absolute; inset: 0; width: 100%; height: 100%; }

/* мультяшные планеты на фоне всех вкладок */
.bg-planets { position: absolute; inset: 0; opacity: .75; }
.bp { position: absolute; border-radius: 50%; will-change: transform; animation: bp-float var(--d, 20s) ease-in-out infinite; }
.bp::after { content: ""; position: absolute; border-radius: 50%; }
.bp.p1 {   /* розовая с кольцом */
  --d: 22s; width: 70px; height: 70px; left: -36px; top: 66%;
  background: radial-gradient(circle at 32% 28%, #ffd3ef 0, #ff8ad1 30%, #b9479a 80%);
  box-shadow: inset -8px -10px 0 rgba(90, 20, 80, .25), 0 0 30px rgba(255, 138, 209, .35);
}
.bp.p1::after { left: -28%; right: -28%; top: 42%; height: 18%; border: 4px solid rgba(255, 216, 74, .85); border-top-color: transparent; transform: rotate(-18deg); }
.bp.p2 {   /* голубая */
  --d: 26s; width: 44px; height: 44px; right: -14px; top: 86%;
  background: radial-gradient(circle at 32% 28%, #e3f7ff 0, #7fd8ff 35%, #2b7bbd 85%);
  box-shadow: inset -5px -7px 0 rgba(10, 50, 100, .3), 0 0 22px rgba(127, 216, 255, .35);
}
.bp.p3 {   /* луна с кратерами */
  --d: 30s; width: 28px; height: 28px; left: 3%; top: 34%;
  background: radial-gradient(circle at 62% 60%, #b8b2cc 0 12%, transparent 13%), radial-gradient(circle at 34% 40%, #b8b2cc 0 9%, transparent 10%), radial-gradient(circle at 32% 28%, #ffffff, #d9d4ea 45%, #8f88a8);
  box-shadow: inset -4px -5px 0 rgba(40, 30, 70, .25);
}
.bp.p4 {   /* маленькая оранжевая */
  --d: 18s; width: 18px; height: 18px; left: 62%; top: 96%;
  background: radial-gradient(circle at 32% 28%, #ffe0b0, #ff9a3d 45%, #c4520c);
  box-shadow: 0 0 16px rgba(255, 154, 61, .45);
}
.bp.p5 {   /* фиолетовая полосатая */
  --d: 34s; width: 56px; height: 56px; right: -30px; top: 48%;
  background: repeating-linear-gradient(170deg, #9f86ff 0 7px, #7a5cf0 7px 13px, #b9a2ff 13px 17px);
  box-shadow: inset -7px -9px 0 rgba(30, 10, 80, .35), 0 0 26px rgba(160, 130, 255, .35);
}
@keyframes bp-float { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(10px, -18px) rotate(8deg); } }

/* ---------- шапка ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 480px;
  padding: 24px 20px 0;
  overflow: hidden;
}
#planets {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  -webkit-mask: linear-gradient(#000 84%, transparent);
          mask: linear-gradient(#000 84%, transparent);
}
.hero.no-gl #planets { display: none; }
.hero.no-gl::before {
  content: ""; position: absolute; z-index: 0; left: -40%; right: -40%; top: 55%; height: 200%; border-radius: 50%;
  background: radial-gradient(circle at 30% 8%, #2f7fe0 0, #1450a8 25%, #0b2350 60%);
  box-shadow: 0 -3px 0 rgba(140, 200, 255, .8), 0 -12px 40px rgba(80, 160, 255, .45);
}

/* мультяшные звёздочки */
.toy-stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ts { position: absolute; width: var(--w); height: var(--w); color: var(--c); filter: drop-shadow(0 0 6px var(--c)); animation: twinkle var(--d) ease-in-out infinite; }
.ts.t1 { --w: 22px; --c: var(--yellow); --d: 2.6s; left: 70%; top: 8%; }
.ts.t2 { --w: 14px; --c: var(--pink); --d: 3.2s; left: 52%; top: 26%; animation-delay: -1s; }
.ts.t3 { --w: 16px; --c: var(--cyan); --d: 2.9s; right: 6%; top: 44%; animation-delay: -.6s; }
.ts.t4 { --w: 12px; --c: var(--yellow); --d: 3.6s; left: 6%; top: 52%; animation-delay: -2s; }
.ts.t5 { --w: 18px; --c: var(--orange-2); --d: 3s; left: 40%; top: 3%; animation-delay: -1.5s; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 50% { transform: scale(.55) rotate(40deg); opacity: .6; } }

/* ракета иногда пролетает по небу */
.rocket {
  position: absolute; z-index: 1; width: 34px; height: 68px; left: -60px; top: 60%;
  animation: fly 16s linear infinite; animation-delay: 3s;
  filter: drop-shadow(0 0 10px rgba(255, 194, 58, .5));
}
@keyframes fly {
  0% { transform: translate(0, 0) rotate(60deg); opacity: 1; }
  22% { transform: translate(calc(100vw + 140px), -260px) rotate(60deg); opacity: 1; }
  22.1%, 100% { transform: translate(calc(100vw + 140px), -260px) rotate(60deg); opacity: 0; }
}
.rocket .flame { transform-origin: 30px 78px; animation: flame .18s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scaleY(.7); } }

/* космонавт парит */
.astro-wrap {
  position: absolute; z-index: 2; right: 0; top: 36%; width: clamp(92px, 26vw, 190px); aspect-ratio: 120 / 150;
  animation: drift 9s ease-in-out infinite; cursor: pointer;
}
.astro { width: 100%; height: 100%; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .45)) drop-shadow(0 0 18px rgba(127, 216, 255, .25)); }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-10deg); }
  25% { transform: translate(-8px, -14px) rotate(-3deg); }
  50% { transform: translate(-16px, 4px) rotate(-14deg); }
  75% { transform: translate(-4px, 12px) rotate(-6deg); }
}
.astro .as-arm-l { transform-origin: 32px 72px; transform-box: view-box; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-24deg); } }
.astro .as-leg-l { transform-origin: 47px 102px; transform-box: view-box; animation: kick 3s ease-in-out infinite; }
.astro .as-leg-r { transform-origin: 73px 102px; transform-box: view-box; animation: kick 3s ease-in-out infinite reverse; }
@keyframes kick { 50% { transform: rotate(10deg); } }
.astro .as-blink { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { fill: #5a1f2a; } }
.astro-wrap.flip .astro { animation: flip .9s cubic-bezier(.4, 0, .2, 1); }
@keyframes flip { to { transform: rotate(360deg) scale(1.05); } }

.hero-text { position: relative; z-index: 3; }
.hero-meta {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 600 12.5px/1 var(--display); color: var(--soft);
}
.live { width: 8px; height: 8px; border-radius: 50%; background: #5fe39a; box-shadow: 0 0 0 3px rgba(95, 227, 154, .2); animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(95, 227, 154, 0); } }
.wordmark {
  margin: 0 0 14px;
  font: 900 clamp(44px, 13.4vw, 110px)/1 var(--display);
  letter-spacing: .01em; color: var(--yellow);
  text-shadow: 0 3px 0 #f2861a, 0 6px 0 #c4520c, 0 8px 0 #8a320a, 0 14px 24px rgba(0, 0, 0, .45);
}
.wordmark span { display: inline-block; animation: bob 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .1s); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px) rotate(-2deg); } }
.hero-sub { margin: 0; max-width: 22ch; color: var(--soft); font-size: 17px; font-weight: 500; line-height: 1.35; text-shadow: 0 2px 10px rgba(10, 5, 25, .8); }
.hero-sub b { color: #fff; font: 800 1.08em/1 var(--display); font-variant-numeric: tabular-nums; }

/* ---------- поиск и фильтры ---------- */
.searchbar {
  position: sticky; top: var(--safe-t); z-index: 5;
  padding: 10px 16px 8px;
  background: linear-gradient(rgba(20, 11, 43, .95) 80%, rgba(20, 11, 43, 0));
}
.search {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 6px 0 16px; border-radius: 16px;
  background: var(--deep); border: 1.5px solid var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .14), 0 0 22px -4px rgba(255, 122, 26, .5);
  transition: box-shadow .25s;
}
.search:focus-within { box-shadow: 0 0 0 4px rgba(255, 122, 26, .25), 0 0 30px -2px rgba(255, 122, 26, .7); }
.search .ic { width: 20px; height: 20px; color: var(--orange); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.search input::placeholder { color: var(--mist); }
.search input::-webkit-search-cancel-button { display: none; }
.clear { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--soft); flex: none; }
.clear svg { width: 18px; height: 18px; }
.kbd { display: none; flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--mist); font: 600 12px/20px var(--mono); text-align: center; }
@media (hover: hover) and (pointer: fine) { .kbd { display: inline-block; } }
.find {
  flex: none; height: 42px; padding: 0 14px 0 16px; border-radius: 11px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--btn-orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--orange-dark);
  color: #fff; font: 800 15px/1 var(--display); text-shadow: 0 1px 0 rgba(150, 50, 0, .5);
  transition: transform .1s, box-shadow .1s;
}
.find b { font-weight: 800; transition: transform .2s; }
.find:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 1px 0 var(--orange-dark); }
@media (hover: hover) { .find:hover b { transform: translateX(3px); } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 6px; scrollbar-width: none; margin: 0 -16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 3px 0 rgba(0, 0, 0, .35); color: var(--soft);
  font: 700 14px/1 var(--display); white-space: nowrap;
  transition: transform .1s, background .2s, color .2s;
}
.chip:active { transform: translateY(2px) scale(.97); }
.chip.game { color: var(--mist); font-weight: 600; }
.chip.is-on, .chip.game.is-on { background: var(--btn-orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--orange-dark); color: #fff; }

.result-line { margin: 8px 16px 0; color: var(--mist); font: 600 13px/1.3 var(--display); }

/* ---------- сетка скриптов ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 12px 16px 0;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  position: relative;
  display: flex; flex-direction: column; text-align: left;
  background: var(--card); border-radius: var(--r-card); overflow: hidden;
  box-shadow: inset 0 0 0 1.5px var(--line), 0 5px 0 rgba(0, 0, 0, .35);
  transition: transform .15s;
}
.card:active { animation: squish .35s ease; }
@keyframes squish { 30% { transform: scale(.94, .96); } 65% { transform: scale(1.02, .99); } 100% { transform: none; } }
@media (hover: hover) { .card:hover { transform: translateY(-4px) rotate(-.6deg); } }
.thumb { position: relative; aspect-ratio: 16 / 10; background: var(--card-2); overflow: hidden; margin: 6px 6px 0; border-radius: 15px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb img.sb, .sheet-media img.sb { height: calc(100% / 0.8); object-position: top; }
.thumb .tag {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  padding: 4px 9px; border-radius: 999px; font: 700 11.5px/1 var(--display);
  background: rgba(17, 10, 34, .82); color: var(--soft);
}
.tag.nokey { color: var(--mint); }
.tag.key { color: var(--key); }
.ph { /* заглушка вместо картинки игры */
  width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 10px;
  background:
    radial-gradient(70% 90% at 85% 0%, hsl(var(--h) 85% 62% / .55), transparent 70%),
    linear-gradient(160deg, #2d2052, #160e2c);
  font: 800 17px/1.05 var(--display); color: #fff;
  overflow: hidden; word-break: break-word;
}
.meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.meta .game { font: 800 15px/1.25 var(--display); color: #fff;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.meta .title { color: var(--mist); font-size: 13px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.meta .views { display: inline-flex; align-items: center; gap: 5px; color: var(--mist); font: 600 12.5px/1 var(--display); font-variant-numeric: tabular-nums; }
.meta .views svg { width: 14px; height: 14px; }
.meta .title, .meta .views { margin-bottom: 6px; }
.meta .get {
  margin-top: auto; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--btn-orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--orange-dark);
  color: #fff; font: 800 14.5px/1 var(--display); text-shadow: 0 1px 0 rgba(150, 50, 0, .5);
}
.card:active .get { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 1px 0 var(--orange-dark); }

.skeleton .thumb, .skeleton .meta i { background: linear-gradient(90deg, #22183f, #33265a, #22183f); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton .meta i { display: block; height: 12px; border-radius: 6px; }
.skeleton .meta i + i { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: var(--mist); }
.empty strong { display: block; color: var(--text); font: 800 18px/1.3 var(--display); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.sentinel { height: 1px; }
.credit { margin: 28px 16px calc(104px + var(--safe-b)); color: #6f6490; font: 600 12px/1.3 var(--display); text-align: center; }

/* ---------- страницы Видео / Экзекуторы / Bypass ---------- */
.view { padding-bottom: calc(104px + var(--safe-b)); }
.page-head { padding: 34px 20px 8px; }
.page-head h2 { margin: 0 0 8px; font: 900 34px/1.05 var(--display); color: var(--yellow); text-shadow: 0 3px 0 #c4520c, 0 5px 0 #8a320a; }
.page-head p { margin: 0; color: var(--soft); max-width: 36ch; }
.page-head a { color: var(--cyan); text-decoration: none; font-weight: 700; }

.exec-list { display: grid; gap: 14px; padding: 16px; }
.exec { position: relative; padding: 16px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line), 0 5px 0 rgba(0, 0, 0, .35); overflow: hidden; }
.exec::before { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(127, 216, 255, .18), transparent 70%); }
.exec-top { display: flex; gap: 14px; align-items: center; position: relative; }
.exec-logo { width: 64px; height: 64px; border-radius: 18px; flex: none; overflow: hidden; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .4), 0 0 0 2px rgba(127, 216, 255, .35); animation: float-logo 4s ease-in-out infinite; }
@keyframes float-logo { 50% { transform: translateY(-4px) rotate(-3deg); } }
.exec-logo svg { width: 100%; height: 100%; }
.exec-logo img { width: 100%; height: 100%; object-fit: cover; }
.exec h3 { margin: 0; font: 900 22px/1.15 var(--display); }
.exec .plat { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(127, 216, 255, .15); color: var(--cyan); font: 700 12.5px/1 var(--display); }
.exec-ver { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 4px; }
.exec-ver div { display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border-radius: 16px; background: var(--card-2); }
.exec-ver small { color: var(--mist); font: 700 12px/1 var(--display); }
.exec-ver b { font: 800 18px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.exec-ver .ok { color: var(--mint); }
.exec-text { position: relative; margin: 12px 0 0; color: var(--soft); font-size: 14px; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.exec-text.open { -webkit-line-clamp: unset; }
.more { color: var(--cyan); font-size: 13px; font-weight: 700; margin-top: 4px; position: relative; }
.exec-actions { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 18px; }

/* ---------- кнопки: объёмные, «нажимаются» ---------- */
.btn {
  height: 52px; border-radius: 16px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 800 16px/1 var(--display);
  transition: transform .1s, box-shadow .1s;
}
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--btn-orange); box-shadow: var(--btn-orange-sh); color: #fff; text-shadow: 0 1px 0 rgba(150, 50, 0, .5); }
.btn.primary:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 1px 0 var(--orange-dark); }
.btn.ghost { background: var(--card-2); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 4px 0 rgba(0, 0, 0, .4); color: var(--text); }
.btn.ghost:active { transform: translateY(3px); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 1px 0 rgba(0, 0, 0, .4); }
.btn.done { background: linear-gradient(180deg, #a6f7cf, #5fdc9e); color: #06301b; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 #2e9c66; text-shadow: none; }
.btn:disabled { opacity: .6; }

.exec-empty { text-align: center; padding: 36px 22px; border-radius: 24px; color: var(--mist); border: 2px dashed var(--line-2); }
.exec-empty strong { display: block; color: var(--text); font: 800 18px/1.3 var(--display); margin-bottom: 6px; }
.exec-empty .btn { margin-top: 16px; }

/* ---------- Bypass ---------- */
.bypass { padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.bypass input {
  width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; outline: 0; font-size: 16px;
  background: var(--deep); border: 1.5px solid var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .14), 0 0 22px -4px rgba(255, 122, 26, .5);
  transition: box-shadow .2s;
}
.bypass input:focus { box-shadow: 0 0 0 4px rgba(255, 122, 26, .25), 0 0 30px -2px rgba(255, 122, 26, .7); }
.bypass input::placeholder { color: var(--mist); }

/* GO — оранжевая планета с кольцом */
.go { position: relative; width: 170px; height: 170px; display: grid; place-items: center; margin-top: 10px; }
.go::before { content: ""; position: absolute; inset: -26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 140, 40, .45), transparent); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.9); opacity: .6; } }
.go-planet {
  position: absolute; inset: 8px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle at 68% 62%, #e2580a 0 8%, transparent 9%),
    radial-gradient(circle at 40% 72%, #e2580a 0 6%, transparent 7%),
    radial-gradient(circle at 72% 32%, #e2580a 0 5%, transparent 6%),
    radial-gradient(circle at 45% 45%, #ffb347, #ff7a1a 55%, #c94b07);
  box-shadow: inset -10px -14px 0 rgba(150, 40, 0, .25), 0 6px 0 var(--orange-dark), 0 18px 40px -10px rgba(255, 122, 26, .8);
}
.go-ring {
  position: absolute; left: -12%; right: -12%; top: 40%; height: 26%; border-radius: 50%;
  border: 5px solid var(--cyan); border-top-color: transparent;
  transform: rotate(-16deg); filter: drop-shadow(0 0 6px rgba(127, 216, 255, .8));
}
.go-label { position: relative; z-index: 2; font: 900 42px/1 var(--display); color: #fff; text-shadow: 0 3px 0 var(--orange-dark), 0 0 18px rgba(255, 255, 255, .5); }
.go:active .go-planet { transform: scale(.94); }
.go.busy .go-planet { animation: wobble .5s ease-in-out infinite; }
.go.busy .go-label { animation: wobble .5s ease-in-out infinite reverse; }
@keyframes wobble { 25% { transform: rotate(-6deg) scale(1.02); } 75% { transform: rotate(6deg) scale(.98); } }

.bp-progress { width: 100%; max-width: 420px; display: grid; gap: 10px; transition: opacity .4s; }
.bp-progress.fade { opacity: 0; }
.bp-bar { position: relative; height: 18px; border-radius: 999px; background: var(--deep); box-shadow: inset 0 0 0 1.5px var(--line-2), inset 0 3px 6px rgba(0, 0, 0, .4); overflow: hidden; }
.bp-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 999px;
  background: repeating-linear-gradient(-45deg, #ffa13d 0 10px, #ff7a1a 10px 20px);
  background-size: 28px 28px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 0 12px rgba(255, 122, 26, .7);
  transition: width .25s linear;
  animation: stripes .6s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0; } }
.bp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 700 14px/1.3 var(--display); color: var(--soft); }
.bp-row b { color: var(--yellow); font: 900 16px/1 var(--display); font-variant-numeric: tabular-nums; }

.soon { margin: 0; color: var(--mist); font-size: 14px; text-align: center; max-width: 34ch; }
.tut-btn { width: 100%; max-width: 360px; }
.bp-result { width: 100%; padding: 16px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line), 0 5px 0 rgba(0, 0, 0, .35); display: grid; gap: 12px; }
.bp-result.err { color: #ffc2c2; }
.bp-result b { color: var(--mint); font-family: var(--display); }
.bp-link { margin: 0; padding: 12px; border-radius: 12px; background: var(--deep); font: 12.5px/1.45 var(--mono); color: #eae3f7; word-break: break-all; }
.bp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- нижняя навигация ---------- */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: 68px; padding: 7px; border-radius: 24px;
  background: rgba(31, 21, 57, .92); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 6px 0 rgba(0, 0, 0, .35), 0 16px 34px -12px rgba(0, 0, 0, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tab { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 18px; color: var(--mist); font: 700 11.5px/1 var(--display); transition: color .3s ease; }
.tab svg { width: 23px; height: 23px; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.tab.is-on { color: #fff; }
.tab.is-on svg { transform: translateY(-2px) scale(1.15) rotate(-6deg); }
.tab:active svg { transform: scale(.8); }
.tab-pill {
  position: absolute; top: 7px; bottom: 9px; left: 7px; width: calc((100% - 14px) / 4); z-index: 1;
  border-radius: 18px; background: var(--btn-orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--orange-dark);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .55s cubic-bezier(.34, 1.4, .5, 1);
}
.card, .vcard { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--n, 0) * 40ms); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.9); } }

/* ---------- карточка скрипта (шторка) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 4, 18, .72); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto;
  background: var(--card); box-shadow: inset 0 1.5px 0 var(--line-2);
  border-radius: 28px 28px 0 0;
  transform: translateY(100%); transition: transform .4s cubic-bezier(.34, 1.25, .5, 1);
  padding-bottom: calc(16px + var(--safe-b));
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.handle { position: sticky; top: 0; z-index: 2; height: 24px; display: grid; place-items: center; }
.handle::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.sheet-media { margin: 0 16px; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--card-2); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.sheet-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-body { padding: 16px 18px 0; }
.sheet-body h2 { margin: 0; font: 900 24px/1.2 var(--display); }
.sheet-body .sub { margin: 6px 0 0; color: var(--mist); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge { padding: 5px 11px; border-radius: 999px; background: var(--card-2); font: 700 13px/1 var(--display); display: inline-flex; gap: 5px; align-items: center; color: var(--soft); }
.badge svg { width: 14px; height: 14px; }
.badge.nokey { color: var(--mint); }
.badge.key { color: var(--key); }
.feat { margin-top: 16px; border-radius: 18px; background: var(--card-2); }
.feat summary { list-style: none; padding: 14px 16px; font: 800 15px/1.2 var(--display); display: flex; justify-content: space-between; cursor: pointer; }
.feat summary::-webkit-details-marker { display: none; }
.feat summary::after { content: "+"; color: var(--orange-2); font-size: 22px; line-height: 1; transition: transform .25s; }
.feat[open] summary::after { transform: rotate(135deg); }
.feat ul { margin: 0; padding: 0 16px 14px 34px; color: var(--soft); }
.feat li { margin: 3px 0; }
.feat li::marker { content: "★ "; color: var(--yellow); }
.code-label { margin: 18px 0 8px; font: 800 15px/1 var(--display); }
.code {
  margin: 0; padding: 14px; max-height: 210px; overflow: auto;
  border-radius: 16px; background: var(--deep); box-shadow: inset 0 0 0 1.5px var(--line);
  font: 12.5px/1.5 var(--mono); color: #eae3f7; white-space: pre-wrap; word-break: break-all;
}
.sheet-actions { position: sticky; bottom: 0; padding: 14px 18px 6px; background: linear-gradient(rgba(31, 21, 57, 0), var(--card) 30%); }
.sheet-actions .btn { width: 100%; height: 56px; font-size: 17px; }
.gate { padding: 6px 18px 4px; }
.gate p { color: var(--mist); margin: 6px 0 14px; }
.gate .btn { width: 100%; margin-bottom: 10px; }

/* ---------- видео ---------- */
.vstrip { padding: 16px 0 2px; }
.vstrip-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 10px; }
.vstrip-head h3 { margin: 0; font: 900 19px/1 var(--display); }
.link { color: var(--cyan); font: 700 14px/1 var(--display); }
.vstrip-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px; scroll-padding-inline: 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.vstrip-row::-webkit-scrollbar { display: none; }
.vstrip-row .vcard { flex: 0 0 62%; max-width: 260px; scroll-snap-align: start; }
.vcard { display: flex; flex-direction: column; text-align: left; border-radius: var(--r-card); overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line), 0 5px 0 rgba(0, 0, 0, .35); }
.vcard:active { animation: squish .35s ease; }
.vthumb { position: relative; aspect-ratio: 16 / 10; background: var(--card-2); overflow: hidden; margin: 6px 6px 0; border-radius: 15px; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.vthumb .play span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--orange-dark); color: #fff; }
.vthumb .play svg { width: 24px; height: 24px; }
.plat-tag { position: absolute; left: 6px; top: 6px; padding: 4px 9px; border-radius: 999px; font: 800 11px/1 var(--display); background: rgba(17, 10, 34, .82); z-index: 2; }
.plat-tag.youtube { color: #ff8a8a; }
.plat-tag.tiktok { color: var(--cyan); }
.vmeta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.vmeta b { font: 800 14px/1.3 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta small { color: var(--mist); font-size: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.social .btn { height: 44px; font-size: 14.5px; padding: 0 18px; }

/* ---------- подписки перед скриптом ---------- */
.gate h2 { font-size: 22px; }
.progress { margin: 6px 0 16px; height: 14px; border-radius: 999px; background: var(--deep); box-shadow: inset 0 0 0 1.5px var(--line-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: repeating-linear-gradient(-45deg, #ffa13d 0 8px, #ff7a1a 8px 16px); transition: width .4s cubic-bezier(.34, 1.4, .5, 1); }
.task { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border-radius: 18px; background: var(--card-2); }
.task .ava { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(150deg, var(--cyan), #6a5cff); font: 900 18px/1 var(--display); color: #fff; }
.task .ava img { width: 100%; height: 100%; object-fit: cover; }
.task .tt { min-width: 0; }
.task .tt b { display: block; font-family: var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .tt small { color: var(--mist); font-size: 12px; }
.task .go-btn { height: 38px; padding: 0 14px; border-radius: 12px; background: var(--btn-orange); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--orange-dark); color: #fff; font: 800 13.5px/1 var(--display); }
.task.done .go-btn { background: rgba(127, 240, 184, .15); box-shadow: none; color: var(--mint); }
.task.done .go-btn svg { width: 18px; height: 18px; }
.gate .btn.primary { margin-top: 10px; }

/* ---------- уведомление и звёздный салют ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 30;
  transform: translate(-50%, 20px) scale(.9); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: var(--yellow); color: #3a1d00; font: 800 15px/1.2 var(--display);
  box-shadow: 0 4px 0 #c99a10, 0 12px 26px -8px rgba(0, 0, 0, .6);
  transition: opacity .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.spark {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  filter: drop-shadow(0 0 4px currentColor);
  animation: spark .9s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes spark {
  from { transform: translate(0, 0) scale(var(--s)) rotate(0deg); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(0) rotate(var(--rot)); opacity: 0; }
}

/* ---------- большой экран (ПК, полноэкранный режим) ---------- */
@media (min-width: 900px) {
  :root { --side: max(32px, calc((100vw - 1240px) / 2)); }
  .hero { padding: 56px var(--side) 0; min-height: 580px; }
  .astro-wrap { right: calc(var(--side) + 60px); top: 12%; width: 200px; }
  .wordmark { font-size: 110px; }
  .hero-sub { font-size: 20px; max-width: 36ch; }
  .searchbar { padding-inline: var(--side); }
  .chips { margin: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 14px var(--side) 0; }
  .result-line { margin-inline: var(--side); }
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px var(--side); }
  .vstrip-row { padding: 0 var(--side) 8px; scroll-padding-inline: var(--side); }
  .vstrip-head { padding: 0 var(--side) 10px; }
  .vstrip-row .vcard { flex-basis: 280px; }
  .exec-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px var(--side); }
  .page-head { padding: 56px var(--side) 8px; }
  .page-head h2 { font-size: 52px; }
  .bypass { max-width: 640px; margin: 0 auto; }
  .tabbar { left: 50%; right: auto; width: 540px; transform: translateX(-50%); }
  .sheet { left: 50%; right: auto; width: 640px; transform: translate(-50%, 100%); }
  .sheet-wrap.open .sheet { transform: translate(-50%, 0); }
}
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rocket { display: none; }
}
