/* =============================================================
   NextShot Links Hub — style.css
   الأسلوب: COD Loadout / Tactical HUD  (أسود · أحمر · عاجي)
   ============================================================= */

/* خط الهوية الرسمي (Ab Snasm) — ضع الملف في public/fonts/ ليُفعّل تلقائيًا.
   إن لم يوجد، يرجع النظام لخط Cairo دون أي خطأ. */
@font-face {
  font-family: 'Snasm';
  src: url('/fonts/snasm.woff2') format('woff2'),
       url('/fonts/snasm.woff')  format('woff');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* ألوان الهوية الرسمية لـ NextShot */
  --void:   #000000;   /* أسود الهوية */
  --panel:  #0C0C0E;
  --panel-2:#131316;
  --steel:  #232327;
  --line:   rgba(255,255,255,.07);
  --blood:  #D91B1B;   /* الأحمر */
  --ember:  #FF2A1B;   /* الأحمر البرتقالي (وهج/تحديد) */
  --maroon: #580C0C;   /* العنابي الداكن */
  --bone:   #FFFFFF;   /* الأبيض */
  --ash:    #9A9AA1;
  --ash-dim:#5C5C63;

  /* الخطوط */
  --f-display: 'Snasm', 'Chakra Petch', 'Cairo', sans-serif;
  --f-body:    'Snasm', 'Cairo', 'Chakra Petch', sans-serif;
  --f-mono:    'Chakra Petch', ui-monospace, monospace;

  --radius: 4px;
  --maxw: 620px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-body);
  background: var(--void);
  color: var(--bone);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
  position: relative;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ---------- طبقات الخلفية ---------- */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.bg-grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 85%);
  opacity: .6;
}

.bg-glow {
  background:
    radial-gradient(70% 50% at 50% -8%, rgba(88,12,12,.55), transparent 62%),
    radial-gradient(55% 42% at 50% -2%, rgba(217,27,27,.30), transparent 60%),
    radial-gradient(40% 30% at 88% 16%, rgba(255,42,27,.12), transparent 60%),
    radial-gradient(55% 45% at 0% 66%, rgba(88,12,12,.35), transparent 60%);
}

.bg-scan {
  background: repeating-linear-gradient(
    0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 3px
  );
  opacity: .5;
}

.bg-noise { opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- الحاوية ---------- */
.hub {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 18px 120px;
}

/* ---------- الهيدر HUD ---------- */
.hud { text-align: center; margin-bottom: 30px; }

.reticle {
  position: relative;
  width: 96px; height: 96px;
  margin: 6px auto 18px;
  display: grid; place-items: center;
}
.reticle-bracket {
  position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--blood);
  filter: drop-shadow(0 0 6px rgba(217,27,27,.6));
  animation: pulseBracket 3.6s ease-in-out infinite;
}
.reticle-bracket.tl { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle-bracket.tr { top: 0; left: 0;  border-right: 0; border-bottom: 0; }
.reticle-bracket.bl { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.reticle-bracket.br { bottom: 0; left: 0;  border-right: 0; border-top: 0; }

.logo {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-weight: 700; font-size: 24px; letter-spacing: 1px;
  color: var(--bone);
  background: linear-gradient(150deg, var(--panel-2), #0d0e12);
  border: 1px solid rgba(217,27,27,.5);
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%);
  box-shadow: inset 0 0 18px rgba(217,27,27,.18), 0 0 22px rgba(217,27,27,.25);
  object-fit: cover;
}
img.logo { padding: 0; }

.brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(34px, 9vw, 52px);
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 25%, #cfd1d6 60%, #8f9198 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.6));
}
.brand::after {
  content: ""; display: block;
  width: 54px; height: 3px; margin: 12px auto 0;
  background: var(--blood);
  box-shadow: 0 0 12px var(--ember);
}

.tagline {
  margin-top: 12px;
  color: var(--ash);
  font-size: 14.5px;
  font-weight: 600;
}

.statusbar {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  font-family: var(--f-mono);
  font-size: 11.5px; letter-spacing: 1.5px;
  color: var(--ash);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 40px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #35e06b; box-shadow: 0 0 8px #35e06b;
  animation: blink 2s ease-in-out infinite;
}
.status-text { color: #35e06b; font-weight: 600; }
.status-sep { color: var(--ash-dim); }
.status-code { color: var(--ash-dim); }

/* ---------- عناوين الأقسام ---------- */
.section { margin-top: 30px; }
.section-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.section-tag {
  font-family: var(--f-mono);
  font-size: 12px; letter-spacing: 2px;
  color: var(--blood); font-weight: 600;
  white-space: nowrap;
}
.section-title {
  font-family: var(--f-display);
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  color: var(--bone); white-space: nowrap;
}
.section-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- شريط التنويه العلوي (Ticker) ---------- */
.ticker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.ticker:empty { display: none; }

.notice {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: linear-gradient(90deg, rgba(217,27,27,.14), rgba(88,12,12,.10) 60%, transparent);
  border: 1px solid rgba(217,27,27,.4);
  border-right: 3px solid var(--ember);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  overflow: hidden;
  text-decoration: none; color: inherit;
}
.notice::before { /* وميض مسح خفيف */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,42,27,.12), transparent);
  transform: translateX(-100%);
  animation: noticeSheen 5.5s ease-in-out infinite;
}
.notice .n-ic {
  flex: 0 0 auto; width: 22px; height: 22px; color: var(--ember);
  display: grid; place-items: center;
  filter: drop-shadow(0 0 6px rgba(255,42,27,.5));
}
.notice .n-ic svg { width: 100%; height: 100%; }
.notice .n-ic .emoji { font-size: 18px; }
.notice .n-text { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; }
.notice.link-notice .n-cta {
  flex: 0 0 auto; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 1px;
  color: var(--ember); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.notice .n-cta svg { width: 13px; height: 13px; transform: scaleX(-1); }
.notice .n-dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 8px var(--ember);
  animation: blink 1.8s ease-in-out infinite;
}
a.notice { transition: border-color .18s, transform .18s; }
a.notice:hover { transform: translateX(-3px); border-color: var(--ember); }

