/* ==========================================================================
   الصفحة العامة — ملف تحقيق أزرق
   الترتيب: المتغيّرات، الأساس، الزخارف، الهوية، المحتوى، التذييل، الاستجابة
   ========================================================================== */

:root {
  --ink: #01040e;
  --neon: #3b82ff;            /* يُستبدل من PHP بلون اللوحة */
  --neon-soft: #7db1ff;       /* يُستبدل من PHP */
  --live: #ff3d5f;
  --text: #dce9ff;
  --muted: #7d95c9;
  --line: rgba(59, 130, 255, 0.18);
  --surface: rgba(4, 10, 32, 0.6);
  --radius: 14px;
  --bg-opacity: 0.18;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Almarai", system-ui, sans-serif;
  font-weight: 300;
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 80% at 50% -10%, #0b1e57 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 110%, #071440 0%, transparent 65%),
    linear-gradient(180deg, #02071a 0%, var(--ink) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* ---------- الطبقات الخلفية ---------- */

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  opacity: var(--bg-opacity);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 45%, transparent 0%, #000 100%);
          mask-image: radial-gradient(70% 55% at 50% 45%, transparent 0%, #000 100%);
}

.motifs { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.motifs svg { position: absolute; fill: none; stroke: var(--neon); stroke-width: 1.1; opacity: 0.2; }

.m-print  { inset-inline-end: -190px; top: 34%; width: 520px; height: 520px; opacity: 0.09; }
.m-lens   { inset-inline-end: 6%;  top: 16%;    width: 90px;  height: 90px; }
.m-bow    { inset-inline-start: 6%; top: 9%;    width: 78px;  height: 78px;  opacity: 0.16; }
.m-specs  { inset-inline-end: 7%;  bottom: 27%; width: 76px;  height: 76px;  opacity: 0.16; }
.m-watch  { inset-inline-end: 5%;  bottom: 9%;  width: 120px; height: 120px; opacity: 0.14; }
.m-target { inset-inline-start: 4%; top: 38%;   width: 58px;  height: 58px; }
.m-hex    { inset-inline-start: -14px; top: 4%; width: 120px; height: 120px; opacity: 0.13; }
.m-steps  { inset-inline-end: 4%;  top: 54%;    width: 46px;  height: 120px; opacity: 0.15; }
.m-steps2 { inset-inline-start: 10%; bottom: 6%; width: 40px; height: 105px; opacity: 0.1; }

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 0%, transparent 100%);
          mask-image: radial-gradient(80% 60% at 50% 40%, #000 0%, transparent 100%);
}

.frame {
  position: fixed;
  inset: 14px;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 6px;
  pointer-events: none;
}
.frame i { position: absolute; width: 34px; height: 34px; border: 1px solid var(--neon); opacity: 0.55; }
.frame i:nth-child(1) { inset-block-start: -1px; inset-inline-end: -1px; border-inline-start: 0; border-block-end: 0; }
.frame i:nth-child(2) { inset-block-start: -1px; inset-inline-start: -1px; border-inline-end: 0; border-block-end: 0; }
.frame i:nth-child(3) { inset-block-end: -1px; inset-inline-end: -1px; border-inline-start: 0; border-block-start: 0; }
.frame i:nth-child(4) { inset-block-end: -1px; inset-inline-start: -1px; border-inline-end: 0; border-block-start: 0; }

/* ---------- الهيكل ---------- */

main {
  position: relative;
  z-index: 3;
  max-width: 520px;
  margin: 0 auto;
  padding: 46px 26px 40px;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.eyebrow b { font-weight: 400; color: var(--neon-soft); }
.eyebrow .rule { width: 34px; height: 1px; background: var(--neon); opacity: 0.35; }

/* ---------- بطاقة الهوية ---------- */

.identity { position: relative; padding: 6px 0 4px; text-align: center; cursor: crosshair; }

.avatar-wrap { position: relative; width: 118px; height: 118px; margin: 0 auto 20px; }
.ring-outer { position: absolute; inset: -19px; border: 1px solid rgba(59, 130, 255, 0.16); border-radius: 50%; }
.ring-dashed {
  position: absolute;
  inset: -9px;
  border: 1px dashed rgba(125, 177, 255, 0.45);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  overflow: hidden;
  border: 1px solid rgba(125, 177, 255, 0.5);
  border-radius: 50%;
  background: linear-gradient(160deg, #0c1c4d, #040a20);
  box-shadow: 0 0 34px rgba(59, 130, 255, 0.28), inset 0 0 24px rgba(59, 130, 255, 0.12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 48px; height: 48px; fill: none; stroke: var(--neon-soft); stroke-width: 1.2; opacity: 0.75; }

h1 {
  margin: 0 0 8px;
  font-family: "Reem Kufi", sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.25;
  color: #eaf2ff;
  text-shadow: 0 0 26px rgba(59, 130, 255, 0.45);
}
.handle {
  margin: 0 0 12px;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--neon-soft);
}
.bio { max-width: 330px; margin: 0 auto; font-size: 14.5px; line-height: 1.9; color: var(--muted); }

/* العدسة المكبّرة */
.reveal {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-mask-image: radial-gradient(circle 78px at var(--x, 50%) var(--y, 50%), #000 0 66px, transparent 78px);
          mask-image: radial-gradient(circle 78px at var(--x, 50%) var(--y, 50%), #000 0 66px, transparent 78px);
}
.reveal-card {
  padding: 16px 20px;
  border: 1px solid rgba(59, 130, 255, 0.35);
  border-radius: 10px;
  background: rgba(1, 6, 22, 0.92);
  font-family: "Share Tech Mono", monospace;
  font-size: 12.5px;
  line-height: 2.1;
  color: var(--neon-soft);
}
.reveal-card span { display: block; }
.reveal-card b { font-weight: 400; color: #fff; }

.lens {
  position: absolute;
  width: 156px;
  height: 156px;
  border: 1px solid rgba(125, 177, 255, 0.75);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  box-shadow:
    0 0 0 6px rgba(4, 10, 30, 0.5),
    0 0 30px rgba(59, 130, 255, 0.35),
    inset 0 0 30px rgba(59, 130, 255, 0.15);
}
.identity.is-lens .reveal,
.identity.is-lens .lens { opacity: 1; }

/* ---------- الحالة والأرقام ---------- */

.status { display: flex; justify-content: center; margin: 22px 0 30px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 61, 95, 0.45);
  border-radius: 100px;
  background: rgba(255, 61, 95, 0.08);
  font-family: "Share Tech Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: #ffd7de;
}
.badge-off { border-color: rgba(125, 177, 255, 0.3); background: rgba(59, 130, 255, 0.06); color: var(--muted); }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 2s infinite;
}
.badge-off .dot { background: var(--muted); animation: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 61, 95, 0.6); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 61, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 61, 95, 0); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1px;
  margin-bottom: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.stat { padding: 16px 8px; background: var(--surface); text-align: center; }
.stat b {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: 19px;
  color: #fff;
}
.stat span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* ---------- الروابط ---------- */

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--neon), transparent);
  opacity: 0.4;
}

.links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 34px; }

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(10, 24, 64, 0.65), rgba(5, 12, 36, 0.5));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 255, 0.14), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.link > * { position: relative; z-index: 1; }
.link:hover,
.link:focus-visible {
  transform: translateX(-4px);
  border-color: rgba(125, 177, 255, 0.5);
  box-shadow: 0 0 24px rgba(59, 130, 255, 0.16);
  outline: none;
}
.link:focus-visible { box-shadow: 0 0 0 2px rgba(125, 177, 255, 0.45); }
.link:hover::before { transform: translateX(120%); }

