:root {
  --brand: #06b6d4;
  --brand-2: #0891b2;
  --brand-3: #22d3ee;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #ef4444;
  --card: #ffffff;
  --tint: #ecfeff;
}

* { 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(900px 500px at 50% -180px, #cffafe 0%, rgba(207, 250, 254, 0) 70%),
    linear-gradient(180deg, #f3fdff 0%, #f8fafc 100%);
}

.wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px 24px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 26px;
  padding: 40px 30px 34px;
  box-shadow:
    0 30px 60px -25px rgba(8, 145, 178, 0.35),
    0 10px 24px -16px rgba(15, 23, 42, 0.25);
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.badge {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 12px 24px -8px rgba(8, 145, 178, 0.6);
}
.badge img { width: 100%; height: 100%; object-fit: cover; display: block; }

h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-accent { color: var(--brand-2); }

.tagline {
  margin: 8px 0 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---- Search ---- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid var(--line);
  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(--brand);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 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: #94a3b8; }

.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(--brand-3), var(--brand-2));
  box-shadow: 0 10px 18px -8px rgba(8, 145, 178, 0.7);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.search button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.search button:active { transform: translateY(0); }

/* ---- Telegram CTA ---- */
.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 12px 22px -14px rgba(34, 158, 217, 0.85);
  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 16px 26px -14px rgba(34, 158, 217, 0.95);
}
.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: 26px;
  background: var(--tint);
  border: 1px solid #cffafe;
  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: #334155;
  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: var(--brand-2);
}
.hl { color: var(--brand-2); font-weight: 700; }

.divider { height: 1px; background: #cffafe; margin: 18px 0; border: 0; }

.note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #334155;
  text-align: center;
}
.note strong { color: var(--danger); }
.note .save { color: var(--danger); 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: #fef2f2; 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(--brand-2); font-weight: 600; text-decoration: none; }
.muted-row a:hover { text-decoration: underline; }

/* ---- Footer ---- */
.footer {
  margin-top: 22px;
  color: #94a3b8;
  font-size: 0.86rem;
  text-align: center;
}
.footer a { color: var(--brand-2); text-decoration: none; font-weight: 600; }

@media (max-width: 480px) {
  .card { padding: 32px 20px 28px; border-radius: 22px; }
  h1 { font-size: 1.8rem; }
  .search button { padding: 13px 20px; }
  .search { padding-left: 14px; }
}