/* لون بديل حسب النوع */
.notice.acc-support { border-color: rgba(53,224,107,.4); border-right-color:#35e06b; background: linear-gradient(90deg, rgba(53,224,107,.12), transparent); }
.notice.acc-support .n-ic, .notice.acc-support .n-cta { color:#35e06b; filter: drop-shadow(0 0 6px rgba(53,224,107,.4)); }
.notice.acc-support .n-dot { background:#35e06b; box-shadow:0 0 8px #35e06b; }

/* ---------- قسم العروض والإعلانات ---------- */
.offers { display: grid; grid-template-columns: 1fr; gap: 12px; }
.offer-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(217,27,27,.16), transparent 55%),
    linear-gradient(160deg, var(--panel-2), #0a0a0c);
  border: 1px solid rgba(217,27,27,.32);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  overflow: hidden;
}
.offer-card::after { /* شريط زاوية علوي */
  content: ""; position: absolute; top: 0; right: 0;
  width: 46px; height: 3px; background: var(--ember);
  box-shadow: 0 0 12px var(--ember);
}
.offer-top { display: flex; align-items: center; gap: 10px; }
.offer-ic {
  flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--ember); background: rgba(217,27,27,.10);
  border: 1px solid rgba(217,27,27,.3); border-radius: 6px;
}
.offer-ic svg { width: 22px; height: 22px; }
.offer-ic .emoji { font-size: 22px; }
.offer-title { font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: .3px; flex: 1; }
.offer-badge {
  flex: 0 0 auto; font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px;
  padding: 3px 9px; color: #fff; background: linear-gradient(135deg, var(--ember), var(--blood));
  border-radius: 40px; text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(217,27,27,.4);
}
.offer-body { color: var(--ash); font-size: 13.5px; line-height: 1.6; }
.offer-cta {
  align-self: flex-start; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--ember), var(--blood));
  color: #fff; text-decoration: none;
  font-family: var(--f-display); font-weight: 700; font-size: 14px;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.offer-cta svg { width: 15px; height: 15px; transform: scaleX(-1); }
.offer-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(217,27,27,.4); filter: brightness(1.08); }

@keyframes noticeSheen { 0%,70%{ transform: translateX(-100%) } 100%{ transform: translateX(100%) } }

/* ---------- بطاقات مميّزة (Featured) ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.feat-card {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 16px;
  min-height: 120px;
  background: linear-gradient(155deg, var(--panel-2), #0e0f13);
  border: 1px solid rgba(217,27,27,.35);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 88% 100%, 0 100%);
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feat-card::before { /* توهج زاوية */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 100% 0%, rgba(217,27,27,.18), transparent 60%);
  opacity: .8; transition: opacity .2s;
}
.feat-card .ic { width: 34px; height: 34px; color: var(--blood); position: relative; z-index: 1; }
.feat-card .ic svg, .feat-card .ic img { width: 100%; height: 100%; object-fit: contain; }
.feat-card .ic .emoji { font-size: 30px; line-height: 34px; }
.feat-title {
  font-family: var(--f-display); font-weight: 600; font-size: 16.5px;
  position: relative; z-index: 1;
}
.feat-desc { color: var(--ash); font-size: 12.5px; position: relative; z-index: 1; }
.feat-card .go {
  position: absolute; bottom: 12px; left: 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px;
  color: var(--blood); z-index: 1;
}
.feat-card:hover, .feat-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--ember);
  box-shadow: 0 10px 30px rgba(217,27,27,.22);
}
.feat-card:hover::before { opacity: 1; }

