@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Regular.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Bold.woff2) format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Black.woff2) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #0c0a1f;
  --card: rgba(255, 255, 255, .06);
  --card-border: rgba(255, 255, 255, .12);
  --ink: #f5f3ff;
  --muted: #b7b0d6;
  --accent: #a855f7;
  --danger: #fb7185;
  --grad: linear-gradient(90deg, #22d3ee, #a855f7 55%, #f472b6);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--ink);
  line-height: 1.7;
  background: var(--bg);
}
/* Glows stay put while scrolling (background-attachment: fixed doesn't work on iOS). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 500px at 100% 0%, rgba(34, 211, 238, .16), transparent 70%),
    radial-gradient(700px 520px at 0% 100%, rgba(236, 72, 153, .16), transparent 70%),
    radial-gradient(800px 600px at 40% 20%, rgba(124, 58, 237, .20), transparent 70%);
}
a { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.wrap { width: min(880px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand img { border-radius: 50%; }
.top-actions { display: flex; gap: 8px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 16px; color: var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #7c3aed, #c026d3); box-shadow: 0 10px 30px rgba(124, 58, 237, .35); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: var(--card); border-color: var(--card-border); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.small svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* hero */
.hero { padding: 40px 0 12px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--muted); font-size: 14px;
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }
h1 { margin: 18px 0 10px; font-size: clamp(38px, 8vw, 68px); line-height: 1.25; font-weight: 900; }
.sub { margin: 0 auto 28px; max-width: 520px; font-size: clamp(16px, 3.6vw, 20px); color: var(--muted); }

.search {
  display: flex; gap: 8px; padding: 8px; border-radius: 20px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.search:focus-within { border-color: rgba(168, 85, 247, .7); box-shadow: 0 0 0 4px rgba(168, 85, 247, .18), 0 20px 60px rgba(0, 0, 0, .35); }
.search input {
  flex: 1; min-width: 0; padding: 0 14px; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: 16px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left;
}
.search input::placeholder { color: rgba(183, 176, 214, .55); }

/* cards */
.card { margin-top: 18px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border); text-align: start; }

.status-head { display: flex; align-items: center; gap: 10px; }
.status-head .percent { margin-inline-start: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.status p { margin: 8px 0 0; font-size: 14px; min-height: 1.7em; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .2); border-top-color: #f472b6; animation: spin .8s linear infinite; }
.bar { margin-top: 14px; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .4s ease; }
.bar.indeterminate i { width: 35%; animation: slide 1.2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(-300%); } to { transform: translateX(100%); } }

.error { border-color: rgba(251, 113, 133, .4); background: rgba(251, 113, 133, .08); }
.error b { color: var(--danger); }
.error p { margin: 4px 0 0; }

.results { display: grid; gap: 4px; }
.result { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; }
.preview { border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.preview video, .preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview audio { width: 92%; }
.result .title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; }
.result .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 14px; font-size: 14px; }
.result .meta span { unicode-bidi: isolate; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* sections */
section h2 { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.sites { padding: 44px 0 8px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { padding: 6px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--card-border); font-weight: 700; font-size: 15px; }
.chip.more { background: var(--grad); border: 0; color: #140a2a; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 36px 0 8px; }
.step { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border); }
.step span {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 10px; border-radius: 12px;
  background: var(--grad); color: #140a2a; font-weight: 900;
}
.step b { font-size: 17px; }
.step p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.telegram { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 36px 0 0; padding: 26px; }
.telegram p { margin: 0; max-width: 420px; }
.tg-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: none; width: 320px; }
.tg-buttons .primary { grid-column: 1 / -1; }

footer { padding: 40px 0 32px; text-align: center; font-size: 13px; }

@media (max-width: 640px) {
  .top .tg-label { display: none; } /* icon only; aria-label says what it is */
  .hero { padding-top: 20px; }
  .search { flex-wrap: wrap; }
  .search input { flex-basis: 100%; min-height: 48px; }
  .search .btn { flex: 1; }
  .result { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .telegram { flex-direction: column; align-items: stretch; }
  .tg-buttons { width: auto; }
}

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