.link-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border: 1px solid rgba(59, 130, 255, 0.28);
  border-radius: 11px;
  background: rgba(1, 7, 26, 0.7);
}
.link-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--neon-soft);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.link:hover .link-icon svg { stroke: #fff; }

.link-text { flex: 1; min-width: 0; }
.link-text b { display: block; font-family: "Reem Kufi", sans-serif; font-weight: 500; font-size: 15.5px; }
.link-text span {
  display: block;
  margin-top: 3px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  color: var(--muted);
}

.chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  transition: transform 0.18s ease, stroke 0.18s ease;
}
.link:hover .chevron { stroke: var(--neon-soft); transform: translateX(-3px); }

/* ---------- بطاقة الدعم ---------- */

.support {
  --gold: #ffb648;
  position: relative;
  margin-bottom: 34px;
  padding: 26px 22px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 182, 72, 0.32);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 182, 72, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, rgba(30, 22, 8, 0.55), rgba(5, 12, 36, 0.5));
  text-align: center;
}
.support::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.support-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 182, 72, 0.4);
  border-radius: 13px;
  background: rgba(255, 182, 72, 0.1);
}
.support-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support h3 {
  margin: 0 0 8px;
  font-family: "Reem Kufi", sans-serif;
  font-weight: 500;
  font-size: 19px;
  color: #ffe9c4;
}
.support-text {
  max-width: 330px;
  margin: 0 auto 20px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.support-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  background: linear-gradient(90deg, #ffb648, #ff9a2e);
  color: #2a1a02;
  font-family: "Reem Kufi", sans-serif;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(255, 154, 46, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.support-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}
.support-button:hover,
.support-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 154, 46, 0.36);
  outline: none;
}
.support-button:focus-visible { box-shadow: 0 0 0 3px rgba(255, 182, 72, 0.5); }
.support-button:hover svg { transform: translateX(-3px); }

.support-note {
  margin: 14px 0 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #8c7a5c;
}

/* ---------- الجدول ---------- */

.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 34px;
}
.day {
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 10, 32, 0.5);
  text-align: center;
}
.day b { display: block; font-family: "Reem Kufi", sans-serif; font-weight: 500; font-size: 14px; color: #e7efff; }
.day span {
  display: block;
  margin-top: 5px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  color: var(--muted);
}
.day-rest span { color: #4d5f88; }
.day-today {
  border-color: rgba(125, 177, 255, 0.55);
  background: rgba(59, 130, 255, 0.1);
  box-shadow: 0 0 20px rgba(59, 130, 255, 0.14);
}
.day-today b { color: #fff; }

/* ---------- التذييل ---------- */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.clock { display: flex; align-items: center; gap: 10px; }
.clock svg { width: 38px; height: 38px; fill: none; stroke: rgba(125, 177, 255, 0.6); stroke-width: 1.1; }
.clock .hand { stroke: var(--neon-soft); stroke-linecap: round; transform-origin: 24px 24px; }
.clock-text {
  margin: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.clock-text b { display: block; font-weight: 400; font-size: 13px; color: var(--neon-soft); }

.copy {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.copy:hover,
.copy:focus-visible { border-color: rgba(125, 177, 255, 0.5); color: #fff; outline: none; }
.copy.is-done { border-color: rgba(138, 255, 192, 0.4); color: #8affc0; }

/* ---------- الاستجابة وإمكانية الوصول ---------- */

@media (max-width: 400px) {
  main { padding: 34px 18px 32px; }
}

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