/* ---------- بطاقات الروابط (Loadout rows) ---------- */
.links-list { display: flex; flex-direction: column; gap: 11px; }

.link-card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, background .2s ease;
}
/* أقواس زاوية الاستهداف */
.link-card .corner {
  position: absolute; width: 10px; height: 10px;
  border-color: var(--blood); opacity: 0; transition: opacity .18s;
}
.link-card .corner.t { top: 7px; right: 7px; border-top: 2px solid; border-right: 2px solid; }
.link-card .corner.b { bottom: 7px; left: 7px; border-bottom: 2px solid; border-left: 2px solid; }
/* خط المسح */
.link-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px;
  right: -30%;
  background: linear-gradient(180deg, transparent, var(--ember), transparent);
  box-shadow: 0 0 12px var(--ember);
  opacity: 0;
  transition: opacity .2s;
}

.link-ic {
  flex: 0 0 46px; width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--bone);
}
.link-ic svg, .link-ic img { width: 24px; height: 24px; object-fit: contain; }
.link-ic .emoji { font-size: 24px; line-height: 1; }

.link-meta { flex: 1; min-width: 0; }
.link-title {
  font-family: var(--f-display); font-weight: 600; font-size: 16px;
  letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.link-desc {
  color: var(--ash); font-size: 12.5px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.link-open {
  flex: 0 0 auto;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 1px;
  color: var(--ash);
  display: flex; align-items: center; gap: 6px;
  transition: color .18s, transform .18s;
}
.link-open svg { width: 16px; height: 16px; transform: scaleX(-1); }

.link-card:hover, .link-card:focus-visible {
  transform: translateX(-4px);
  border-color: rgba(217,27,27,.55);
  background: linear-gradient(180deg, #15161c, #101116);
}
.link-card:hover .corner, .link-card:focus-visible .corner { opacity: 1; }
.link-card:hover .link-open, .link-card:focus-visible .link-open { color: var(--ember); }
.link-card:hover::after { opacity: 1; animation: scanSweep .7s ease forwards; }

/* ---------- الفوتر ---------- */
.foot { margin-top: 46px; text-align: center; }
.foot-line { display: block; width: 100%; height: 1px; background: var(--line); margin-bottom: 16px; }
.foot p { color: var(--ash-dim); font-size: 12.5px; font-family: var(--f-mono); letter-spacing: .5px; }

/* ---------- زر واتساب ثابت ---------- */
.wa-fab {
  position: fixed; z-index: 20;
  bottom: calc(18px + env(safe-area-inset-bottom)); left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: #1faa52;
  color: #fff; text-decoration: none;
  font-family: var(--f-display); font-weight: 600; font-size: 14px;
  border-radius: 40px;
  box-shadow: 0 8px 24px rgba(31,170,82,.4);
  transition: transform .18s, box-shadow .18s;
}
.wa-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 30px rgba(31,170,82,.5); }
.wa-fab svg { flex: 0 0 auto; }

/* ---------- حالة التحميل ---------- */
.loading {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 50px 0; color: var(--ash); font-family: var(--f-mono); font-size: 13px; letter-spacing: 1px;
}
.loading-bar {
  width: 120px; height: 3px; background: var(--steel); overflow: hidden; position: relative;
}
.loading-bar::before {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: var(--blood); box-shadow: 0 0 10px var(--ember);
  animation: loadSlide 1s ease-in-out infinite;
}
.empty { text-align: center; color: var(--ash-dim); padding: 40px 0; font-family: var(--f-mono); }

/* ---------- أنيميشن ---------- */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.35} }
@keyframes pulseBracket { 0%,100%{opacity:1} 50%{opacity:.45} }
@keyframes scanSweep { from{right:-30%} to{right:110%} }
@keyframes loadSlide { 0%{right:-40%} 100%{right:110%} }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ظهور متدرّج للعناصر عند التحميل */
.reveal { opacity: 0; animation: riseIn .5s ease forwards; }

/* ---------- شاشات صغيرة جدًا ---------- */
@media (max-width: 380px) {
  .featured-grid { grid-template-columns: 1fr; }
  .link-open span { display: none; }
}

/* ---------- احترام تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}

/* ---------- تركيز لوحة المفاتيح ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}
