:root {
  /* Brand palette sampled from the logo: orange + sky-blue on deep navy */
  --orange: #f2841f;
  --orange-bright: #ff9e45;
  --orange-deep: #d96e0c;
  --blue: #3d9be9;
  --blue-bright: #5fb3f5;
  --blue-deep: #2c7cc4;

  --navy: #070f22;        /* page base */
  --card: #101e38;        /* primary card */
  --card-2: #0c1730;      /* inset surfaces (search field) */
  --tint: #0e1b32;        /* info / steps box */
  --line: rgba(255, 255, 255, 0.09);
  --line-2: #21375c;

  --ink: #eaf0fa;
  --muted: #93a2c2;
  --danger: #fb7185;

  /* aliases kept so server-rendered result pages + inline styles resolve */
  --brand: var(--orange);
  --brand-2: var(--blue);
  --brand-3: var(--orange-bright);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(780px 460px at 12% -10%, rgba(242, 132, 31, 0.16) 0%, rgba(242, 132, 31, 0) 60%),
    radial-gradient(820px 520px at 90% 0%, rgba(61, 155, 233, 0.20) 0%, rgba(61, 155, 233, 0) 62%),
    linear-gradient(180deg, #08101f 0%, var(--navy) 60%, #050b18 100%);
  background-attachment: fixed;
}

.wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px 24px;
}

/* ---- Brand banner (the logo image already carries the wordmark) ---- */
.brand-logo {
  display: block;
  width: min(440px, 86%);
  margin: 0 auto 10px;
  animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.brand-logo img {
  width: 100%;
  height: auto;
  display: block;
  /* logo.png has a transparent background, so it composites cleanly on the
     navy page; a soft halo gives it a little depth */
  filter: drop-shadow(0 8px 26px rgba(61, 155, 233, 0.18));
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.card {
  width: 100%;
  max-width: 560px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 36px 30px 30px;
  box-shadow:
    0 36px 70px -34px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(61, 155, 233, 0.05) inset;
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.08s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-accent { color: var(--blue); }

.tagline {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---- Search ---- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-2);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 132, 31, 0.18);
}
.search .icon {
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
}
.search .icon svg { width: 20px; height: 20px; }

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 12px 6px;
}
.search input::placeholder { color: #5d6b8a; }

.search button {
  flex: none;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-bright), var(--orange-deep));
  box-shadow: 0 10px 22px -8px rgba(242, 132, 31, 0.65);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.search button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.search button:active { transform: translateY(0); }

/* ---- Telegram CTA (keeps Telegram's own brand blue) ---- */
.tg-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  box-shadow: 0 14px 26px -16px rgba(34, 158, 217, 0.9);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.tg-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 18px 30px -16px rgba(34, 158, 217, 1);
}
.tg-cta:active { transform: translateY(0); }

.tg-cta__icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}
.tg-cta__icon svg { width: 22px; height: 22px; }

.tg-cta__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}
.tg-cta__title { font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; }
.tg-cta__sub { font-size: 0.82rem; opacity: 0.88; margin-top: 2px; }

.tg-cta__arrow {
  flex: none;
  display: grid;
  place-items: center;
  opacity: 0.9;
  transition: transform 0.18s ease;
}
.tg-cta__arrow svg { width: 18px; height: 18px; }
.tg-cta:hover .tg-cta__arrow { transform: translateX(3px); }

/* ---- Instructions ---- */
.info {
  margin-top: 24px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
  text-align: left;
}
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: #c4cee2;
  line-height: 1.45;
}
.steps li + li { margin-top: 12px; }
.steps .num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
}
.hl { color: var(--blue-bright); font-weight: 700; }

.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

.note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #c4cee2;
  text-align: center;
}
.note strong { color: var(--orange-bright); }
.note .save { color: var(--orange-bright); font-weight: 800; letter-spacing: 0.01em; }

/* ---- Result pages (404 / 503) ---- */
.result-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(251, 113, 133, 0.13); color: var(--danger);
}
.result-icon svg { width: 30px; height: 30px; }
.muted-row { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }
.muted-row a { color: var(--blue-bright); font-weight: 600; text-decoration: none; }
.muted-row a:hover { text-decoration: underline; }

/* ---- Footer ---- */
.footer {
  margin-top: 22px;
  color: #6b7a9c;
  font-size: 0.86rem;
  text-align: center;
}
.footer a { color: var(--blue-bright); text-decoration: none; font-weight: 600; }

@media (max-width: 480px) {
  .card { padding: 30px 20px 26px; border-radius: 22px; }
  h1 { font-size: 1.8rem; }
  .search button { padding: 13px 20px; }
  .search { padding-left: 14px; }
}
