/* ==========================================================
   DP Links — single stylesheet. Mobile-first, RTL-aware
   (uses logical properties: margin-inline, padding-inline…).
   ========================================================== */

:root {
  --bg: #0b1120;
  --bg-2: #111a2e;
  --card: #141f36;
  --line: #24314f;
  --text: #e6ebf5;
  --muted: #93a0b8;
  --primary: #4f8cff;
  --primary-2: #6aa0ff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 50% -200px, #1b2a4d 0%, var(--bg) 60%) fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 32, 0.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff; font-size: 0.95rem;
}
[dir="rtl"] .brand-mark { transform: scaleX(-1); }
.nav { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; }
.nav a { color: var(--muted); }

.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; flex: 1; }
.container.narrow { max-width: 640px; }

.footer {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  padding: 20px; color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--line);
}
.footer a { color: var(--muted); }

/* ---------- typography ---------- */
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hero { text-align: center; margin: 12px 0 24px; }
.center { text-align: center; }
.big-icon { font-size: 3rem; opacity: 0.6; }

/* ---------- card ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field > label { font-size: 0.9rem; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.advanced { margin-bottom: 14px; }
.advanced summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; user-select: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; border-radius: 10px; padding: 11px 18px;
  border: 1px solid transparent; cursor: pointer; transition: background 0.15s, opacity 0.15s;
  white-space: nowrap; color: var(--text);
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--primary-2); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- alerts / badges ---------- */
.alert { border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; font-size: 0.92rem; }
.alert-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.4); color: #fecaca; }
.alert-ok { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.4); color: #bbf7d0; }
.alert-warn { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); color: #fde68a;
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; margin-top: 6px; }
.badge-ok { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.badge-info { background: rgba(147, 160, 184, 0.12); color: var(--muted); }

/* ---------- result + history ---------- */
.result { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.result-row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.result-row input { flex: 1 1 220px; font-weight: 600; }
.history { list-style: none; margin: 0; padding: 0; }
.history-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line);
}
.history-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.history-main a { font-weight: 600; direction: ltr; unicode-bidi: plaintext; }
.history-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-clicks { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* ---------- bridge page ---------- */
.bridge-card { text-align: center; }
.bridge-title { font-size: clamp(1.25rem, 3.5vw, 1.6rem); }
.dest {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 14px 0 18px;
}
.dest strong { font-size: 1.1rem; word-break: break-all; }
.dest-title { color: var(--text); opacity: 0.85; }
.countdown { margin-bottom: 14px; }
.count {
  font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--primary-2), #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.progress { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #8b5cf6); transition: width 0.1s linear; }
[dir="rtl"] .progress-bar { margin-inline-start: auto; background: linear-gradient(270deg, var(--primary), #8b5cf6); }
.status { color: var(--muted); min-height: 1.6em; margin: 10px 0 0; }
.status.is-error { color: #fca5a5; }
.verify { display: flex; justify-content: center; margin: 6px 0 14px; min-height: 0; }
.bridge-card.is-ready .count { color: var(--ok); background: none; }
.manual { display: block; margin-top: 12px; font-size: 0.9rem; }
.offer { margin: 0 0 14px; }

/* Ad zones — class names avoid "ad" keywords on purpose (see ads.js). */
.zone { display: flex; justify-content: center; margin: 0 0 18px; min-height: 50px; }
.zone-demo {
  display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px;
  color: var(--muted); font-size: 0.85rem; background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(255,255,255,0.02) 10px 20px);
}
.zone-house {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; max-width: 728px;
  padding: 14px; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(79,140,255,0.15), rgba(139,92,246,0.15)); color: var(--text);
}
.zone-house:hover { text-decoration: none; border-color: var(--primary); }
.zone-house span { color: var(--muted); font-size: 0.9rem; }

/* ---------- prose (legal pages) ---------- */
.prose h2 { margin-top: 22px; margin-bottom: 6px; }
.prose ul { padding-inline-start: 22px; }
