/* ==========================================================================
   Nömrə Axtar — göy temalı, müasir UI
   ========================================================================== */

:root {
  --bg-0: #050b1f;
  --bg-1: #0a1530;
  --bg-2: #0f1d44;
  --surface: rgba(20, 35, 75, 0.55);
  --surface-2: rgba(15, 28, 62, 0.85);
  --border: rgba(96, 165, 250, 0.18);
  --border-strong: rgba(96, 165, 250, 0.4);

  --text: #e8efff;
  --text-muted: #93a4cc;
  --text-dim: #6b7ba3;

  --blue-50: #eff6ff;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --cyan-400: #22d3ee;

  --gold: #fbbf24;
  --green: #34d399;
  --red: #f87171;

  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --grad-text: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  --grad-vip: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);

  --shadow-glow: 0 20px 60px -20px rgba(59, 130, 246, 0.5);
  --shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  --shadow-soft: 0 4px 16px -4px rgba(0, 0, 0, 0.3);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

body { position: relative; overflow-x: hidden; padding-bottom: 0; }

.bg-gradient {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(59, 130, 246, 0.35), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(800px 700px at 50% 100%, rgba(29, 78, 216, 0.25), transparent 60%),
    linear-gradient(180deg, #050b1f 0%, #050913 100%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.4;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 80%);
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Header ──────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(5, 11, 31, 0.7);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad-primary);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 8px 24px -4px rgba(59, 130, 246, 0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-title { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.logo-sub { font-size: 12px; color: var(--text-muted); }

.ext-link {
  font-size: 14px; color: var(--blue-300); text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.ext-link:hover { border-color: var(--border-strong); color: var(--blue-50); transform: translateY(-1px); }

/* ── Main ────────────────────────────────────────────────────────────── */
.main { padding-top: 56px; }

.hero { text-align: center; margin-bottom: 40px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 16px; color: var(--text-muted);
  max-width: 580px; margin: 0 auto;
  line-height: 1.6;
}
.hero code {
  font-family: var(--font-mono); font-size: 13px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-300);
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── Card / Form ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.form-card { animation: slideUp 0.5s ease; }

.field { margin-bottom: 22px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.field input {
  width: 100%; padding: 14px 16px;
  font-family: var(--font-mono); font-size: 15px;
  background: rgba(5, 11, 31, 0.6);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: all 0.2s;
}
.field input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: rgba(5, 11, 31, 0.8);
}
.field input::placeholder { color: var(--text-dim); }

.hint { font-size: 12px; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }
.hint code {
  font-family: var(--font-mono);
  background: rgba(96, 165, 250, 0.1);
  color: var(--blue-300);
  padding: 1px 5px; border-radius: 4px;
}

.row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px;
  font-size: 14px; font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(5, 11, 31, 0.5);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.chip:hover {
  color: var(--blue-300);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.chip.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px -2px rgba(59, 130, 246, 0.5);
}
.chip-vip.active { background: var(--grad-vip); box-shadow: 0 4px 14px -2px rgba(251, 191, 36, 0.5); }

.actions {
  display: flex; gap: 12px; margin-top: 28px;
  align-items: center;
}
.btn-primary {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  font-size: 15px; font-weight: 700;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 60px -16px rgba(59, 130, 246, 0.7); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary svg { width: 18px; height: 18px; }

.btn-ghost {
  padding: 14px 22px;
  font-size: 14px; font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* ── Status / loading ────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.status {
  margin-top: 28px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease;
}
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(96, 165, 250, 0.2);
  border-top-color: var(--blue-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.loader-orb {
  position: relative; width: 36px; height: 36px; flex-shrink: 0;
}
.loader-orb span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--blue-400);
  animation: spin 1.1s cubic-bezier(.5,.1,.5,.9) infinite;
}
.loader-orb span:nth-child(2) {
  inset: 5px; border-top-color: #93c5fd;
  animation-duration: 1.6s; animation-direction: reverse;
}
.loader-orb span:nth-child(3) {
  inset: 11px; border-top-color: #bfdbfe;
  animation-duration: 0.9s;
}
.status-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.btn-stop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px; cursor: pointer;
  transition: all 0.15s ease; flex-shrink: 0;
}
.btn-stop:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fecaca; border-color: rgba(239, 68, 68, 0.5);
}
.btn-stop:active { transform: scale(0.96); }
.btn-stop svg { width: 14px; height: 14px; }
.status-text strong { font-size: 14px; color: var(--text); display: inline-flex; align-items: baseline; }
.status-text > span { font-size: 12px; color: var(--text-muted); }
.status-timer {
  margin-top: 4px; font-size: 11px; color: var(--blue-400);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
  display: flex; gap: 6px; align-items: center;
}
.status-timer #statusStage { color: var(--text-muted); }
.dots {
  display: inline-flex; align-items: flex-end; gap: 2px;
  margin-left: 2px; line-height: 1;
}
.dots i {
  display: inline-block; font-style: normal; font-weight: 700;
  font-size: inherit; color: var(--blue-400);
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: 0.3;
  animation: dotPulse 1.2s infinite;
}
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.hint code { white-space: nowrap; }

/* ── Results ────────────────────────────────────────────────────────── */
.results-head {
  margin-top: 36px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: end;
  padding: 0 4px;
}
.results-count { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.results-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.sort-info { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }

.results { display: grid; gap: 12px; }

.num-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 18px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  animation: slideUp 0.35s ease backwards;
}
.num-card:hover {
  border-color: var(--border-strong);
  transform: translateX(2px);
  box-shadow: var(--shadow-soft);
}
.num-card.vip {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), var(--surface-2) 60%);
}
.num-card.vip:hover { border-color: rgba(251, 191, 36, 0.55); }

.op-badge {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-primary);
  font-family: var(--font-mono);
  font-weight: 700; font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.num-info { min-width: 0; }
.num-phone {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(17px, 2.6vw, 22px);
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  word-break: break-all;
}
.vip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: var(--grad-vip);
  color: #1a1304;
  border-radius: 999px;
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.num-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
  margin-top: 6px;
}
.num-meta span { display: inline-flex; align-items: center; gap: 4px; }
.num-meta .pat-tag {
  font-family: var(--font-mono);
  background: rgba(96, 165, 250, 0.1);
  color: var(--blue-300);
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--border);
}

