/* ===========================================================
   TestDZ — لوحة قياس / Diagnostic instrument
   اتجاه التصميم: جهاز تشخيص دقيق، طيف إشارة (teal→blue→violet)
   =========================================================== */

:root {
  /* الخلفيات — نافي عميق ماشي أسود قاتح */
  --bg:        #0B1220;
  --panel:     #131C2E;
  --surface:   #1B273D;
  --surface-2: #223150;
  --line:      #2A3A57;

  /* النصوص */
  --ink:    #E8EEF7;
  --muted:  #8595AD;
  --faint:  #5A6B86;

  /* طيف الإشارة (يخدم في العدّاد) */
  --c-low:  #2DD4BF;   /* teal — سرعة منخفضة */
  --c-mid:  #3B82F6;   /* blue — متوسطة */
  --c-high: #8B5CF6;   /* violet — عالية */

  /* العمل / CTA — كهرماني دافئ ضد الأزرق البارد */
  --go:      #F5A524;
  --go-ink:  #1A1206;

  --ok:    #2DD4BF;
  --warn:  #F5A524;
  --bad:   #F4516C;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.7);

  --font: 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 50% -10%, #16223a 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== الهيدر ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,18,32,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.logo .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-low), var(--c-high));
  box-shadow: 0 0 16px var(--c-mid);
}
.logo b { color: var(--go); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted);
  font-weight: 500; font-size: .95rem; transition: .2s;
}
.nav a:hover, .nav a.active { color: var(--ink); background: var(--surface); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }

/* ===== الهيرو + العدّاد ===== */
.hero { padding: 40px 0 20px; text-align: center; }
.isp-line {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px;
  font-size: .9rem; color: var(--muted); margin-bottom: 22px;
}
.isp-line .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--c-low);
  box-shadow: 0 0 0 0 rgba(45,212,191,.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45,212,191,.5); }
  70% { box-shadow: 0 0 0 10px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}

/* العدّاد — العنصر المميّز */
.gauge-zone { display: flex; flex-direction: column; align-items: center; }
.gauge { position: relative; width: 340px; max-width: 86vw; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge .readout {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
  padding-top: 8%;
}
.gauge .readout .value {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.gauge .readout .unit { color: var(--muted); font-size: 1rem; margin-top: 4px; letter-spacing: 1px; }
.gauge .readout .phase {
  margin-top: 10px; font-size: .9rem; color: var(--faint);
  min-height: 1.2em;
}

/* زر GO داخل القرص */
.go-btn {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffce6e, var(--go));
  color: var(--go-ink); border: 0; cursor: pointer;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.5rem;
  box-shadow: 0 10px 30px -6px rgba(245,165,36,.6), inset 0 -3px 8px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .2s;
  animation: breathe 3s ease-in-out infinite;
}
.go-btn:hover { transform: translateX(-50%) scale(1.05); }
.go-btn:active { transform: translateX(-50%) scale(.96); }
.go-btn:disabled { opacity: .45; cursor: default; animation: none; }
@keyframes breathe {
  0%,100% { box-shadow: 0 10px 30px -6px rgba(245,165,36,.5); }
  50% { box-shadow: 0 10px 40px -2px rgba(245,165,36,.85); }
}
.go-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* بطاقات القياس الثلاثة */
.stats { display: flex; gap: 14px; justify-content: center; margin: 28px 0 8px; flex-wrap: wrap; }
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 22px; min-width: 150px;
}
.stat .lbl { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 6px; justify-content: center; }
.stat .num {
  font-family: var(--font-mono); font-size: 1.9rem; font-weight: 700;
  font-variant-numeric: tabular-nums; margin-top: 4px;
}
.stat .num small { font-size: .8rem; color: var(--muted); font-family: var(--font); margin-right: 4px; }
.stat.dl .num { color: var(--c-mid); }
.stat.ul .num { color: var(--c-high); }
.stat.png .num { color: var(--c-low); }

/* ===== شريط الأفلييت (VPN) ===== */
.affiliate {
  margin: 26px auto; max-width: 720px;
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; display: flex; align-items: center; gap: 16px;
  justify-content: space-between; flex-wrap: wrap;
}
.affiliate .txt b { display: block; font-size: 1.05rem; }
.affiliate .txt span { color: var(--muted); font-size: .92rem; }
.btn {
  display: inline-block; background: var(--go); color: var(--go-ink);
  font-weight: 700; padding: 12px 22px; border-radius: 999px;
  transition: .2s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }

/* ===== أماكن الإعلانات ===== */
.ad-slot {
  margin: 28px auto; max-width: 720px; min-height: 90px;
  background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 10px, #101829 10px, #101829 20px);
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: .85rem;
}

/* ===== الأقسام العامة ===== */
section { padding: 44px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.eyebrow { color: var(--go); font-weight: 700; letter-spacing: 1px; font-size: .85rem; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 10px; }
h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.lead { color: var(--muted); max-width: 620px; margin: 8px auto 0; }
p { color: #C7D2E4; margin-bottom: 14px; }

/* بطاقات المزودين */
.carriers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.carrier-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; text-align: center;
  transition: .2s; position: relative; overflow: hidden;
}
.carrier-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent, var(--c-mid));
}
.carrier-card:hover { transform: translateY(-4px); border-color: var(--accent, var(--c-mid)); }
.carrier-card .cn { font-weight: 800; font-size: 1.15rem; margin-bottom: 4px; }
.carrier-card .cd { color: var(--muted); font-size: .88rem; }
.carrier-card.djezzy  { --accent: #E2001A; }
.carrier-card.ooredoo { --accent: #ED1C24; }
.carrier-card.mobilis { --accent: #00A859; }
.carrier-card.idoom   { --accent: #0072BC; }

/* خطوات كيف يعمل */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.step .n {
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700;
  color: var(--go); border: 1px solid var(--line); border-radius: 8px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

/* جدول المقارنة */
.cmp-table { width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp-table th { background: var(--surface); color: var(--muted); font-weight: 600; font-size: .9rem; }
.cmp-table td { font-variant-numeric: tabular-nums; }
.cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table .cname { font-weight: 800; text-align: right; }
.cmp-table .big { font-family: var(--font-mono); font-weight: 700; color: var(--c-mid); }
.cmp-note { color: var(--faint); font-size: .82rem; text-align: center; margin-top: 12px; }

/* FAQ */
.faq-item { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--go); font-size: 1.4rem; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* ===== الفوتر ===== */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 30px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ===== هلال داكن للمقالات ===== */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 28px; }
.prose ul { margin: 0 22px 16px; color: #C7D2E4; }
.prose li { margin-bottom: 8px; }

/* ===== responsive ===== */
@media (max-width: 860px) {
  .carriers { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; background: var(--panel); padding: 12px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: block; }
  h1 { font-size: 1.6rem; }
  .gauge .readout .value { font-size: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