.num-price { text-align: right; flex-shrink: 0; min-width: 90px; }
.price-main {
  font-weight: 700; font-size: 18px;
  color: var(--blue-300);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.price-old {
  font-size: 13px; color: var(--text-dim);
  text-decoration: line-through;
  font-family: var(--font-mono);
  margin-bottom: 2px;
}
.price-discount-badge {
  display: inline-block; margin-top: 4px;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Sifariş et düyməsi */
.num-action { display: flex; align-items: center; flex-shrink: 0; }
.btn-order {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(59, 130, 246, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-order:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(59, 130, 246, 0.75); filter: brightness(1.08); }
.btn-order:active { transform: translateY(0); }
.btn-order:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; filter: grayscale(0.4); }
.btn-order svg { width: 15px; height: 15px; }

/* Responsiv: tablet */
@media (max-width: 820px) {
  .num-card {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "badge info price"
      "action action action";
    gap: 14px 16px;
  }
  .op-badge { grid-area: badge; }
  .num-info { grid-area: info; }
  .num-price { grid-area: price; }
  .num-action { grid-area: action; }
  .btn-order { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }
}

/* Responsiv: mobil */
@media (max-width: 560px) {
  .num-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "badge info"
      "price price"
      "action action";
    padding: 14px 14px;
    gap: 12px;
  }
  .num-price { text-align: left; padding-top: 6px; border-top: 1px dashed var(--border); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .price-old { margin-bottom: 0; }
  .op-badge { width: 44px; height: 44px; font-size: 12px; }
  .num-phone { font-size: 19px; }
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty {
  margin-top: 36px;
  text-align: center;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  color: var(--blue-400);
}
.empty-icon svg { width: 28px; height: 28px; }
.empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty p { font-size: 14px; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  margin-top: 48px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
.footer .container { padding-top: 0; padding-bottom: 0; }

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.num-card:nth-child(1) { animation-delay: 0.02s; }
.num-card:nth-child(2) { animation-delay: 0.04s; }
.num-card:nth-child(3) { animation-delay: 0.06s; }
.num-card:nth-child(4) { animation-delay: 0.08s; }
.num-card:nth-child(5) { animation-delay: 0.10s; }
.num-card:nth-child(6) { animation-delay: 0.12s; }
.num-card:nth-child(n+7) { animation-delay: 0.14s; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: rgba(96, 165, 250, 0.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(96, 165, 250, 0.4); }

/* ── Ümumi responsiv ─────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .container { padding: 0 18px; }
  .header-inner { padding: 14px 18px; }
  .main { padding-top: 36px; }
  .hero { margin-bottom: 28px; }
  .hero p { font-size: 15px; }
  .card { padding: 22px; }
  .results-head { margin-top: 28px; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 560px) {
  .container { padding: 0 14px; }
  .header-inner { padding: 12px 14px; }
  .logo { gap: 10px; }
  .logo-mark { width: 36px; height: 36px; border-radius: 10px; }
  .logo-mark svg { width: 18px; height: 18px; }
  .logo-title { font-size: 15px; }
  .logo-sub { font-size: 11px; }
  .ext-link { padding: 6px 10px; font-size: 12px; }
  .main { padding-top: 24px; }
  .hero { margin-bottom: 20px; }
  .hero h1 { margin-bottom: 12px; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .field { margin-bottom: 18px; }
  .field input { padding: 12px 14px; font-size: 14px; }
  .actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .actions .btn-primary, .actions .btn-ghost { width: 100%; padding: 13px 18px; }
  .chip { padding: 8px 12px; font-size: 13px; }
  .results-head { padding: 0; }
  .results-count { font-size: 18px; }
  .sort-info { font-size: 11px; }
  .status { padding: 14px 14px; gap: 12px; flex-wrap: wrap; }
  .btn-stop span { display: none; }
  .btn-stop { padding: 8px 10px; }
}

@media (max-width: 380px) {
  .num-phone { font-size: 17px; gap: 8px; }
  .op-badge { width: 40px; height: 40px; font-size: 11px; }
}
